MCPcopy Create free account

hub / github.com/McGill-NLP/length-generalization / functions

Functions942 in github.com/McGill-NLP/length-generalization

↓ 1 callersMethodhandle_tokenizer
(self, tokenizer: Optional[Tokenizer] = None)
src/models/gpt2.py:30
↓ 1 callersMethodhandle_tokenizer
(self, tokenizer: Optional[Tokenizer] = None)
src/models/gpt2.py:70
↓ 1 callersMethodhandle_tokenizer
(self, tokenizer: Optional[Tokenizer] = None)
src/models/roberta.py:42
↓ 1 callersMethodhandle_tokenizer
(self, tokenizer: Optional[Tokenizer] = None)
src/models/custom_t5_decoder_only.py:1464
↓ 1 callersFunctioninfer_and_cast
In some cases we'll be feeding params dicts to functions we don't own; for example, PyTorch optimizers. In that case we can't use `pop_int`
src/common/params.py:35
↓ 1 callersFunctioninfer_method_params
(cls: Type[T], method: Callable)
src/common/from_params.py:250
↓ 1 callersFunctioninfo_value_of_dtype
Returns the `finfo` or `iinfo` object of a given PyTorch data type. Does not allow torch.bool.
src/modules/span_extractors/self_attentive_span_extractor.py:210
↓ 1 callersMethodis_answer_correct
( self, final_answer: str, data_instance: Dict[str, Any] )
src/data/data_instance_processor/lego_instance_processor.py:157
↓ 1 callersMethodis_answer_correct
( self, final_answer: Any, data_instance: Dict[str, Any] )
src/data/data_instance_processor/data_instance_processor.py:720
↓ 1 callersMethodis_answer_correct
( self, final_answer: int, data_instance: Dict[str, Any] )
src/data/data_instance_processor/addition_instance_processor.py:180
↓ 1 callersMethodis_answer_correct
( self, final_answer: str, data_instance: Dict[str, Any] )
src/data/data_instance_processor/clutrr_instance_processor.py:100
↓ 1 callersMethodis_answer_correct
( self, final_answer: Any, data_instance: Dict[str, Any] )
src/data/data_instance_processor/poly_instance_processor.py:154
↓ 1 callersMethodis_answer_correct
( self, final_answer: str, data_instance: Dict[str, Any] )
src/data/data_instance_processor/parity_instance_processor.py:128
↓ 1 callersMethodis_answer_correct
( self, final_answer: Any, data_instance: Dict[str, Any] )
src/data/data_instance_processor/sum_instance_processor.py:217
↓ 1 callersFunctionis_base_registrable
Checks whether this is a class that directly inherits from Registrable, or is a subclass of such a class.
src/common/from_params.py:208
↓ 1 callersFunctionis_cuda_out_of_memory
(exception: BaseException)
src/common/torch_utils.py:53
↓ 1 callersFunctionis_cudnn_snafu
(exception: BaseException)
src/common/torch_utils.py:63
↓ 1 callersFunctionis_eval_complete
(exp_dir: Path, metric_name: str)
scripts/is_sweep_hp_run_complete.py:54
↓ 1 callersFunctionis_eval_complete
(exp_dir: Path, metric_name: str)
scripts/manual_sweep.py:58
↓ 1 callersFunctionis_out_of_cpu_memory
(exception: BaseException)
src/common/torch_utils.py:73
↓ 1 callersFunctionis_run_complete
(run: wandb.apis.public.Run)
scripts/fail_if_sweep_not_complete.py:24
↓ 1 callersFunctionis_tool
Check whether `name` is on PATH and marked as executable.
scripts/launch_experiment.py:133
↓ 1 callersFunctionis_training_complete
(exp_dir: Path)
scripts/is_sweep_hp_run_complete.py:33
↓ 1 callersFunctionis_training_complete
(exp_dir: Path)
scripts/manual_sweep.py:37
↓ 1 callersFunctionlaunch_job
(args: argparse.Namespace)
scripts/launcher.py:776
↓ 1 callersFunctionlist_experiments
(args)
scripts/launch_experiment.py:401
↓ 1 callersFunctionlist_metadata
(download_dir, run)
scripts/download_nope_runs_to_local.py:107
↓ 1 callersMethodload_ckpt
(self, name)
src/runtime/model_inference_shell.py:161
↓ 1 callersFunctionload_config_object
(filenames: List[str])
src/common/py_utils.py:184
↓ 1 callersFunctionload_dataframe_from_jsonlines
(path: Path)
src/common/wandb_utils.py:397
↓ 1 callersFunctionload_dataframe_from_jsonlines
(path: Path)
scripts/experiment_uploaders/attention_analysis_aggregate.py:157
↓ 1 callersFunctionload_dataframe_from_jsonlines
(path: Path)
scripts/experiment_uploaders/final_attention_analysis.py:158
↓ 1 callersFunctionload_dataframe_from_jsonlines
(path: Path)
scripts/experiment_uploaders/final_attention_kl_analysis.py:167
↓ 1 callersFunctionload_dataframe_from_jsonlines
(path: Path)
scripts/experiment_uploaders/attention_analysis.py:160
↓ 1 callersMethodlog_accuracies_and_distances
(self, accuracies, distances, prefix: str = "")
src/analyzers/seq_cls_analyzer.py:149
↓ 1 callersMethodlog_accuracies_and_distances
(self, accuracies, distances, prefix: str = "")
src/analyzers/seq2seq_analyzer.py:183
↓ 1 callersMethodlog_number_of_parameters
(self, model: nn.Module)
src/runtime/seq2seq_runtime.py:464
↓ 1 callersMethodlog_scratchpad_metrics
( self, scratchpad_metrics: Dict[str, Dict[str, Deque[float]]], prefix: str = "" )
src/analyzers/seq2seq_analyzer.py:232
↓ 1 callersFunctionmain
()
src/tests/test_lego_dataset.py:9
↓ 1 callersFunctionmain
()
src/tests/test_parity_dataset.py:9
↓ 1 callersFunctionmain
()
scripts/upload_pos_enc_exp_for_sum_ds.py:28
↓ 1 callersFunctionmain
(args: argparse.Namespace)
scripts/launch_sweep.py:18
↓ 1 callersFunctionmain
(args: argparse.Namespace)
scripts/upload_experiment.py:470
↓ 1 callersFunctionmain
(args)
scripts/launch_experiment.py:709
↓ 1 callersFunctionmain
(args)
scripts/launcher.py:876
↓ 1 callersFunctionmain
(args: argparse.Namespace)
scripts/upload_ds.py:9
↓ 1 callersFunctionmain
(args: argparse.Namespace)
scripts/download_ds.py:8
↓ 1 callersFunctionmain
()
scripts/generate_all_unified_scratchpad_configs.py:88
↓ 1 callersFunctionmain
()
scripts/fail_if_sweep_not_complete.py:71
↓ 1 callersFunctionmain
(args: argparse.Namespace)
scripts/dataset_builders/make_lego_dataset.py:113
↓ 1 callersFunctionmain
(args: argparse.Namespace)
scripts/dataset_builders/make_reverse_dataset.py:154
↓ 1 callersFunctionmain
(args: argparse.Namespace)
scripts/dataset_builders/make_copy_half_dataset.py:104
↓ 1 callersFunctionmain
(args: argparse.Namespace)
scripts/dataset_builders/make_parity_dataset.py:51
↓ 1 callersFunctionmain
(args: argparse.Namespace)
scripts/dataset_builders/make_copy_dataset.py:198
↓ 1 callersFunctionmain
(args: argparse.Namespace)
scripts/dataset_builders/make_poly_dataset.py:59
↓ 1 callersFunctionmain
(args: argparse.Namespace)
scripts/dataset_builders/make_sum_dataset.py:54
↓ 1 callersFunctionmain
(args: argparse.Namespace)
scripts/dataset_builders/make_addition_dataset.py:74
↓ 1 callersFunctionmain
(args: argparse.Namespace)
scripts/dataset_builders/make_count_dataset.py:129
↓ 1 callersFunctionmain
(args: argparse.Namespace)
scripts/dataset_builders/make_sort_dataset.py:127
↓ 1 callersFunctionmake_download_nope_scripts
( configs: str, commands: str, env_vars: str, exp_key: str, exp_name: str, sweep_id: s
scripts/upload_experiment.py:400
↓ 1 callersFunctionmake_executable
(script_path)
scripts/create_run_script.py:24
↓ 1 callersFunctionmake_executable
(script_path)
scripts/launcher.py:26
↓ 1 callersFunctionmake_metadata
(exp_name, exp_key)
scripts/upload_experiment.py:429
↓ 1 callersFunctionmake_run_script
( configs: str, commands: str, env_vars: str, exp_key: str, exp_name: str, args=None,
scripts/upload_experiment.py:76
↓ 1 callersFunctionmake_run_script_seeds
( configs: str, commands: str, env_vars: str, exp_key: str, exp_name: str, seeds: int,
scripts/upload_experiment.py:139
↓ 1 callersFunctionmake_run_script_sweep_agent
( configs: str, commands: str, env_vars: str, exp_key: str, exp_name: str, sweep_id: s
scripts/upload_experiment.py:231
↓ 1 callersFunctionmake_run_script_sweep_job
( configs: str, commands: str, env_vars: str, exp_key: str, exp_name: str, seeds: int,
scripts/upload_experiment.py:196
↓ 1 callersFunctionmake_run_script_sweep_manual_agent
( configs: str, commands: str, env_vars: str, exp_key: str, exp_name: str, sweep_id: s
scripts/upload_experiment.py:326
↓ 1 callersFunctionmake_run_script_sweep_manual_job
( configs: str, commands: str, env_vars: str, exp_key: str, exp_name: str, seeds: int,
scripts/upload_experiment.py:279
↓ 1 callersFunctionmasked_softmax
`torch.nn.functional.softmax(vector)` does not work if some elements of `vector` should be masked. This performs a softmax on just the non-m
src/modules/span_extractors/self_attentive_span_extractor.py:229
↓ 1 callersFunctionmin_value_of_dtype
Returns the minimum value of a given PyTorch data type. Does not allow torch.bool.
src/modules/span_extractors/self_attentive_span_extractor.py:222
↓ 1 callersFunctionmodify_array
(arr: List[Any], idx: int, val: Any)
src/tests/test_all_scratchpad_datasets_for_length.py:106
↓ 1 callersFunctionmodify_array
(arr: List[Any], idx: int, val: Any)
src/tests/test_all_scratchpad_datasets.py:94
↓ 1 callersFunctionmodify_array
(arr: List[Any], idx: int, val: Any)
scripts/upload_pos_enc_exp_for_scratchpad_ds.py:54
↓ 1 callersFunctionmodify_array
(arr: List[Any], idx: int, val: Any)
scripts/experiment_uploaders/scratchpad.py:57
↓ 1 callersFunctionmodify_array
(arr: List[Any], idx: int, val: Any)
scripts/experiment_uploaders/attention_analysis_aggregate.py:57
↓ 1 callersFunctionmodify_array
(arr: List[Any], idx: int, val: Any)
scripts/experiment_uploaders/final_attention_analysis.py:58
↓ 1 callersFunctionmodify_array
(arr: List[Any], idx: int, val: Any)
scripts/experiment_uploaders/final_attention_kl_analysis.py:67
↓ 1 callersFunctionmodify_array
(arr: List[Any], idx: int, val: Any)
scripts/experiment_uploaders/attention_analysis.py:60
↓ 1 callersFunctionmodify_array
(arr: List[Any], idx: int, val: Any)
scripts/experiment_uploaders/util.py:72
↓ 1 callersFunctionmodify_array
(arr: List[Any], idx: int, val: Any)
scripts/experiment_uploaders/attention_kl_analysis.py:65
↓ 1 callersMethodoutput_generator
(self, seq)
scripts/dataset_builders/make_dyck_pred_dataset2.py:72
↓ 1 callersFunctionpad_tensors_to_same_length
Pad x and y so that the results have the same length (second dimension).
src/data/s2s_dl_factory.py:735
↓ 1 callersFunctionpadded_precision
( *, padded_preds: np.ndarray = None, padded_labels: np.ndarray = None )
src/data/s2s_dl_factory.py:798
↓ 1 callersFunctionpadded_recall
( *, padded_preds: np.ndarray = None, padded_labels: np.ndarray = None )
src/data/s2s_dl_factory.py:774
↓ 1 callersFunctionparam_name
(param: str)
src/common/py_utils.py:214
↓ 1 callersFunctionparse_overrides
( serialized_overrides: str, ext_vars: Optional[Dict[str, Any]] = None )
src/common/params.py:141
↓ 1 callersMethodparse_scratchpad_str
We use regex to parse scratchpad str into its components.
src/data/data_instance_processor/data_instance_processor.py:448
↓ 1 callersFunctionpop_and_construct_arg
Does the work of actually constructing an individual argument for [`create_kwargs`](./#create_kwargs). Here we're in the inner loop of i
src/common/from_params.py:377
↓ 1 callersFunctionpredict_next_token
( runtime, model, prompt, io_obj=None, target_tokens=None, )
src/runtime/model_inference_shell.py:206
↓ 1 callersMethodprediction_step_loss_per_example
Perform an evaluation step on `model` using `inputs`. Subclass and override to inject custom behavior. Args: mo
src/trainers/decoder_only_trainer.py:236
↓ 1 callersMethodprepare_job
(self, output_dir: Path)
scripts/launcher.py:147
↓ 1 callersFunctionprint_info
(args: argparse.Namespace)
scripts/launch_experiment.py:657
↓ 1 callersFunctionprint_info
(args: argparse.Namespace)
scripts/launcher.py:824
↓ 1 callersFunctionprism_color_pal
Get the prism color palette by name
src/common/plotnine_utils.py:57
↓ 1 callersFunctionprism_fill_pal
Get the prism fill palette by name
src/common/plotnine_utils.py:62
↓ 1 callersFunctionprism_shape_pal
Get the prism shape palette by name
src/common/plotnine_utils.py:67
↓ 1 callersFunctionread_eval_metric
(exp_dir: Path, metric_name: str)
scripts/manual_sweep.py:83
↓ 1 callersFunctionread_jsonlines
(path)
src/tokenization_utils/whitespace.py:21
↓ 1 callersFunctionremove_optional
Optional[X] annotations are actually represented as Union[X, NoneType]. For our purposes, the "Optional" part is not interesting, so here we
src/common/from_params.py:224
← previousnext →401–500 of 942, ranked by callers