Download annotations/annotation_17/function_info.json from mcy98/RECODE-H: direct link, hf CLI and curl.
- Browser
- Download file 6.61 kB
-
https://huggingface.co/datasets/mcy98/RECODE-H/resolve/main/annotations/annotation_17/function_info.json
- Command line
-
hf download hf://datasets/mcy98/RECODE-H/annotations/annotation_17/function_info.json
-
curl -L -o function_info.json https://huggingface.co/datasets/mcy98/RECODE-H/resolve/main/annotations/annotation_17/function_info.json
6.61 kB
| [ | |
| { | |
| "function_name": "collect_grads", | |
| "file_path": "collect_grad_reps.py", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "torch.random.manual_seed", | |
| "functionality": "Sets the seed for generating random numbers in PyTorch for reproducibility.", | |
| "input": "seed (int)", | |
| "output": "None", | |
| "location_or_namespace": "torch" | |
| }, | |
| { | |
| "function_call_name": "torch.stack", | |
| "functionality": "Concatenates a sequence of tensors along a new dimension.", | |
| "input": "sequence of tensors", | |
| "output": "stacked tensor", | |
| "location_or_namespace": "torch" | |
| }, | |
| { | |
| "function_call_name": "to", | |
| "functionality": "Casts a tensor to the specified type/device.", | |
| "input": "dtype, device, or both", | |
| "output": "converted tensor", | |
| "location_or_namespace": "torch.Tensor" | |
| }, | |
| { | |
| "function_call_name": "projector.project", | |
| "functionality": "Projects the input gradient tensor into a lower-dimensional subspace using a random projection matrix.", | |
| "input": "gradient tensor, model_id (int)", | |
| "output": "projected gradient tensor", | |
| "location_or_namespace": "trak.projectors.BasicProjector or CudaProjector" | |
| }, | |
| { | |
| "function_call_name": "cpu", | |
| "functionality": "Moves a tensor to CPU memory.", | |
| "input": "None", | |
| "output": "tensor on CPU", | |
| "location_or_namespace": "torch.Tensor" | |
| }, | |
| { | |
| "function_call_name": "torch.cat", | |
| "functionality": "Concatenates a sequence of tensors along an existing dimension.", | |
| "input": "sequence of tensors", | |
| "output": "concatenated tensor", | |
| "location_or_namespace": "torch" | |
| }, | |
| { | |
| "function_call_name": "os.path.join", | |
| "functionality": "Joins one or more path components intelligently.", | |
| "input": "directory path(s), file name(s)", | |
| "output": "joined path string", | |
| "location_or_namespace": "os" | |
| }, | |
| { | |
| "function_call_name": "torch.save", | |
| "functionality": "Saves an object to a disk file.", | |
| "input": "object, file path", | |
| "output": "None", | |
| "location_or_namespace": "torch" | |
| }, | |
| { | |
| "function_call_name": "print", | |
| "functionality": "Prints the given object(s) to the console or standard output.", | |
| "input": "object(s), optional flush parameter", | |
| "output": "None", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "next", | |
| "functionality": "Retrieves the next item from an iterator.", | |
| "input": "iterator", | |
| "output": "next item from iterator", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "model.parameters", | |
| "functionality": "Returns an iterator over model parameters.", | |
| "input": "None", | |
| "output": "iterator over parameters", | |
| "location_or_namespace": "torch.nn.Module" | |
| }, | |
| { | |
| "function_call_name": "assert", | |
| "functionality": "Raises an AssertionError if the condition is false.", | |
| "input": "condition", | |
| "output": "None or exception", | |
| "location_or_namespace": "builtins" | |
| }, | |
| { | |
| "function_call_name": "prepare_optimizer_state", | |
| "functionality": "", | |
| "input": "model, adam_optimizer_state, device", | |
| "output": "m, v (momentum statistics)", | |
| "location_or_namespace": "collect_grad_reps.py" | |
| }, | |
| { | |
| "function_call_name": "get_trak_projector", | |
| "functionality": "", | |
| "input": "device", | |
| "output": "projector class/factory", | |
| "location_or_namespace": "collect_grad_reps.py" | |
| }, | |
| { | |
| "function_call_name": "get_number_of_params", | |
| "functionality": "", | |
| "input": "model", | |
| "output": "number of parameters (int)", | |
| "location_or_namespace": "collect_grad_reps.py" | |
| }, | |
| { | |
| "function_call_name": "os.makedirs", | |
| "functionality": "Creates a directory recursively; does not raise an error if directory exists.", | |
| "input": "directory path, exist_ok (bool)", | |
| "output": "None", | |
| "location_or_namespace": "os" | |
| }, | |
| { | |
| "function_call_name": "get_max_saved_index", | |
| "functionality": "", | |
| "input": "output_dir, prefix", | |
| "output": "max index (int)", | |
| "location_or_namespace": "collect_grad_reps.py" | |
| }, | |
| { | |
| "function_call_name": "tqdm", | |
| "functionality": "Wraps an iterable with a progress bar for iteration.", | |
| "input": "iterable, total", | |
| "output": "iterator with progress bar", | |
| "location_or_namespace": "tqdm" | |
| }, | |
| { | |
| "function_call_name": "prepare_batch", | |
| "functionality": "", | |
| "input": "batch", | |
| "output": "", | |
| "location_or_namespace": "collect_grad_reps.py" | |
| }, | |
| { | |
| "function_call_name": "obtain_gradients_with_adam", | |
| "functionality": "", | |
| "input": "model, batch, m, v", | |
| "output": "gradient vector", | |
| "location_or_namespace": "collect_grad_reps.py" | |
| }, | |
| { | |
| "function_call_name": "obtain_sign_gradients", | |
| "functionality": "", | |
| "input": "model, batch", | |
| "output": "gradient vector", | |
| "location_or_namespace": "collect_grad_reps.py" | |
| }, | |
| { | |
| "function_call_name": "obtain_gradients", | |
| "functionality": "", | |
| "input": "model, batch", | |
| "output": "gradient vector", | |
| "location_or_namespace": "collect_grad_reps.py" | |
| }, | |
| { | |
| "function_call_name": "model.zero_grad", | |
| "functionality": "Sets gradients of all model parameters to zero.", | |
| "input": "None", | |
| "output": "None", | |
| "location_or_namespace": "torch.nn.Module" | |
| }, | |
| { | |
| "function_call_name": "torch.cuda.empty_cache", | |
| "functionality": "Releases all unused cached memory from CUDA.", | |
| "input": "None", | |
| "output": "None", | |
| "location_or_namespace": "torch.cuda" | |
| }, | |
| { | |
| "function_call_name": "merge_and_normalize_info", | |
| "functionality": "", | |
| "input": "output_dir, prefix", | |
| "output": "", | |
| "location_or_namespace": "collect_grad_reps.py" | |
| }, | |
| { | |
| "function_call_name": "merge_info", | |
| "functionality": "", | |
| "input": "output_dir, prefix", | |
| "output": "", | |
| "location_or_namespace": "collect_grad_reps.py" | |
| } | |
| ] | |
| } | |
| ] | |