Download annotations/annotation_102/function_info.json from mcy98/RECODE-H: direct link, hf CLI and curl.
- Browser
- Download file 10.3 kB
-
https://huggingface.co/datasets/mcy98/RECODE-H/resolve/main/annotations/annotation_102/function_info.json
- Command line
-
hf download hf://datasets/mcy98/RECODE-H/annotations/annotation_102/function_info.json
-
curl -L -o function_info.json https://huggingface.co/datasets/mcy98/RECODE-H/resolve/main/annotations/annotation_102/function_info.json
10.3 kB
| [ | |
| { | |
| "function_name": "__init__", | |
| "file_path": "TAHyper", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "super", | |
| "functionality": "Calls the constructor of the parent class (nn.Module) to ensure proper initialization of the module.", | |
| "input": "TAHyper, self", | |
| "output": "None", | |
| "location_or_namespace": "built-in" | |
| }, | |
| { | |
| "function_call_name": "tensor", | |
| "functionality": "Constructs a tensor from data.", | |
| "input": "[args.c]", | |
| "output": "A torch.Tensor object.", | |
| "location_or_namespace": "torch" | |
| }, | |
| { | |
| "function_call_name": "to", | |
| "functionality": "Moves a tensor to a specified device (e.g., CPU or GPU).", | |
| "input": "args.device", | |
| "output": "A torch.Tensor on the specified device.", | |
| "location_or_namespace": "torch.Tensor" | |
| }, | |
| { | |
| "function_call_name": "Parameter", | |
| "functionality": "Wraps a tensor to be a learnable parameter of a neural network module.", | |
| "input": "torch.Tensor([1.])", | |
| "output": "An nn.Parameter object.", | |
| "location_or_namespace": "torch.nn" | |
| }, | |
| { | |
| "function_call_name": "getattr", | |
| "functionality": "Retrieves an attribute (function or class) from an object by its name.", | |
| "input": "manifolds, self.manifold_name", | |
| "output": "The class or function object corresponding to the manifold name.", | |
| "location_or_namespace": "built-in" | |
| }, | |
| { | |
| "function_call_name": "getattr", | |
| "functionality": "Retrieves an attribute (function or class) from an object by its name.", | |
| "input": "encoders, args.model", | |
| "output": "The class or function object corresponding to the encoder model name.", | |
| "location_or_namespace": "built-in" | |
| }, | |
| { | |
| "function_call_name": "Linear", | |
| "functionality": "", | |
| "input": "nhid, nhid, args.dropout, F.relu, args.bias", | |
| "output": "A Linear layer object.", | |
| "location_or_namespace": "hgcn.layers.layers" | |
| }, | |
| { | |
| "function_call_name": "Linear", | |
| "functionality": "", | |
| "input": "nhid, 1, args.dropout, lambda x: x, args.bias", | |
| "output": "A Linear layer object.", | |
| "location_or_namespace": "hgcn.layers.layers" | |
| }, | |
| { | |
| "function_call_name": "Sequential", | |
| "functionality": "A container module that executes its submodules sequentially.", | |
| "input": "*hnn_layers_y1 or *hnn_layers_y0", | |
| "output": "An nn.Sequential object.", | |
| "location_or_namespace": "torch.nn" | |
| }, | |
| { | |
| "function_call_name": "Linear", | |
| "functionality": "", | |
| "input": "nhid*2, nhid, args.dropout, F.relu, args.bias", | |
| "output": "A Linear layer object.", | |
| "location_or_namespace": "hgcn.layers.layers" | |
| }, | |
| { | |
| "function_call_name": "Linear", | |
| "functionality": "", | |
| "input": "nhid, 1, args.dropout, F.sigmoid, args.bias", | |
| "output": "A Linear layer object.", | |
| "location_or_namespace": "hgcn.layers.layers" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "encode", | |
| "file_path": "TAHyper", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "zeros_like", | |
| "functionality": "Creates a tensor of zeros with the same size as the input tensor.", | |
| "input": "x", | |
| "output": "A tensor of zeros.", | |
| "location_or_namespace": "torch" | |
| }, | |
| { | |
| "function_call_name": "cat", | |
| "functionality": "Concatenates the given sequence of tensors in the specified dimension.", | |
| "input": "[o[:, 0:1], x], dim=1", | |
| "output": "A new concatenated tensor.", | |
| "location_or_namespace": "torch" | |
| }, | |
| { | |
| "function_call_name": "encode", | |
| "functionality": "", | |
| "input": "x, adj", | |
| "output": "The encoded hyperbolic representation.", | |
| "location_or_namespace": "hgcn.models.encoders" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "uplift_decode", | |
| "file_path": "TAHyper", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "logmap0", | |
| "functionality": "", | |
| "input": "rep, c=self.c", | |
| "output": "The mapped representation.", | |
| "location_or_namespace": "hgcn.manifolds" | |
| }, | |
| { | |
| "function_call_name": "proj_tan0", | |
| "functionality": "", | |
| "input": "self.manifold.logmap0(rep, c=self.c), c=self.c", | |
| "output": "The projected representation.", | |
| "location_or_namespace": "hgcn.manifolds" | |
| }, | |
| { | |
| "function_call_name": "layers_y0", | |
| "functionality": "Performs a forward pass through the sequential layers for the control group.", | |
| "input": "rep", | |
| "output": "The output of the sequential layers.", | |
| "location_or_namespace": "TAHyper" | |
| }, | |
| { | |
| "function_call_name": "layers_y1", | |
| "functionality": "Performs a forward pass through the sequential layers for the treated group.", | |
| "input": "rep", | |
| "output": "The output of the sequential layers.", | |
| "location_or_namespace": "TAHyper" | |
| }, | |
| { | |
| "function_call_name": "y0_out", | |
| "functionality": "Performs a forward pass through the final output layer for the control group.", | |
| "input": "y0", | |
| "output": "The predicted outcome for the control group.", | |
| "location_or_namespace": "TAHyper" | |
| }, | |
| { | |
| "function_call_name": "y1_out", | |
| "functionality": "Performs a forward pass through the final output layer for the treated group.", | |
| "input": "y1", | |
| "output": "The predicted outcome for the treated group.", | |
| "location_or_namespace": "TAHyper" | |
| }, | |
| { | |
| "function_call_name": "view", | |
| "functionality": "Reshapes a tensor.", | |
| "input": "-1", | |
| "output": "The reshaped tensor.", | |
| "location_or_namespace": "torch.Tensor" | |
| }, | |
| { | |
| "function_call_name": "where", | |
| "functionality": "Returns a new tensor with elements from y1 or y0, depending on the condition.", | |
| "input": "t > 0,y1,y0", | |
| "output": "A new tensor with the selected values.", | |
| "location_or_namespace": "torch" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "lp_cls", | |
| "file_path": "TAHyper", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "normalize", | |
| "functionality": "", | |
| "input": "h", | |
| "output": "The normalized tensor.", | |
| "location_or_namespace": "hgcn.manifolds" | |
| }, | |
| { | |
| "function_call_name": "logmap0", | |
| "functionality": "", | |
| "input": "h, c=self.c", | |
| "output": "The mapped representation.", | |
| "location_or_namespace": "hgcn.manifolds" | |
| }, | |
| { | |
| "function_call_name": "proj_tan0", | |
| "functionality": "", | |
| "input": "self.manifold.logmap0(h, c=self.c), c=self.c", | |
| "output": "The projected representation.", | |
| "location_or_namespace": "hgcn.manifolds" | |
| }, | |
| { | |
| "function_call_name": "cat", | |
| "functionality": "Concatenates the given sequence of tensors in the specified dimension.", | |
| "input": "[emb_in, emb_out_samet], axis=-1 or [emb_in, emb_out_difft], axis=-1", | |
| "output": "A new concatenated tensor.", | |
| "location_or_namespace": "torch" | |
| }, | |
| { | |
| "function_call_name": "out_nn1", | |
| "functionality": "Performs a forward pass through the first layer of the MLP for treatment-aware relationship identification.", | |
| "input": "pos_input or neg_input", | |
| "output": "The output of the first MLP layer.", | |
| "location_or_namespace": "TAHyper" | |
| }, | |
| { | |
| "function_call_name": "out_nn", | |
| "functionality": "Performs a forward pass through the final output layer of the MLP for relationship identification.", | |
| "input": "pos_input or neg_input", | |
| "output": "The scores for positive or negative pairs.", | |
| "location_or_namespace": "TAHyper" | |
| }, | |
| { | |
| "function_call_name": "squeeze", | |
| "functionality": "Removes a dimension of size one from a tensor.", | |
| "input": "()", | |
| "output": "The squeezed tensor.", | |
| "location_or_namespace": "torch.Tensor" | |
| }, | |
| { | |
| "function_call_name": "binary_cross_entropy", | |
| "functionality": "Calculates the Binary Cross Entropy loss.", | |
| "input": "pos_scores, torch.ones_like(pos_scores), reduction=\"none\" or neg_scores, torch.zeros_like(neg_scores), reduction=\"none\"", | |
| "output": "The BCE loss.", | |
| "location_or_namespace": "torch.nn.functional" | |
| }, | |
| { | |
| "function_call_name": "ones_like", | |
| "functionality": "Creates a tensor of ones with the same size as the input tensor.", | |
| "input": "pos_scores", | |
| "output": "A tensor of ones.", | |
| "location_or_namespace": "torch" | |
| }, | |
| { | |
| "function_call_name": "zeros_like", | |
| "functionality": "Creates a tensor of zeros with the same size as the input tensor.", | |
| "input": "neg_scores", | |
| "output": "A tensor of zeros.", | |
| "location_or_namespace": "torch" | |
| }, | |
| { | |
| "function_call_name": "mean", | |
| "functionality": "Calculates the mean value of all elements in a tensor.", | |
| "input": "axis=-1", | |
| "output": "The mean of the tensor.", | |
| "location_or_namespace": "torch.Tensor" | |
| } | |
| ] | |
| }, | |
| { | |
| "function_name": "forward", | |
| "file_path": "TAHyper", | |
| "function_calls": [ | |
| { | |
| "function_call_name": "encode", | |
| "functionality": "Performs the hyperbolic confounder representation learning.", | |
| "input": "x, adj", | |
| "output": "The learned hyperbolic representation 'rep'.", | |
| "location_or_namespace": "TAHyper" | |
| }, | |
| { | |
| "function_call_name": "uplift_decode", | |
| "functionality": "Performs potential outcome prediction.", | |
| "input": "rep, t", | |
| "output": "The predicted factual outcome 'y' and a placeholder 'p1'.", | |
| "location_or_namespace": "TAHyper" | |
| }, | |
| { | |
| "function_call_name": "lp_cls", | |
| "functionality": "Implements the treatment-aware relationship identification module and returns its loss.", | |
| "input": "rep, idx", | |
| "output": "The cross-entropy loss for the relationship classification task, 'minus'.", | |
| "location_or_namespace": "TAHyper" | |
| } | |
| ] | |
| } | |
| ] |