Download annotations/annotation_39/function_info.json from mcy98/RECODE-H: direct link, hf CLI and curl.
- Browser
- Download file 6.64 kB
-
https://huggingface.co/datasets/mcy98/RECODE-H/resolve/main/annotations/annotation_39/function_info.json
- Command line
-
hf download hf://datasets/mcy98/RECODE-H/annotations/annotation_39/function_info.json
-
curl -L -o function_info.json https://huggingface.co/datasets/mcy98/RECODE-H/resolve/main/annotations/annotation_39/function_info.json
6.64 kB
| [ | |
| { | |
| "function_name": "__init__", | |
| "file_path": "data_augmentation.py::Random", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "Reorder", | |
| "functionality": "Creates a Reorder augmentation operator instance", | |
| "input": "rate_min, rate_max", | |
| "output": "Reorder instance", | |
| "location_or_namespace": "data_augmentation.py" | |
| }, | |
| { | |
| "function_call_name": "Substitute", | |
| "functionality": "Creates a Substitute augmentation operator instance", | |
| "input": "item_similarity_model, rate_min, rate_max", | |
| "output": "Substitute instance", | |
| "location_or_namespace": "data_augmentation.py" | |
| }, | |
| { | |
| "function_call_name": "print", | |
| "functionality": "Prints the number of augmentation methods", | |
| "input": "\"Total augmentation numbers: \", len(self.data_augmentation_methods)", | |
| "output": "None", | |
| "location_or_namespace": "builtins" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "__call__", | |
| "file_path": "data_augmentation.py::Random", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "random.randint", | |
| "functionality": "Randomly selects an index for augmentation method", | |
| "input": "0, len(self.data_augmentation_methods) - 1", | |
| "output": "int", | |
| "location_or_namespace": "random" | |
| }, | |
| { | |
| "function_call_name": "__call__", | |
| "functionality": "Applies the selected augmentation operator", | |
| "input": "sequence", | |
| "output": "augmented sequence, rate", | |
| "location_or_namespace": "data_augmentation.py (Reorder or Substitute)" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "_ensmeble_sim_models", | |
| "file_path": "data_augmentation.py", | |
| "function_calls": [] | |
| }, | |
| { | |
| "function_name": "__init__", | |
| "file_path": "data_augmentation.py::Substitute", | |
| "function_calls": [] | |
| }, | |
| { | |
| "function_name": "__call__", | |
| "file_path": "data_augmentation.py::Substitute", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "copy.deepcopy", | |
| "functionality": "Creates a deep copy of the input sequence", | |
| "input": "sequence", | |
| "output": "copied_sequence", | |
| "location_or_namespace": "copy" | |
| }, | |
| { | |
| "function_call_name": "np.random.uniform", | |
| "functionality": "Samples the substitute rate from a uniform distribution", | |
| "input": "low=self.rate_min, high=self.rate_max", | |
| "output": "float", | |
| "location_or_namespace": "numpy" | |
| }, | |
| { | |
| "function_call_name": "int", | |
| "functionality": "Converts substitute rate times sequence length to int", | |
| "input": "substitute_rate * len(copied_sequence)", | |
| "output": "int", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "max", | |
| "functionality": "Ensures at least one item is substituted", | |
| "input": "int(substitute_rate * len(copied_sequence)), 1", | |
| "output": "int", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "range", | |
| "functionality": "Generates list of possible indices for substitution", | |
| "input": "len(copied_sequence)", | |
| "output": "range object", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "random.sample", | |
| "functionality": "Randomly selects indices to substitute", | |
| "input": "list of indices, k=substitute_nums", | |
| "output": "list of int", | |
| "location_or_namespace": "random" | |
| }, | |
| { | |
| "function_call_name": "self.item_sim_model_1.most_similar", | |
| "functionality": "", | |
| "input": "copied_sequence[index], with_score=True", | |
| "output": "list of (item, score) tuples", | |
| "location_or_namespace": "" | |
| }, | |
| { | |
| "function_call_name": "self.item_sim_model_2.most_similar", | |
| "functionality": "", | |
| "input": "copied_sequence[index], with_score=True", | |
| "output": "list of (item, score) tuples", | |
| "location_or_namespace": "" | |
| }, | |
| { | |
| "function_call_name": "_ensmeble_sim_models", | |
| "functionality": "Selects the best substitute item from two similarity models", | |
| "input": "top_k_one, top_k_two", | |
| "output": "list of top item(s)", | |
| "location_or_namespace": "data_augmentation.py" | |
| }, | |
| { | |
| "function_call_name": "self.item_similarity_model.most_similar", | |
| "functionality": "", | |
| "input": "copied_sequence[index]", | |
| "output": "list of similar items", | |
| "location_or_namespace": "" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "__init__", | |
| "file_path": "data_augmentation.py::Reorder", | |
| "function_calls": [] | |
| }, | |
| { | |
| "function_name": "__call__", | |
| "file_path": "data_augmentation.py::Reorder", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "copy.deepcopy", | |
| "functionality": "Creates a deep copy of the input sequence", | |
| "input": "sequence", | |
| "output": "copied_sequence", | |
| "location_or_namespace": "copy" | |
| }, | |
| { | |
| "function_call_name": "np.random.uniform", | |
| "functionality": "Samples the reorder rate from a uniform distribution", | |
| "input": "low=self.rate_min, high=self.rate_max", | |
| "output": "float", | |
| "location_or_namespace": "numpy" | |
| }, | |
| { | |
| "function_call_name": "int", | |
| "functionality": "Converts reorder rate times sequence length to int", | |
| "input": "reorder_rate * len(copied_sequence)", | |
| "output": "int", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "random.randint", | |
| "functionality": "Randomly selects the start index for the sub-sequence", | |
| "input": "0, len(copied_sequence) - sub_seq_length - 1", | |
| "output": "int", | |
| "location_or_namespace": "random" | |
| }, | |
| { | |
| "function_call_name": "random.shuffle", | |
| "functionality": "Shuffles the sub-sequence in place", | |
| "input": "sub_seq", | |
| "output": "None", | |
| "location_or_namespace": "random" | |
| }, | |
| { | |
| "function_call_name": "assert", | |
| "functionality": "Ensures that the length of the output sequence matches the input", | |
| "input": "len(copied_sequence) == len(reordered_seq)", | |
| "output": "None or AssertionError", | |
| "location_or_namespace": "builtins" | |
| } | |
| ] | |
| } | |
| ] | |