|
|
|
@ -36,7 +36,7 @@ from .. import callback
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_imagefolderdatasetv2(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the original Dataset(ImageFolderDatasetV2)."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the original Dataset(ImageFolderDatasetV2)."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -62,7 +62,7 @@ def check_imagefolderdatasetv2(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_mnist_cifar_dataset(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the original Dataset(ManifestDataset, Cifar10/100Dataset)."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the original Dataset(ManifestDataset, Cifar10/100Dataset)."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -85,7 +85,7 @@ def check_mnist_cifar_dataset(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_manifestdataset(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the original Dataset(ManifestDataset)."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the original Dataset(ManifestDataset)."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -112,7 +112,7 @@ def check_manifestdataset(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_tfrecorddataset(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the original Dataset(TFRecordDataset)."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the original Dataset(TFRecordDataset)."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -138,7 +138,7 @@ def check_tfrecorddataset(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_vocdataset(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the original Dataset(VOCDataset)."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the original Dataset(VOCDataset)."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -179,7 +179,7 @@ def check_vocdataset(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_cocodataset(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the original Dataset(CocoDataset)."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the original Dataset(CocoDataset)."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -215,7 +215,7 @@ def check_cocodataset(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_celebadataset(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the original Dataset(CelebADataset)."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the original Dataset(CelebADataset)."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -251,7 +251,7 @@ def check_celebadataset(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_save(method):
|
|
|
|
|
"""A wrapper that wrap a parameter checker to the save op."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the saved operator."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -271,7 +271,7 @@ def check_save(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_minddataset(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the original Dataset(MindDataset)."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the original Dataset(MindDataset)."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -303,7 +303,7 @@ def check_minddataset(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_generatordataset(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the original Dataset(GeneratorDataset)."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the original Dataset(GeneratorDataset)."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -369,7 +369,7 @@ def check_generatordataset(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_random_dataset(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the original Dataset(RandomDataset)."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the original Dataset(RandomDataset)."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -794,7 +794,7 @@ def check_add_column(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_cluedataset(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the original Dataset(CLUEDataset)."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the original Dataset(CLUEDataset)."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -824,7 +824,7 @@ def check_cluedataset(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_csvdataset(method):
|
|
|
|
|
"""A wrapper that wrap a parameter checker to the original Dataset(CSVDataset)."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the original Dataset(CSVDataset)."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -871,7 +871,7 @@ def check_csvdataset(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_textfiledataset(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the original Dataset(TextFileDataset)."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the original Dataset(TextFileDataset)."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -964,7 +964,7 @@ def check_gnn_graphdata(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_gnn_get_all_nodes(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the GNN `get_all_nodes` function."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the GNN `get_all_nodes` function."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -977,7 +977,7 @@ def check_gnn_get_all_nodes(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_gnn_get_all_edges(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the GNN `get_all_edges` function."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the GNN `get_all_edges` function."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -990,7 +990,7 @@ def check_gnn_get_all_edges(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_gnn_get_nodes_from_edges(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the GNN `get_nodes_from_edges` function."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the GNN `get_nodes_from_edges` function."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -1003,7 +1003,7 @@ def check_gnn_get_nodes_from_edges(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_gnn_get_all_neighbors(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the GNN `get_all_neighbors` function."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the GNN `get_all_neighbors` function."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -1018,7 +1018,7 @@ def check_gnn_get_all_neighbors(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_gnn_get_sampled_neighbors(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the GNN `get_sampled_neighbors` function."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the GNN `get_sampled_neighbors` function."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -1046,7 +1046,7 @@ def check_gnn_get_sampled_neighbors(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_gnn_get_neg_sampled_neighbors(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the GNN `get_neg_sampled_neighbors` function."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the GNN `get_neg_sampled_neighbors` function."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -1062,7 +1062,7 @@ def check_gnn_get_neg_sampled_neighbors(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_gnn_random_walk(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the GNN `random_walk` function."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the GNN `random_walk` function."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -1110,7 +1110,7 @@ def check_aligned_list(param, param_name, member_type):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_gnn_get_node_feature(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the GNN `get_node_feature` function."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the GNN `get_node_feature` function."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -1132,7 +1132,7 @@ def check_gnn_get_node_feature(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_gnn_get_edge_feature(method):
|
|
|
|
|
"""A wrapper that wrap a parameter checker to the GNN `get_edge_feature` function."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the GNN `get_edge_feature` function."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -1154,7 +1154,7 @@ def check_gnn_get_edge_feature(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_numpyslicesdataset(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the original Dataset(NumpySlicesDataset)."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the original Dataset(NumpySlicesDataset)."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
@ -1195,17 +1195,17 @@ def check_numpyslicesdataset(method):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_paddeddataset(method):
|
|
|
|
|
"""A wrapper that wraps a parameter checker to the original Dataset(PaddedDataset)."""
|
|
|
|
|
"""A wrapper that wraps a parameter checker around the original Dataset(PaddedDataset)."""
|
|
|
|
|
|
|
|
|
|
@wraps(method)
|
|
|
|
|
def new_method(self, *args, **kwargs):
|
|
|
|
|
_, param_dict = parse_user_args(method, *args, **kwargs)
|
|
|
|
|
|
|
|
|
|
paddedSamples = param_dict.get("padded_samples")
|
|
|
|
|
if not paddedSamples:
|
|
|
|
|
padded_samples = param_dict.get("padded_samples")
|
|
|
|
|
if not padded_samples:
|
|
|
|
|
raise ValueError("Argument padded_samples cannot be empty")
|
|
|
|
|
type_check(paddedSamples, (list,), "padded_samples")
|
|
|
|
|
type_check(paddedSamples[0], (dict,), "padded_element")
|
|
|
|
|
type_check(padded_samples, (list,), "padded_samples")
|
|
|
|
|
type_check(padded_samples[0], (dict,), "padded_element")
|
|
|
|
|
return method(self, *args, **kwargs)
|
|
|
|
|
|
|
|
|
|
return new_method
|
|
|
|
|