MCPcopy Create free account
hub / github.com/McGill-NLP/length-generalization / add_source_code

Function add_source_code

scripts/upload_experiment.py:461–467  ·  view source on GitHub ↗
(art)

Source from the content-addressed store, hash-verified

459
460
461def add_source_code(art):
462 root = "src/"
463 root = os.path.abspath(root)
464 exclude_fn = lambda path: path.endswith(".pyc") or path.endswith("__pycache__")
465 for file_path in filenames.filtered_dir(root, lambda p: True, exclude_fn):
466 save_name = os.path.relpath(file_path, root)
467 art.add_file(file_path, name=f"src/{save_name}")
468
469
470def main(args: argparse.Namespace):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected