diff --git "a/iterative__dvc-5188/docstore.json" "b/iterative__dvc-5188/docstore.json" new file mode 100644--- /dev/null +++ "b/iterative__dvc-5188/docstore.json" @@ -0,0 +1 @@ +{"docstore/metadata": {"/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/__main__.py__": {"doc_hash": "e31af0c8ed8cf737b18f8007d97c06eb7c8de8e12f98e39126e6b74e7a897913"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/base.py_CmdBase_": {"doc_hash": "a15f01b50e577f0ded648d0b6be906cb09d1da31f2b0486465382fb6d548fde0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/commit.py_add_parser_": {"doc_hash": "c02c82b0b5761699c87da8d25ed4a13f3b97961cfeb3a26187cae85423b6a4b7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/daemon.py_add_parser_": {"doc_hash": "0ac772a1497929d1c162e4cf7a17e9af70981d68569b11c697107501d6ee2a62"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/destroy.py_add_parser_": {"doc_hash": "2ce107d7fe9bb3dc44061eb3c99584b7e34936f0b6956dd32d6c3474512d75c4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/gc.py_add_parser_": {"doc_hash": "fa81355cb2976681082c362a08b5321c551b616195613a6ae876ce8190807bc0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/imp.py_add_parser_": {"doc_hash": "75202ceb95db845ec30a9368d7395f19886ba7ed68886109862fad3370674bff"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/repro.py_add_parser_": {"doc_hash": "8e4f0bf99261424e93f09b8034d7219900ed7a12f4fa483ec509fa18a775d693"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/daemon.py__spawn_posix__spawn_posix._pylint_disable_protect": {"doc_hash": "c0dd63b46c8c5fcf995ecbeadddd59cee0a6fdfce2d2bcb64cedd3a1b126045d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py_AsciiCanvas.point_AsciiCanvas.point.self_canvas_y_x_char": {"doc_hash": "4438404988c1c1ba2a6a9a758901d369b8bb471df71f9160fd5671df01d17129"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py_AsciiCanvas.line_AsciiCanvas.line.if_dx_0_and_dy_0_.else_.for_y_in_range_y1_y0_1.self_point_x_y_char_": {"doc_hash": "22175052ed01a03d73de567a51e0589471a6f21aa39bdd5f458e0121dcfdb4f5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py_AsciiCanvas.text_AsciiCanvas.box.None_3": {"doc_hash": "f688adf839f2b26a1ae8fd3d7eab613a0121ab423169625c3dce84b878a87eee"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py__build_sugiyama_layout__build_sugiyama_layout.return.sug": {"doc_hash": "9bf4862bdd1edcf3d6a1cb46e9aa1e7bef056ca06487be8d2a586d3dffb642fd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py_draw_": {"doc_hash": "ebae308441dd36ebaec5b98fd9971178db187f52e240261452c326ed0736c279"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/gs.py__": {"doc_hash": "e89569b7090f0a4716b0bd17198e2c359c503a4278a86fc36f41ad00ccdc2391"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/hdfs.py__": {"doc_hash": "7d5e26ff982cd671f6978c0d262dc30a135c293b56408b4d65acdc493a2891fa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/local.py__": {"doc_hash": "9a740ea3538cb8701c9018f14df89d5ad26fafd73ea6fbe6c0533d60e191415a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/s3.py__": {"doc_hash": "374d44246032306f6be91952affefc3946657653075d8efd03a2add5de98bd99"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/ssh.py__": {"doc_hash": "1ea987e9482ee8130aef4de338328bdd7cee31a3d426535edaed2900bbbe2339"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/gs.py__": {"doc_hash": "b122e46b95e7fc9f25a43ac862c9732a96b8974fcad149eadbb39f8e8e7b31c8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/prompt.py__Manages_user_prompts__": {"doc_hash": "14be4c026209b4149da0cbd30e6a3a52f7dd7866cd56f0871d6c5bcfd7926a2f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.used_cache_Repo.used_cache.return.cache": {"doc_hash": "6b35679154fccc0cf1f863923ce2af454f62ea015e90b8f7b6b39c447b9c81e0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/destroy.py__": {"doc_hash": "d350671272d316b9d159032fe14d1cc784414d03d63cda75756dd008c7f29079"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/install.py__": {"doc_hash": "20806fd88a001bc9d41d62364614b77f8c6973a2473658fc9d0a7af78600c52e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/move.py_os_": {"doc_hash": "f6f570f4faf04e9de1a4c6bc659f225b42049fe358ed9f43a4526d1d6140796f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/remove.py__": {"doc_hash": "7a161f1ac416a8ba34207fbad4b4e6907e6d32fe61311419af0715e4f0efa731"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/status.py__cloud_status__cloud_status.return.ret": {"doc_hash": "dbd8537e70d3ceebc1cea4392b0b027015ac1708d5c6cf63a970d774ad1002b6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/status.py_status_": {"doc_hash": "b88d2eae221f151bc0e15f7c10bec57be70c9ce00dc2b7f0e5632b78e7df7460"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/__init__.py__Manages_source_control_": {"doc_hash": "455ec4065ec09981702c4e00b56308e43647ada6e527b1b401f2909be884e884"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State._prepare_db_State._prepare_db.None_4": {"doc_hash": "7bea2ec8c4fdf1543e87df72f8631e0aa2458b1e6348c67f83b1cee7f5d3154b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State.load_State._vacuum.self.database.isolation_level_1._": {"doc_hash": "65b120d9cd79cbdad810865449b32589e2318ea0c6ee962c5dcd99323d790cae"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State.dump_State.dump.self.inserts.0": {"doc_hash": "f0d60c46db6cbc600b6a09663428cfe4df2042d485f2900de7c72c855ef5367e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/system.py_System._reflink_darwin_System._reflink_darwin.return.clonefile_": {"doc_hash": "95586490d20f983fcc27337130e555c21385a2efb1fd667fd47fedc23b4e9f15"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/system.py_System.inode_System.inode.return.inode": {"doc_hash": "16ddc9b22db5817b211c4d66031fc111a43bc58db4b186bdc58f6602d1171c03"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/hooks/hook-google_compute_engine.logger.py__": {"doc_hash": "279dbc5d002def4b2f5f488c0d9186caabd9e99b333544b1aa0ca7b3c7d188cc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/innosetup/config_gen.py__": {"doc_hash": "85c3c59e6b53d4a4751f24d6bb11f5f9d8c7b3396aa6bb06d03a2c7d1d96b184"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/add.py_add_parser_": {"doc_hash": "3c89de41352215e7517c6ae0f35ac4df4a3204ab6ac356b1217827d35768d35f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/init.py_add_parser_": {"doc_hash": "6567d6b4a2e624e37286178fc7495be46f80a470ace6a047a06f0021c8f49350"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/metrics/show.py_show_": {"doc_hash": "250ff8d3a4cfe02e949e9d5c118aa5ea77687e7d65f3eaec37043ec2c2079251"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/base.py_Base_": {"doc_hash": "bfedb3d4f7e06b9d857e42d0c3cf05b7d88d01969ee250577f5cec942451cfa4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_gs.py__": {"doc_hash": "ce1f1913d37589e356ec555584421987e12f0029be344c22c55d41a42544f8b2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_hdfs.py__": {"doc_hash": "2d717bf93c3797ec9e633da94268ab2dcee9c8ee969928f1e8f4bf707e659331"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_http.py__": {"doc_hash": "12a7f2c7d1a75681f5154f5a61e978c7a8887fcd33d048a96fe6743b02e08180"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_local.py_mock_": {"doc_hash": "9ca8968c51d9a943a9aa593e3e697c5d353f5c63ca0b8dbdc98941bc6f7083a3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_s3.py__": {"doc_hash": "137f5657e42340c14425b8c159bd19db5136a8f90c8f11ed8801ae8b6a2b9c2b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_ssh.py__": {"doc_hash": "9bce7e6f784061d1267d08ed5127bd5da80c15d7b3999dd4e7509922e52aa6a3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_gs.py__": {"doc_hash": "1a973ddea889c57aae51b9c46290a3f017ccf3e977e6ccbbc64c39ea55df038b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_hdfs.py__": {"doc_hash": "9e59f98d92286fceb17d00ea5546194847610e5f1c42fa513d777c6210d1ff56"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_local.py_TestGetFilesNumber_": {"doc_hash": "edcc9302f7a3f0d41e9351b2dc585534a6f7ea619b1a472202425e6c70545091"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_s3.py__": {"doc_hash": "c12b2fad1793f73babc133fdba13f5be866eaaa6f24a9ba2c94d37baa396e77e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_ssh.py__": {"doc_hash": "964ed461919c03a05b0b1897fe2d394ea3a65fbe1b3b340bf3078f33149542a1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_prompt.py__": {"doc_hash": "338bba00daa820a77f923d966146491ba9529c6e91f518434ad5dc942ff39a0a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_TestContainsLink_TestContainsLink.test_should_return_false_on_no_more_dirs_below_path.dirname_patch_assert_call": {"doc_hash": "e9fe11633bc2bcc6c24c3af8a1543381e6541560afc60f9f3eddb38dd3d7f04f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/diff.py_add_parser_": {"doc_hash": "a5bd94b9710c5f1d39776d37012c07b2a4cba80e8a7789032bb453cc5c149ce7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/daemon.py__spawn_": {"doc_hash": "f1233a6f21add61fab569a9cc74c13e370ecb775f4d3394219a74634b1576458"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/env.py__": {"doc_hash": "b9dd3c7334f49efd5174c66dd21ab24d56660c131a60fe94513e292cb352d0bc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/logger.py_setup_": {"doc_hash": "aa1d1651e5cc6b39a94e0d600adcae11edf9842427e41c1d8c3353963b968239"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State._file_metadata_changed_State._update_state_for_path_changed.self__execute_": {"doc_hash": "03c5e022f9d3ad4acdbbb86a8f344a72cf71bb8f1f4e6de18368c0b6804b0c6d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State._insert_new_state_record_State.get_state_record_for_inode.return.None": {"doc_hash": "12d5d7a75558a235a3d225b7020190d1ff1f3513179c29c782b8b22b1fd7b7de"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State.save_State.save.self__update_state_for_pa": {"doc_hash": "31c157802b86f145b952941af8f49fba2256072d279ec84040c50476bae79063"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/updater.py_Updater._notify_Updater._notify.logger_info_boxify_messag": {"doc_hash": "af178e407a6513cfce2494889da72bd92e79b78f8c0529f60fa4642899fd2e57"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py_boxify_boxify.return.box_str": {"doc_hash": "53b8e5bb1187fae6f3bc1b06591fca1068704c81933c713deccfece5e4bbb7aa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/version.py__Used_in_setup_py_so_do__generate_version.return._base_version_short_sh": {"doc_hash": "7604c5369292bced002d35eca9aea368ada8356a19363010cce5491c10f4ab14"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/version.py__is_git_repo_": {"doc_hash": "c5b7b18e96086b509550448c704023524767ad7ad260ae33978341fd888d04b3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestAddLocalRemoteFile_TestAddLocalRemoteFile.test.None_4": {"doc_hash": "6c32a365d98f575f3332ea3854b95bec9c97bb90e2138c3d21bda1d91c952083"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestCmdAdd_TestDoubleAddUnchanged.test_dir.None_1": {"doc_hash": "5826619b9a822bd6c9b0db85665896b80e6bb879d2056d697f768d6f59623a17"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestShouldThrowProperExceptionOnCorruptedStageFile_TestShouldThrowProperExceptionOnCorruptedStageFile.test.assert_expected_error_in_": {"doc_hash": "4ac395ffbaa3636e70bd8151310b97c644f5c5e456dc6e20c2efb0b1049894ae"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestAddFilename_TestAddFilename.test.None_10": {"doc_hash": "342868a15a1da3bd07fc23db84c1a201bf4d01096353fa2cc7d18869a166a501"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cache.py_TestExternalCacheDir_TestExternalCacheDir.test_remote_references.assert_self_dvc_cache_ssh": {"doc_hash": "32f82a63b672f12cb5c02023fc250621b8135f66ce939466da0478d6bd026ec3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cache.py_TestSharedCacheDir_TestSharedCacheDir.test.None_5": {"doc_hash": "71d23d378710c46eec5212c870c6829ab59067094a1c45f0b80eeb453098e88d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckout_TestCheckout._test_checkout.self_assertTrue_filecmp_c": {"doc_hash": "aadbd2c5a37caf4f7494c8949e61d3ea535d1f0bada4fbbadd4b98668a03e9d2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutSingleStage_TestCheckoutCorruptedCacheFile.test.None_2": {"doc_hash": "6194392792791757d6cb2464747ea897b7f17ab12afe2bad4ff5b97abdeeb746"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutCorruptedCacheDir_TestCheckoutCorruptedCacheDir.test.self_assertFalse_os_path_": {"doc_hash": "b8df4da18ae6e911a0ccdc3ab5b21699b739cade07c2284316ba0e6e4623d54c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCmdCheckout_CheckoutBase.outs_info.return._": {"doc_hash": "e4f441a6ac75a5cd2c0209a3835bc567d81cea453ebf1481c51b98ccea715e49"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestRemoveFilesWhenCheckout_TestRemoveFilesWhenCheckout.test.self_assertFalse_os_path_": {"doc_hash": "f22ebf106cec84e9982f621aac5edf678a11e8933d94c3782d45d5049c29f0de"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutCleanWorkingDir_TestCheckoutCleanWorkingDir.test.self_assertFalse_os_path_": {"doc_hash": "d017d0b1a56ec16037090cc79f8373bf24f4a28145e68a738ea5a2df452bb9e4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutCleanWorkingDir.test_force_TestCheckoutCleanWorkingDir.test_force.self_assertRaises_DvcExce": {"doc_hash": "3288548f7d9143dbffc713e86159c9f844ac12876bbd2af20e5bea7dfce1bc1c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutSelectiveRemove_TestCheckoutSelectiveRemove.test.None_7": {"doc_hash": "f5343f5c5c4baf664ea8bb69e68afab86bb9f426c1ff9be1437f03ae50f94ac2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestGitIgnoreBasic_TestGitIgnoreBasic.test.None_9": {"doc_hash": "ff4435833a1c88f3e019af414933e708c24c22d9a118152959bd409da91fa99d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestGitIgnoreWhenCheckout_TestGitIgnoreWhenCheckout.test.None_12": {"doc_hash": "1a8f7704d6a7fa45f7e40be1759d6d6e8470dfc1a47743a5cc412605faa768b7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutMissingMd5InStageFile_TestCheckoutEmptyDir.test.self_assertEqual_len_os_l": {"doc_hash": "878ceab9b9a9c65eb508dedae149fd770e253f974d07ec33fcdeee9b91d3b9a8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutNotCachedFile_TestCheckoutDirectory.test.self_assertTrue_os_path_e": {"doc_hash": "96dbd32d78c9c799fc9d132c81fa25a1ee349096153efb8e2a54acfc925c8f6c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutHook_TestCheckoutHook.test.with_self_assertRaises_Co.self_dvc_checkout_": {"doc_hash": "86b061f1d5f7916a2715db26bc119d2c4af6e2e473fc7b2a0668822f7fa63110"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cli.py_os_TestArgParse.test.self_assertIsInstance_arg": {"doc_hash": "515bff44f6070363ddf523081c1615a0512a11b260b58f4a98051154f946424f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cli.py_TestRun_TestRun.test.self_assertEqual_args_com": {"doc_hash": "079d7fbd7a8bc553042183dafe9d920952784dcbc969197a61b9bd8980e11580"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_TestGCBranchesTags_TestGCBranchesTags.test.self__check_cache_1_": {"doc_hash": "720da6a6eb4d4f7950d332bd4cfeb1deacaf8fcf2ce0a902412cefd8b125f042"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_TestGCMultipleDvcRepos_TestGCMultipleDvcRepos.setUp.self.additional_dvc_7.DvcRepo_self_additional_p": {"doc_hash": "83d5c07654959d1f2afe16b11313c009b3ddbb922da98f018fe26dde77ce5f6e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_os_TestMoveNotDataSource.test.self_assertNotEqual_ret_": {"doc_hash": "6e394b6b7bc023f097de8ef5fb80a90a6bc206e70611fab06b425471ae2350f1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_TestMoveFileWithExtension_TestMoveFileWithExtension.test.None_7": {"doc_hash": "17f900b6fc674b75eeab0164f8a94f06e441f8943a1f65caf2b48bfbb03beadf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_TestMoveFileToDirectory_TestMoveFileToDirectory.test.None_6": {"doc_hash": "9879d9d4f50831ea2419d074d04ce74e2b74e13496af6a441464d5cb1d8980cf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_TestMoveFileToDirectoryWithoutSpecifiedTargetName_TestMoveFileToDirectoryWithoutSpecifiedTargetName.test.self_assertEqual_self_FOO": {"doc_hash": "dcb8c81b69ac41332996ac40de4494ac0c9df2ce77cc5d52ad88e736ddb41386"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_TestMoveDirectoryShouldNotOverwriteExisting_TestMoveDirectoryShouldNotOverwriteExisting.test.self_assertEqual_set_os_l": {"doc_hash": "33f5da791ce8059bbf6166166a8b9ae6d2240975fc012f9c5fca2e8bc1a591f3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_TestMoveFileBetweenDirectories_TestMoveFileBetweenDirectories.test.self_assertEqual_": {"doc_hash": "2eb53aa12f6df5fc8b2604557719656f12195849a358b32bd132e7e41817b115"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_output.py_pytest_": {"doc_hash": "84cb63358e05bd4d38862a26c4cb4cbcaf4cdcade9b4fc24d0c1e54211480b22"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_TestRemote.test_overwrite_TestRemote.test_referencing_other_remotes.assert_config_remote_ba": {"doc_hash": "5b828beaa8ff902b8f5ea10f9b82a62c3a209ff6a0c7682502c9c6711ba4fdf0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_TestRemoteRemove_TestRemoteDefault.test.None_4": {"doc_hash": "0109cb4965993ec3bb177b9db51f61728b6a77647b84da609791601242fef1c5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestRepro_TestReproFail.test.self_assertNotEqual_ret_": {"doc_hash": "a8b4248d3015d34eac453a2ae97e1418f7d5fcfc585b98a5b253688da13513c6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproCyclicGraph_TestReproCyclicGraph.test.with_self_assertRaises_Cy.self_dvc_reproduce_cycle": {"doc_hash": "97014bdc0cfba441296aeabc2be2080daac776f2472b3b77653b7355a7110104"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproWorkingDirectoryAsOutput_TestReproWorkingDirectoryAsOutput.test.with_self_assertRaises_St.self_dvc_reproduce_faulty": {"doc_hash": "965b1fdcbbea8c29ec45d7c73cba4cedc7790223c72119e9b65b5bb603b14163"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproWorkingDirectoryAsOutput.test_similar_paths_TestReproWorkingDirectoryAsOutput.test_similar_paths.try_.except_StagePathAsOutputE.self_fail_should_not_rai": {"doc_hash": "37ae210a601e8b0ac06bd69c77091a79bbeaea3d3dbeac7938259625695db585"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproDepDirWithOutputsUnderIt_TestReproDepDirWithOutputsUnderIt.test.None_8": {"doc_hash": "8ae1fda27f6cbe7fb52f0ac675429cc00d9f46a98da17d9ab04c504966c9bdc3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproNoDeps_TestReproNoDeps.test.self_assertEqual_len_stag": {"doc_hash": "7f2077b7c58d64edd366c9360bb13286998b9d69d02eb1a9eef1eea79269f6d5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproForce_TestReproChangedCode.swap_code.self_create_self_CODE_ne": {"doc_hash": "578a23b1bbe820eaffc257c1f155b115788510460580dd6ece897f437359a102"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproChangedData_TestReproUpToDate.test.self_assertEqual_ret_0_": {"doc_hash": "9f6fa906823fbe49167f0cacb5ac959e2289bd394603666d271c1b651e9e1129"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproDryNoExec_TestReproDryNoExec.test.None_1": {"doc_hash": "281904c4efc6b2d171673cdaf2c633f724cd2f2526f9a4e4bd29b81075407cbb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproChangedDeepData_TestReproChangedDeepData.test.self_assertEqual_len_stag": {"doc_hash": "87ec2486ba5036ee7e416f3da7827d559dadcada0605e9cef38a2480c6cb38f0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproMetricsAddUnchanged_TestReproMetricsAddUnchanged.test.None_7": {"doc_hash": "93bca4d37d682bc4aaa00d52c919466e8f338dbc64d35fa2bd189b9914e93209"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproChangedDirData_TestReproChangedDirData.test.None_9": {"doc_hash": "d90d634c5b4cf80cf3e2303e4ae52ec47b97d4493f2fd3b7b87832fce89b8915"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproMissingMd5InStageFile_TestCmdRepro.test.self_assertNotEqual_ret_": {"doc_hash": "8cf3aa2f2b3a7d272bee19bd14dbb532fb69ece09139c298a4250e5296ab3645"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproAlreadyCached.test_force_import_TestReproAlreadyCached.test_force_import.with_patch_download_as_mo.with_patch_checkout_as_mo.self_assertEqual_mock_che": {"doc_hash": "f7915e27ab51ad7e30e406030b304b0f870a2e2e10e3796d3e1258e25d35e268"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestShouldDisplayMetricsOnReproWithMetricsOption_TestShouldDisplayMetricsOnReproWithMetricsOption.test.self_assertIn_expected_me": {"doc_hash": "42cf7ee2d1aa986dfba7988069bdda20fef7b1d88e759461bffc33e81f8b9a31"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_s3.py__upload_multipart_": {"doc_hash": "28bfff468427650cf7f81b02e6c9260162ebbca90aa3de7b5ac0c27bed8dfe60"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_TestSCMGit_TestSCMGit.test_is_tracked.None_10": {"doc_hash": "b86048df88d55eef1181cd724c1f4e34f29b3c23d8e521676b2bd63ac676dc1d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_TestReload_TestReload.test.self_assertEqual_d_stage_": {"doc_hash": "09d4aceec7d841cab18abfcd1b88e400de57c0f4f6d4fdd2d79fc3cdcfc5bc46"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_TestExternalRemoteResolution_TestExternalRemoteResolution.test_remote_output.assert_os_path_exists_fil": {"doc_hash": "f9c5099c31b6b3536440af8e33ad60e05259a379f7619807344da35761dd2ee9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_TestExternalRemoteResolution.test_remote_dependency_TestExternalRemoteResolution.test_remote_dependency.assert_os_path_exists_mo": {"doc_hash": "0ca7f915891cef43072be5f63467ced9c884c5bc58da060682280d3dd1eb7e87"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_system.py__": {"doc_hash": "78ae7a038b8effbc82837b4857fdb6a6f4aa346378e39c0045136d8f4287d48c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_TestWalkInGit_TestWalkInGit.test_nobranch.None_1": {"doc_hash": "07237083e84b7cd6dba566cdfdccd6c3b6046208b28e118abf7365c99015b691"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_unprotect.py_os_": {"doc_hash": "0d36ab4df0a011e350721e9d1c0c666383b4528249580acfdfc3cc605099c5bb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_TestColorFormatter.test_exception_under_verbose_TestColorFormatter.test_exception_under_verbose.with_caplog_at_level_logg.assert_expected_format": {"doc_hash": "b6ddbe83711f6b6a0cfb9d96f43ff01e0d688a1ad91c33012042afd99dafd17d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/https.py__": {"doc_hash": "ff787a316a3cab4acb6277b7416e326a45812994201cedb258936a9ff1c2e0aa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scheme.py__": {"doc_hash": "62e10f19761a85f57d857c2d0692516a0e6b29996be2cba659f4273a428db4d2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State_State._from_sqlite.return.num": {"doc_hash": "f3f790db72e70d8fe5973da62be6cc74ed7f738e5cfd797c4f54a82ecca7d0be"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/basic_env.py_TestDirFixture.tearDown_TestDirFixture.tearDown.try_.except_OSError_as_exc_.if_os_name_nt_and_ex.else_.raise": {"doc_hash": "9803e85f12b6ac1e3ca52da33c1115d31cdc69058ec5e06874f4a558b5b4be0d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestAddCmdDirectoryRecursive_TestAddCmdDirectoryRecursive.test_warn_about_large_directories.with_self__caplog_at_leve.assert_warning_in_self__c": {"doc_hash": "9c509ed9ff848d30f5d91f9bff9647b8a04571469df4022ffa7d75d6a764ade3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/config.py_parent_config_parser_parent_config_parser_set_": {"doc_hash": "fd2c7e7c236ac34744e2eb7a665eb7d344ca73c2d7a1fdc8bd2c3c360a5b3e07"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/config.py_add_parser_": {"doc_hash": "bdbe50ac4b6c0e0bc8920a2f49713f670721183a1e631528b656bbb60d85e312"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/http.py__": {"doc_hash": "a0b16b6e47e219c4afb9a753dc92d279856c011af27eb30f7fd8764dd09f055c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/hdfs.py__": {"doc_hash": "957465f19ad36b3834ab5ace111a5182c94b105e73cb19b690ac5db4779fcae6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/s3.py__": {"doc_hash": "99fd0c989e1bb80b0382c7718f0f1f8543fc0af0379d1ad034443e35da101869"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/ssh.py__": {"doc_hash": "784dc90eb39410f1cce150528fa00b63ef2ea89ad37e10d5cba6f9dc10db8fe1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_progress.py_logging_": {"doc_hash": "dfd7ccd002b2caf79cecd52eed9c9cdca333e44c345e3983524d97219f459a37"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/get.py_add_parser_": {"doc_hash": "da16780d2d1dc5bd50409a165d46b8fda6c7232af4b883936e79e4463627c017"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/imp_url.py_add_parser_": {"doc_hash": "8224683e335943fb3991744e3855a09738adcf945f96f5f02a35a456bb7ae84d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/imp.py__": {"doc_hash": "6a9eac0378932da9eadf5c91d3e35d5fe4d1da20f3bc2f76d08e5141b7971d24"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State.save_link_State.save_link.self__execute_cmd_relat": {"doc_hash": "6d5ddb35922ef9571cca8824ff55900d6f8b8fb844b2447749289c20fb14506f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/__init__.py_os_": {"doc_hash": "8c69d808f20a0f30b44117b04c01a8412582fd039d966bf699e509601250f2bb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/basic_env.py_TestGitSubmoduleFixture_": {"doc_hash": "d6518a1f8902e69f21926c60017ed31582e78965fff8b614b6ad57feb78fb830"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_open_external_test_open_external.assert_api_read_version_": {"doc_hash": "9c0d4fe23d091a6b405daae237c23d4ff1f1e58b2bbf88fe75e9c88907422931"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproShell_TestReproShell.test.None_2.self_assertEqual_os_geten": {"doc_hash": "54ff8f23dd96da6062f10c3f0021cabbe53584f7766fe3f1fafb46f6f065e5a6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_state.py_test_state_overflow_mock_get_inode.return.get_inode_mocked": {"doc_hash": "a67777e8305aa42fc9dd3359e97c651d807cfdc67602fd1566fcd4b02bebc1fd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_state.py_test_get_state_record_for_inode_test_get_state_record_for_inode.with_state_.assert_ret_is_not_None": {"doc_hash": "4f20981f37f5d674742d746724cdece44b0b554988aaea6f25d56e6cc1aae112"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_get_url.py__": {"doc_hash": "6b9c1cf96fe3d56e6758f28690849627b9d970781647becfa5d45f69fcd59ea6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_run.py_from_dvc_cli_import_parse_test_run.m_assert_called_once_with": {"doc_hash": "85e2fe30b9bd825f5f59be2917dcd7ca29df0da290a028241651bd29bf397e23"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_run.py_test_run_args_from_cli_test_run_args_from_cli.m_assert_called_once_with": {"doc_hash": "6b8597e1dbd6920d0f8907d3f3550aea4b13183f7f48546329066689b8e24df1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_run.py_test_run_args_with_spaces_": {"doc_hash": "cf0f4b470004f42ffef685ab03698ddebea1bea029bfaf23e3f66c4de3875544"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/analytics.py_json_logger.logging_getLogger___name_": {"doc_hash": "4292f808a0b30320a975e06bd9d796c44ecdd516a0711470251f9bf8d4af8a82"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/analytics.py_collect_and_send_report_collect_and_send_report.with_tempfile_NamedTempor.daemon_analytics_fobj": {"doc_hash": "cf8c729d8c2eba51c324cce283f9f78640ba0266025f4294058b54ce89308b55"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/analytics.py__scm_in_use__runtime_info.return._": {"doc_hash": "c593991a0861596c6b9c8e9ef239a7a68025e8ecc9e7bdb8edc651fde4d1627c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/analytics.py__system_info__system_info.raise_NotImplementedError": {"doc_hash": "5fc3fcfdae2843b9175c21b79589d78a844abc96d9bfdc7b7389cf3e98218d52"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/analytics.py__find_or_create_user_id_": {"doc_hash": "d251c4d8330da233c177d5a29f4fe8c5691fb95037d4962860479586a506c61f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/api.py_open_open.return._OpenContextManager__open": {"doc_hash": "3212801e05b06ac0863adc9bdb19da2d655ca3a21ed7be40f6246f63e8352777"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/api.py__OpenContextManager__open.with__make_repo_repo_rev.with__repo_open_by_relpat.yield_fd": {"doc_hash": "a6d75fe930971cfc628b2d986217c6168eb2a137cde88cf4d5a4b4b343670276"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/add.py_argparse_CmdAdd.run.return.0": {"doc_hash": "c008e163f779940c1ff86dd47df64c075381524319ede8f4907ab7b25e107440"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/base.py_logging_append_doc_link.return._message_nDocumentation": {"doc_hash": "9e448b7cafd2a964c62785cada56fdcd2ecc7bc99b4f2b6db1347bb4169d1904"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/checkout.py_CmdCheckout_CmdCheckout.run.return.0": {"doc_hash": "2502f70d0c3844a6e4c90fb660a60a134634bbe082ba4957c8ea27aab4dcc4a7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/checkout.py_add_parser_": {"doc_hash": "70fda1714061671e56cbf5dfc4d87e5e5014da367b4a814a9fa6f6702bb88c2d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/commit.py_argparse_CmdCommit.run.return.0": {"doc_hash": "570ecd67a0b0f2a3e857ce222111c5afc4d6df76df2696bff17d09f6ed1fdffd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/data_sync.py_argparse_CmdDataPull.run.return.0": {"doc_hash": "25d33bd01d231c5008995dd8702bc396d1aa9a6e0a7bcda522665d7993a71d84"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/data_sync.py_CmdDataPush_CmdDataPush.run.return.0": {"doc_hash": "56bc7ba0fff09003a1bf1d70ef82a1037cda46d57b15e1f56c6c05857dff124e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/data_sync.py_CmdDataFetch_CmdDataFetch.run.return.0": {"doc_hash": "2ec4b415070fa67c19d745507a7e1dc9a6f3f855dd5c0a7cf09273f24556e853"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/destroy.py_argparse_CmdDestroy.run.return.0": {"doc_hash": "e9da61d325c1787491c93bcd29d38d30fa1e2d454a3127dc23ec022afbec9888"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/gc.py_argparse_CmdGC.run.return.0": {"doc_hash": "3959f5e27cd3785d2a53885c3961e1f967cda1d0b6012edfd1ebc11076f2ecda"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/get.py_argparse_CmdGet._get_file_from_repo.try_.except_DvcException_.return.1": {"doc_hash": "60d390de9a725b0aba45b7e994c69fd6ac7d74dbdc0e32418096a99c30c9bc97"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/get_url.py_argparse_": {"doc_hash": "086cff16193d2cc73ac74f101015b7ce1de3a266041fd0c3f0d67c7019c65561"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/git_hook.py_logging_CmdPreCommit._run.return.main_status_": {"doc_hash": "ff59ce89f66c042405f43dffb60102608377482608e592903fe1bb4b2accbe8c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/git_hook.py_add_parser_": {"doc_hash": "40922587b15224be42e332d8e871ac993c9c4c345c40f5a8b3a883244a46b5b1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/imp.py_argparse_CmdImport.run.return.0": {"doc_hash": "65a32c772a8e4f17dd4638bb437fc6b9cb98dc37a001a458a73c916967d8afd4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/imp_url.py_argparse_CmdImportUrl.run.return.0": {"doc_hash": "efe77fe0ad098af58502006ed5d925b86b883840da6031cbb9c6087b886d47af"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/init.py_argparse_CmdInit.run.return.0": {"doc_hash": "895cf4cdc462111e1c4593c03d6c8907fe6b181da87ff83c08a3d20cda3b093b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/install.py_argparse_": {"doc_hash": "13458962139c288774a7a4f53498995a6bd49b97580c56d49eb6aed1c7cd3df0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/ls/__init__.py_add_parser_": {"doc_hash": "6d59c4a8570c2871d75a2966c3f14e5af1e919e09b1ebc63dffe2f8dd561b261"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/ls/ls_colors.py_os_": {"doc_hash": "787ae6fa1d5a787acc3000dc4c8f4a470d2b9051c1cd3a77e808c6a55dc3f653"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/metrics.py_CmdMetricsDiff_CmdMetricsDiff.run.return.0": {"doc_hash": "5d3aad0b0cfcb656c9dc078d870061b1156680085a0afa59f141b27b57eee3bb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/move.py_argparse_": {"doc_hash": "abff7174dfd7ffb2a26940af657e2ca96d90cdf550a712971d46923c54c7e8c8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_CmdRemoteAdd_CmdRemoteAdd.run.return.0": {"doc_hash": "ee8d11efacc1d4e23555d5341dca340ca0e6d8d366b5a9f8fadb603ce52d8be8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/root.py_argparse_": {"doc_hash": "e1ccd8154580a568b83bc98916050ae5300218d9bac86eaa25003a08c144b390"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/run.py_argparse_CmdRun.run.return.0": {"doc_hash": "c216d496a33a7a91dbb9432a4919a1d02ec3e0d2051a5b664d9edf3cbbbbf812"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/status.py_CmdDataStatus.run_": {"doc_hash": "e69bd96e0a753ce440f5e7cb03dd3489a7658405e0261a360d960828f1d059f5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/unprotect.py_argparse_": {"doc_hash": "d7de3494c94bfdd3f6b18e9e159051a49c659778be4a08dca6d0eddec710757f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/update.py_argparse_": {"doc_hash": "e936eaaad8e4e9332a629e5a50d06bb1a8665cc61f543174669e0bf1e75dd267"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py__DVC_config_objects__NoRemoteError.pass": {"doc_hash": "a0484bf9292d30cf2c6290c2e4ed9601be99e9d89bb2233119740ac243302a41"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_supported_cache_type_supported_cache_type.return.types": {"doc_hash": "f3dc543b7fcc73e9ab5f3583fe90215a514ccd26b33f2f33ccb50c3ec394840d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py__Checks_that_value_is_ei_Choices.return.Any_choices_msg_expect": {"doc_hash": "a251475eebad59a5d2dc403bd9b8f3b8ccf4b6da8b0c6888867b332a46fec837"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_ByUrl_ByUrl.return.validate": {"doc_hash": "71d658f401726e003172f808ed4514a4c312d6139c90b3a212f88c22885a17b9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py__Draws_DAG_in_ASCII__make_pager.return.pager": {"doc_hash": "8457c1aa06590895d6d2a31cf76c6c73eb62054d6184cb7655d8349fae0f7127"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py_find_pager_find_pager.return.pydoc_plainpager": {"doc_hash": "ad6aab83708cdacc5ac6feeb9a7f7d7e4827036793e12c9bc48cbfa72fdfcd5a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py_VertexViewer_VertexViewer.w.return.self__w": {"doc_hash": "d11e43f30489497463f8b1a32d35d887a6ba0f6bcbb3ac8bbc286281f04809e8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/data_cloud.py__Manages_dvc_remotes_th_DataCloud.get_remote.raise_NoRemoteError_error": {"doc_hash": "b330df642e8071339d8dd323dbb7fec9b550273d0b786a3ab832c303dcabdcb6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py_OutputNotFoundError_StagePathAsOutputError.__init__.super___init___": {"doc_hash": "a3baa1a9e88ed0cfbeec9d0690775f3e10f98446a2e04ad4cd63ce37ad516d67"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py_MoveNotDataSourceError_MoveNotDataSourceError.__init__.super___init___msg_form": {"doc_hash": "2b9d711f277cbdb64ff5937f50c86d2949ce3e7795cf8979aecd1d18760eefcd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py__cached_clone__cached_clone.return.repo_path": {"doc_hash": "22e5bf068126bec4f7942e5dd564cc09491490a7a4083bbaa970ba7dc38a4ad2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/istextfile.py__Use_heuristics_to_gues_": {"doc_hash": "feb0ca572bec20cebebfacbb11d7feab62bd0e852955a24df14abd126fd44d8a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/lock.py_Lock_Lock.__exit__.self_unlock_": {"doc_hash": "d1599871e72aba4c44fa2096a3cd215f1ed601917dd9436041f6710dabcbcfcb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/lock.py_HardlinkLock_": {"doc_hash": "62facfe7b479d84d855b8cad60bd6fcb0b7761aa02bd8470bc9dd05188aa48a0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/logger.py_ColorFormatter.format_ColorFormatter.formatTime.return._green_date_nc_form": {"doc_hash": "88299c378246c5bfc6408dbdfd2c1b9a069b4729d49ee8c0bdd0103dc2af3116"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/main.py_main_": {"doc_hash": "394cd9b5289ca7acc2ecfe4d5275d68807ab4239444eb07d43dde2466e6dcb48"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_URLInfo_URLInfo.from_parts.return.obj": {"doc_hash": "334bf0a760da2ff502335d98e3de2f038d8bd550b3346a7b509c6da00802cf4c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_URLInfo._base_parts_URLInfo.isin.return.self__base_parts_other": {"doc_hash": "08bdc3a26d5ad7faaed9e25268a8ad18f3ff02112445b21391fe7ead0a814a91"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_HTTPURLInfo._extra_parts_": {"doc_hash": "883795a9928727c33360f100426478614b0d98e595210f73213cde37e864c0f4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/progress.py__Manages_progress_bars__Tqdm.update_to.self_update_current_sel": {"doc_hash": "9d227a16107da854417b0fa1bd36fc600024a78f94846d8ad900ef2a7cc4c996"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/slow_link_detection.py_slow_link_guard_": {"doc_hash": "5cd8ea6fd7d78e7728ce5d2d85a0ba2a0cb4d3cc95eec0130d7bccbd41e30a5a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/add.py__find_all_targets__find_all_targets.return._target_": {"doc_hash": "12176486781f63b1399b1bc4fd870241334835809a861a57a81a2f42de61f98e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/add.py__create_stages_": {"doc_hash": "b037322727798feeaba9293afa1ee232f41fa855cc2e8654fe0f8bf8005d7c0a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/brancher.py_from_funcy_import_group_b_": {"doc_hash": "8eb62ec4706df3b1ddda499555ede81b3a782caa0516d28a9ffba19036180a4f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/checkout.py_logging_get_all_files_numbers.return.sum_": {"doc_hash": "8bc441226f7851a5cfb7b5e78090665b16180bde7433a2d048da16720107f38d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/get.py_logging_": {"doc_hash": "c4572663e6c4edc2bb428fcb9137783517dc70f028768d6b34a7ed88e62076d7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/pull.py_logging_": {"doc_hash": "9d388fb75584695869dd0a5d0abd28e543e5056b0e3c8e5c95aac303017fd312"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/rwlock.py__edit_rwlock__infos_to_str.return._n_join_": {"doc_hash": "0ea12ff0d00b0128b126cc0893c34d3abdec27f208f6bfe96abd309634de1a58"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/rwlock.py__check_blockers__check_blockers.for_path_info_in_waiters_.raise_LockError_": {"doc_hash": "88a743add35d0f1e8d4f255ab9a27d63f462c61b0b4274e2beba7fce4557c05f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/rwlock.py__acquire_read__release_read.for_url_in_changes_.if_not_lock_read_.del_lock_read_": {"doc_hash": "5684702434b0b7782c3fb9a01c2684b8bf3c69ef5b433af9ff8ca1d593879d72"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/rwlock.py_rwlock_": {"doc_hash": "17461db65c5218da660b6d0506980f5e3c4236402cd15b46553d416db5c2a632"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State.get_unused_links_State.remove_links.for_chunk_unused_in_to_ch.self__execute_cmd_tuple_": {"doc_hash": "5d7310b61b30bb858c6311c7a4b3f214be2a78264ec16eec2ed90ebf0df18902"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py__connect_sqlite_": {"doc_hash": "ed3dbfd8cb80eaa88dd3832134c905d9b50d784976779617e431b9576abc627c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/system.py_errno_System.symlink.try_.except_OSError_as_exc_.raise_DvcException_faile": {"doc_hash": "1018478b23514229de766d8e33c815a24d50d2e463f7d17f3c3e6bcc517a413a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/system.py_System._getdirinfo_System._getdirinfo.return.Info_GetFileInformationB": {"doc_hash": "792d7363a3cafad6ca93ed2ebd7b8bbea886caa7b3c9fe3eaa6e53e958a38a6e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/system.py_System.is_symlink_": {"doc_hash": "519e4df767b924121c08868c9997cbade4da7f50d93787685e4e30311d9bbf44"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/updater.py_Updater._get_update_instructions_": {"doc_hash": "f48f64029cf5b28e2a6bad17aefab2b6408bb617ef26d9c1c87f31db27354d30"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py_file_md5_file_md5.return._None_None_": {"doc_hash": "8140b9114195d8c595c39b2f6cc6ce43070e35eab8c5a957e7ee73c7013a3728"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py_fix_env_fix_env.return.env": {"doc_hash": "df1fb2b7ff45e5da0cd32793893e3c9e4b6019842cc50f8c9f76e2daa214aacf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/fs.py_get_mtime_and_size_get_mtime_and_size.return.str_mtime_str_size_": {"doc_hash": "0de7c603466fbf172815e7db760bbe45c71d9a9433aa6fdcdb077842a87e56b3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/fs.py_BasePathNotInCheckedPathException_contains_symlink_up_to.return.contains_symlink_up_to_os": {"doc_hash": "db105915c39bcacd13504392e4a40d680b044d28f7d7953a30f86e3b46a8acc0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/fs.py_move_move.shutil_move_tmp_dst_": {"doc_hash": "cddf304f5a40983175b413598553caf2d96075776c58b1f30d1bc1a1088ffb83"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/fs.py__chmod_path_isin.return.child_parent_and_child": {"doc_hash": "a4096833f4ad2beededb3cd57b0926821851b9623fa52c44f803b1bceda11f83"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/fs.py_makedirs_makedirs.try_.finally_.os_umask_umask_": {"doc_hash": "e4e2c4fd314bcae876054426b6c51296cf07660f9ce52dd4b174d7f04f75d13b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/fs.py_copyfile_": {"doc_hash": "80a6639d65776e94e324943c8fa3f074094ef1496e27d85ff365657525c231ad"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/http.py_io_open_url.with_iter_url_url_as_re.if_mode_rb_.else_.yield_io_TextIOWrapper_by": {"doc_hash": "b03c68780aac823b24452b65f373b7ec72d600b374fd072db6c9b1d7d18d810e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/pkg.py__": {"doc_hash": "88d036370701a87a8bff1b19982232274b85599412eb50cb4351c0fc1ae3383e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/fastentrypoints.py__noqa_D300_D400_TEMPLATE.r_": {"doc_hash": "23a3e55edea627fa51156db7dd2d9ecdc71e00ac7776487929aaf799d967f78d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/fastentrypoints.py_get_args_easy_install.ScriptWriter.get_args.get_args": {"doc_hash": "f62ed4b7039c36ec3f827e901c0ee07c47c4a3284fe5f7ca13f43866ceca4aa1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/fastentrypoints.py_main_": {"doc_hash": "d4104e3141d24a4e1a0482c42b30582b788312a3e5d55de5d921e6d230d5b7b4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/hooks/hook-dvc.system.py__": {"doc_hash": "18ee1d91b261e82a9c4330a2513dc39548bb4e56cabdf5f9711310a477140fc4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/hooks/hook-win32file.py__": {"doc_hash": "fd5844718b1a0d95f2aa9ba55e3947d23fdcd0a285255da7f92fccf30d4fdd6b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/setup.py_importlib.util_build_py.run._build_py_run_self_": {"doc_hash": "c296ff7a2e6fcaa3bd72b5e0a5f48893d2b49ef56d75126b56aafccd3ff9a63c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/basic_env.py_TestGitFixture_TestGitFixture.tearDown.super_tearDown_": {"doc_hash": "db74657a13dd90df8e41fbe220af285c4b63bdec03a89c4af4f91a169e528908"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_filecmp_from_tests_utils_import_g": {"doc_hash": "4698ef055e197b4411c028697d3a5d78c45c8bd74c2bb01fa285054cf715228a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_unicode_TestAddDirectoryRecursive.test.self_assertEqual_len_stag": {"doc_hash": "9b71680ea03558c7f0d1c64eea62322f18333695ffdc7ef6dbacdc2836a9f011"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestAddDirWithExistingCache_TestAddModifiedDir.test.None_5": {"doc_hash": "6f600409204d101804ff118e3663b459fc1d2aadc8cf6781a3898b48dbf8829f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_file_in_dir_test_add_file_in_dir.assert_stage_outs_0_def_": {"doc_hash": "d40ba8cb8d1f82a1dfff8883f46a9bf1a195d6328d2146cc680996d7a5393e9c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_should_update_state_entry_for_file_after_add_test_should_update_state_entry_for_file_after_add.None_10": {"doc_hash": "c1ed1a35e8366ba2d36b8dbcea15c04212ffda9a980be64b5b066060e6310c0d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_should_update_state_entry_for_directory_after_add_test_should_update_state_entry_for_directory_after_add.None_10": {"doc_hash": "8cf44162ba6c2da71a3904a0292639831316e09add41c92e748633d36f64a5dc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_failed_add_cleanup_test_should_not_track_git_internal_files.for_fname_in_created_stag.assert_git_not_in_fnam": {"doc_hash": "fef925fa8f9b08ed68a4390afac17a4b65fb18e61c8940c05a0631ac48d1ba9c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestAddUnprotected_TestAddUnprotected.test.None_7": {"doc_hash": "c7ebe7750f51dad9f44616bf97a5de63190a438f6c19a2f2b893728e9e85a56e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_temporary_windows_drive_temporary_windows_drive.if_tear_down_result_0_.raise_RuntimeError_Could": {"doc_hash": "14234e4394bd17314a809701909f4580276fa50739a9734b899bdb21f87cef61"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_windows_should_add_when_cache_on_different_drive_test_windows_should_add_when_cache_on_different_drive.filecmp_cmp_file_cache": {"doc_hash": "4c3d8584099946ae95a128ba823c5b46c08b23844b43ae1942ba6e0dbb46c5cf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_readding_dir_should_not_unprotect_all_test_should_not_checkout_when_adding_cached_copy.assert_copy_spy_mock_call": {"doc_hash": "d2b81fc49cb37f87ad37adaa591a1c9995dcfb8f9d5c5aaca469581ad62f9919"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_should_relink_on_repeated_add_test_should_relink_on_repeated_add.assert_link_test_func_fo": {"doc_hash": "6d329d83c9119e37a9770974b33ff3353f848254c45ccfb4c0256d928ff77d97"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_should_protect_on_repeated_add_test_should_protect_on_repeated_add.if_link_copy_or_lin.else_.assert_not_os_access_foo": {"doc_hash": "fd30201fb3d2e008c43458ee5f3d474fb5164afef2bc0adf7098a175b02a3e1c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_escape_gitignore_entries_test_escape_gitignore_entries.assert_ignored_fname_in_g": {"doc_hash": "55a316496df3a7ced32e8ebd55b8b72aaafb4d5fc41dda033ef5ec34fae8021a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_from_data_dir_test_add_from_data_dir.assert_str_e_value_": {"doc_hash": "668f4855e4b885bdf5963c98bb632cee28c0b2f51a31708c8a42c35c34f456d0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_not_raises_on_re_add_test_add_empty_files.assert_os_path_exists_sta": {"doc_hash": "edb43741f5370f8e952d09856891e1da2eb1b81d2b34bd4de7ef305046b6f885"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_os_test_get_url.assert_api_get_url_foo_": {"doc_hash": "d18fa32c4cbe47d85221e16353505887b74a0c086f111466c7b7484cb0260b73"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_get_url_external_test_get_url_external.assert_api_get_url_foo_": {"doc_hash": "f04f3bc51aa03f74e42181c02d0077dfd5a0b2ee24560abad110b14a70e446b7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_get_url_requires_dvc_test_open.with_api_open_foo_as_f.assert_fd_read_foo_": {"doc_hash": "f1839ba411c714749fd8ae26fcf6cf88c6007c2e400024e93dfa00d5c8338b29"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cache.py_TestCacheLinkType_TestCmdCacheDir.test_relative_path.self_assertEqual_len_file": {"doc_hash": "b5b3b499007b983995ecac6d3c26a96f2af4ee8f88810615b0460608c2612b9f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_collections_logger.logging_getLogger_dvc_": {"doc_hash": "3f0abb6140c932a9862226d77e353eb3ddfb896e15c86cbd32a932844d4b12ea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutTargetRecursiveShouldNotRemoveOtherUsedFiles_TestCheckoutRecursiveNotDirectory.test.assert_stats_added_": {"doc_hash": "d4647448b3141d74277657364527232a25e105f5ce0dc3d0bd5b9b04d68c630a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutMovedCacheDirWithSymlinks_TestCheckoutMovedCacheDirWithSymlinks.test.None_11": {"doc_hash": "588aafd2d687afee215577d1ebf36fe97b55aa6b7f2830c5fa19541ce70bb81c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkout_no_checksum_test_checkout_relink.assert_link_test_func_di": {"doc_hash": "101d4f6deb76ce68e22f167562775121575238afa1d74f44827e646690a3aa21"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkout_relink_protected_test_checkout_relink_protected.if_link_copy_or_lin.else_.assert_not_os_access_foo": {"doc_hash": "52ad95b2b36e77fb24a075e1d6d125b5820976f4af1901d4f72afbe267823625"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_partial_checkout_test_stats_on_empty_checkout.None_1": {"doc_hash": "02cea888cd910f705c998a0edae20f5748adcf17cce2395f38e74f99c4a21a03"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_stats_on_checkout_test_stats_on_checkout.None_7": {"doc_hash": "edbbed85b7ea7dfc49def2f28cea5a21dc2662261355690d77bd5a542e95e0ff"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkout_stats_on_failure_test_checkout_stats_on_failure.assert_exc_value_stats_": {"doc_hash": "2b57a779a16551787b92e6e4292a9d6d940d4bf1d0419bb191ec6f1b9b4ff357"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_stats_on_added_file_from_tracked_dir_test_stats_on_added_file_from_tracked_dir.None_3": {"doc_hash": "a7000d3f042fb5adc10859d330f58f41dcc234b976689c254a106b2060bd086f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_stats_on_updated_file_from_tracked_dir_test_stats_on_updated_file_from_tracked_dir.None_3": {"doc_hash": "7bebf7fd50e5cd8f23ea35ad5019e591bcdbd3bdf84e070b560b325a01e6063b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_stats_on_removed_file_from_tracked_dir_test_stats_on_removed_file_from_tracked_dir.None_3": {"doc_hash": "0d5518ea53b5fc47262b4faaa9c1d17862fceeb089eed357f1f45d3c2d1b710f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_stats_on_show_changes_does_not_show_summary_test_stats_on_show_changes_does_not_show_summary.with_caplog_at_level_logg.assert_added_not_in_cap": {"doc_hash": "0215fc0cdc0677cf453840b6d80e4f55d06ab81693e4ec37ad940a714dc11aac"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_stats_does_not_show_changes_by_default_test_checkout_with_relink_existing.assert_stats_empty_": {"doc_hash": "6608ca500ac689faaa4e417f751cd6d5356e293b0ff240a82aee8f5210176c94"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkout_with_deps_test_checkout_with_deps.assert_set_stats_added_": {"doc_hash": "ac4ee39e4e0ac7ec2706ba9d928213558d179c4acf7a26c72d8132f6c93206b1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkout_recursive_test_checkout_recursive.assert_set_stats_added_": {"doc_hash": "08fc473c461e71c47c888ba752a902d529b02255d9540e60813915139165b562"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_commit.py_test_commit_force_test_commit_force.assert_dvc_status_stage_": {"doc_hash": "a435f01f19239a73f0815741e981484b578066d7d3d6050d38f8beeae330a739"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dependency.py_copy_": {"doc_hash": "a97ed2af1f97ae690e9999c7563b28ec8d367226f934bb144f9ee4a0947ef0a6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_hashlib_test_added.assert_dvc_diff_": {"doc_hash": "9ae7f7dce9a43c3a21094b8a9be76994d7e719ff7cead1f5cc1d80456181607b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_test_no_cache_entry_test_no_cache_entry.assert_dvc_diff_": {"doc_hash": "a9ebf568ccbcfe8e633cfb88a6d34a03d5487c56668f3d93095d3cf682834500"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_test_deleted_test_modified.assert_dvc_diff_": {"doc_hash": "c3587645bb4641a14b1d088254ce783b3d7064497f9476a72b252914f5dde447"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_test_refs_test_refs.with_pytest_raises_DvcExc.dvc_diff_missing_": {"doc_hash": "56067f93f896130d525cc017f8217ceaf4041cd74c0cc26b53e193fd366b63c5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_test_directories_test_directories.assert_dvc_diff_modify": {"doc_hash": "568f41b9c4dc3d122a88b9a82c2459dd9ea459c769ae28d12e89da23ce6b6527"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_os_test_external_repo.with_patch_object_Git_c.assert_mock_call_count_": {"doc_hash": "6e9d0fa360690c75fb42f5f391db40a46ce93552366cbb3b9feba15eaec33eb0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_test_source_change_test_cache_reused.with_external_repo_url_.assert_download_spy_mock_": {"doc_hash": "58c59724ab4dea535d7ec2b40367e100314e16194818eaaf244432d5b22bbf09"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_fs.py_os_": {"doc_hash": "653e94af668561b1d5d38c3dc3039b0181e16d80555fdff269800b4630f0cd97"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_logging_TestGC._test_gc.for_c_in_self_good_cache_.self_assertTrue_os_path_e": {"doc_hash": "ed736ef053fcf149e29d061404a4e8b2c0b32e80a1ef6cd610af802e9dc28c6c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_TestGCMultipleDvcRepos.test_TestGCMultipleDvcRepos.test.self__check_cache_2_": {"doc_hash": "e5b1dbdde7c1d3c3eb5bfb1bff8cf114e40c6ceb77f1581a174d4d1643602ae4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_all_commits_test_all_commits.assert__count_files_dvc_c": {"doc_hash": "959894351f63f645f0e92865445a3764d8f8849ef3bdd04a535100566ffd403b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_cache_type_is_properly_overridden_test_cache_type_is_properly_overridden.assert_tmp_dir_file_i": {"doc_hash": "9828d7920d7d929bf779d6800cebc62667b9ffd2e55ea60130fca8f8e3c16523"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py__https_github_com_iter_test_get_full_dvc_path.assert_tmp_dir_ext_da": {"doc_hash": "461b6ab109f4760ae583b8f06fbd5ee45027fd640e0d491cd8654a88d515fed6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_non_cached_output_test_non_cached_output.assert_tmp_dir_dst_re": {"doc_hash": "b0e3aa853e34ff93caba927b6c5d0bde132cae74114311420fe29b89bf7b3c0a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_file_from_dir_test_get_file_from_dir.assert_tmp_dir_X_re": {"doc_hash": "3784cbbb6ba06c34d5231c2a2a31899c71dd7e596d1cfcdd29e15521ac6a88de"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get_url.py_pytest_": {"doc_hash": "2e8eda774efb12b589b9a04de3a26f34d9472463bc29fcf1da167ec405e74742"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_rename_ignored_file_test_rename_ignored_file.assert_new_mtime_mtime": {"doc_hash": "e899a789e8e9e517c51eb3e0269186428159aa60eb3c7ba4924dea36b44c15af"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_ignore_on_branch_test_ignore_on_branch.None_1": {"doc_hash": "2ec3b663a332fe9df687e38c7416ae7bc6d07e31750f9113ed7cbe3f5f77a249"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_git_file_test_import_git_file.assert_stage_deps_0_def_": {"doc_hash": "cca282bd8c41d8c0ef3a94a3f95c6a9de1df25802cb7adedb62a29a3b12d301d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_git_dir_test_import_git_dir.assert_stage_deps_0_def_": {"doc_hash": "2497e5cce20340630eed486ab0afd7cce4cdd4ff9b421f359778316e91fd0328"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_dir_test_import_dir.assert_stage_deps_0_def_": {"doc_hash": "296ceae0a8dfc7ee6654539b761a93d60a07a0f6bd3b4fc838da1f2879d77b47"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_file_from_dir_test_import_file_from_dir.assert_tmp_dir_X_dvc_": {"doc_hash": "6fe532e0bffce2099abcd856a48661e50cb20221382101522dc3569f04f8e9e4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_non_cached_test_import_non_cached.assert_stage_deps_0_def_": {"doc_hash": "634566efc35025bc039d2e994598f31097389b9cd4463174688f97cbc6ea6299"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_rev_test_import_rev.assert_stage_deps_0_def_": {"doc_hash": "2bcc656dcc8ea2ac07b12782810f30be4d26f2f7672414b976383a376b69612a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_pull_imported_stage_test_pull_imported_stage.assert_os_path_isfile_dst": {"doc_hash": "a9af771710fba64a390a92dda48ae670e97d540c7c00fa098cd24c146a9049fa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_download_error_pulling_imported_stage_test_download_error_pulling_imported_stage.with_patch_.dvc_pull_foo_imported_d": {"doc_hash": "3cfae83aaa7b604e5208150380ba604553e0c4571884bc76f573c1549def257b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_to_dir_test_import_to_dir.assert_tmp_dir_dst_re": {"doc_hash": "cb8e05040b855abdfd69c913761b9d74bdbdf1f3e8b87579ab2a1ad1a68d9611"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_pull_non_workspace_test_pull_non_workspace.assert_os_path_exists_sta": {"doc_hash": "05740c07e3fe17c4dd0e3c27b08a8563b024a9b584bc3b7637574c75e2cfc46f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_non_existing_test_pull_no_rev_lock.None_2": {"doc_hash": "642b4b205113edcc1f5fa8b3f952b41054f1e1210ad75af93442583fff98df2e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_os_test_should_remove_outs_before_import.assert_remove_outs_call_c": {"doc_hash": "705fc9c353dd5cb046edd2337cfff714f99c95c6190b34a24e64e8176f414f19"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_test_import_url_to_dir_test_import_url_to_dir.assert_dst_read_text_": {"doc_hash": "9d9f4b57ff6b848e7abfd7774d1e0f1f64590fc734a32f4e0d7a425c68704d09"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_init.py_logging_test_allow_init_dvc_subdir.assert_repo_scm_root_dir_": {"doc_hash": "e2ea3fa46f15eada0a6582f8e22069ced0350989dc98e2239e895c0fdf98c4a0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_install.py_os_TestInstall.test_post_checkout.assert_os_path_isfile_fi": {"doc_hash": "86db0c0b013c4551f4a64af003a8110b84c50635b17a9117d9bfffb97de34e21"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_os_match_files.assert_left_right": {"doc_hash": "3e1ba0a1f0985c897d089d28ac6e34f7339ae4ad75570ace0b8d8f277000f198"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_create_dvc_pipeline_create_dvc_pipeline.shutil_rmtree_out_": {"doc_hash": "fd7dc466c3f351e06380ae82fad15dcc6bb34aa8e9fdd443a789cb84f6b35a8b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_test_ls_repo.match_files_": {"doc_hash": "174cc0c72ea7fdeca5fc21af189113d75f6b267d77ebf27a9dd6467d0b041641"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_color_test_ls_repo_with_color.assert_caplog_records_1_": {"doc_hash": "480b0e9ee9159895fdffe570087f9135f431d41a4385ec19c9ce51d14af883a4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_recursive_test_ls_repo_recursive.match_files_": {"doc_hash": "f267f1dcd442852cffc405f29e72f60ae81c6fb4ed35d026393da7c07a20f8ad"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_path_subdir_test_ls_repo_with_path_subdir.match_files_": {"doc_hash": "20dff59c54d32250c5d67569959d31eb784fac062a4f1fb03e620d7ff492e33e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_removed_dvc_dir_recursive_test_ls_repo_with_removed_dvc_dir_recursive.match_files_": {"doc_hash": "f567b0b2b7be8ee8faabbc4b2f378dbbe3366b0a285339015544566fbab30c11"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_removed_dvc_dir_with_path_dir_test_ls_repo_with_removed_dvc_dir_with_path_file.match_files_files_fi": {"doc_hash": "b3daf0d876914acfe8a47b1a0d6f29f3e76824397d7d087794235bb3b3bfcf88"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_remote_repo_test_ls_remote_repo.match_files_": {"doc_hash": "06ff5ba760afa7f79477319e7d3f35f4fd6a91913f3f5662b321323b8efd9b75"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_remote_repo_recursive_test_ls_remote_repo_recursive.match_files_": {"doc_hash": "ae5d4721540ce58a518c8f06327344ea0308af2c17d8ffa2a8478dc2e3840ebc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_remote_git_only_repo_recursive_test_ls_remote_repo_with_path_dir.match_files_": {"doc_hash": "848fc371bd3adc2bf42c4bcaa1732e011b21d2830d9426f6bf81c1bc54a8df1c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_remote_repo_with_rev_test_ls_remote_repo_with_rev.match_files_": {"doc_hash": "636b888dac0173ad7a3ac8d164f6579fc8580de77177524020fecefd974b4928"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_TestMoveFileInsideDirectory_TestMoveFileInsideDirectory.test.None_3": {"doc_hash": "4b732651b595ff5d1e3a16597e12cea76cc2253c428df2a8cdedcbc162285204"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_test_move_should_save_stage_info_": {"doc_hash": "b24c0426bd47c32815c84170bf25ca45122e735f8edaadb553332c7aa7453835"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_errno_TestRemote.test.None_5": {"doc_hash": "5c53b0d5cd3f7ad5f7c4a48b4874ea815b70866c637e15c6369971871b59981e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remove_default_test_remove_default.assert_local_config_get_": {"doc_hash": "d27022d534d06a0f578a6822d01886870cd85033b81bda2b6734c916aa007b00"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_show_default_TestRemoteShouldHandleUppercaseRemoteName.test.None_2": {"doc_hash": "206fc58369adab9d4b72e57db6128ad354b8d709a12b3c51c3dc801facd106d3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_partial_push_n_pull_test_partial_push_n_pull.None_1.assert_download_error_inf": {"doc_hash": "42a5e07fc612a8239a545d9dad7e944818c0262657692dd49ae5e34ae8a5d14e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproWorkingDirectoryAsOutput.test_nested_TestReproWorkingDirectoryAsOutput.test_nested.with_patch_object_self_dv.with_self_assertRaises_St.self_dvc_reproduce_error_": {"doc_hash": "4ce563cfcb6c2e91ca92056a0fea65bb97719a98a3a3450facb52c18aa13caf4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_repro_dir_repro_dir.yield_stages": {"doc_hash": "8c38e9988237562c676576df010b292b35ace81097c314ebbd3ce0a904428f6d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py__rewrite_file_test_recursive_repro_default.None_2": {"doc_hash": "eed98830489ac4a1a81d94db17cd1d7e6a7da0ce18104bff714eb92f674a7c80"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_test_recursive_repro_single_test_recursive_repro_single.assert__read_out_repro_di": {"doc_hash": "15254d1bf1d259c9fc8bfe11ef0a51d22f5005e0ae4a6817a9aaa60389bdc79f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_test_recursive_repro_single_force_test_recursive_repro_single_force.None_3": {"doc_hash": "383ff37a1ae5cf4732cf642fdd0054b7d3397ec6d9d1ebdb2022408976e6df9f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_test_recursive_repro_empty_dir_test_recursive_repro_on_stage_file.assert_stages_repro_d": {"doc_hash": "e445b7e579c6df55ae4feee39aff6b2f48c346f7ffba873b4e07c88c0aaafc37"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_get_gitignore_subdir_test_get_gitignore_subdir.None_5": {"doc_hash": "a1fbbd0e29664f2d99843992c305fafd2d7f41eb643c37e693749146f9487de9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_TestDefaultWorkingDirectory_TestDefaultWorkingDirectory.test_ignored_in_checksum.with_self_dvc_lock_self_.self_assertFalse_stage_ch": {"doc_hash": "936bbd1ce30954e8f48621b3b091ffcd7737ec8f98671426be3c7bad96d3bcd1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_md5_ignores_comments_test_meta_is_preserved.assert_new_data_meta_": {"doc_hash": "96721039b05a4347212a53db6819b22a0db5ea3b6e054a3cbf1dc213c8b8cb11"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_state.py_test_remove_links_test_remove_links.with_dvc_state_.assert_result_0": {"doc_hash": "3fdd1d202da80fea7a5bd2ff8ca7b8d56dea69cccf1bd2a3400fb550bbfb7ae7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_state.py_test_get_unused_links_": {"doc_hash": "1b6e2e87e1299deed9607cd1650a32c767aa8a63ac804ca32b2b654262b04ff5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_status.py_test_status_non_dvc_repo_import_test_status_non_dvc_repo_import.assert_status_": {"doc_hash": "8506cf40e3472b1b24631025a22d966f65ee6b452cfa8f4dc753281c4319258f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_TestGitTree_AssertWalkEqualMixin.assertWalkEqual.self_assertEqual_": {"doc_hash": "bf5e28125eb321793628c917316f08b638bf32ec13efe22f5dd209662597d1dd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_TestWalkInNoSCM_TestWalkInNoSCM.test_subdir.self_assertWalkEqual_": {"doc_hash": "ee41e832890867d1c9f9ae67a8278e69606088a9d1f0de7c5977d492e7a89062"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_update.py_test_update_import_after_remote_updates_to_dvc_test_update_import_after_remote_updates_to_dvc.None_11": {"doc_hash": "3bd14a6f7f38e1ca9ce5e83028453793479da26ddc778715821e737d276a6665"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_update.py_test_update_before_and_after_dvc_init_test_update_before_and_after_dvc_init.None_3": {"doc_hash": "a8996cb40899c508e3da69a01329a51b9aa863fe935e17b186e0b6eafc472a71"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_update.py_test_update_import_url_test_update_import_url.None_5": {"doc_hash": "043931e4770f43ca50714043af89a57abfab0bcf70efa08319f314bc7736da82"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/ls/test_ls.py_from_dvc_cli_import_parse_": {"doc_hash": "2f87c90c76bd6a2a563f4b4d0b24738d32cec0bf111039f7b8100bede4322704"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/ls/test_ls_colors.py_from_dvc_command_ls_ls_co_": {"doc_hash": "922a43170c056d753c0adda9cfa6bda33f169aa5807ff7828219e10b71dc787a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_checkout.py_logging_test_checkout.m_assert_called_once_with": {"doc_hash": "76953dec4d3dc48528f0dc3b0d2c2c9abd5b7893de68044e2a341800fa157ed5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_checkout.py_test_log_changes_": {"doc_hash": "123fd22a943d8066198eea5aec914f02b7c5be910bc37f891e75e6d33beed911"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_show_hash_test_show_hash.assert_": {"doc_hash": "b1e363610a0ac45c8d31f5627c08782d53c0dfec4b03f31c9f4fbb54458ab1bb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_get.py_from_dvc_cli_import_parse_test_get.m_assert_called_once_with": {"doc_hash": "dd25305510a5b9502ec6797df66577d2a52182da451669b2fd6d05f3af097d8c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_get.py_test_get_url_": {"doc_hash": "e6a5e969771d7eaa333eec20a8587a6a40996a7ffb9c5ab88b9c6c3c476aa2c7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_imp_url.py_logging_test_import_url.m_assert_called_once_with": {"doc_hash": "1336562958c0b1662970c7978033c31861ccc5ee7978e70be6eb6cfd0d3c5542"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_repro.py_from_dvc_cli_import_parse_": {"doc_hash": "662b596d44f6d43fdbe5f39c8889aa12a33e63dc0fe56cc55f18633275117488"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_local.py_os_test_str_on_external_absolute_path.assert_str_output_abs": {"doc_hash": "35bfb833b65a8d469ff547dbca0a02450fe9fa3b7079f5511821b114e17df46b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_output.py_logging_test_checksum_schema.assert_Schema_CHECKSUM_SC": {"doc_hash": "8a181c71552515dcd0a54b541d995c141655b20f2a4188d81430aaf9970c37cf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_output.py_test_checksum_schema_fail_": {"doc_hash": "6c699d3bcdaf16be2ef2888825920a20ec91b4b6d08d9427bed25d6ed69a34a7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_connection.py_filecmp_test_remove_dir.assert_not_dpath_exists_": {"doc_hash": "8c012db21a5f0646aa4fbb21dba260780d799cc6fcaef9f672c14723a2ad8e9c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_connection.py_test_walk_test_walk.assert_paths_expected": {"doc_hash": "6fee0c64b3399661970397b929bf680b23f2282d42a2ca577b86b037245ebeb8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_connection.py_test_reflink_test_reflink.assert_not_System_is_hard": {"doc_hash": "b193a4a3e0e65141f8f7dd725a3ec63f4f801e906ade3dda108975286c28e0c0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_hardlink_optimization_": {"doc_hash": "555fdce008f47b25a411b13dc3ba04ff7006bdfab62f907f32f4b0708f1c59ce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_gdrive.py_TestRemoteGDrive_": {"doc_hash": "81c7a0c6b93aafef8b9b4cc0dcff0aeadd9928c2f4b883bd5dbdc17c4bfa3aa2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_slow_link_detection.py_mock_": {"doc_hash": "91e92af7154ef142a56a0cad577d6c256f909e45bd4f5debb12fbff743f323a2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_analytics.py_test_runtime_info_test_send.assert_not_report_file_ex": {"doc_hash": "c9210b0df900edaed158adac21162e5d0d6b9beea58b56597dc31862e1f67c5f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_analytics.py_test_is_enabled_test_is_enabled.assert_result_analytic": {"doc_hash": "dd6a509fd04226c9bd91e6e32acfbd3ca578fa8a951421ac1b4dd76931f8190d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_analytics.py_test_system_info_": {"doc_hash": "9a309b7d9eb9bdf787528d26ef89c51d39b9675fa73ba997e90f3fc830531afb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_daemon.py_inspect_": {"doc_hash": "957d6d4bc9ad05a3a526ba88a7d51d3fec2f1f990f49b5785c4536e69243032d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dagascii.py_from_dvc_import_dagascii_": {"doc_hash": "56ec14a7e38bdbb1f1bb64d7d9077a32b64978d2c41650ae3797b22acfc142b0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_imports.py_subprocess_": {"doc_hash": "71a2730c8ab90a484c1de8cf8beb0f707da39fa3a3ab73cb17c60d05f68903bb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_logging_dt.yield_2020_02_02_00_00_0": {"doc_hash": "e6ee9caceb12d14a90b99e25a68cb0dda008d91a02fa8ebdef9daadf2b4ca04e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_TestColorFormatter_TestColorFormatter.test_exception_with_description_and_message.with_caplog_at_level_logg.assert_expected_format": {"doc_hash": "812f5e57de83ad3133122a6277a1bf30035c02a1c633e7c1163cd98078d5077b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_TestColorFormatter.test_exc_info_on_other_record_types_TestColorFormatter.test_exc_info_on_other_record_types.with_caplog_at_level_logg.assert_expected_format": {"doc_hash": "5f53f1d79168995bda59b285a965066e1b906cd7b0f9fa5c80ad7ec9b6d6a41c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_TestColorFormatter.test_tb_only_TestColorFormatter.test_tb_only.with_caplog_at_level_logg.assert_expected_format": {"doc_hash": "f694b298852d2329ead4f69ca192391b250479c97980a5efefeaa584e8b22950"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_TestColorFormatter.test_nested_exceptions_TestColorFormatter.test_nested_exceptions.with_caplog_at_level_logg.assert_dvc_exceptions_Dv": {"doc_hash": "2728e8f1dbbc8d6e24230573953ad2f97d02f87c2f568aeeb168331f885070bd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_TestColorFormatter.test_progress_awareness_TestColorFormatter.test_progress_awareness.with_Tqdm_total_100_desc.None_1.assert_captured_out_": {"doc_hash": "ef1fa710ef89eb1462aa83be25d938876b37ecb559df9af50a48631dede3b70d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_test_handlers_": {"doc_hash": "c573061916510c090249cf4a34dbe7b74dad920fac73d3877673f9c8f0814f69"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_path_info.py_copy_test_https_url_info_str.assert_u_fragment_fra": {"doc_hash": "edb285a2d34b1ee1fc5d72245e5b1deb839f62bf65471f55ab40a965cc0f65e2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_rwlock.py_os_test_rwlock.None_2.with_pytest_raises_LockEr.with_rwlock_path_cmd2_.pass": {"doc_hash": "2db8704da8a4136b2b07e727a0831861fe6f3a1fcd52625ef7df9aee07231481"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_rwlock.py_test_rwlock_reentrant_test_rwlock_reentrant.with_rwlock_path_cmd_.with__edit_rwlock_path_a.assert_lock_": {"doc_hash": "3e860b59e565da5b652d39beab0027130336e583f3bc434c6cf037f738eddfd8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_rwlock.py_test_rwlock_subdirs_": {"doc_hash": "90cb4900572b94b6833be8f7a413ea6a596392a5fab7e5cb50a5fdd643c12733"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_state.py_pytest_": {"doc_hash": "b157b207e1106592711102132726e4aa20b7162db6159bb7862c09d783448c1c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_updater.py_json_test_fetch.assert_info_version_": {"doc_hash": "c47ff507a9ab2949842c774bd4f024fecd72805d9303f1f0c6f86c7be4c94594"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_version.py_subprocess_": {"doc_hash": "6e40d04afad79954e2177ecd94e4f1e33e32048cbacf0a26b53e18d46c0061aa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_filecmp_from_tests_basic_env_impo": {"doc_hash": "77140879017577388682b0b603c4e2baed0c516b547317cdcb8fbc373edb4d96"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_TestMtimeAndSize_TestMtimeAndSize.test.self_assertEqual_dir_size": {"doc_hash": "0bb9b1ed5dae6043fb8699ecd28ff61da144495377e5eff6651bf584aebe8eeb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_TestContainsLink.test_should_return_false_when_base_path_is_symlink_TestContainsLink.test_path_object_and_str_are_valid_arg_types.self_assertFalse_": {"doc_hash": "32519e747092f899f2d506eb18ff8a37f6bdaccc2590be8e446fc0f09f6bd774"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_test_should_call_recursive_on_no_condition_matched_test_should_call_recursive_on_no_condition_matched.assert_contains_symlink_s": {"doc_hash": "8741a6a0cbc2274505ec6beeebbe6da0b46c479050135ca542670b8408c36323"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_test_relpath_windows_different_drives_test_get_inode.assert_get_inode_foo_": {"doc_hash": "016a0db7a92d34a330446ebbd145ec58836410b0372e27c354d350477964442e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_test_path_object_and_str_are_valid_types_get_mtime_and_size_test_path_object_and_str_are_valid_types_get_mtime_and_size.None_7": {"doc_hash": "41dd4b7347ad7459599c7386cbef2627f1ddbc43abdc51991f6deedb5519b79c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_test_move_test_move.None_5": {"doc_hash": "22040e866c6ea26d474f1935d90ffc2b09e74697bf274447682068cc467a3bed"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_test_remove_test_makedirs.None_1": {"doc_hash": "5b2738717a1d5bee06a1332bc7867ddb03b5b5ff1a780f23d25aad64f6e135e0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_test_copyfile_": {"doc_hash": "f7ba80a47a1511df39b5014fe6beaf0dcd53dd3375e0f2ca5d8ad8bfcdb478a5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_utils.py_test_to_chunks_should_raise_test_to_chunks_num_chunks.assert_result_expected": {"doc_hash": "4997e44eed1f1526e9466d26fbeffebdeba421f0a2435b22b319f24cdfe90493"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_utils.py_test_fix_env_pyenv_test_fix_env_pyenv.assert_fix_env_env_PATH": {"doc_hash": "6f37b34170ba2de5de369eb4d477cb4273153d68e915cabad3040f49b4d0a5d1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_utils.py_test_file_md5_test_relpath.assert_relpath_path_r": {"doc_hash": "31725b3023daeeb41628f32fd4424b35b063a9c104580d87e9048e7cfc20e4fd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_pull_git_imports_test_pull_git_imports.None_5": {"doc_hash": "7a062b8bf756afdf8aca5401861a2205d4bc608c2f1078d1f837faad9e149424"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_URLInfo._fill_parts_URLInfo._fill_parts.if_isinstance_path__URLP.else_.self._spath.path": {"doc_hash": "7700288a719568f50f8affca2cb3c074ea5764db3649443d2795fcec069e82d6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/progress.py_Tqdm.wrap_fn_Tqdm.close.super_close_": {"doc_hash": "85b1ca374247b26ef1daa3450e711eb551ab7cd333a0023db8ef405acf104e84"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/progress.py_Tqdm.format_dict_": {"doc_hash": "aa5bf428dc68319120a3db341668c07b12ac8c6302138061f2886c6fa0b1f9b4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_local.py_test_protect_ignore_errors_": {"doc_hash": "366267ae40f9a8aefba45666c6c6baa08ec61cf0861d50ee4ff7478756e39ff5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote.py_test_makedirs_not_create_for_top_level_path_": {"doc_hash": "42a723c14b0882cfbbfa3e563e604e79b680dc397fe14d903c04e542c46efaa0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/__init__.py__": {"doc_hash": "d143ab5f07bca9902adcfca1fa1af9eb52a989642fd2ee035391ffb05ac098bc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/analytics.py_is_enabled_send.os_remove_path_": {"doc_hash": "1a704ff7de1e30801ce57ec5a3a4ccd9c9c1d21346661feeec87adfae2013425"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/params.py_add_parser_": {"doc_hash": "c70340248c350d7c40c8a7ef3997b7d8c38ada138019d9bdf4c0a74934b05869"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/params/__init__.py__": {"doc_hash": "314b303d6d55a9b929ae95e2593bf406e1af542df1a46f4fb68c756c70142fbf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/params/show.py_show_": {"doc_hash": "52c40dad3007e43f98c6e9ef10b366a2fa55244fb562e251779f6efeed8fb662"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_diff.py_test_diff_new_test_diff_deleted_config.assert_dvc_params_diff_": {"doc_hash": "b4fb307525eb3ebe612a25ec59903a91443b47ad20e394af620f8824d8bbd5a4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_diff.py_test_diff_list_test_diff_list.assert_dvc_params_diff_": {"doc_hash": "5d1bd7e1cfc46e67580a4960a5cb0b35e852d003fb11ad9b8b9c244fd4c7ca1b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_data_sync.py_from_dvc_cli_import_parse_test_fetch.m_assert_called_once_with": {"doc_hash": "320c19b1088020b801b5a460784d912587f9a85d90824afd0b2c66b429284c55"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_data_sync.py_test_pull_test_pull.m_assert_called_once_with": {"doc_hash": "06c1a601bd65a65b4a3e20547c59a21ff839f31c6f7dd07e853aab2541d2d600"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_data_sync.py_test_push_": {"doc_hash": "8824fd20e008ac2da9223bfda17d1a5fbc087423c24e46e6053560fb8a5ece4c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_show_json_diff_test_metrics_diff_deleted_metric.assert__show_diff_": {"doc_hash": "0e9a19c5e0bc4e2f8d66be49bdb825d0ce0b3e99691757a475fc82e014e5e6e0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_params.py_logging_test_params_diff.m_assert_called_once_with": {"doc_hash": "52551b1426c492c9a77a441ece65a4c40cc966e92b5bcd546a7fc9ebd012b844"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_params.py_test_params_diff_changed_test_params_diff_prec.assert__show_diff_": {"doc_hash": "99073f14aa76241fe07e137253dfc6ad4c0fb0cdf9828ce97bd34914de231093"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_params.py_test_params_diff_show_json_test_params_diff_show_json.with_caplog_at_level_logg.assert_params_yaml_": {"doc_hash": "3fad233c735b5270d7092ba9e9d3c7fa355f02e1841342b6e15c35e572b7fb1f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_getpass_test_url.None_1": {"doc_hash": "fff9cee91211eff873284f1fe369331814ef399afb64c9a14e31e3278505103f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_no_path_if_sys_version_info_major.else_.builtin_module_name.___builtin___": {"doc_hash": "76f15f6a870f0d68cf091a38df752254d9ca70a2fb71ce815f979ded01c89d7d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_gs.py_mock_": {"doc_hash": "757f7a9b4a994f3b9ab1c6295535635261079d0834c68227b0b15c8924c63fee"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/data_cloud.py_DataCloud.status_": {"doc_hash": "c201768c9bf227550cd1cbf297644d32612a0b083f78f111f3b8051e600c58ac"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/index.py_logging_RemoteIndexNoop.intersection.return._": {"doc_hash": "2013a90cd6335290c2f653f5850dab5d386a45d39b049c94e94b75d31455aab4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/index.py_RemoteIndex_RemoteIndex._executemany.return.self_cursor_executemany_c": {"doc_hash": "51c6e8d699fefade8de8af5605e322c6b600602b3e0e3a3ca6114ac8af3b08a2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/index.py_RemoteIndex._prepare_db_RemoteIndex._prepare_db.None_1": {"doc_hash": "fb6dcca99fecc0b049a2f2d3490a60f7e1b40016f68f79a5ca0fa384b7f6aaaf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/index.py_RemoteIndex.load_RemoteIndex.load.while_True_.try_.except_sqlite3_DatabaseEr.if_retries_0_.else_.raise": {"doc_hash": "8f0b000fb48294c3792ea1c30d773090421877fd80447a69f2324b0901afc6f6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/index.py_RemoteIndex.dump_RemoteIndex.update.None_1": {"doc_hash": "da8903a8e4d7bc1da0209b9c9121c2b9f9410ea83a17893263e3d3e230d6eb87"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/index.py_RemoteIndex.intersection_": {"doc_hash": "8b7369810dd8c83621bf2ce2dda1be5651e7f439d8196ba93816f866e8c7b7c9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/imp_url.py_os_": {"doc_hash": "a6555cb8d9b8b49d34e4dbd816b761d50633948363153f21e3d85be021ff51a7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/ls.py__ls_": {"doc_hash": "6141cdb6a2fda8568e3668fd7bf559b694b9cafc8f6d44611a512ea2c3adca2a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/params/diff.py_from_dvc_utils_diff_impor_": {"doc_hash": "841c7b23e958e26fd682c74aca09c67e3d7864ff44526f387bcbd5ee6ec101f1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/run.py_run_": {"doc_hash": "9fea12e235376c2eee38f5abecb25f5c97bcf360aa15358fd772f530aab262eb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/base.py__Manages_source_control_NoSCMError.__init__.super___init___msg_": {"doc_hash": "fc7f7510b9fed7562b45533a183861a1fc1c0db2e67ec8e8c1a8168a28910961"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_PipelineStage_": {"doc_hash": "622deb80332962a29b7694a49e8a27ecd4cf86b1dc8bb1e7cba147a112814acf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/exceptions.py_from_dvc_exceptions_impor_": {"doc_hash": "70a15fa83bfb7a204635c88d26ef2bf0cd8fdd45096652702f1c12acb0a36762"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py__visual_width_resolve_output.return.out": {"doc_hash": "c65c3dc7dd1c79edb09b13ef0d4d553cf603da534c18fff295f5d62c6075d4bb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/diff.py_json__diff_vals.return.res": {"doc_hash": "61a794a5b2db8e640c0f82bfe115db57ca44e18fd3ecc7fb5c4e23f007f91d84"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/diff.py__flatten_": {"doc_hash": "696d9262911c2327d68ed49901b8f3968b0bcbe648573e0f0e2ef345d96c5831"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_diff.py_test_diff_dict_test_diff_dict.assert_dvc_params_diff_": {"doc_hash": "2b9d17390ca84638952bd1d01a9a450119a0b1879498697ac220ad9e2b66b671"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/remote/test_index.py_test_indexed_dir_missing_test_clear_on_download_err.mocked_clear_assert_calle": {"doc_hash": "04ec61b317628480cde27715c221f2dfcd1bc78feeed468ec52ccb2c900c8041"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/remote/test_index.py_test_partial_upload_": {"doc_hash": "d7abdf0af97aed14381d2af111a64c9c30e040c354ac66ecd8a1ecd26aec9c89"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_has_stage_with_name_test_has_stage_with_name.assert_copy_not_in_dvcf": {"doc_hash": "81c97ecaae80185bb7d8c9955218df28599f68cae9da0dda37f3b97eedb9ad7a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproPipeline_TestReproPipelines.test_cli.self_assertEqual_ret_0_": {"doc_hash": "900195931d575d6afe965d9d511f8d25b47c126afd9a5726ca6a9d8003a9d5f1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproChangedDir_TestReproChangedDir.test.None_4": {"doc_hash": "2304596b2d485263437daf6a797e215ec4c0278c2d6d947883616b955edd781a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproAllPipelines_TestReproAllPipelines.test.with_patch_object_.self_assertEqual_mock_rep": {"doc_hash": "9685baf1e899ada282dc226ee6076fe57327aac48259b43e9fcb22603bdb932a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproNoCommit_TestReproAlreadyCached.test.self_assertNotEqual_run_o": {"doc_hash": "7443b6b1e89356edbaa9162f5e095865883000488fd546e1b8a701c60f8a4064"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproAlreadyCached.test_force_with_dependencies_TestReproAlreadyCached.test_force_with_dependencies.self_assertNotEqual_run_o": {"doc_hash": "38b18432c009c1e72b272859ae9abc64ad9493d79c74653f572c6bdfb167a384"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_new_deps_is_added_in_dvcfile_test_repro_when_new_deps_is_added_in_dvcfile.assert_dvc_reproduce_targ": {"doc_hash": "df5f3e02badded01d46a03963f3d1998d5a6ea03de48c343a9d7860d0ade793b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_new_outs_is_added_in_dvcfile_test_repro_when_new_outs_is_added_in_dvcfile.assert_dvc_reproduce_targ": {"doc_hash": "bf75fba2685326afb20482127b68d2bd2d3e7cddd0800b0f7af94d2ef0f9933c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_new_deps_is_moved_test_repro_when_new_deps_is_moved.assert_dvc_reproduce_targ": {"doc_hash": "26f84455d110f361dc5c75e7877ca70639e3e22f30719672b002031e24d046ef"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_new_out_overlaps_others_stage_outs_test_repro_when_new_out_overlaps_others_stage_outs.with_pytest_raises_Overla.dvc_reproduce_run_copy_": {"doc_hash": "1e5f8a1ce3f2b62a0629802870189b94577cb6f7cc2a9d20902abc05739733ca"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_new_deps_added_does_not_exist_test_repro_when_new_deps_added_does_not_exist.with_pytest_raises_Reprod.dvc_reproduce_run_copy_": {"doc_hash": "1c4300ed9f03acf0fb6166cbfc65a849edcd30ac947e7d4f7ebd14b00022a685"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_new_outs_added_does_not_exist_test_repro_when_new_outs_added_does_not_exist.with_pytest_raises_Reprod.dvc_reproduce_run_copy_": {"doc_hash": "a79fa9c4161e604b0e759e1e6446b6c8810dcfaaee83ba6300c77b4eba4bcc04"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_with_multistage_and_single_stage_test_run_with_multistage_and_single_stage.assert_stage2_name_co": {"doc_hash": "38de980f789ac7fbb4f7d72b6d1fcc6efa3080f0a0adc60b5463367525fb2077"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_multistage_with_wdir_test_multistage_with_wdir.assert_dir_data_sta": {"doc_hash": "b4940a4183b3832e2aca4b415bcf6094f8dc48bd51f25cac25463d1f1832a420"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_multistage_always_changed_test_multistage_always_changed.assert_data_stages_co": {"doc_hash": "b5a0feff672d17dc67b6fcdf64ddc507a81d1db94bc61ad2e0139efb331bb901"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_graph_test_graph.with_pytest_raises_Cyclic.dvc_run_deps_baz_out": {"doc_hash": "d5938df296feef07cc9023e7ebab8b72d6387ac993b4058d1ed0d07d7da85f23"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_filecmp_from_tests_basic_env_impo": {"doc_hash": "f3abd9b1c4f93088c662726ca341feab70f056a421a50bd9d57301d3c37deace"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRun_TestRun.test.with_self_assertRaises_Ou.self_dvc_run_": {"doc_hash": "6ee6c2e4c0131a008adef6353d5ea45e24a84f8cdec0d680bc3378a5120220b8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunDuplicatedArguments_TestRunDuplicatedArguments.test_non_normalized_paths.with_self_assertRaises_Ar.self_dvc_run_": {"doc_hash": "ef44357a084c1afa674c4ffe03f8c0d488656931911dac09706173c5f91d5b5d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunBadName_TestRunBadName.test_not_found.with_self_assertRaises_St.self_dvc_run_": {"doc_hash": "06d36e88d2255acc4f80d509d5a40231c463d71a58a323efef2369b1df7d5745"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunRemoveOuts_TestRunRemoveOuts.test.self_dvc_run_": {"doc_hash": "511e0b82bcbd70ef42fd71a6733bcef6f24cbf3b3aa2238127e1812dc4857f0d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunUnprotectOutsCopy_TestRunUnprotectOutsCopy.test.None_2.self_assertEqual_fd_read_": {"doc_hash": "539d2913259c2e28c82472caaa50f7ee10fee4f4262816a36058fe8eca20186d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunUnprotectOutsSymlink_TestRunUnprotectOutsSymlink.test.None_4.self_assertEqual_fd_read_": {"doc_hash": "447040ad04a614d82a7be1e1517273774b51c5d64635d2215fff7168c1a3ed0f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunUnprotectOutsHardlink_TestRunUnprotectOutsHardlink.test.None_2.self_assertEqual_fd_read_": {"doc_hash": "aa950ebeeb416e7fae19680c67ac9d28903d1bd71777ebe55b41c77532594447"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestCmdRunOverwrite_TestCmdRunOverwrite.test.None_9": {"doc_hash": "7f61c5dde373a4bf2831e979cf1c1bef9814b234933d5e7914a0fc88029e01ab"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestCmdRunCliMetrics_TestCmdRunCliMetrics.test_not_cached.with_open_metrics_txt_.self_assertEqual_fd_read_": {"doc_hash": "7fcb30d565225d925bf741a1ede8b5553a7b7e5a17b405a8d324635cd72decea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestCmdRunWorkingDirectory_TestCmdRunWorkingDirectory.test_default_wdir_is_not_written.None_1": {"doc_hash": "698f6358fba6d29e55ecb28ec1b66b27db3a5fa9822711a1ba8407f6dc24271c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestCmdRunWorkingDirectory.test_fname_changes_path_and_wdir_TestCmdRunWorkingDirectory.test_fname_changes_path_and_wdir.self_assertEqual_d_Stage_": {"doc_hash": "991c63203c287431390eb5a37da88fcbafbd7eed0dcde07aedb7d5d8801f6bec"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunCommit_TestRunCommit.test.self_assertEqual_len_os_l": {"doc_hash": "cef9fcb5dc2a9c5fa56bf19852c814cb6b90c5c8c39a83bae9b495c1ed3d9a2b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunPersist_TestRunPersist.should_remove_persistent_outs.self_assertFalse_os_path_": {"doc_hash": "3589c04bc9cf76afc136c54d5be7499c61ec8af4c84f595431ee38ff4bb921f1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunPersistOuts_TestShouldRaiseOnOverlappingOutputPaths.test.None_4": {"doc_hash": "7191eb71be131902c41e94a09d684d825135284ade1fac61f8e58dce37124d20"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRerunWithSameOutputs_TestRerunWithSameOutputs._run_twice_with_same_outputs.None_2": {"doc_hash": "41cddd18ac3e7c6e5c7a94a228b7274c6e55f96c8205c141eed3275841c20894"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestNewRunShouldRemoveOutsOnNoPersist_TestNewRunShouldNotRemoveOutsOnPersist._outs_command.return._outs_persist_": {"doc_hash": "a3d54eb0e3d314f41fe1fffe39bbc73cbdce9f4aab891771699f8e11b2ff74e4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestShouldNotCheckoutUponCorruptedLocalHardlinkCache_TestShouldNotCheckoutUponCorruptedLocalHardlinkCache.test.with_self_dvc_lock_self_.with_patch_checkout_as_mo.with_patch_run_as_mock_ru.mock_checkout_assert_not_": {"doc_hash": "228557f17ba58be23877cfcbb3e277009559329f1f5f534a50d3e31b16cf6deb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_os_test_empty_list.None_1": {"doc_hash": "f2c6c95f0fdc7d2d0fa92f455763158f9bf5d4954215befe4453e263c31d1f84"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_list_test_list.None_1": {"doc_hash": "534b0605cbb5ad81b6c065e7afbf0d83f0e476534e0f553f04baa11d51fe877c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_index.py_os_": {"doc_hash": "9180a1403a5ca2956a5c9e44b621a2cfab547338a08347aa85abc4d7611c98a0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_lockfile.py_test_load_when_lockfile_is_corrupted_": {"doc_hash": "9aa9ce7bc2367841ca7fd5ddc6ad65f68806d02d6b5c948b9dc4766c43bb8998"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_TestRemote.test_relative_path_TestRemote.test_relative_path.self_assertEqual_": {"doc_hash": "32341f74f51f7232d8527bb9f2373c9c7a9e64654dbf86f8e4647fe9f77dbd4a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/checkout.py_argparse_log_changes.for_state_color_in_color.for_entry_in_entries_.logger_info_": {"doc_hash": "6b65958c17baa0491fd2d857512645e5c6ca94d1e17afb5a2bf669219d0f9ba9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/data_sync.py_shared_parent_parser_shared_parent_parser.return.parent_parser": {"doc_hash": "e6fa92266ccc5e7e22a212a78441df624b7d144af9267f0092dbce16a20c0c83"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_CmdRemoteDefault_CmdRemoteList.run.return.0": {"doc_hash": "b4ec7159054c59a1f17e79eed374ae58a1341a20e98504168f1c477096775561"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/__init__.py_from_collections_import_d_SCHEMA_update_ParamsDepen": {"doc_hash": "30cefb216b6ca7cecb3668ee7fe1b5800e696eea9f9d0b8cacdd40b444e487b0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_FileMixin_FileMixin.exists.return.self_repo_tree_exists_sel": {"doc_hash": "de27bfb28f172cb34ebc739bd66adf1b8f50d4f6796b35352f6bac62c755cdfa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_PipelineFile._dump_pipeline_file_PipelineFile._dump_pipeline_file.self_repo_scm_track_file_": {"doc_hash": "0397c3d789c0ba8bb22720e9a4df93c3840b4c2754758900073775f5143a89af"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_Lockfile_": {"doc_hash": "63032db48f0f9650ba48e81a0a125cc5d83580ca83ac0c0fa6172db3b2aa9d6e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py__Exceptions_raised_by_t_OutputDuplicationError.__init__.self.output.output": {"doc_hash": "49e5a1f9d4e23b697594840fd04b8cbe907a3ea22358b3f81c2481f13d33edc6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/__init__.py__get__get.return.LocalOutput_": {"doc_hash": "31466a3e756a7b2bb49d77b9ea3d5a1db0bf51d015c1e4efa0ae11fddaa1f53f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/metrics/diff.py_from_dvc_exceptions_impor_": {"doc_hash": "cd0ba5760e3ee0cd322a961ef186de7e0a6a82d63748ae278629ad32bd065e33"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/update.py_Dvcfile_": {"doc_hash": "f04ba91d590b608c6bbac439d3941e08abe47aa5337e37c751b1799f97a88042"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/rwlock.py_json_RWLockFileFormatError.__init__.super___init___": {"doc_hash": "949568ebb9158a3aed206dd5f87f9e3aae6d66dc5485a38f65cc3592b35f8642"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/schema.py_from_voluptuous_import_An_": {"doc_hash": "033066fcd445726b472ff39cb2bb146f18b00481f4259602d9e82b56c1d41b08"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/cache.py_logging__get_stage_hash.return._get_cache_hash_to_single": {"doc_hash": "33bd220a9230c2b573b154239a5ace4ff1220acbbacf074f4836a241c6bee396"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/cache.py_StageCache_StageCache._cache_type_copy.try_.finally_.self.repo.cache.local.cache_types.cache_types": {"doc_hash": "9ba1576e4336fda1a0a9761a1494e49959e4b50b66f4759a5e6c5bd3b6d5e2df"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/cache.py_StageCache._uncached_outs_StageCache._uncached_outs.with_self__cache_type_cop.for_out_in_cached_stage_o.if_out_def_path_in_outs_n.yield_out": {"doc_hash": "7958635b4bf7190413ed089bb7bfee29c637065637343036b904bafbc9530ec1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/cache.py_StageCache.push_": {"doc_hash": "f96dec1820efc5cb26a47e3b47715a39ccc57bd8068dd7d355cb8db89c10b54b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/loader.py_SingleStageLoader_SingleStageLoader.__getitem__.return.self_load_stage_": {"doc_hash": "7cd0c5be5b1ca145ec76bbc17590f52590be416359d3a4dc2f4fc742db94ef10"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/loader.py_SingleStageLoader.load_stage_": {"doc_hash": "4daadbd671598c660154cc5c6a61fab4b870fbe06b2c01235b6933e91fe68fbf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py_bytes_hash_is_binary.return.getattr_sys_frozen_Fa": {"doc_hash": "b08b1887810b7c3ef63a64a6660857a5f03ed034b1f6e88fa9eb5e09b92b6701"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/fs.py_errno_get_inode.return.inode": {"doc_hash": "1dfa9566d0d9615247567b4db237a99f8a565e91597432aee453be7248ef2337"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/humanize.py_from_funcy_import_is_seq_": {"doc_hash": "cb8d49fb570c7ac07c07f862d3dc9998f8a4e831bdeafe8472dbe634a0953ef0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_diff.py_test_diff_with_unchanged_test_diff_with_unchanged.assert_dvc_params_diff_a_": {"doc_hash": "5078984a4157a3437f10e58bb242f05b42bade9496d0de6b1c07e5c9f025eb06"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_show.py_test_pipeline_tracked_params_": {"doc_hash": "fd388593404c564bcd5933763f9dfbc83c9369b760a46b3b0b708bfe1617457a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_optimization_for_hardlink_on_empty_files_test_add_optimization_for_hardlink_on_empty_files.for_stage_in_stages_.None_1": {"doc_hash": "ee6e622cb748f6dd10855df62efa89d6f6fdf6fb955ed99999dc05c63a3f7b8e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_pull_external_dvc_imports_recurse_list_dir.return._": {"doc_hash": "f066b046d4739d064e94f9fa1d9cb4a69327ed5e332598a3406c92aa2ca37cbf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_dvc_pull_pipeline_stages_test_dvc_pull_pipeline_stages.None_4": {"doc_hash": "af66bcda94ac872036628f9c432ec47cba1dc64dffd73d59c70183c6340526a6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_pipeline_file_target_ops_test_pipeline_file_target_ops.None_1.dvc_pull_dvc_yaml_Stage": {"doc_hash": "1fc26997c0325b52126329dd4e46eae1ac4759d969cd0eb42ecd6232fb24242e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_push_stats_test_push_stats.assert_msg_in_caplog_text": {"doc_hash": "7634394fde9acc0cd372a9472d00c64f87b193620ca84fc25d58ce77cf16fcb4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_fetch_stats_test_fetch_stats.assert_msg_in_caplog_text": {"doc_hash": "b1dda7419e2a6acc8a0fb5711ef6c07ae44a371fc8867b1e19e18bb2ca88cffb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_load_all_multistage_test_load_all_multistage.assert_set_Dvcfile_dvc_P": {"doc_hash": "68e426f0151d6896e5418489fdb55716260d6713f6d9e34fa4cf1c778a5c4bac"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_load_all_singlestage_test_try_get_single_stage_from_pipeline_file.with_pytest_raises_DvcExc.assert_Dvcfile_dvc_PIPEL": {"doc_hash": "1eede6729335938f196232ff898685a9d7c5f96af8ee1dee0a31f0001592727c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_gc_without_workspace_on_tags_branches_commits_test_gc_cloud_positive.for_flag_in_cw_ca_.assert_main_gc_vf_": {"doc_hash": "5089d745e494aaa38cb1ce4138747bfdbae07e8f521fbcf062d1219f79907cb5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_gc_cloud_remove_order_test_gc_cloud_remove_order.for_args_in_mocked_remove.assert_checksum_endswith_": {"doc_hash": "1d91fee17b216df5814ad4e98de3d2e8308567835e4c5716a042bb33292bcf80"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_url_positive_test_get_url_git_only_repo.with_caplog_at_level_logg.assert_failed_to_show_UR": {"doc_hash": "757af733d4a247390562715252111a8c463dc5bcbf38019fd165a19e5f853b14"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_lockfile.py_test_deps_outs_are_sorted_by_path_test_deps_outs_are_sorted_by_path.assert_list_": {"doc_hash": "922d029d809ce0e4cdd3282a9e4408243226668ad7ec19c83fcfeae248d1f625"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_lockfile.py_test_order_is_preserved_when_pipeline_order_changes_test_order_is_preserved_when_pipeline_order_changes.for_reverse_items_in_reve.None_4": {"doc_hash": "0606d8d166c20a4cbb73d8a4c224b3b2f25e6caa1adb0c003ae90422f92de4dd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_lockfile.py_test_cmd_changes_other_orders_are_preserved_test_cmd_changes_other_orders_are_preserved.assert_eq_lockfile_new_lo": {"doc_hash": "e5b9927b395e24e1d88d86f80cfa32b3a22922b98465f78ced20a952cdff2e88"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_lockfile.py_test_params_dump_": {"doc_hash": "0da850de7b2996c2d22ca14d2401b97d851b41a4b9b4f98aa7d3c4c5087de580"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_remote_repo_with_rev_recursive_test_ls_remote_repo_with_rev_recursive.match_files_": {"doc_hash": "ad071f25543ed23c7417617d1483967e6d3d49c736c0a6019a8fb97cdac44504"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_raise_on_too_many_open_files_test_modify_missing_remote.assert_main_remote_m": {"doc_hash": "d26789370048e211438a5d93c86f0dc86b00e0e4f66ae31051e546ca107dba69"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_test_downstream_test_downstream.assert_evaluation_4_relp": {"doc_hash": "429dd9a79a82cfb21845a2cbad7a2cb0d6649cb4f5269ed4a4efa3408e02556d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_os_TestReproChangedDirMultiStage.pass": {"doc_hash": "a3bc817c2824b9054279d5701fdf603b3cd7fecc780a39ac164d365ec01022b6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_downstream_test_downstream.None_15": {"doc_hash": "bdc7f4ebe518f8acb2365a3c88fe34ca9cb9728d9cab8a93368836b1218962b8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_lockfile_gets_deleted_test_repro_when_lockfile_gets_deleted.assert_": {"doc_hash": "ff7736445226ce1da14149ea813cd35f22d47635fb83eb64942600f17012db05"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_cyclic_graph_error_test_cyclic_graph_error.with_pytest_raises_Cyclic.dvc_reproduce_copy_baz_": {"doc_hash": "fb0ea935528eda5b055a4d0c60edfd7ad5ce43490b161332c1276efd87ecd19d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_os_test_run_with_name.None_4": {"doc_hash": "4a3070feb05f36cf6b6158b32b26ed6bd00a6f5dd94dff1731a2e38e218f1a48"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_multi_stage_run_cached_test_multistage_dump_on_non_cached_outputs.dvc_run_": {"doc_hash": "a31f4d9b8dae82b04ae33e4ec8d490e42d661f5a46fed647ef774c63001d5ccc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_dump_on_multistage_test_run_dump_on_multistage.assert_Dvcfile_dvc_PIPEL": {"doc_hash": "c44ddc262a3fcac4991346ae1a42963a67207bff6e6e8aff8add032b5790447d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_with_invalid_stage_name_supported_params._": {"doc_hash": "1deb2fde9ff51fbbcf12371ea2c31a6f3c0b0671c0b0ab41872cdaa3e471a3be"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_params_default_test_run_params_default.assert_data_stages_re": {"doc_hash": "d007465183193d1ac4897308f7d94a864cdab8a60ec714904cf82416e2c25078"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunCircularDependency_TestRunCircularDependency.test_non_normalized_paths.with_self_assertRaises_Ci.self_dvc_run_": {"doc_hash": "b5057c671475599df63548a7b38dc815212eae9487e80b10e4aa18add4ed3496"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunCircularDependency.test_graph_TestRunCircularDependency.test_graph.with_self_assertRaises_Cy.self_dvc_run_": {"doc_hash": "74e3d5798162565d3424f7176cb9a07da880b0fb7d2208e3d98e732b95941991"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunBadWdir_TestRunBadWdir.test_not_dir.with_self_assertRaises_St.self_dvc_run_": {"doc_hash": "4056530c1cd5f0b9ca0656e0e49295a411500426a8c81d7c060547ce0d106398"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_state.py_os_test_state.with_state_.None_2": {"doc_hash": "d2e275b425ce121dc8da50afcad22b4a1d9c247494ce9671f752eb70fcbfc2ea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_status.py_test_status_before_and_after_dvc_init_test_status_before_and_after_dvc_init.assert_status_": {"doc_hash": "4deeb70351c42db15291eb683be0ff6d1e209fb82187f423bd61e7474cc7d6d7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_status.py_test_status_on_pipeline_stages_test_status_on_pipeline_stages.None_2": {"doc_hash": "e1712d4547ab4b1d6c9e69103a29acde63bc89a6c0501d62dad3c9397cdfd24e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_update.py_test_update_rev_test_update_rev.None_4.assert_foobar_foo_f_": {"doc_hash": "d74b0cac82e4e9266ea03cbcdd4df05674f43f99176eebfc1afecd3e91727dbb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_no_changes_test_show_md_empty.assert__show_md_": {"doc_hash": "4be4961338791981bb50d1f8ade0b157498978a67c6ca540789e3867942a4826"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_textwrap_test_metrics_diff.m_assert_called_once_with": {"doc_hash": "42ec6e2d962fdf8339d2179e0948ce770a5432c0f8e46f62a07869676cc7de38"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_diff_sorted_test_metrics_diff_markdown_empty.assert__show_diff_mar": {"doc_hash": "10f9e7dfd7d0d4e91c18721465b8ddf0f4af2509ee322231746b2aa22bd8ef0e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_params.py_test_params_diff_sorted_test_params_diff_markdown_empty.assert__show_diff_mar": {"doc_hash": "58f3627fce9e806d5872999381f42317c1e00e55e06ef9d970abac38c891b444"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_update.py_from_dvc_cli_import_parse_": {"doc_hash": "a4bd1a7935a4302279bc371bfeab6169e8c99abe8bac937b32c55350d7f1c3c8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_gdrive.py_os_USER_CREDS_MISSED_KEY_ERROR._": {"doc_hash": "725e11f1c124bd71e6d5ea9f36d9a5bbb8f24af00ce500faf803e5989fe13c0b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_walk_with_submodules_test_walk_with_submodules.assert_set_files_g": {"doc_hash": "def1265e488500754a8b6a28b9563b535279384beb47442f0115b7cdfbbdc518"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_is_tracked_test_is_tracked.None_11": {"doc_hash": "bb5dc5a1eece2ac892bd85f6ce321cc88757e66a6cedc66751954145ad5cada0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_analytics.py_json_test_collect_and_send_report.assert_mock_daemon_call_c": {"doc_hash": "f3fec5bbe72f1857de8a0be919031fab689f65af30b84ed9ff7d0d9f15085b24"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_lockfile.py_test_stage_dump_with_deps_and_outs_test_stage_dump_with_deps_and_outs.assert_lockfile_load_": {"doc_hash": "5f2784cc11561d01be55b139b392a94a9bc08ba99c28cc99651311787133ba9a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_lockfile.py_test_stage_overwrites_if_already_exists_test_load_when_lockfile_does_not_exist.assert_Lockfile_dvc": {"doc_hash": "b2d7e066dde952c68bdd65c1fcfd86abfc611fd8b375e075a7fd373ef7d1f438"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_humanize.py_from_collections_import_O_": {"doc_hash": "78b28e4b75960c07551fd7310d55bbd7aeda355d7d07a6d8336f07f53fe0e835"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_utils.py_os_test_to_chunks_chunk_size.assert_result_expected": {"doc_hash": "d0206ba6f1c5ee8d92252ca896698638e213c5738ed97faec1ecf0adf1d18ebf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_utils.py_test_resolve_output_test_resolve_output.assert_result_expected": {"doc_hash": "62020587abc59639de58754cd051736ebe078f28aa1507110a120e5694309f75"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/dag.py_add_parser_": {"doc_hash": "57074f994a18d8f275894e07448e629320070a4feaa1e7dbd957626b56e72cc9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/freeze.py_argparse_CmdUnfreeze.run.return.self__run_self_repo_unfre": {"doc_hash": "6a5d8768ac862e88f5d6bb08e81cd0ee1df37529155588e9efacc89e9cfd933b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/freeze.py_add_parser_": {"doc_hash": "31c9fe81db58f23d82f5712414960c04ea3808eba13e7e5f2c7f6e8e6ab3e8e4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/metrics.py__show_diff__show_diff.return.table_header_rows_markd": {"doc_hash": "2cfe1f1d418dba4761943582badfb51332405f7640c8c8dfe30ebb6c2aa75292"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/params.py_argparse__show_diff.return.table_header_rows_markd": {"doc_hash": "417952883d27de49ad5cac9552a98939f64925e6614a4f1cda7e73729f4bf8bb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/params.py_CmdParamsDiff_CmdParamsDiff.run.return.0": {"doc_hash": "ad2d48759732ee3a2106e543a0fd6481ff0a4c1fe8e399e9bceec008bed98d82"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/plots.py_argparse_DIV_HTML._div_id_id_div": {"doc_hash": "c2327b4d522490aa4b0bc09b2bd8716893ffac1808a1485e81425285266dba24"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/plots.py_CmdPlots_CmdPlots.run.return.0": {"doc_hash": "78ad0872366f3dffb45f0eb88450ad4c93bb3a2034192544d7e2c29103dd05fa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/plots.py_CmdPlotsShow_CmdPlotsModify.run.return.0": {"doc_hash": "61f38122ccaba60396fd778d35b8c8eae881eeda77a4526b96667280fc0be0bc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/plots.py_add_parser_add_parser.plots_modify_parser_set_d": {"doc_hash": "f97de076a7e3585d46d1141d45818e174497e931dba89a860dde9338aa0ecb25"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/plots.py__add_props_arguments_": {"doc_hash": "29b2c0ba049ee592fe60db621318b94e67f7df954be58823ada1f6ab8d0e31de"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_argparse_CmdRemote._check_exists.if_self_args_name_not_in_.raise_ConfigError_f_remot": {"doc_hash": "cfbcdd891855a7aba779c9db562942c28079adc01f80f0cbfa14e89e2074a50c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_CmdRemoteRename_CmdRemoteRename.run.return.0": {"doc_hash": "a8f3984b02406ce66357f5a788f0000d2a5235679ff9a653fa20aa3fa9cbd5b9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_add_parser_add_parser.REMOTE_REMOVE_HELP._Remove_a_data_remote_": {"doc_hash": "ea63362724dba8c28c0b14489aa6120eb837403e04428e482d7493e8b3187b79"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_add_parser.remote_remove_parser_": {"doc_hash": "28809b0889e07aeff4b93dc2d6f2a318aa5d6f8389a047f43adc31dbe1e1b8ed"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remove.py_argparse_": {"doc_hash": "ce351f67d12087f002cbca2df4da0cfaebbc690bc2a560ae2c562ca624807ed7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/run.py_CmdRun._parsed_cmd_CmdRun._quote_argument.return.f_argument_": {"doc_hash": "8d52bbf10c3f80574aa3bc38a06f9bf75f94e5050303eff2b6d0c2fec5719fa4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py_AsciiCanvas_AsciiCanvas.draw.return.joined_lines": {"doc_hash": "21926aed487e0b0e1fbabc144262d834c0e3ad678c61b9c9dae7b0f283269c0a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/__init__.py__merge_params_": {"doc_hash": "5d98198a4be8e2b10318fc5747ed37260397acd80d84f910cc43f56904468a9b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/azure.py__": {"doc_hash": "928b3494b726cdb05e4bccd58dc1527bb6478cdae3b29c439c0409f21374867d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py_CircularDependencyError_ArgumentDuplicationError.__init__.super___init___f_file_": {"doc_hash": "919c084cfc3e5b98246491e20345aedc4c8da2e4447efda4f08df0b1891268d6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py_PathMissingError_PathMissingError.__init__.self.dvc_only.dvc_only": {"doc_hash": "b2c1157b4bbc7f9969a730b8a05cdcf116f3ef5a4f4ddbca47119fc8bcb57738"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_logging_DvcIgnore.__call__.raise_NotImplementedError": {"doc_hash": "b1f8754ef1e487ac638439dad11b7e05ce16125800539406b85a390e5dc198f0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/logger.py__Manages_logging_config_addLoggingLevel.setattr_logging_methodNa": {"doc_hash": "e1983ca30ec61bcab33cb27d9ca42d4c9f1cfec23fc33b921740d8349eeaa047"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/logger.py_LoggingException_ColorFormatter.color_code._": {"doc_hash": "38397c16dc03fcfa0454b06d89faf8f5f9f884172a9d611fa896e3767ee6c741"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/__init__.py_loadd_from_loadd_from.return.ret": {"doc_hash": "31b46c144ca35cb3f0b6ab6bad130466844598ef4a0074d6dfafbfbf18fa2abb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/__init__.py_loads_from__merge_data.return.d": {"doc_hash": "3fc5c4eb08a4d5939a95af24057f148775f6893d51c4f5f7428da22c44bd8ea7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/__init__.py_load_from_pipeline_": {"doc_hash": "beb997787a233c91561943a669b2badac2e4461fdab1cd17135898ddbcc03ff7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_BaseOutput.collect_used_dir_cache_BaseOutput.collect_used_dir_cache.return.cache": {"doc_hash": "c8f77767d53898a0dad6441ccdc35ce0997a57827125f60ebae0da5a931a2a23"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/local.py_logging_LocalOutput._parse_path.return.self_TREE_CLS_PATH_CLS_ab": {"doc_hash": "e1dee01c59bdf225909fd09894ec5ff461a4265dbc8d928bc6bd39d6c6b350b1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/local.py_LocalOutput.__str___LocalOutput.dumpd.return.ret": {"doc_hash": "085fa5ddd7bface4ee6c163f924fc3f6c15be780efcb445b3f27fba43b441681"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/local.py_LocalOutput.verify_metric_": {"doc_hash": "d39f5cf5aa18f54d00172cfec24f5718220844dcddb7a1ce6660120515cb4ef9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_WindowsPathInfo__URLPathParents.__repr__.return.f_self_src_parents_": {"doc_hash": "a4c76ce7521423a8d9e978863c9ad6530b62399a2e326076728ceb1e6d50dedf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_logging_locked.return.wrapper": {"doc_hash": "a6c0627eff06a671353d29003565edc699431a170bc1061fe0a68011d97c433f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/commit.py_from_dvc_import_prompt__prepare_message.return.msg_format_map_kw_": {"doc_hash": "60c625bdd49a44c7ee0d8c64155bc03c266ad021e081bd166db86e59c4a1247b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/commit.py_prompt_to_commit_": {"doc_hash": "82c48e4ce80f0cf761572bb4261ae52fdb47847c1be5ff49bf2b13c6bd54fd6b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/fetch.py__fetch_external_": {"doc_hash": "2b5b584906138403c8eb2a0c25714faf57d82fe8d0aea3c3c77ba4d94b3fd54c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/freeze.py__": {"doc_hash": "ae193c594a7dcea4f7deac85020662ebd3624e35c8370c059c87ebe5d3fc9c4e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/metrics/__init__.py__": {"doc_hash": "b27073827941147a630ebf6b23e38ba4535ebc6f3784cf1a618d395890ad8efc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py_logging_PropsNotFoundError.pass": {"doc_hash": "86ba9ad098682383e94d273fba490caa988e4f0c0cfef89c0b89bf5839c0451d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py_Plots_Plots.collect.return.data": {"doc_hash": "41912503a20ae244e720a6d47fb00cbd32a0500f651df2adbf550b76bdf27fb6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py__prepare_plots__prepare_plots.return.plots": {"doc_hash": "3e998db85f33e1fc6a1695a80ce4734e60c16c1b30e8d7615bbacc519777c0e3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py__render_": {"doc_hash": "507bfb789fec081500ca4889d9e1b4b8e6c605e2e751a8e443c715c7c73d13bc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/data.py_csv_plot_data.raise_PlotMetricTypeError": {"doc_hash": "91224331efef5f00dea836594bb4c9747db05418302debce169ac94581755751"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/data.py__filter_fields__filter_fields.return.new_data": {"doc_hash": "4a3dbd69f4d532b21153ab2ac1fa2d27754f79fadf575e0e399a8291d8a4f8cb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/data.py__apply_path__apply_path.return.data_points": {"doc_hash": "6022572256da39531619408837d795b49a7eba61af4337c16d99f224b35fec4f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/data.py__lists__find_data.raise_PlotDataStructureEr": {"doc_hash": "7e1f6ee8ec240fc3f3c24390ba3435ef96a8fac70d59907f256df7203753109f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/data.py__append_index__append_revision.return.data_points": {"doc_hash": "0bb21f6b1224b1583127c4cf8af56198aaa03a6d37a618325cd0a2409c818832"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/data.py_PlotData_JSONPlotData._processors.return.__apply_path__find_data_": {"doc_hash": "d40bc1aea0d8c4b9951b5de34adfb2066676c6a73c97ce8919fd1fc051a59ca4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/data.py_CSVPlotData_": {"doc_hash": "b1c43269a3a7f2782d2901ddee6720e8693b9f1121f57784e49f5a09bbf77030"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_json_NoFieldInDataError.__init__.super___init___": {"doc_hash": "1fca87297926ded91067e2a158f73efb5b3ff6b95a31aff48e5dfecb327c29a9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_Template.anchor_Template._check_field_exists.if_not_any_field_in_row_f.raise_NoFieldInDataError_": {"doc_hash": "339b0fbd74d12ad4e0c0b67a56ef41de3ca37f92cee185d924db0533cdd2922e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_SmoothLinearTemplate_SmoothLinearTemplate.DEFAULT_CONTENT._": {"doc_hash": "79a09ecb040e8bcca9e5e57097d1d2973224fefd80e40e22c3c6caf6259c1ef1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_PlotTemplates.__init___": {"doc_hash": "be4ac73ba3a5e21dc7975abae3535cdfdbb31571f4caf042f4465a9f7d9bdb11"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/run.py_os_parse_params.return.ret": {"doc_hash": "35a2614041a12346ac3860da99d776618713fd0189c212ed3aa7c2cb8d3fb817"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/run.py__get_file_path__get_file_path.return._": {"doc_hash": "2bc3619b6af1fa78938c147bb501ac75e2ef5de9236361c3b9170a5895372e2c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/run.py__check_stage_exists__check_stage_exists.if_stage___class___Pip.elif_stage_name_and_stage.raise_DuplicateStageName_": {"doc_hash": "18797065315de3829336a4da65e09df658cbbc3f4aab820c46a3736d1ae5adc6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/imports.py_logging_": {"doc_hash": "c5b0e5e5bd28894dae537bcc9d2fbdf67c300a29f0c919c6e77f8e24d9afdf06"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/params.py__": {"doc_hash": "87cb823500b7fa3ab66b610e66aefd4099aa1e5c3a23347f432cfa93e32cd565"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/serialize.py__serialize_params_keys__serialize_params_keys.return.keys": {"doc_hash": "4536718ec9682a7590462a7c09422994cb10d57f20182fe2bf09fb89acf4bc8e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/serialize.py__serialize_params_values__serialize_params_values.return.key_vals": {"doc_hash": "3204fa0858adbe6d254932a46fbcbf84188435d6ff5e92ea5e5d46c4a6006170"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/serialize.py_to_pipeline_file_to_pipeline_file.return._": {"doc_hash": "b9dfb51d02728235143f2c97256a00fa8401b644fc8ec8d43f3aa2bd2ba0e407"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_os_MissingDataSource": {"doc_hash": "63cd7cc0ffd2461a040d7f641fa5940527a4b2df23ee47994a6d6424fde26b6f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_check_stage_path_check_stage_path.if_real_path_proj_dir_.raise_StagePathOutsideErr": {"doc_hash": "61161bd8f3135c757d543e254bf83609eb8de4c0c49ffa2c277e461b5a4f112c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_fill_stage_outputs_fill_stage_dependencies.None_2": {"doc_hash": "7747439f3481b02c43f232decfa70af6e793d2d2f70ef7a9fad4221fc8dea80e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_check_no_externals_check_no_externals.raise_StageExternalOutput": {"doc_hash": "86df12b5faaa9a8a029fff45243e2d5680bfe4ac907c1d774fc6f8ed1fb6b30d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_check_circular_dependency_check_missing_outputs.if_paths_.raise_MissingDataSource_p": {"doc_hash": "1a7f77011163649c37fca53f04a8fcd906d8811c014145ec958142d131adfe5d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_stage_dump_eq_stage_dump_eq.return.old_d_new_d": {"doc_hash": "875656270f8c6d4644d5ef39dd942d898ab7ee612b16c76bec1ade30f98d5de6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_compute_md5_compute_md5.return.dict_md5_": {"doc_hash": "e5db25796643c52f289dfec51eaa99f2efe86f7d5121feff0fcaa92ec49a5c86"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_resolve_wdir_": {"doc_hash": "ca7668724f1387fd7c59291a75cb18a460d7f00a1effe87439c3c71ddf6fd8d7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/system.py_System._reflink_windows_System.reflink.if_ret_0_.raise_DvcException_refli": {"doc_hash": "4eaa7da8b1163a05af647e39b75bbab881e2642af3ad4519788baa896e4336e4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py__Helpers_for_other_modu__fobj_md5.while_True_.if_progress_func_.progress_func_len_data_": {"doc_hash": "0421092da98eebaaa91c883f3480f12d5c71e5b4d41b72301850daa705f844bf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/http.py_iter_url_": {"doc_hash": "da19d5532a908000af48e274ac0f3c3a783851abd6ea57b1f989955b366d75d8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/stream.py_io_": {"doc_hash": "3df8c67d450468e0bee35a28b16256c0c62c312a1b348313eb9273c8ef3b8aa6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/hooks/hook-pydrive2.py__": {"doc_hash": "51590c6cde42a6727880f7e03eb2485eda04ed9b43925cc85059733dd9eeb777"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/basic_env.py_logging_TestDirFixture.setUp.self_create_self_UNICODE_": {"doc_hash": "965c04fe0bd7ed3e48b482956961a0c6f2a55e4227075e061595fab06b19e7cc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/conftest.py_os_": {"doc_hash": "ff6d15f318e7b21c3f48d4f822c7eed5df407ec4ebd1661fcda67dbf2d769e15"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_diff.py_test_diff_dirty_test_diff_dirty.assert_dvc_params_diff_": {"doc_hash": "cb6ced7cfe20811e3f02465493eaaaeb995e2e3141ed6b5af55c5e8847fc3a7d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/remote/test_index.py_os_remote.return.dvc_cloud_get_remote_ups": {"doc_hash": "8fa611d1f2f80c2bd5be5c94b7fa616b285643154ec9d79064e9ead828c4f4b4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_test_add.assert_load_yaml_foo_dvc": {"doc_hash": "66fa790d28deed4c3ac209e9081946d189800cfc6e707d7d8b54a7da0de1ec34"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestAddDirectoryWithForwardSlash_test_add_tracked_file.with_pytest_raises_Output.dvc_add_path_": {"doc_hash": "685ea0d13493041f7383c209657e3bc425d3bc2a53b8222ec42dcc68052149a6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestAddCommit_test_should_collect_dir_cache_only_once.assert_get_dir_hash_count": {"doc_hash": "f4263a3e0f8e3a6e3c5f7e6cbfd5b083649a0a38f558f991b1650466d9bbc07f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_analytics.py_os_": {"doc_hash": "cd1ff3045f823a579583cc5d679625c9f3cc2f2f531d0e89f8b3b6387c4a6daa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cache.py_os_TestCache.test_get.self_assertEqual_os_fspat": {"doc_hash": "4ce00561d41150d50ca14a4e02495e28bd9c4fed78d8a5a906e5c7352fd68520"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutSuggestGit_TestCheckoutSuggestGit.test.None_2.except_DvcException_as_ex.self_assertIsNone_exc___c": {"doc_hash": "8458286e11e37ce2ab6e9281e4f55c10ae0fe83a4a079ee3e30d1511fd5b3e28"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkouts_with_different_addressing_test_checkouts_with_different_addressing.assert_dvc_checkout_bar_": {"doc_hash": "c087fdea749e518ba17ed2a5f903d9a2890a54e21e49c71b0a80aec83c39edd0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkouts_on_same_stage_name_and_output_name_test_checkouts_on_same_stage_name_and_output_name.assert_dvc_checkout_co": {"doc_hash": "a63aced79b0b581dc6cc3a9f7a84dfcafa48ad6929b7e68c4ee27e09833ad5e3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_commit.py_test_commit_pipeline_stage_": {"doc_hash": "0227fe4da6d7143686b4bdf2bb36b1d1d11310177ded8fadf1969a4303453bcf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_cloud_cli_test_cloud_cli.None_25": {"doc_hash": "1ae72b31efb8bde0bcb5d2ac3fd38b3306ca3ef53bb6fcf66cbe2ff744ebcff1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_hash_recalculation_test_hash_recalculation.assert_test_get_file_hash": {"doc_hash": "6a7cb70566b86c080fec92c8ba5b96a4852c6146ac9acffa05ff6480b0205b33"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_verify_hashes_test_verify_hashes.None_2": {"doc_hash": "4a4574f09b2bb38781b227b150c6f0dfa21837c698572fcf73d838daabafd3dd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_pull_stats_test_pull_stats.assert_Everything_is_up_": {"doc_hash": "f7390c3c10d6b55b01c9250eef9a21a535dbb913b824e090635dfce4b1c23809"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_push_pull_all_test_push_pull_all.assert_dvc_pull_key_T": {"doc_hash": "8d774a9f30521b6405c3037924601b3180e922bcacbf5b19ac7f332a50791040"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_push_pull_fetch_pipeline_stages_": {"doc_hash": "9a97bee28ed93f6fbd7718fc4456d0a1e4e288335b3387cd1864302db836f738"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_run_load_one_for_multistage_non_existing_test_run_load_one_for_multistage_non_existing_stage_name.with_pytest_raises_StageN.assert_Dvcfile_dvc_stage": {"doc_hash": "69f6b73d03f0597fbc7b8d064b6531466c33480c228bae66ea102fe5d31c4be1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_run_load_one_on_single_stage_test_run_load_one_on_single_stage.None_2": {"doc_hash": "7440fd6fb90b75048beccfa9a37174cccdf9f72dfc3aec51fecbe49233e77548"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_remove_stage_test_remove_stage.None_5": {"doc_hash": "decc9b11da09e094662d1325484fbd4514c780a59f0b25ed6035c821582feeee"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_remove_stage_lockfile_test_remove_stage_lockfile.None_5": {"doc_hash": "03826e575d76e8c75d4736b3178aafc42a0e78e25cd8efed0e4c35836c4317ad"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_remove_stage_dvcfiles_test_remove_stage_dvcfiles.None_4": {"doc_hash": "e572feab4e9bf3e891230264f887366f6a14b805c7b7295d1db0b8b59e05624b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_remove_stage_on_lockfile_format_error_test_remove_stage_on_lockfile_format_error.None_1.dvc_file_remove_stage_sta": {"doc_hash": "0dc68e06f08a14ba081e122ae3dcb3afdc22db682b37c6fa3b974b8fe536b16d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_remove_stage_preserves_comment_test_remove_stage_preserves_comment.assert_": {"doc_hash": "ac873541c22c994b5a4cd4df49cc704ce4a59881d1f284a327a8be36652e6c74"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_dvcfile_dump_preserves_meta_test_dvcfile_dump_preserves_meta.None_2": {"doc_hash": "2d6dd4ea12d3411500e24c21142a16188bfee36375cf4e56cce9d01deba0eb94"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_test_known_sha_test_pull_subdir_file.assert_dest_read_text_": {"doc_hash": "40539b20b8c1efba1867746904822ad4d5d0b85d1ceac9614aef316fd0a1ebe1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_gc_no_dir_cache__count_files.return.sum_len_files_for_____": {"doc_hash": "7c607764cafca014839b7c977aae9703da2e8fd39dc43e19662e5e5e3221900b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_gc_no_unpacked_dir_test_gc_no_unpacked_dir.assert_not_os_path_exists": {"doc_hash": "e492e718502b44f87fc03bb2f112df30ac6626c7902471f680eacaa8a9e6f8c5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_gc_without_workspace_raises_error_test_gc_cloud_with_or_without_specifier.None_4": {"doc_hash": "34042117850caeadbb2818eaac44408c216f3d988f9bc44b0cf7f85202d3d94d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_repo_rev_test_get_a_dvc_file.with_pytest_raises_GetDVC.Repo_get_os_fspath_erepo_": {"doc_hash": "89bd2714f1fa3a0d9a789897adf5916560dbafc7d24003544493852c7979e312"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_None_1_test_unknown_path.with_pytest_raises_PathMi.Repo_get_os_fspath_erepo_": {"doc_hash": "56f3841e7e4936b9b78db7e59c7900df31471fe4f7890c42f8b0c2a611e2a101"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_to_dir_test_get_from_non_dvc_master.assert_tmp_dir_some_d": {"doc_hash": "951a936a45946da42071a077b103e1bfac739b90f32ec46a20250ef8ebdc0c8c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_cached_file_test_import_cached_file.assert_filecmp_cmp_erepo_": {"doc_hash": "943dd6f2a7a9b627487d54b415be66869af95c70283f9788463394c4f2e5f2cf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_from_bare_git_repo_test_import_from_bare_git_repo.with_dvc_repo_chdir_.dvc_repo_dvc_imp_os_fspat": {"doc_hash": "0e4a21e560f2fee01c9c3599a7a53ce7aeadd9ff3f3b4d7864ebded4ed56fb45"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_TestImportFilename_TestImportFilename.test.None_5": {"doc_hash": "508aa6840811314cf011354d1ae4686115741cbb5ae699ce31f70ee21f884f54"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_lockfile.py_from_collections_import_O_assert_eq_lockfile.assert_previous_new": {"doc_hash": "303dfa1710f8451d712f4deb64ce5574ed310c0d8934586d2b0401cbd27046a6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_dvc_only_recursive_test_ls_repo_dvc_only_recursive.match_files_": {"doc_hash": "1d25173a4b3408693de67ae21ac75377f0626d7e29c8f67f09a0c835ac2a730e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_path_dir_test_ls_repo_with_path_dir_dvc_only_empty.with_pytest_raises_PathMi.Repo_ls_os_fspath_tmp_dir": {"doc_hash": "53db9b0c6d5ae4ed727caca9c78f6eb5eab5ad052776f5b4c1b181b999d68e7c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_path_subdir_dvc_only_test_ls_repo_with_path_subdir_dvc_only_recursive.match_files_": {"doc_hash": "51eeeaa461c2d28f9c922d7cabbf70737d8a66bf8093338a21fb6ca67d1209b8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_dir_hash_should_be_key_order_agnostic_test_dir_hash_should_be_key_order_agnostic.assert_hash1_hash2": {"doc_hash": "39b3e32fb71cfa669e12452473668799d1ad6063d18b6f9012288ff48ac5bd48"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_external_dir_resource_on_no_cache_test_external_dir_resource_on_no_cache.with_pytest_raises_Remote.dvc_run_": {"doc_hash": "09a4f2d05b1d24b64ab3ebc2c01f23f764322192d2f58f6213db89d94c5839e4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remote_modify_unset_test_remote_modify_unset.None_5": {"doc_hash": "1a17a4bde101831466bac3164bc810aa7072bbf6cad61b9c82d60bbd2b2c6de6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remote_modify_default_test_remote_modify_default.assert_local_config_core": {"doc_hash": "6cf21c26e1aeb57f18001a0aacffa62510d44b50d624979185e78fdd9a49787d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remote_rename_test_remote_rename.assert_config_remote_n": {"doc_hash": "bd1d94f9ddea8be6c6daad785a57d34134393d2466e8204c00e3b6d2ec3eb97e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remote_duplicated_test_remote_duplicated.None_6": {"doc_hash": "f312c2020512ed04630995ac4f9f5599ebea7e4e6f3a4a19cc51a90c356fc92e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remove.py_test_remove_non_existent_file_test_remove_broken_symlink.assert_not_tmp_dir_sta": {"doc_hash": "841e70cf3d1e88caaec0d0d84978287a224a4dbd88755fc6bf47d324ac1f541f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_filecmp_SingleStageRun._get_stage_target.return.stage_addressing": {"doc_hash": "63fbcf4a8dd868b9319637bbf56fb9b5919bc29c12cd4779c43edbbbe24a62d6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproForceDownstream_TestReproForceDownstream.test.self_assertEqual_stages_1": {"doc_hash": "06431e6e30b2171d8692514aaf9bdffb0b403c6a7220462339c53a4e7fca8090"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproFrozen_TestReproFrozen.test.None_6": {"doc_hash": "04e6af0ac31276048a1d07f432cd661c7d12e232e739dd79b3915d5b8fc6682e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproFrozen.test_non_existing_TestReproFrozen.test_non_existing.self_assertNotEqual_ret_": {"doc_hash": "d6247ae6a2e808159c153378a0a5c8e378828db3ac5a40aa25b1151a3ae8ea54"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproFrozenCallback_TestReproFrozenUnchanged.test.None_3": {"doc_hash": "878d6536ce3eaf0da6040833809a52699b293c6d3aca5210358f437011733f1a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_test_repro_when_cmd_changes_": {"doc_hash": "6263fcccd665526a1eed2b61d7a1da8fba12a28c557067415b40322ec6d32c2a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_TestReproChangedDirDataMultiStage_test_non_existing_stage_name.assert_main_freeze_": {"doc_hash": "34a4dc76542d7f9146a67c89d2d5184c947e7d0b71f982fc7cfa0fd4ec4408b0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_cmd_changes_test_repro_when_cmd_changes.m_assert_called_once_with": {"doc_hash": "bfcf02b23de68b3614536d63990d48d9adfa113b039441f8e906a58f891f8796"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_cache.py_os_test_push_pull.with_erepo_dir_chdir_.assert_os_listdir_erepo_d": {"doc_hash": "f0e4f154ac6bcf46a000471a58101c72b5373d1fff452962b7c01851ee10fc72"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_cache.py_test_restore_test_restore.assert_tmp_dir_PIPELIN": {"doc_hash": "81a0d052199d5c988ccd9ad5d18fa9aabf42b0ca73c31d42cca7730b4aec5b25"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_cache.py_test_save_test_uncached_outs_are_cached.assert_os_path_exists_rel": {"doc_hash": "177dba275cdac065758d734f52e2a684824ee5c9f7b2351eece272685d289b05"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_cache.py_test_memory_for_multiple_runs_of_same_stage_test_memory_for_multiple_runs_of_same_stage.None_8": {"doc_hash": "8b143918b68d9b186768144c7ee5c79ff36f76b77bb92d256ca5bfd84686ea61"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_no_exec_test_run_no_exec.assert_data_": {"doc_hash": "186ce93e8a98ef4735da1aefeb9d7930bf23ea8b348242bb291fe9a2430626db"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_multi_stage_repeat_test_run_multi_stage_repeat.assert_stage_name_for_st": {"doc_hash": "a81d2cf9ccb1c354bfb9f391d7657cf962d8b0aba1831d41f3ca814c2c1b7c6f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_params_custom_file_test_run_params_custom_file.assert_data_stages_re": {"doc_hash": "694e930a3dbb001f9a48e7fbe2332cf77b2e92dc8d08f022446f2037d441deac"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunEmpty_TestRunNoExec.test.with_open_gitignore_a.self_assertEqual_fobj_rea": {"doc_hash": "a5c8f4dc380feb250f4269c714aa4429feace1bc8b1396a59bdc7fd53bff8396"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunStageInsideOutput_TestRunBadCwd.test_same_prefix.with_self_assertRaises_St.self_dvc_run_cmd_command": {"doc_hash": "192d49fea290e63e7d32e905a31331f27960f6ace07ac9a1619f29ac1435d98e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_test_rerun_deterministic_test_rerun_changed_out.with_pytest_raises_StageF.run_copy_foo_out_fo": {"doc_hash": "90058ffc43e32ce152bef0303cf5d62b36c164da823612b4e51b3e0508af2966"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestPersistentOutput_TestPersistentOutput.test_ignore_run_cache.with_open_greetings_as.assert_hello_nhello_n_": {"doc_hash": "e3efa2cba07db1963cd83ff32f728bdc31a8e89dfabcf28e9587ed76a022bcfa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_test_bad_stage_fname_test_should_raise_on_stage_output.with_pytest_raises_Output.run_copy_foo_name_dvc": {"doc_hash": "c92667704d2eb6328f2910b8061707a4952d0eda9063ac9e7e8daa817c826e1d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_s3.py_test_link_created_on_non_nested_path_test_makedirs_doesnot_try_on_top_level_paths.tree_makedirs_base_info_": {"doc_hash": "cf6cfcd30ef8cd41dc5550f42cbebfd2ec17adce1bb09cd2f46251dd5c96337d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_os_test_init_sub_dir.assert_scm_root_dir_os": {"doc_hash": "43cfb6bf8e09f9e485e2eb3d08027c623fb4f5519b124ea947b6c8c9b77aca9a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_get_gitignore_test_get_gitignore_symlink.assert_gitignore_os_fs": {"doc_hash": "3016c419151aee067a03b5b113222e7b8153e2b9f60d3e815ff8dc2e4f21dc49"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_parent_repo_collect_stages_test_parent_repo_collect_stages.assert_deep_subrepo_stage": {"doc_hash": "4f3a4793a36116941086f298049c37b855fcff751680e015ee7bbb3d47ea8a70"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_stage_strings_representation_test_stage_strings_representation.with_folder_chdir_.assert_str_stage2_f_s": {"doc_hash": "c52548e24b8f056e23038126e89d0ed1602a020627a9b63ca9074a3d5dce3a6b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_stage_on_no_path_string_repr_test_stage_on_no_path_string_repr.assert_str_p_stage_": {"doc_hash": "1c1b97262d2009ab870809c1d7f45ee269d9b0611f106ca25bd7a48d592de9bf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_TestWalkInGit.test_branch_TestWalkInGit.test_branch.None_3": {"doc_hash": "2e10ea512ad17bd721540bbffdbdc37982e4dd04af24fa232181853657a06d05"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_test_repotree_cache_save_test_repotree_cache_save.for_hash__in_expected_.assert_os_path_exists_cac": {"doc_hash": "1fab4e974a9dfa4803ef97e5ada9dbed54645710fc9efba12a46e26b1a970671"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_utils.py_from_dvc_import_utils_": {"doc_hash": "81c1bfd7d53e1e4f0b060881458bea5f3435c6f3b3f6dbae25beea3104d565a0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/ssh.py_ssh_server_": {"doc_hash": "4b239067bc5279c14d163a359bffb1ebc22549fc8ffc1d8d71fa1e10da726312"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_dag.py_nx_test_dag.assert_cmd_run_0": {"doc_hash": "ebb9c155c2c658e74ffeed95baf4bbef6b158bd8cfd870c7aedbd209806c372d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_dag.py_test_build_test_build_full.assert_nx_is_isomorphic_G": {"doc_hash": "4a74fff491380369b9965cfecff6119a703f4141a07ab62a460ef43a46227aab"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_dag.py_test_show_dot_": {"doc_hash": "1f2f20c7865c8379b1e47ef14835ad368ff93759e3ba3392922339bdef4a5412"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_show_test_metrics_show.m_assert_called_once_with": {"doc_hash": "7d0fa7b3bf526cca7d96970e3f28d63eda177ef8b656906d94e0f32405620ef5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_diff_precision_test_metrics_diff_precision.assert__show_diff_diff_p": {"doc_hash": "1aecb1338c5457d85a1ba9bd0966b1a311dcc50086002ad06bae5f2445ed1a3a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_diff_markdown_test_metrics_diff_markdown.assert__show_diff_": {"doc_hash": "5285cc7aef8f96cba365a91e194260a1a1b2fe5dac23146ad2b81f576d5340bc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_diff_no_path_test_metrics_diff_no_path.assert__show_diff_": {"doc_hash": "891e1eb6973b21ce8130194e5942fee52094877fe7ec8a123445e29332f60504"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_params.py_test_params_diff_markdown_test_params_diff_markdown.assert__show_diff_": {"doc_hash": "2571b75be553444eee3ab2be97d30a40aa07b96674fa922ba838efb7902e26b8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_params.py_test_params_diff_no_path_": {"doc_hash": "fe9584011a58fed96d4d8fcbfa33c24212e9a3e316dadb8bd6fb06aff630a5a8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_plots.py_test_plots_show_vega_": {"doc_hash": "eff749e9a58022129b77ff1638d0a003c7771ffc7fb6b86717c6d35864cae4bc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_status.py_json_test_cloud_status.m_assert_called_once_with": {"doc_hash": "5505c758e05452ada4502f8fd23595dc20fd7df869f25ae2d579542e03be9450"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_status.py_test_status_show_json_test_status_show_json.assert_caplog_messages_": {"doc_hash": "daad21cb805ab845325f6a064261a6255197424453a24d1ab152bd6c50dad0cc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_status.py_test_status_quiet_": {"doc_hash": "001713497fbdce7d191c10ccd53602e833aa4ab5413f008a9b743a4a19daee73"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_azure.py__": {"doc_hash": "815e61d1d88f720db211647649132f3d76a6877da3baa2ba24c61a9740228aef"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_load.py_test_load_from_pipeline_accumulates_flag_test_load_from_pipeline_accumulates_flag.assert_not_outs_1_use_ca": {"doc_hash": "7ca3901651fac20f5652afd775fb311c19732d3b3160a19661152462ab239111"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_load.py_test_load_remote_files_from_pipeline_test_load_from_pipeline_illegal_type.None_1.output_load_from_pipeline": {"doc_hash": "2f8ede900d1f0fe357a157691ea297c85e34aaef7e6b633326997a9f3cacec71"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_load.py_test_plots_load_from_pipeline_": {"doc_hash": "35488a528494406c65f557d3a15fb62551ada296a707c9009e85003e60d717da"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_pool.py_pytest_": {"doc_hash": "6adea83f20c3f8af73e1262bd6534651f8d325df77f7d5906d168e0347eadfdc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_ssh_host_override_from_config_test_ssh_host_override_from_config.assert_tree_path_info_hos": {"doc_hash": "1e4eba16056acce37b911ed377508516a8facc841830d4142241d5bc1cbb80dd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_ssh_user_test_ssh_user.assert_tree_path_info_use": {"doc_hash": "e9d756f20472288fa83b598108f5fda44ec39f5cde102d4beecb3b4a692ebe0c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_ssh_port_test_ssh_port.assert_tree_path_info_por": {"doc_hash": "7d26ea49490cbfe7f2191d5d505db8b9e67100df98c6a4c709b8aa190a99b3bf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_ssh_keyfile_test_ssh_keyfile.assert_tree_keyfile_ex": {"doc_hash": "49d02d106686c7f9c6827394db422c78f632eab835486502a14841058222a282"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_ssh_gss_auth_test_ssh_gss_auth.assert_tree_gss_auth_e": {"doc_hash": "1ee2d2351cce6a84f6a08ff7f8d815aa528a7384670b936cc6c67c36fb1d8f10"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_base.py_test_hashes_exist_test_hashes_exist.None_2.traverse_assert_called_wi": {"doc_hash": "1ea2ca90c6a648ded72d525359d970b2509bf420cec8e82616e1acb2c2af2b16"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_base.py_test_list_hashes_traverse_test_list_hashes_traverse.list_hashes_assert_called": {"doc_hash": "e4b325b85d1ab558508c4efba69da05e7a3e74a11e7ad80261b2c79f99e86dd4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_base.py_test_list_hashes_": {"doc_hash": "79b8d7cc9da732b0d2a1eed483493660c785a77cefab2c175d0ebb0dd42d86a2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_http.py_pytest_test_public_auth_method.assert_tree__auth_method_": {"doc_hash": "6a49d19a6dfbd92edd6185cad7f72e196d1e93c167cdb672d4392511b34afaf6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_http.py_test_basic_auth_method_test_basic_auth_method.assert_isinstance_tree__a": {"doc_hash": "890cdf9cbe8c20cf8bec3208a881ece657e1d9ae1b6661d1502bcadc2d509df7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_local.py_errno_test_status_download_optimization.assert_other_remote_hashe": {"doc_hash": "d687ac1d7a517cea7dcd913056f74bd0a96e0a4e4cedcc393b047fa37683a758"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_local.py_test_is_protected_test_is_protected.if_os_name_nt_and_li.else_.assert_tree_is_protected_": {"doc_hash": "ec79d5536729ede91b3218f62af6f42b9774774060da05e01ad00f3b03aace12"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote.py_pytest_test_remote_without_hash_jobs_default.assert_tree_hash_jobs_": {"doc_hash": "261762c67b89e12e8848d1548c103ad06019c175aa2045e85030d37710dd8aa7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote_tree.py_test_isdir_test_isdir.for_expected_path_in_tes.assert_remote_tree_isdir_": {"doc_hash": "5b79937e28d8c441b2d285cedd05140c19e03b2a2dd5b8c8338e0479dfeebc9a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote_tree.py_test_exists_test_exists.for_expected_path_in_tes.assert_remote_tree_exists": {"doc_hash": "6016a306d15e1a3d04eb24db930e315b837e420720449db0444b473d163c88cd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote_tree.py_test_copy_preserve_etag_across_buckets_test_makedirs.assert_tree_isdir_empty_d": {"doc_hash": "789117003ac759f78eda6ef241899365310933d969e0c1d6592a974469f6f89e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote_tree.py_test_isfile_test_isfile.for_expected_path_in_tes.assert_remote_tree_isfile": {"doc_hash": "eaa5f77bc1ff915b4dec1c4eae5fe63144ff2d29976ea729282c241b6e6735f5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote_tree.py_test_download_dir_": {"doc_hash": "aea43e879c3568719e2aed957660ef04e00ee63c838e98efa43fc830324edbb8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/plots/test_data.py_from_collections_import_O_test_parse_json.assert_result_expected": {"doc_hash": "1653f002368f03a9365a0dfe2e79ef476f14b841b0b0a60b4cc87d360b15cebe"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/plots/test_data.py_test_finding_lists_": {"doc_hash": "64cb31aeead01573a8d60f7619eca0b63a1bfce9f2831f8420c1df0c7d82b64a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_walk_onerror_test_walk_onerror.None_3.for___in_tree_walk_foo_.pass": {"doc_hash": "8d948c3f27f42df77650883aaf1e7384e5bbaa1656a9ed7251e2d51c45ad80b3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_cache.py_os_test_stage_cache.None_11": {"doc_hash": "50fcce99fa5a8f9956391e5ad531cbc6ef5d8d1e918eaffb99c7a98618b3d164"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_cache.py_test_stage_cache_params_test_stage_cache_params.None_11": {"doc_hash": "56810639b33c046d2a45f6c49dff3974ad98a93349577e2d410c0bf55997d572"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_os_lock_data.return._": {"doc_hash": "268b0fdf1389baba899891ad6f1e8ceff427f1e4b0b1f1e0c27f5ff0b9546e25"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_fill_from_lock_missing_params_section_test_fill_from_lock_missing_params_section.assert_not_params_deps_0_": {"doc_hash": "329bdb09b778b36e0474be52e73f5483eb23a42782d6ad60f24e7ffe44669494"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_fill_from_lock_missing_checksums_test_fill_from_lock_missing_checksums.assert_not_stage_deps_1_": {"doc_hash": "44a14e323598b04bcbd6b8d4e338aeefd0052b1aee444fe81dea95f5a74b1641"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_fill_from_lock_with_missing_sections_test_fill_from_lock_empty_data.None_1": {"doc_hash": "0ed53015c78fc26a59adb379b343fad2128b758e8ec48ca03a5da6951c0a4f19"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_load_changed_command_": {"doc_hash": "40933774092a6048d218d5877f9af735d7bfbf9a1cc43446d38011f3af49f08c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_file.py_os_test_outs_sorted.assert_to_pipeline_file_s": {"doc_hash": "91a4c8e563bd1fc579cc6c963b4783f026714b483b3a4b0be193cc4b1d494dc3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_file.py_test_params_sorted_test_params_sorted.assert_to_pipeline_file_s": {"doc_hash": "abdff40f96f9a3c73ae400b9c2e34d21ba9d081edbe69f4afe93b267226a81e3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_file.py_test_params_file_sorted_test_params_file_sorted.assert_to_pipeline_file_s": {"doc_hash": "22266fffb9394ed179516bb2e8a51254303a5d74fa3f4353fa04b7b4eb799f76"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_file.py_test_outs_and_outs_flags_are_sorted_test_outs_and_outs_flags_are_sorted.assert_list_serialized_ou": {"doc_hash": "8c144ba2871e8439c1e03f5ee82db4de937cfb71eab0532bc802157531543075"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_file.py_test_plot_props_test_always_changed.None_1": {"doc_hash": "9a333f269cfe8963f280cd2f414104206fa08f7f8bc790e74f0dd9836e8ec451"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_file.py_test_order_test_order.assert_list_to_pipeline_f": {"doc_hash": "11794c988ab8d82e43a92dd2d2bea016ffb40814253a46105f793f32974f6965"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_file.py_test_order_deps_outs_": {"doc_hash": "b743573f8126b7092ee56867afe57856a83d216a2f0642c8567169ed5e494914"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_from_collections_import_O_test_lock_deps.assert_to_single_stage_lo": {"doc_hash": "7fa164417a037efc92fa87bb0bd481822f5172f5a79a87c4cba09bef640ad64d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_lock_deps_order_test_lock_deps_order.assert_to_single_stage_lo": {"doc_hash": "a18095f42630e3a230d8dfb144dd3c4a9a8a8ec3f9b883003a0f9beefefffd16"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_lock_params_test_lock_params.assert_to_single_stage_lo": {"doc_hash": "1a5946b4940cbca0f90daaaa62423bbf09ad59369b2a2ec43fb11816255b8de1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_lock_params_file_sorted_test_lock_params_file_sorted.assert_to_single_stage_lo": {"doc_hash": "03bb76a50c529e1073f6c64a4dd11cc15766d866ae3008113244e4ff51c370d8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_lock_params_no_values_filled_test_lock_outs.assert_to_single_stage_lo": {"doc_hash": "1b2fe9bbcd5688394fe7d2a26b14291b9466aa0ff564ac724241110eb27276f0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_lock_outs_order_test_lock_outs_order.assert_to_single_stage_lo": {"doc_hash": "ae5a47a6520766b8d77eb18b83a319d780d827445cf323b1012fcb73021440ac"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_order_test_order.assert_to_single_stage_lo": {"doc_hash": "68ae4d266a97d4a1c37364eac37120c54ba49cd49b5391fedf841e54b7459192"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_to_lockfile_": {"doc_hash": "ac348fa2de96930a531065495bb8dadaa395a35e4b6bd4474f5bc6e11344414e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_stage.py_os_test_path_conversion.assert_stage_dumpd_wdi": {"doc_hash": "7f7ed1b6ab22cd76ed3434fdb214d8b6a42648e09331764a9329350df8d5d1c9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_stage.py_test_stage_update_test_stage_update.with_pytest_raises_StageU.stage_update_": {"doc_hash": "94eb89457ac6c879574ce844acf618e1fea2064045b543e07292be3dbf50d8d0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_utils.py_os_": {"doc_hash": "20b54935bc2fa8200a57e819a4e7592f627c92f8ce8d1589b28e985b53c4262f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dvcfile.py_pytest_test_stage_load_on_invalid_data.None_1.assert_dvcfile_validate_d": {"doc_hash": "ca98e93f0a0cd6886bf97d3953d23b2a62b336af8ffce42f4c7e69d1b42c108b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dvcfile.py_test_dump_stage_": {"doc_hash": "e7207e08e12b73436f719bcacfb8d5dccf26ae6c2b6cf1b600891d9cba1e6d9f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_run.py_pytest_": {"doc_hash": "c1a4818825ee858585d55177ed5ca76ba9db4a0f2404d0927dff924b104c95a5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cli.py_get_main_parser_": {"doc_hash": "638f589b685c17b17659990bcbcd5d21230ffe1c79a1bca078639807a5548dfc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/completion.py_argparse_CmdCompletion.run.return.0": {"doc_hash": "816bf702d80e644be00b0021160926c321b45d47e7243f6d559861a0d08e2395"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/completion.py_add_parser_": {"doc_hash": "85c3703fe897325d2862e22e7801033ca5fc0998a88d0e3e97e2686c4f9d01fb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/daemon.py_from_dvc_command_import_c_CmdDaemonAnalytics.run.return.0": {"doc_hash": "d77f1e6c4d4ba7624afcf46c659c72200f55b11c2b9d7805ad3a28d28d27a893"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/ls/__init__.py_argparse__prettify.return._fmt_entry_for_entry_in_": {"doc_hash": "958b846fadd4cdc3ced29dd444fc7af34ac2a95fd63c78b63ebefc18cf438492"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/ls/__init__.py_CmdList_CmdList.run.try_.except_DvcException_.return.1": {"doc_hash": "6313bcbbc015f0b0b06d6422058e950b86e4b26c6b72fd3a6325338a849e2988"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/__init__.py__get_loads_from.return.__get_stage_s_info_copy": {"doc_hash": "7ca5b3b5516e7f201e029053a604c436d74a07a4a18d9a0102f60eb151766427"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_collections_check_dvc_filename.if_not_is_valid_filename_.raise_StageFileBadNameErr": {"doc_hash": "7fbcb68bde452342e6ee739d866cb7f7c7c48e2083d034e7a342d4b05357974f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/logger.py_LoggerHandler_LoggerHandler.emit.try_.except_Exception_noqa.self_handleError_record_": {"doc_hash": "683b72a462856991b8311ee528ce0f8ebda48a04ae5e67bbcbbd411f00db2482"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/logger.py__is_verbose_disable_other_loggers.for_logger_name_logger_.if_logger_name_dvc_a.logger.disabled.True": {"doc_hash": "2268bc0ff7ed9842161aba3e4989ed3478bf1e8d103cd5050bb14a622b294d9f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/updater.py_logging_Updater.check.self__with_lock_self__che": {"doc_hash": "1c097f63ea2a7e837ec31e07165fcbd635bebbc41682c46218ecd149470f18f0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/updater.py_Updater._check_Updater._check.if_version_parse_self_cur.self__notify_latest_": {"doc_hash": "a72a31f42ce77f3266c79df3a8df9a61988b494a265d05d34a530d38a08b6b4f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/updater.py_Updater.fetch_Updater._get_latest_version.with_open_self_updater_fi.json_dump_info_fobj_": {"doc_hash": "c1066c3bd4c68d39a77c740f680a8b7b9103d31c7ba5844cbde5e170bb7397af"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/__main__.py__Needs_investigation_py_": {"doc_hash": "6df21a6ad9619d81d4b37a1125e5613c476f653e400ac2c2906fd6563fc8edb3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_data_cloud_error_cli_test_warn_on_outdated_stage.with_caplog_at_level_logg.assert_expected_warning_i": {"doc_hash": "103706f88509957ad8ed584348b071f18d90190ef79658c01a1dff5435253c80"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_stage_collection_test_stage_collection.assert_set_dvc_stages_": {"doc_hash": "0a31455f33267e5f4f7ab1e424656699909a3ee288f1fe78bd74038f15c7e428"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_test_import_stage_accompanies_target_test_import_stage_accompanies_target.None_1": {"doc_hash": "7bf5bf2fcc2825b17617209aab9852cad42a9b049e7569bb24388992200d47fc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_not_existed_url_test_ls_shows_pipeline_tracked_outs.match_files_files_ba": {"doc_hash": "42d971fe633fc5bb917c58879013e3983cf7b089004a9bae68ba7440cd057931"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproDepUnderDir_TestReproDepUnderDir.test.None_5": {"doc_hash": "345cbc5836409f252282728298d11eb56af97d368afe132070daea7ce8188dc2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_git_hook.py_pytest_": {"doc_hash": "02a9b1f4d547132f61ac9144b3cf629feb7496c7e43b2c9057d6ad35cc68ed7e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_load.py__pylint_disable_unsubsc_test_load_from_pipeline.for_i_out_in_enumerate_o.assert_type_test_func_out": {"doc_hash": "084266696cff8838c1eb68beac44d9c1cd9d787fa50bb254867de5f680c81816"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/test_run.py__": {"doc_hash": "38e628869171a0862cdb77e46a3bf5f54d0ea3cce29a71d7a3a81dcf1ad7270f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_stage.py_test_stage_run_ignore_sigint_test_stage_run_ignore_sigint.assert_signal_getsignal_s": {"doc_hash": "e008676dfefb8fa7ce737b474462fd8b655de7f21bca95dbc809a03f758986b0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_stage.py_test_always_changed_": {"doc_hash": "32a5b0fc619fd0dbe1ed5150f7dd91edb5a9a4ccf86161c389c8d0041156b6e9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_updater.py_test_check_updates_test_check_updates.if_notify_.else_.assert_not_caplog_text": {"doc_hash": "d5e927ca6358769d3f99a5dda7d1d6e0c242abdd564d78cf42ce56a99e287483"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_updater.py_test_check_refetches_each_day_test_check_refetches_each_day.mock_time_assert_called_": {"doc_hash": "c001b33e096bb693fa4ea0b84cafa7bd634fd0c74d33bd8f69a6eb27804d7170"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_updater.py_test_check_fetches_on_invalid_data_format_": {"doc_hash": "67ed6705ed53af91c6cbb9a49875db60d5bdb31f4d5fcb29f3d66361dec6bbaa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_collections.py__pylint_disable_unidiom_": {"doc_hash": "4bd78cc114055673bffa93aeb03d989e4868169bff6e6e5dc54b21beab778086"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_FileMixin._load_FileMixin._load.return.d_stage_text": {"doc_hash": "8c35a29fb6575caba7cc7b74cd0484bbe25b1aaf207ec2873a54756d2315e3e3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py__pylint_disable_protect__BasePath.isin_or_eq._pylint_disable_no_memb": {"doc_hash": "514ce39e6c108d66dfcee875fa4f4f80bd8fc767dad49bb413e5936241d1a654"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_PathInfo_PathInfo.as_posix.return.self_fspath_replace_f_sep": {"doc_hash": "044dac3beaaee7da0c3ed353dfd2a0be5f1c711dcfeb7396058bd3f3f8fd6df6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_external_file_test_add_external_file.assert_dvc_status_": {"doc_hash": "37042baca8dc1bd6bc652df749b602d61983f75c69a92ccd96fe403b655a2991"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_external_dir_test_add_external_dir.assert_workspace_cach": {"doc_hash": "c24e52ecbd74b77b5062ae5ac33ca7e3c97eaf9e827d9d5e51575ca7869a4aff"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_open_granular_test_missing.with_pytest_raises_FileMi.api_read_foo_": {"doc_hash": "743d1b1946d70582f5a647a0f03a710dd8e4f2218521efdb7402f5013aaa1abf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py__pylint_disable_no_memb_test_run_load_one_for_multistage.assert_dvc_reproduce_co": {"doc_hash": "a5739936099f016b44390fb41653d6d98b844aefae69f0d78253f64bd92ee113"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_gc_not_collect_pipeline_tracked_files_test_gc_not_collect_pipeline_tracked_files.None_2": {"doc_hash": "772e91695c9979ad28f5b0261b2a84f045235514b23ee1273ec57ffb26a3a0a8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_git_dir_test_get_git_dir.assert_tmp_dir_dst_re": {"doc_hash": "90da814316d78e6b26d4298f30659bffd61ae9d0f78ae8361ad84e5f2824e74b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_pull_imported_directory_stage_test_pull_imported_directory_stage.assert_tmp_dir_dir_im": {"doc_hash": "c39b9e27d0a8cb944c98edfd23b03790fb5a8f03e75f48471abdd73b31ae3bf0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_test_import_url_nonexistent_test_import_url_with_no_exec.assert_not_dst_exists_": {"doc_hash": "54e8d007b1f4ee72b7fd53b54f35ef9209bba8c4ffa2eed93237f1dcd4179e38"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_test_import_url_test_import_url.assert_dvc_status_": {"doc_hash": "72d8ae2238fc54d633a818c9c2e4231790f9d1bd16893168f5c3e79190449718"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_overwrite_preserves_meta_and_comment_test_run_overwrite_preserves_meta_and_comment.assert_tmp_dir_PIPELIN": {"doc_hash": "d8b7a0e2d8f1a5beb75f22de5009c5a11e76f7f229569522fe7bb546496f7f86"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_external_outputs_": {"doc_hash": "bd265ccd7996f241c62658ad36521f1ea5641982232dc85f568a8a694a4e4b5e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_update.py_os_test_update_import.None_13": {"doc_hash": "dd174f30e7f6a09720ed2c6706e3656d3f190b7ec4b36c58f9d58f4281fb19bf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/pylint_plugin_disable.py___": {"doc_hash": "9f4cf519cafb518dde52e1683abdd8b64e1a848d2644af38aa4b9f9fd306bf48"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/base.py_pathlib_": {"doc_hash": "ec790175ba59ce08843b7cffaa7a72cc5f5423d3938f18e388267899c7d9640c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/gdrive.py__pylint_disable_abstract_": {"doc_hash": "6ecd78c7995e2166e8351aa382b0d2f324e823829cbfad806ee86313226f52a3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/gs.py_locale_os_environ_GOOGLE_APPLIC": {"doc_hash": "ef93f328b3fae50d8537a1d8610e28ee70b1b43945aab640054cfe25d858351d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/http.py__pylint_disable_abstract_": {"doc_hash": "384841153493fc083e098c100e1f0dea5aa353dc5aac6bac15d42649bbcb8cb5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/local.py__pylint_disable_cyclic__": {"doc_hash": "a71a6610a398cf7f2de6a98c782f53c4c702e79e613ee2e869712226d370d4a7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/s3.py_locale_": {"doc_hash": "6880d8a96c063ddbb537ba429dda3d6d7d0d808050d7310db1bb6c28e328f654"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/ssh.py_SSHMocked.config_SSHMocked.read_text.return.self_read_bytes_decode_": {"doc_hash": "a14ecb0134eb99cd076272d2ff5dc7de9b6efdf15e267e3f6c6fae2af893904f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote_tree.py_os_remote.return.get_remote_dvc_cloud_c": {"doc_hash": "ea1935bb58301e73591bf0f4903b336b4cfc2243179c77bc3b490b5fd101d616"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/utils/__init__.py__": {"doc_hash": "c79568cd23740a0cf08cb4554ab3c586e12e3074971b9cc794a78972791eb3bf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/utils/httpd.py_hashlib_TestRequestHandler.translate_path.return.path": {"doc_hash": "f948df6f011a369cf98e90dbd00a66e639ec9ec66705ac52654e8ee410562269"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/utils/httpd.py_TestRequestHandler.end_headers_TestRequestHandler.end_headers.RangeRequestHandler_end_h": {"doc_hash": "c22cd0a82b2a710ecb4fa9dd5f9dc346a1be811c6a2bbca658f5df98eeb0de0c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/utils/httpd.py_TestRequestHandler._chunks_TestRequestHandler.do_POST.self_end_headers_": {"doc_hash": "882516b40ac21da88afa6b021558f360e4820f326511a532304d36e2ace2b59c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cli.py__DVC_command_line_inter__find_parser.for_action_in_actions_.for_subparser_in_action_c._find_parser_subparser_c": {"doc_hash": "6f96b2b0f0ef5828440c69c6d345e54f6c49100a4f9f862d4e13e3a4fd90bb17"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/azure.py__pylint_disable_abstract_Azure.pass": {"doc_hash": "c7d82596ce3edf7fa4fdb6b92dd6be1f2751466160adcaddca0dd527637e6c7e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/azure.py_azure_server_": {"doc_hash": "43c33bb9ab4ca00c368b6738f779d92906f61fad10313bbbc96cf828f02d0dc8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_azure.py_from_dvc_path_info_import_": {"doc_hash": "df139c396a242703b7e5eb93fcfa11c2e8c54d68b849346879dd68f8d67f436d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_ignore.py_os_": {"doc_hash": "fd6da808e45afd3898db42add762704c004e57220156aaee7cc4661214cd27d6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/api.py_os_get_url.with__make_repo_repo_rev.return.cloud_get_url_for_remote_": {"doc_hash": "7e157e0ed1334e1f1da348684224bf99e50d7719d98750b82a7b1ed44e674f98"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/api.py_read__make_repo.with_external_repo_url_re.yield_repo": {"doc_hash": "c45ecbd0fac411e4450fecbc543d2bba1784b17dcde0b36266a185f85fcca1be"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/api.py_make_checkpoint_": {"doc_hash": "9da92c6585feeff823b67769ceae2459ebac4ccb2daca2e2bb5507ff9266599d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/__init__.py_NamedCacheItem_NamedCacheItem.update.for_checksum_child_item_.self_children_checksum_u": {"doc_hash": "43c366fb1255651d07157973a48e8342cbe0bceaff086bfefa5972ab2cfdcea4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/__init__.py_NamedCache_": {"doc_hash": "8072a2907b8c8e01da18e9ee985939127d611e93e7273dcc49f41f02944a6a44"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache_CloudCache.get_dir_cache.return.dir_info": {"doc_hash": "48e3d833c9ce438eb65f00b2120610f045d397e2826b4b488a2108517566572e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.changed_CloudCache.changed.return.False": {"doc_hash": "d04f589e5eea8167e785a7ce6764b236f0e14ce06e8e69ab99da3173342d5fa6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.link_CloudCache._verify_link.self.cache_type_confirmed.True": {"doc_hash": "efc71404c1152d3a46960a0d0ebebe43aef53f2957a2125ea5ae158de94f0ea9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._try_links_CloudCache._do_link.logger_debug_": {"doc_hash": "fc081c13f1b623b8f1c12739860119ee17d5eb4dab3a9c618d70ce44142698e3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._save_file_CloudCache._save_file.self_tree_state_save_cach": {"doc_hash": "c5bfe819d5712b8ca2120f8905bd79b0367b4326c7a833babfea4fb982eb2efc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._cache_is_copy_CloudCache._cache_is_copy.return.self_cache_types_0_c": {"doc_hash": "7fc90639e8001adcca6687e8c48087e981fdc152e48248868e6c30ce1a54a80a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._get_dir_info_hash_CloudCache._get_dir_info_hash.return.hash_info_to_info": {"doc_hash": "a0781696b35615949f4d40ba15a301b797a8057a88daf53b8a85860f49f40e8d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.save_dir_info_CloudCache.save_dir_info.return.hi": {"doc_hash": "7d26dd6959a891075ac6e0ed680cff9e3c1d620f26e558b2e0e9e1f76b3796e3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._save_dir_CloudCache._save_dir.self_tree_state_save_cach": {"doc_hash": "fe4c40efb02e2d5f1bba3ac8694c80e04ccfa041cca65aacff1a63a360c9e0d8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.save_CloudCache.hash_to_path.return.self_tree_hash_to_path_in": {"doc_hash": "13c5e54a5f0f0327e0764feedbb7c3b18766b46fe4ca35e62e16f50699e3f468"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.changed_cache_file_CloudCache.changed_cache_file.return.True": {"doc_hash": "8b9de14ec4d56923434cfc7d49a3a5604e0bfa3f0d13b691812a95ae936cb45d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._checkout_file_CloudCache._checkout_file.return.added_modified_and_not_r": {"doc_hash": "87b2b6b4e7725084254bede7e331a135682225a74f522bab380194311f67f139"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._checkout_dir_CloudCache._remove_redundant_files.return.bool_redundant_files_": {"doc_hash": "f762bcc6682ad4ca72d6c282838db0a939aada581e8d8a48b044bf52c7a82668"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.checkout_CloudCache.checkout.return.self__checkout_": {"doc_hash": "81b5e3d0755ff3f23a9937ca1ecf1dfaf78d86858fb5b2daa5c406800f8644f5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cli.py_DvcParser_VersionAction.__call__.sys_exit_0_": {"doc_hash": "ba4128ed90a26aedcf10c387a0b20961eddb3b73ad21e1f88becfdfd5bd70dbc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cli.py_get_parent_parser_get_parent_parser.return.parent_parser": {"doc_hash": "3cb885bf858ba31f97ea08dddbebd087ee80b48f3ae5d98f893e24185828b00b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/check_ignore.py_argparse_CmdCheckIgnore._normal_mode.return.ret": {"doc_hash": "5e72cf995f89e04da130397decb1a9291c0c718ff6cc98f31c0386f1101cd1a2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/check_ignore.py_CmdCheckIgnore._check_args_CmdCheckIgnore.run.return.self__normal_mode_": {"doc_hash": "99141b294d3caaa089526543e0f302dc99722806d48bcb07174fc4526415d23b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/check_ignore.py_add_parser_": {"doc_hash": "f15ecce24db9d059310f4728941fa0b51946d39ffad895ca01cf566ffc2f8d1c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/diff.py_argparse__show_md.return.table_header_rows_True_": {"doc_hash": "5e5d237d4debd865142b047496c16b7b306d517e3349cd8c1aa16f95eb28d21e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/diff.py_CmdDiff_CmdDiff._format.return._n_n_join_groups_": {"doc_hash": "743ad1ba1ac0c94bf8e93b01d6b8ee28900704c2b9dac46e3d7c844ee4fa0100"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/diff.py_CmdDiff.run_CmdDiff.run.return.0": {"doc_hash": "8783d26f98119de037da480e71a08deaddd6c0cd6e4f0748bff30aea03d6f28f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_argparse_logger.logging_getLogger___name_": {"doc_hash": "bca8d19cb9a0354489535b0190f9062a256f5d6610da645eea7d9918234c6f06"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__filter_names__filter_names.return._join_name_for_name_": {"doc_hash": "65518d57851be70f4892b20cc6498d055f5e43452cb0a5bacc88a7de0c0348ed"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__update_names__collect_names.return.metric_names_param_names": {"doc_hash": "a70348fb1e00a34da5826ba9eec584b15a694b6fea7c532fad9653f5424a59f5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__collect_rows__collect_rows.for_i_rev_exp_in_enum.yield_row_style": {"doc_hash": "0c45e84718076a5fec7eb3eb62ba7ccf632209165ce254e3a261617151ad1641"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__sort_exp__sort_exp.return.ret": {"doc_hash": "6ab90042e05931b15ccebc7d654c7cc57ac5dd6ab90cb6cfc5282fa489f3defa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__show_experiments__format_json.raise_TypeError": {"doc_hash": "b62a26207bc52bed60d28426f83e215fab50e3bd26a704bd7d6cd7fc30b5892e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_CmdExperimentsShow_CmdExperimentsShow.run.return.0": {"doc_hash": "ca4fe09f18574baa79e0dad68497aecbc6543e044348f08108a455f7b69db5af"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_CmdExperimentsDiff_CmdExperimentsDiff.run.return.0": {"doc_hash": "8561414f585adbca1ef7ffdacdff3a314fea6eb0ee6fe9e16fd491ae8ce5f71d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/git_hook.py_CmdPostCheckout_CmdPostCheckout._run.return.main_checkout_": {"doc_hash": "7f1054f0c40a8c9b10913aa80fbb73a731241b2560c278b3119922d228d5da13"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/git_hook.py_CmdPrePush_CmdMergeDriver._run.try_.finally_.dvc_close_": {"doc_hash": "cd80b14106c250310334375c227ae3815cc26834b7c46586fc0fc029e56862ab"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/metrics.py_CmdMetricsBase_CmdMetricsShow.run.return.0": {"doc_hash": "27c808d3d9b920524d4a74a1a8c603b1ec95f69c9fa1da86d28a93fbdd61df1b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_CmdRemoteRemove_CmdRemoteRemove.run.return.0": {"doc_hash": "60744e72843584beb2348c46e8c954b0f6c54b879a92462e111a7b3ac3d73f2c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_CmdRemoteModify_CmdRemoteModify.run.return.0": {"doc_hash": "6533cf9b0e46ad927934c9666f5b4a3ddc998b059a5dccee1755160c0d86ad8e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/run.py_add_parser_add_parser.None_11": {"doc_hash": "737c9c494f83fca06851f4d55f551a63b5dfefc6ed71a4de1b50bd579d1c0ecb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/run.py_add_parser.None_12_": {"doc_hash": "e00df7a3f61304eeb2fc2aece0dfb0b5f16fff2884fdb19198daa6e8394cb961"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/status.py_logging_CmdDataStatus._normalize.return.s_self_STATUS_LEN_le": {"doc_hash": "c31b2c5c3abdaa9343d3d41dd4402d53ed4b7b340e83a00f7590acebe4580c5a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/status.py_CmdDataStatus._show_CmdDataStatus._show.for_key_value_in_status_.if_isinstance_value_str_.elif_value_.self__show_value_indent_": {"doc_hash": "4dd31f1680a1b1f51f9b7ad12003ba973188940e216c3fe0fe6790acadcef8b9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/version.py_argparse_": {"doc_hash": "7373094908b485e3ce9f570afbcc8fa66dbd078f16f0037f457361046a43208e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_RelPath_WEBDAV_COMMON._": {"doc_hash": "e2ddc7ad847bd4bddac3435b882207ccafef65c6bf747073b26e4fe12f8fa496"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_SCHEMA_SCHEMA._": {"doc_hash": "97ba58e3818cf796201038985c41e53e750cbfa66a0c1541ae395f2c613d0cd0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py__parse_remotes_": {"doc_hash": "9957de600aaf400e4114f840a99676052167f59ea00c415ac9d4f80d85c3a32d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/daemon.py__Launch_dvc_daemon_co__spawn_windows._popen_": {"doc_hash": "5cb85e120183bcbe80c3908f6134d475f9860a582848a7712de7709fe262e97b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/param.py_os_ParamsDependency.fill_values.self.hash_info.HashInfo_self_PARAM_PARAM": {"doc_hash": "87cc78c1d343b79201c7de5e1743ba3788076e546a05ed0723b7541378a38b95"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/param.py_ParamsDependency.workspace_status_ParamsDependency.status.return.self_workspace_status_": {"doc_hash": "e39156c79bbbf7ac9d7d1d9e413a12898112e185b10962e157f1e2f461efb8fb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/param.py_ParamsDependency.read_params_": {"doc_hash": "c64c4ddf09c0c11986a28ac1487d3e1bdde0c89f512c3f463abf7686e3496cc8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/repo.py_from_voluptuous_import_Re_": {"doc_hash": "b18a07b6d358f4391e7fbd4edd73699ef20444289713ae02e295114816c0f21b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/webdav.py__": {"doc_hash": "2e7c07845f5a93b32f902ff2ef4a70b780213f0bc0ea6b35653fab0e9aaacc1a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/webdavs.py__": {"doc_hash": "d4e33ee40135d100be030965cc834667283c0d54ce40becb4f30d8689613c2f7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_FileMixin.validate_FileMixin.merge.raise_NotImplementedError": {"doc_hash": "15713858da7de0c935abb3fbd9c58687b8091aa82d325c6ecc7bb53c9c7f6c56"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_SingleStageFile_SingleStageFile.merge.self_dump_stage_": {"doc_hash": "dc624eb8382b7eadf774083eae27c4c07422cfa073a9131ec628ed8303d1c688"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py_logging_IsADVCRepoError._Raised_when_it_is_not_": {"doc_hash": "f8d59c6533e8e9b34cc3a6a27f64cdf47dc38fe13f6d87355d44c37343b62bb0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py_ExternalRepo_ExternalRepo._fetch_to_cache.return.hash_info": {"doc_hash": "63d4a7a8d5ccbd52a273bdde4ced2bcd1cd2d3e3ec4dd5edfac48c734ecc51b2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py_ExternalRepo.fetch_external_ExternalRepo.fetch_external.return.sum_download_results_fa": {"doc_hash": "d499694896b2e9e1d90bdd57fc5bb3147ec11cba1ae6d569d31370a91f5d523a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py_ExternalRepo._check_repo_ExternalRepo.get_external.if_metadata_output_exists.else_.tree_copytree_path_info_": {"doc_hash": "8a3847212c09d330cd0b07167741e57de4fa6e5287b2c069525d0a039b9c5079"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py__clone_default_branch__clone_default_branch.return.clone_path_shallow": {"doc_hash": "c3e1e8b281461c26f07809bd88022f6084a28abaee7811bd4edc314748f4dcd2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnorePatterns_DvcIgnorePatterns.__init__.self.ignore_spec._": {"doc_hash": "ee60cb7fd8a030746139778ebec83b26d1519a36c9a6805df6512395ac6b3c0b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnorePatterns.from_files_DvcIgnorePatterns.from_files.return.cls_path_spec_lines_dirn": {"doc_hash": "c3f9d6fb26191e675f2e357edaaadf1acd2fee2b776ab9b7419187bc3b39a758"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnorePatterns.__call___DvcIgnorePatterns._get_normalize_path.return.path": {"doc_hash": "3ca8c08986306883506be96e26f6aa047aef91d22c646050bce4c3d70587919c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnorePatterns.matches_DvcIgnorePatterns.__bool__.return.bool_self_pattern_list_": {"doc_hash": "d2feeb03a0709cd3f20a04d9e05dc93285e8acae9c392593e0d619f696d4e02e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_CheckIgnoreResult_DvcIgnoreFilterNoop.is_ignored.return.False": {"doc_hash": "d8ae212e3f300d62b95ab1d9522859c588ae49bacd385205ae61be978d46af60"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnoreFilter_DvcIgnoreFilter.__init__.self__update_self_root_di": {"doc_hash": "d16c71c65d284e5b1d4c35aeaa00ecd4c474da90de79437f52c16a13465debf1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnoreFilter.__call___DvcIgnoreFilter._get_trie_pattern.return.self_ignores_trie_tree_ge": {"doc_hash": "48b997bcab7bfbc1fe5ed79142470f34d803a9a8086d2af922021e2d0494dbf7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnoreFilter._is_ignored_": {"doc_hash": "0ae372b5f62bf55c32490072ef35828c57b027a1f603675ec89bbbc8ce7e60f7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/info.py_itertools_if_PKG_is_None_.else_.package.f_PKG_": {"doc_hash": "9c712d417049c1c7eda87a2b1f467a7e178f8cdba2e50d85eca571303afd9e12"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/info.py_get_dvc_info_get_dvc_info.return._n_join_info_": {"doc_hash": "5db9e97ab5d46aa6d2e7987ba34afb4ff14cd52fd9efb5df09765628dbc3d114"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/info.py__get_linktype_support_info__get_linktype_support_info.return._join_cache_": {"doc_hash": "46cc24afd3c8239c615188412190cefbea1b40ee10f233cfafa39826967a0b9b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/info.py__get_supported_remotes_": {"doc_hash": "d71e0d1296e9d56e430a567f5152d2ab22aafe631c625972cfef0c9859bd1d79"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/lock.py__Manages_dvc_lock_file__LockNoop.__exit__.self_unlock_": {"doc_hash": "d4c3dde18c69ac1f03d572d8d0f538220ee24ca1a5adba9e6d84d852e9787978"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_logging_OutputIsIgnoredError.__init__.super___init___f_Path_": {"doc_hash": "661e6bb2e391b28e9aebeb665027422e42361e82a038da7dc4b6b845cf925e26"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_BaseOutput.remove_BaseOutput.get_dir_cache.return.self_dir_cache": {"doc_hash": "f26b300ffbdc58aaf0e4112e71cf507d604252958843901e8945e65bed95e6cf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_BaseOutput.get_used_cache_BaseOutput.get_used_cache.return.ret": {"doc_hash": "47834aa246068dc293fdb8a98127b0147294de239c53eee1f6735b6f4e6ca164"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_BaseOutput._validate_output_path_": {"doc_hash": "bbc782aabaab7498d6cf7d8084b5008e001a2a519dac2e21d1af14fad91f58e5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_CloudURLInfo_HTTPURLInfo.replace.return.self_from_parts_": {"doc_hash": "7c3363d95162e826b79e42ecb526a5fcd0ae1fd0f870bb7e068f515c06ff0ad0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_HTTPURLInfo.from_parts_HTTPURLInfo.from_parts.return.obj": {"doc_hash": "5112d747a5c89ae1302c5bef5035bdc8570cd654e2fdc8342d5c37ac07923338"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/pathspec_math.py__Path_Specification_Patt__match_all_level.return.True_rule": {"doc_hash": "fc8a77b74c65d2f6fc6541a2b20126ea07c8a0fad690e5439a83229173c273c1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/pathspec_math.py_change_rule__change_dirname.return._": {"doc_hash": "ca6e4617f9e41fb7c0e2648ae1862708d84ade012341dcf69ba29803bff15700"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/pathspec_math.py_merge_patterns_": {"doc_hash": "c92e56005f7cf65df3ad1bd0a13cf44f8a7170346168c1e24ce27821df14dede"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/__init__.py__": {"doc_hash": "3781df5f15cf49e90cb1edfd7f797fb66226fad051be0e54bb571bb4c1ec70b3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/local.py__": {"doc_hash": "e9199eb9cc8f177c888862ab01a9b18616ecf0e2f43ab14de79105492ceef4b0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.find_outs_by_path_Repo.repo_tree.return.RepoTree_self_subrepos_s": {"doc_hash": "673435cd7814d26b4f0180d35eb33b98de46dc90be7db8545e5e09f1e697355a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.open_by_relpath_": {"doc_hash": "b9061b889127e2c5f7e6a31d8f0a25f0166d5f648e809dce97146aa7284ba0a8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/checkout.py_checkout_": {"doc_hash": "b92034cf51ea2ecea70b9f28a97e81ee56efb74761bd0887ded44d643d410b4b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/collect.py_logging__collect_outs.return.set_filter_output_filter_": {"doc_hash": "4e72d05d9a121f6662d6624c5b8a7ed358da0c979b092d64a6487f4c71710e51"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/collect.py__collect_paths__collect_paths.return.target_infos": {"doc_hash": "4e4fd862934282aec1665a16fc740f4e47ca3c75862294aab50822cb0ffdb364"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/collect.py__filter_duplicates_": {"doc_hash": "2c2506985a4032d4ac3933e384352423c03c41ff377e32103b53a482d4b77e88"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/diff.py_logging_diff.return.ret_if_any_ret_values_": {"doc_hash": "5aed46723c18ecfb0c4189e4da49bc4c45bd1437f4b7cb4044ad4b8dd2a4a074"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/diff.py__paths_checksums__output_paths.for_stage_in_repo_stages_.for_output_in_stage_outs_.if__exists_output_.if_output_is_dir_checksum.yield_from__dir_output_pa": {"doc_hash": "a265c8c955e6f9f77b2615ab8ccf1eb204b121589016d726b0ca1983955a9a4a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/diff.py__dir_output_paths_": {"doc_hash": "dbcc6c8f17401b04b5e51966781fcf4bda9e4fda3a7c7d6a51198fbd16062ec9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/diff.py_logging_": {"doc_hash": "7c99441e4218da0fe22581733eb17e02633328afad3bf02e7360c775fbb61ea0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/run.py_logging__parse_params.return.ret": {"doc_hash": "de263c66a3e7a1828465deec1567edfe6ba64fa6a7c6878cc0f3d7f4bec6fc66"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/run.py_run_": {"doc_hash": "c51a3f6306f7eefcf5ab9a8f720496eb6614e15c70357fa091e7159e71b6a59b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/show.py_show_": {"doc_hash": "67f2d7cfd02394fa08a11f27a6a4d7d86d025913882a0ee277e28fb12221c48c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/fetch.py_logging_fetch.return.downloaded": {"doc_hash": "6855f5886600aadc8d7b56dee7f5bae332fce333ccb8a37308982b35099a1408"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/ls.py_from_itertools_import_cha_ls.with_external_repo_url_r.return.ret_list": {"doc_hash": "c3994de97e24f9178867ca715d62c883935d8d92dbdb9f06e58c703f13c4a01b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/metrics/show.py_logging__collect_metrics.return._m_path_info_for_m_in_met": {"doc_hash": "6f5336fcb9613afd8145751c6e612a7b036ac02dcdb6b1b888adfc83a9c4ebc1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/metrics/show.py__extract_metrics__extract_metrics.return.ret": {"doc_hash": "9d17af2d01871b20e8d3baf372da14e3e4c1fcc67de5ce04fd4c7dae2e6d166f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/metrics/show.py__read_metrics__read_metrics.return.res": {"doc_hash": "2552345984a4b758ba4bf60ac9c1233e3209bd4f22a24114b406128f5f345ce4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py__is_plot__plot_props.return.project_out_plot_PLOT_PR": {"doc_hash": "0d6ba7c496f7fd9f869ffc147e7312a94e70c3aaeecc22e5e980060d22ea5505"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/diff.py__revisions_": {"doc_hash": "bdba550bf64ce99ca1eef3c5ea40bc56f69b3a64170644781dbdb075bf3d0fd1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_Template_Template.__init__.self.filename.self_name_self_EXTENSIO": {"doc_hash": "441b017bb39cbc6daa798dde1d6ec52c78d6992462a875f712af39f4fb42f6a1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_Template.render_Template.render.return.content": {"doc_hash": "d13157bfacc0aa6ac2aa8a37d204afe51192ca8f26474974f8275aec6deeace6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_PlotTemplates_PlotTemplates.get_template.raise_TemplateNotFoundErr": {"doc_hash": "1e1da73ec4a925b59b00685a9ed0377a67df6da2a801c7a011349fe7b09d06ca"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/scm_context.py_scm_context_": {"doc_hash": "1609389741391710bc3007425b10875e890f4c3f980a6cf51cc08fe309dac91f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/status.py_logging__local_status.return._joint_status_pairs_": {"doc_hash": "51f5dec3ba78ff7e6ca51d9c8ad62eccba982be728f088629a65d545ca9d9d6b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.reproduce_Stage.reproduce.return.self": {"doc_hash": "b04994c67efa8bd4109086ebf90adbe04fd2923ab953aacd332fde4f76350468"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.filter_outs_Stage.get_used_cache.return.cache": {"doc_hash": "79cbf7039765468c87906dac3edd9c051a8b188e3fcc9e8420e3e96d4beda1fa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage._check_can_merge_Stage._check_can_merge.if_ancestor_out_and_not_s.raise_MergeError_": {"doc_hash": "9794f16f834251e479cdcc378bd78c552f4750e8c4f2d3c062a717542ba4ec38"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.merge_Stage.merge.self_outs_0_merge_ancest": {"doc_hash": "e3bb1b5f0b866fa17b130d6f915be3a9261eee1590c68f73c8b051152ce72d62"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/cache.py_StageCache.save_StageCache.save.self_tree_move_PathInfo_t": {"doc_hash": "f6f2f864dd75f55ec4128b126b771ba67f0a2c63747b64ccdafc66dcd81f65ad"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/cache.py_StageCache.restore_StageCache.restore.cached_stage_checkout_": {"doc_hash": "50cc28d082d28743604592b1091b37ef9f8f84b88525af8f0aa232ce00bcf866"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/cache.py_StageCache._transfer_StageCache._transfer.return.ret": {"doc_hash": "707cf3d32e59fef2c50338d9546354a7b30b7cbdc844dbea89f3b85e98122f85"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/decorators.py_from_functools_import_wra_rwlocked.with_rwlock_stage_repo_tm.return.call_": {"doc_hash": "081d33a4c110a2dd80a1338d2bd14d60b738b140897a5fa03cfdac97666065c6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/decorators.py_unlocked_repo_": {"doc_hash": "762fdd6187363186f8d835ed292391e865f90afdbc40d678802d67bbd594dcb5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py__Manages_state_database_StateVersionTooNewError.__init__.super___init___": {"doc_hash": "218e70ee5ce76767f14c9f8b50f719018f9e5867d5d26af38b3fa07cf9a3a477"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_StateBase_StateNoop.dump.pass": {"doc_hash": "59f567639f00a50a1f446e06f2334862d320f8330d9220492685d97ad5c4def5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/__init__.py__resolve_remote_refs_": {"doc_hash": "e33d4906348970d8584d3b815e417d008c547a3d2fc44cf7b0a0450c8ddef6b5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/_metadata.py_from_dataclasses_import_d_Metadata._list_of_outputs": {"doc_hash": "a8701363ba4af73e5c4bb568349e295d3ca1e08c42799342b8cd47ce2445690e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/_metadata.py_Metadata.__post_init___": {"doc_hash": "669f664f8420163c2d5fd156999c0ba5854e13e849a7e41d2912cce7fae9da6f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/azure.py_logging_AzureTree.__init__.if_not_self__credential_.self._credential.self__az_config_get_stor": {"doc_hash": "92ed6bb782d1ba100288477d5e7c6a0a9ccfc901620c01b95ac30abeda570d12"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/azure.py_AzureTree._az_config_AzureTree._az_config.return.CLIConfig_config_dir_conf": {"doc_hash": "350a616f1d3efb6712de06d08c4e7fecfff753e914722d3dd1f89171423a2513"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/azure.py_AzureTree.blob_service_AzureTree.blob_service.return.blob_service": {"doc_hash": "6f24c8ed27f1d5ff4e4e6dbd1ff9b9598dcef11a724b87fa7a15be0285387c2b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/azure.py_AzureTree.get_etag_AzureTree._generate_download_url.return.blob_client_url_s": {"doc_hash": "4c9a88f444d07de664adf9cc7a2dac90f4bddfb881473255cf283e2e25cd3a7f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/azure.py_AzureTree.exists_AzureTree.get_file_hash.return.HashInfo_self_PARAM_CHECK": {"doc_hash": "da65e3bdf5fbd0ebcbbbfed00038971f6dc1d8747ab6f18a988008df577a7a16"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/azure.py_AzureTree._upload_AzureTree._upload.with_open_from_file_rb_.with_Tqdm_wrapattr_.blob_client_upload_blob_w": {"doc_hash": "d9b69606d0f51b17b3f7db87af36cc381c50ee11e4836beac0c50aa262c5fae7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/azure.py_AzureTree._download_": {"doc_hash": "35c8f08527aff9f8895d67f0120514067cf96abb64588882f7c8166feeb8aac7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree_BaseTree.get_missing_deps.return.missing": {"doc_hash": "03e81ec086ce5173d126bec781357a49fa2fba1fbe7b02caad4a7000fc53b43b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree._check_requires_BaseTree._check_requires.raise_RemoteMissingDepsEr": {"doc_hash": "576b5a3c801fb128d252b4aa85e30c807778204aea75bdc4fe4b316eee0899d8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree.supported_BaseTree.is_dir_hash.return.hash__endswith_cls_CHECKS": {"doc_hash": "b813b0ee829cecdc4af546d7a14ce62b6f72796270f2d12afc7526016b662be3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree.get_hash_BaseTree.get_hash.return.hash_info": {"doc_hash": "ed91d9f1902cb0707df1852aedf06a050866fff16b27a816d8ab10b41668fb0a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree.get_file_hash_BaseTree._calculate_hashes.with_Tqdm_.with_ThreadPoolExecutor_m.return.dict_zip_file_infos_hash": {"doc_hash": "5777e23684b435f3fd558e0d89098312c2f8448e80858b1e2aace2f103b4be64"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree.get_dir_hash_BaseTree.upload.self__upload_noqa_py": {"doc_hash": "e719fa62b6c2df7c81464d2880bb96e567e1da1d1bed9e3afb173c8d2708f643"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree.download_BaseTree.download.return.self__download_file_": {"doc_hash": "f2129716e1c753363394682b3aeb7709772c82fa0f684dfe183c2affb0703817"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree._download_dir_BaseTree._download_dir.with_Tqdm_.with_ThreadPoolExecutor_m.for_future_in_as_complete.if_exc_.raise_exc": {"doc_hash": "73b2e36057c5852a677e40725ebe05ee9d0bfdb77cda24692f8e7f91b58d42f5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/dvc.py_logging_DvcTree._find_outs.return.outs": {"doc_hash": "026a2cdf9c2a3f45d448c23ef725bacdd234b9978a2355d3a6127ec830c7bc56"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/dvc.py_DvcTree._get_granular_hash_DvcTree._get_granular_hash.raise_FileNotFoundError": {"doc_hash": "ba3711b66205707835ddb1eda8eeaa7ba7e4424e195437ac2ef4281d0a06b298"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/dvc.py_DvcTree.open_DvcTree.open.return.open_cache_path_mode_mod": {"doc_hash": "6d8b01b60806c5baed8524199dae74073be74e26d51cbd249aa3ebf8e7cd9865"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/dvc.py_DvcTree._walk_DvcTree._walk.for_dname_in_dirs_.yield_from_self__walk_roo": {"doc_hash": "dd662ff35ada8d18daee1c6cc13ce42230105ea33182fa244070257882a79348"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/dvc.py_DvcTree.walk_DvcTree.walk.yield_from_self__walk_roo": {"doc_hash": "22bfdf92f6b93975856b1750c17981a72c7deed9f15abe0fd653d1c9d3235506"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/dvc.py_DvcTree.walk_files_": {"doc_hash": "7b2ef910067e172d43d4bb926b4d431b16d0257ce440a5d55f56cab604ee82db"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_io_FOLDER_MIME_TYPE._application_vnd_google_a": {"doc_hash": "ee0900c356de627b2934d0bee7bcd9b097d33416e6fdd2acc316f19b7ce13a4f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveAuthError_GDriveAuthError.__init__.super___init___message_": {"doc_hash": "e578f85435e7113c33411bce58962109bec1766588b6c464d744525af26d626b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py__gdrive_retry__gdrive_retry.return.retry_": {"doc_hash": "438982a9eafbc90f2e220c6aac195ec2d421c4307ab5d620dd07b9bf5d77c14f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveURLInfo_GDriveURLInfo.__init__.self._spath.re_sub_2_self": {"doc_hash": "5fb2a7a16235ca4deadc95fb9b707d31a4501b35f12b826544c3275d5520ca6a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree_GDriveTree.__init__.self._gdrive_user_credentials_path._": {"doc_hash": "753f495f21693cb920e4e5aa2f36bbd40d4ed99c3fb7e8e068825532547d52cd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._validate_config_GDriveTree._validate_config.if_not_self__use_service_.if_bool_self__client_id_.raise_DvcException_": {"doc_hash": "17fff2b0738fcf8f7af55ed179b3e02dedffe59a2ef749c43f557b7bde493add"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree.credentials_location_GDriveTree.credentials_location.return.None": {"doc_hash": "43ee7069f7cd0d343860489b0b70df22693a63d9fc4e7c0cbf4f86d3e2a9c758"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._validate_credentials_GDriveTree._validate_credentials.if_not_os_getenv_GDriveTr.if_.logger_warning_": {"doc_hash": "17f222c6805d45a412f429c607d7beb1c79e2253cb828d1dc263b39118eda159"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._drive_GDriveTree._drive.return.GoogleDrive_gauth_": {"doc_hash": "a1e2b7bb255a73f004492fbd3c1ab3129c46f5e22fa11662a5d21cbf5013919f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._ids_cache_GDriveTree._ids_cache.return.cache": {"doc_hash": "32e968417f40b3c9f753d34726e240cb746d6fd44ad5f895ffcf3d9bb1e8b37b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._cache_path_id_GDriveTree._list_params.return.params": {"doc_hash": "83cb8625440a9d7ace858197d81e003537e12734793ce8bb6ae35b131f35a69a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._gdrive_shared_drive_id_GDriveTree._gdrive_shared_drive_id.return.item_get_driveId_None_": {"doc_hash": "3d2bf2ad752c346c66859f301d6518b77f8e73a2623c28625fd44bd53ecac348"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._gdrive_upload_file_GDriveTree._gdrive_upload_file.return.item": {"doc_hash": "c88c648ddb23257f164097fd29d42c047d90c7f6d20984b42d31bf3a4926f2f7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._gdrive_download_file_GDriveTree._gdrive_download_file.with_Tqdm_.gdrive_file_GetContentFil": {"doc_hash": "3f8532844af1247120db0ada7b001aadc01cda32947c90bab93fce466b6001b4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree.open_GDriveTree.open.yield_stream": {"doc_hash": "bdc4cfb8365e3cc9be6556254c731a1a9d392f042247c09283d13e46208c7ffa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree.gdrive_delete_file_GDriveTree.gdrive_delete_file.try_.except_ApiRequestError_as.raise": {"doc_hash": "dd680e4e7ad3cc5e01e71aab5966fd2b0820a2cbf7cd032f4039cccb621d9a47"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._gdrive_list_GDriveTree._create_dir.return.item_id_": {"doc_hash": "39ce385565f90eb63c33fa194cc6d7eec41918e46c7b642123233e51b4ba4e00"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._get_remote_item_ids_GDriveTree._get_remote_item_ids.return._": {"doc_hash": "0ab323d1c7fe5a5d4f611f932180f7b36a2c38bb28f82c6ad0b1b39631d8b400"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._get_cached_item_ids_GDriveTree._path_to_item_ids.return._": {"doc_hash": "d7d4fb65d1d9329b9c2d2db8a75fc440a161db70adb991ea00c99fe65e68a746"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._get_item_id_GDriveTree.exists.try_.else_.return.True": {"doc_hash": "0f32688b5f71fecfbcb97b9787a97e645ac7782bf8a0562f1f636e92d6f3d221"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._list_paths_GDriveTree._list_paths.for_item_in_self__gdrive_.yield_posixpath_join_": {"doc_hash": "8614e25d035ccc65ee17627df9384a6a318575cc5b4ef2f495266d83f9ff2a91"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree.walk_files_": {"doc_hash": "42b6836fc66af120aebdf0063cda162d296b2247425e9fd92d0a08e9d4c8fb2c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gs.py_logging_dynamic_chunk_size.return.wrapper": {"doc_hash": "977bc2c04679bee2eb93e3cbba1dcb875190589002aeaa95b42ae64e1b7907a7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gs.py__upload_to_bucket__upload_to_bucket.with_open_from_file_mode.with_Tqdm_wrapattr_.blob_upload_from_file_wra": {"doc_hash": "a29591db5add3fc6c36f4a6b721f5d435cda20d5deb4f09ef6e6c9cc5d4e08b9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gs.py_GSTree_GSTree.gs.return._": {"doc_hash": "76568f5f566470f23f528a8be4743084386a1bfd6ba27e1c933d21964aa302c6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gs.py_GSTree._generate_download_url_GSTree._generate_download_url.return.signing_credentials_signe": {"doc_hash": "916f4c58c651ae91e78b8cf33174af739e6d9fc265304fe2103bf4723fef8c2a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gs.py_GSTree.exists_GSTree.copy.from_bucket_copy_blob_blo": {"doc_hash": "493efcc67b9a7b8a42aa1c17d76b43c615f2f1d9bda72c4d6804844e3368ed4b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gs.py_GSTree.get_file_hash_GSTree.get_file_hash.return.HashInfo_": {"doc_hash": "99ba8c586d6ad4c4b273c832ff3dd8b777e37f1cbbcf5d8bf835a49dc687cdbd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gs.py_GSTree._upload_": {"doc_hash": "eb20aba19b1b5318fd16aae9ba70e3367b3133fab52a6c6cf0a43c66a102fbf4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/hdfs.py_io_HDFSTree.hdfs.return.get_connection_": {"doc_hash": "5405791d2abbb6a7807b3434fa811bb926aa64626ffa79151bd319e1d894de0e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/hdfs.py_HDFSTree._download_": {"doc_hash": "4ece4d34d0790530f8d578ac61bdcd2b911adc8473ebff02353da82a2ae50691"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_logging_ask_password.return.prompt_password_": {"doc_hash": "c9a0c40e2ea067b00ab53ba7a2d95f7104740bd3d75f2e69dd6f4b1e20cba263"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_HTTPTree_HTTPTree.__init__.self.method.config_get_method_POS": {"doc_hash": "28e5c1dd7cd117beeb45ed77102106b8fe77cebe397e5b325244c1c2958bb277"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_HTTPTree._auth_method_HTTPTree._auth_method.return.None": {"doc_hash": "c30410563d610986de1ed5481fe87266cfdd5bbc8c25a4e554bf884a36d086d1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_HTTPTree._session_HTTPTree._session.return.session": {"doc_hash": "f0b3167bdfa181452b03dc98cadb0dd14edb9dd21d6b04e23ba5ef5e29dafc3a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_HTTPTree.request_HTTPTree.request.try_.except_requests_exception.raise_DvcException_f_coul": {"doc_hash": "f84d0ea8ca954519ce312b0fbdb469794459541abfd65073d68c9ae4cb10dec5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_HTTPTree._head_HTTPTree.get_file_hash.return.HashInfo_self_PARAM_CHECK": {"doc_hash": "ba2a325ae1699549e23374836151de77b66ec729b5e92a8818005fec0e6bf960"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_HTTPTree._download_HTTPTree._download.with_open_to_file_wb_.with_Tqdm_wrapattr_.for_chunk_in_response_ite.fd_wrapped_write_chunk_": {"doc_hash": "38003ac8ad4fe05ed9ecb45f7f1f504cd4412d238e95cbde393b7f2a6d90aac6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_HTTPTree._upload_": {"doc_hash": "5d62803d763b334330c559e09fddfcc998ca883f35a68fbc1b1bbee807bb3a29"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/https.py__": {"doc_hash": "a37384e82f121327936fcb3ef6e7c6d080cc0bdcdfa7b3609e584b66c6e47140"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_errno_logger.logging_getLogger___name_": {"doc_hash": "36ee8a1696da87253fb7cd2c98de3abcab29c87fd9a85347ee2008f7f82dba8e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree_LocalTree.iscopy.return.not_": {"doc_hash": "a839a10a72d6b815b59a7bf6917eea3fda872d1d7ae58fa441bf5ef5df8049ef"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree.walk_LocalTree.walk.for_root_dirs_files_in_.yield_os_path_normpath_ro": {"doc_hash": "408d898b1948d1a6187ce2b658d99f444720646f6eae805797eb8d16412fc91d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree.walk_files_LocalTree.is_symlink.return.System_is_symlink_path_in": {"doc_hash": "8a423317fedb81b6b05c1494657643e1ee00f80f2fbde96d4429f5f694d713b7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree.hardlink_LocalTree.hardlink.System_hardlink_from_info": {"doc_hash": "d38f34980b2a9e16de61447ea368f4c02254a217ee17cfcc0d517bdbcf32ccaf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/oss.py_logging_OSSTree.__init__.self.key_secret._": {"doc_hash": "0003c730c0eb34d62bd12947b0c54a8e9a94f3c11f4ed35688a0a3ca8de32e10"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/oss.py_OSSTree.oss_service_OSSTree.oss_service.return.bucket": {"doc_hash": "c8ecd54d46a33572ae371f51a4463b47299da91055d0a8b0d6e666f39e73d977"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/oss.py_OSSTree._generate_download_url_": {"doc_hash": "5b1d49401940b185f6dea6880c6af616c17499a3354c12308aa349305bd7beec"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/pool.py_threading_close_pools.get_pool_memory_clear_": {"doc_hash": "eea4283c4a6245474b8c308d81c71692f8107bbebcd6aa50d35983fa1c0a8188"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/pool.py_Pool_": {"doc_hash": "4563541e643bfca9c2511d8cac602bfebc1acb0d286a366222f6798c0483e7a2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree_RepoTree.__init__.if_hasattr_repo_dvc_dir.self__dvctrees_repo_root_": {"doc_hash": "a9a59622b2655e225484289cd3adc3c40ed74190a5283ae11f42a5adea38689b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree._get_repo_RepoTree._get_repo.return.self__subrepos_trie_get_p": {"doc_hash": "997a9b4074ab23d361c5fe1cfd5244bfa4f60ac57961dc693c4a8ade98e95e03"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree._update_RepoTree._is_dvc_repo.return.self__main_repo_tree_isdi": {"doc_hash": "80e720978c1c6b2d76b3c4777d2a48e22172dc87da5120cd0a44a33c3571cf0c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree._get_tree_pair_RepoTree._get_tree_pair.return.repo_tree_dvc_tree": {"doc_hash": "4f7b6651f755a52496761e40abab3fa067b78e8aba303774347c21e670b6ff8e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.fetch_RepoTree.open.return.dvc_tree_open_path_info_": {"doc_hash": "094c85916abfc63145ad685e357c652246cbe3011e17ea98c52d384ef8162d7a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.exists_RepoTree.isdir.return.meta_isdir": {"doc_hash": "17e87be7a108e4965d29423c56dce8e5aaa26a385fe3c31741b9aa79c44e96bf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.isdvc_RepoTree.isfile.return.meta_isfile": {"doc_hash": "bb64a3d16a01ee06b8287082f55fdc161a564ec7c0c161d365e9531929af63e7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.isexec_RepoTree._dvc_walk.for___in_dirs_.yield_from_self__dvc_walk": {"doc_hash": "8faba394091adece995cbdb5f22e88bb00ed8c84c49b52b4e3432ab28eec9425"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree._subrepo_walk_RepoTree._subrepo_walk.yield_from_self__walk_tre": {"doc_hash": "6f3ba535223c974be684b7d3600df186e752397819924984125b4133e2cc2c18"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree._walk_RepoTree._walk.for_dirname_in_dirs_.if_dirname_in_subrepos_.elif_dirname_in_repo_set_.yield_from_self__walk_rep": {"doc_hash": "258c705891f0a70b8911c93974505c3fbfb55c2fa6e4685bb8d9888dc23e2cc4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.walk_RepoTree.walk.yield_from_self__walk_rep": {"doc_hash": "70f0bdfcd717e416264ea1a6ea6edd3c8d0423dc91f3d194fbb9ea00a42d0100"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.walk_files_RepoTree.get_dir_hash.return.dvc_tree_get_dir_hash_pat": {"doc_hash": "bd1d5cbc7db6eafb6df89f3997e8318f506f31053088e4bf698ca5cc0a3bcf2e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.get_file_hash_RepoTree.get_file_hash.return.HashInfo_self_PARAM_CHECK": {"doc_hash": "9913acef28d0d73516d8784c356e03a3720f75c39a1770ab13140a1ef9626e6f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.copytree_RepoTree.hash_jobs.return.self__main_repo_tree_hash": {"doc_hash": "373f6b2139d51c52c518c55dbe7abb473f27d2004674b5e4ec2a7ed4e61fd8d3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.metadata_": {"doc_hash": "fed50c997755cf124c133e43841f0dab4b60929db7620f8e8cd9c112b74ae1c9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_logging_S3Tree.__init__.if_shared_creds_.os_environ_setdefault_AW": {"doc_hash": "cd04cf3f056eb16801ff08c2bbd36367eabf149023c36a3517fecda2b5bb5cc8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree.s3_S3Tree.s3.return.session_resource_": {"doc_hash": "6e9ab396364072728190735defceca4896e1b6e2532a789663efbc4f277d61ad"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree._get_s3_S3Tree._get_s3.try_.except_EndpointConnection.raise_DvcException_": {"doc_hash": "bb47c634065a7f4bb2f12eda8542da8d6b33c3be9f97df00ae87d8e66b01c0f2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree._get_bucket_S3Tree._get_obj.with_self__get_bucket_pat.try_.except_bucket_meta_client.raise_DvcException_f_pat": {"doc_hash": "26de6d27a588dcdd9d9a6c4696ecc3e76b03eee8cfdbf550b2aaec7e804c4ad2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree._append_aws_grants_to_extra_args_S3Tree._append_aws_grants_to_extra_args.for_grant_option_extra_a.if_config_get_grant_optio.self_extra_args_extra_arg": {"doc_hash": "cb775a8be0570cc44837f7fa7098bf538ac91f3384b6f2c763aa94d9fbabf46e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree._generate_download_url_S3Tree.exists.return.self_isfile_path_info_or": {"doc_hash": "a0a239b658ee80e0965c160460a02b348fea61d6b7ca784371858af8911acc88"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree.isdir_S3Tree.isdir.return.bool_list_self__list_path": {"doc_hash": "81f6fe62ea95bd0d3219502fa9c6a7544be78db462487a390e17b4bc58829d93"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree.isfile_S3Tree.copy.with_self__get_s3_as_s3.self__copy_s3_meta_client": {"doc_hash": "b3150415493dead206ea98cf85a17f5395881f664d3a05c0a9d9a0f621128216"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree._copy_multipart_S3Tree._copy_multipart.s3_complete_multipart_upl": {"doc_hash": "caf963cfdfd9f67d95df66984b465585f98163138088257abd45ee877824cb6a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree._copy_S3Tree._copy.if_etag_cached_etag_.raise_ETagMismatchError_e": {"doc_hash": "2f410435ef6e9d208389c1a8beaa8c90ecf267bb8dfa5cb4934e1977e9e957fb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree.get_file_hash_": {"doc_hash": "493c470d22fadca0ef2bea585cfc79ed3a98d8d14649d6f1f0b625bd177e742a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/__init__.py_getpass_ask_password.return.prompt_password_": {"doc_hash": "8a71c072b597e5553698462feab7218e5258791e41552998d50fe7bb5c76564d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/__init__.py_SSHTree_SSHTree.ssh.return.get_connection_": {"doc_hash": "0bc406b435fd019cc0f7bbe9ea1d1a88d386e18f342b5028333381729a13f514"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/__init__.py_SSHTree.open_SSHTree.symlink.with_self_ssh_from_info_.ssh_symlink_from_info_pat": {"doc_hash": "32dea6153c2800adf262ec4421bd088934712f46436f24a9557174f68fb99e74"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/__init__.py_SSHTree.hardlink_SSHTree.hardlink.with_self_ssh_from_info_.ssh_hardlink_from_info_pa": {"doc_hash": "8f65faa0f17f1e5238e8c99b5c17b10ae0459a71355231d2f6628bfc60f49a97"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/__init__.py_SSHTree.reflink_": {"doc_hash": "8fac7a2dd674093e521ace976b3edc5aadd967ac20d4ecd90a83f330ce075f51"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_errno_sizeof_fmt.return._1f_format_num_": {"doc_hash": "b40b9478973059efc1715181d1cb46279391831b2042e1c4e6c8d3a9ba02bab6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_SSHConnection_SSHConnection.islink.return.stat_S_ISLNK_self_st_mode": {"doc_hash": "eb80210535989e2b0f70f59225fd73ace4062875c65dd9ec5bc677bd00db166d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_SSHConnection.makedirs_SSHConnection.makedirs.if_tail_.try_.except_OSError_as_exc_.if_exc_errno_errno_EAC.raise_DvcException_": {"doc_hash": "075c821f7feabdfcc5ea846c6586fbeba72c1d19eb7402ead31d517ad55e00d7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_SSHConnection.walk_SSHConnection.walk.if_not_topdown_.yield_directory_dirs_no": {"doc_hash": "597008ce5ed0c58e5e130884f1ebfca8cece0aa22a6a8660b378f6fd3f071451"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_SSHConnection.walk_files_SSHConnection.upload.self_sftp_rename_tmp_file": {"doc_hash": "18a147a7adeadcd192c533e7adbf0366feda5e351a7ee0ca3fa0ff1ad84de461"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_SSHConnection.execute_SSHConnection.execute.return.b_join_stdout_chunks_d": {"doc_hash": "584ff60e3225fd06eb65111d03e2bb5658aecddece9b578c218765c0c6d64f5d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_SSHConnection.uname_SSHConnection.md5.return.md5": {"doc_hash": "dccce4b74eb3fdea1344210b2503a5ce20e865bb0bf4825b47c5e4023610d454"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_SSHConnection.copy_": {"doc_hash": "1856b4b61f930dfbdbae50a47ece94f918ef7d7c05d939efb53f6730f3d30f59"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_logging_WebDAVConnectionError.__init__.super___init___f_Unable": {"doc_hash": "6f34d51ca17c32aa64ab3418e69b464bbf75fc4f15ca2c544222140398f102d6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_WebDAVTree_WebDAVTree._Webdav_client": {"doc_hash": "606750dab41d6fe8e6d9c26493c4c81dccb0779dff139323d0dff2de2875813f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_WebDAVTree._client_WebDAVTree._client.return.client": {"doc_hash": "02b1f05e021ab6506188959e4758e90e95423449d1fa2d7803a201e40dd95808"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_WebDAVTree._Checks_whether_file_dir_WebDAVTree._Yields_path_info_to_all": {"doc_hash": "4c0be134a7da2bbf3a2de1dbe6e12e471ad2badaff68b1eee08fb5be87748710"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_WebDAVTree.walk_files_WebDAVTree.walk_files.while_dirs_.for_entry_in_self__client.if_entry_isdir_.else_.yield_info": {"doc_hash": "e38a8cf7cef9c20fc4d1a32d2e02034cb7cf1dd84931b88074c1205d027170e5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_WebDAVTree._Removes_file_directory_WebDAVTree._Downloads_file_from_rem": {"doc_hash": "89f0a870c1d1870befd66f6b0c97f99dbea55bc6691779b74a21c1547ddf6fd4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_WebDAVTree._download_WebDAVTree._Uploads_file_to_remote": {"doc_hash": "ff5fbcb6b15fde0d41aff1ed82288fc9051d26fd67c780bd31664fd97f873f09"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_WebDAVTree._upload_": {"doc_hash": "7b3ebec3765b685240fe6e8de35b4b015ca67bf5bf7aa6c720c8efc38fc76c76"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdavs.py__": {"doc_hash": "942f1ce6dbc787387a376c2d59424e033b57a74f2d5216e3d2f7782b60c9c003"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/collections.py_os_": {"doc_hash": "80e080853cc769b4dbab1ca63a17429a9afe280a3d4637b832ee9a327f04775e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/flatten.py__": {"doc_hash": "ddf765a6d1498828eec6d5f7eb0cd3cb9afa396895c58dd0c7224cf5272bf354"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/pager.py__Draws_DAG_in_ASCII__make_pager.return._pager": {"doc_hash": "44ac703bc7c902dccec30c378540a7a0306e7812ab95fff8724f65e7c921cb28"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/pager.py_find_pager_": {"doc_hash": "b9b93add60e7b3b0956f5fce5d1ba730c5f51fb60ed5b33d88a9a19d5735f30e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/__init__.py_from_collections_import_d_": {"doc_hash": "117140c6c489c629d3aed8ef369935e6eedbd901d60b2a25ff5cb11e62809b08"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_common.py__Common_utilities_for_s_": {"doc_hash": "220b2a8680b4ce6382b486858e36bf509754bc2ce658e34e74ed71b06d4cf0a6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_json.py_json_": {"doc_hash": "f12ec700514c60a6d2f3dbc02750ae570077dd5c3bdb1b1a1dc44812213b49ae"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_py.py_ast_parse_py_for_update.return.result": {"doc_hash": "860c8fc84907361349cf025faab636dc572053713c9b4a20d22868b6b23b195f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_py.py__dump__dump.stream_close_": {"doc_hash": "d3ae4303f930190b4142db1600ac7bb397732f4ad85bef6e3cb5a4b1711f2ae9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_py.py_dump_py__ast_tree_to_dict.return.result": {"doc_hash": "51ae3be216bbe1da0566a18ff7ab58e86722fb3ad36a1598875aa8726d498e1b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_py.py__ast_assign_to_dict__ast_assign_to_dict.return.result": {"doc_hash": "6b191311faaf3e2f67b8c79ffa494741406ab5ce4b6560c50142bee9ffa0ab39"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_py.py__get_ast_name_": {"doc_hash": "35e0350e400ef675920eb9a85aac63cf631fc2c895f9967e442df7ed5e455659"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_toml.py_from_contextlib_import_co_": {"doc_hash": "e98582b56b538f4b37f4262a85ebd289e52e0c2defdaea8b74d825b9b9bd921d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_yaml.py_io_load_yaml.return._load_data_path_parser_p": {"doc_hash": "60c473a4b2f6674d70966840fe3a627a01bdb231bd6fc6df612e13492bd38073"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_yaml.py_parse_yaml_parse_yaml.try_.except_DuplicateKeyError_.raise_YAMLError_path_exc": {"doc_hash": "52f909f02a8837e1162fa22c74ce0df0587b67e8c25df3ab8a90f73a1be8366a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_yaml.py_parse_yaml_for_update_": {"doc_hash": "4e5b923d337b0e9c902539a8e33569da3d853d9dcc533db3136f91fce8fc80f8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/hooks/hook-dvc.py__": {"doc_hash": "f87f88fa6d8a3ec93af2173fe655b9757fba9a3e32dfb8f34fba2573650a1e1c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/hooks/hook-dvc.tree.gs.py__": {"doc_hash": "fbf503308c8085e6d453f4c860b6b7d4f328bb19d0ffc63dc18b0e06afb066ce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/hooks/hook-dvc.utils.flatten.py__": {"doc_hash": "28c466d67f533ebd3503783d21f4a2213d81d4acc958173f41d35b11049047ba"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_show.py_test_show_experiment_test_show_experiment.for_rev_exp_in_experimen.if_rev_baseline_.else_.assert_exp_params_par": {"doc_hash": "af4d6268d7460b769aae766939841af0afe8c4a31177f1f122b95f537ac9bddb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_show.py_pytest_test_show_toml.assert_dvc_params_show_": {"doc_hash": "6725f4090a0feb06e0560f7a271fd78cb4232b2d0cd4a338453000d9c215988d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_show.py_test_show_py_test_show_py.assert_dvc_params_show_": {"doc_hash": "ec4e51aefa42f9345d2a538adca3d590d9ccab4fd504ee029f02c9001310fce9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_show.py_test_show_multiple_test_show_list.assert_dvc_params_show_": {"doc_hash": "f325b64a77bd9fba5a5495c749a9de53985e060bdc5ae43d09fef7b3bbe5e200"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_show.py_test_show_branch_test_show_branch.assert_dvc_params_show_re": {"doc_hash": "3709431c500702a4f62c1334dba6f2c2fadaaff7d9782e1ea0544a37bc8a2195"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/remote/test_index.py_test_indexed_on_status_test_indexed_on_status.None_1.assert_foo_hash_info_valu": {"doc_hash": "e0d3336ec7324f067be82470a2e742a519e21762a383aed3e945f5b4b9a1bd66"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/remote/test_index.py_test_indexed_on_push_test_indexed_on_push.with_remote_index_.assert_foo_hash_info_valu": {"doc_hash": "7da23fee1dee6cf76cebe5d17ac0aa6af4830b39b1b78c8398b38106a3806e57"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_output_duplication_for_pipeline_tracked_test_add_pipeline_file.with_pytest_raises_Output.dvc_add_PIPELINE_FILE_": {"doc_hash": "34df735d7bd89369f12c0bbdba383ef67bc54134148e90fcf833d4971abb3d63"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_open_scm_controlled_test_open_not_cached.with_pytest_raises_FileMi.api_read_metric_file_": {"doc_hash": "6dd2ebe9ff1d41dbbef4193892f0691555c29228171642b61c6e1edfdc9bac33"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_api_missing_local_cache_exists_on_remote_test_api_missing_local_cache_exists_on_remote.assert_api_read_to_read_": {"doc_hash": "464d63a40583202abed8af4eb72807df4ffbcb6f6ed35a5e7c5cdc3e024b6c80"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_read_with_subrepos_test_read_with_subrepos.None_3": {"doc_hash": "f090faf0d14e531baa2137efa68caade731b00a3f71e6faf8673718a75446770"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_get_url_granular_test_get_url_granular.assert_api_get_url_os_pat": {"doc_hash": "0a1241e830fd61bb7aa3ef330d9380b301b63b18b7a9d0f7e6ae25b4c63e4187"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_get_url_subrepos_": {"doc_hash": "77c8ab3505ff3d93e8c766b3eff438442c26d7b4161ad3fc68c0466f5ca27662"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_check_ignore.py_os_test_check_ignore.assert_Having_any_troubl": {"doc_hash": "0c95ce7d3e59ac1a382839c10978e255533191dcde11d1e0ce6d70a6c83448c2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_check_ignore.py_test_check_ignore_details_test_check_ignore_details.assert_output_in_caplog_t": {"doc_hash": "632d80a5f9bcfcf0d8ec06f028da932146c43dfbf96bdc757e5e393216095574"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_check_ignore.py_test_check_ignore_non_matching_test_check_ignore_out_side_repo.assert_main_check_ignor": {"doc_hash": "80c0b882adf4b70b16e519243aa7d3e5d59025b2de771f7aa7fac95bc8b4ca8c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_check_ignore.py_test_check_ignore_sub_repo_test_check_ignore_sub_repo.assert_": {"doc_hash": "96ee45c95995913cb02227b5905f16fb4446cd2d652656ab2d87bbd11e1407df"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_check_ignore.py_test_check_sub_dir_ignore_file_test_check_sub_dir_ignore_file.with_sub_dir_chdir_.assert_dvcignore_2_foo_": {"doc_hash": "7127b853eedf8e43c4b25e84dc03c92e937c276ca68e4190beef2e5dbdd59bfb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_check_ignore.py_test_check_ignore_details_all_": {"doc_hash": "1be6abb3e21d9f53962383eef499e3fbc577d06aa99bb49c04e43e0a6911acc2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkouts_for_pipeline_tracked_outs_test_checkouts_for_pipeline_tracked_outs.None_4": {"doc_hash": "0cfa9682a8e8b57e96d541b1dd56a8f7d0688f025fc7d3b8a06ac28b3e78aa59"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_commit.py_from_os_import_fspath_test_commit_recursive.None_2": {"doc_hash": "9ae201facd574716fdce98e17135d9b13869127f777e6a5317eca4f542c3712d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_commit.py_test_commit_with_deps_test_commit_with_deps.assert_not_stage_outs_0_": {"doc_hash": "66aaad885a0bc95ce39b8b9f309fdfdf4e4a915595f5efa28761dc1e20ce8073"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_commit.py_test_commit_changed_md5_test_commit_changed_md5.assert_md5_not_in_load_": {"doc_hash": "6b05f30f897f9c7ee706d4c15a779689e8fbff516cd078e04237f5c83fa57443"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_commit.py_test_commit_no_exec_test_commit_no_exec_missing_out.with_pytest_raises_Output.dvc_commit_stage_path_fo": {"doc_hash": "a2752f8427659f1af535624d17712880d27d047fb1b2d84c310ae7204c028057"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_logging_all_clouds._": {"doc_hash": "74f9de007d4d5278251736978bc6a68da8329fbf1261d41559932a4f4d90399a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_cloud_test_cloud.None_17": {"doc_hash": "d1f34d4285a50a2d05e885f3c3ea48c6e90c1b4aaa2b9ae0435785d81d3e3d71"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_missing_cache_test_missing_cache.assert_bar_not_in_caplog_": {"doc_hash": "4a33a6292fcd4bc5ca3d3d0c93dbf0e72c3b48878422bce00208a7e5f0a44912"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_test_diff_no_cache_test_diff_no_cache.None_7": {"doc_hash": "491d607617eb9828d1ab082a282ff1d0b07a00b8cce392da6f6ae2c5d27909c5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_remove_stage_removes_dvcfiles_if_no_stages_left_test_remove_stage_removes_dvcfiles_if_no_stages_left.assert_not_tmp_dir_PIP": {"doc_hash": "545b2f601cd3ad81f41de0a76472c8d09896d8a1d3f1a1d113333a1cc3807be9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_test_relative_remote_test_relative_remote.with_external_repo_url_a.with_repo_open_by_relpath.assert_fd_read_cont": {"doc_hash": "9420cad99a33b4ea2ac8ad781601c1cc6ee7589f0ecda8a5f8369ce6c2db5683"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_test_shallow_clone_branch_test_shallow_clone_branch.with_patch_object_Git_c.assert_not_shallow": {"doc_hash": "c543c1295140862fbeed77de60229c49fcb2afea34fdc5ec8e81610aa2f525b6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_test_shallow_clone_tag_test_shallow_clone_tag.with_patch_object_Git_c.assert_not_shallow": {"doc_hash": "bc89644a89ac00ddfe844588e48f64a8417371ac0958490921df167a510baf98"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_test_subrepos_are_ignored_test_subrepos_are_ignored.with_external_repo_os_fsp.assert_repo_fetch_externa": {"doc_hash": "1dd8203e12f343488eb0eb02f3893e687fbf7e58ea3b4dcfde6e7d3d8d12c4cb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_test_subrepos_are_ignored_for_git_tracked_dirs_": {"doc_hash": "e8c86f0cb9f28a5aa2920d6aa28a7b97dddf4bb78527352ac362e897da9c836f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_pipeline_tracked_outs_test_get_pipeline_tracked_outs.with_git_dir_chdir_.assert_git_dir_baz_": {"doc_hash": "fd9af20183bbc4e95137b9b1af6671cdf173480304d8f0a0349f520f36ac8cd9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_mixed_dir_test_get_mixed_dir.assert_tmp_dir_dir_": {"doc_hash": "1a90a6ada5a87c516bcba2164cc6b27b8083d97b007482a654423d4f6dc95301"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_from_subrepos_test_get_from_subrepos.assert_tmp_dir_out_": {"doc_hash": "36aabfcfdadfa0f34a607b1a03a510ff724e59ab89604dd3f0f17ffa12eea753"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_granular_get_from_subrepos_test_granular_get_from_subrepos.assert_tmp_dir_out_": {"doc_hash": "501a3e5812657ebefe1beb54f8f97f866f6875c8530fd6a4335cdbc516086455"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_try_to_get_complete_repo_": {"doc_hash": "54c23b7f87c4e1f19de6809b6b0778ebdeb1de82bec6258a08ad7b350fa79f4d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_os_test_ignore_unicode.assert_set_dvc_tree_walk_": {"doc_hash": "0ef0012019855c5ecd05686d5282f2e6b27641c1a02435112d14c1371e98d063"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_rename_file_test_remove_ignored_file.assert_new_mtime_mtime": {"doc_hash": "ab41ef5644e3e58505f53d57536da348a0c060f543876a395fcb353dd6810704"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_remove_file_test_dvcignore_in_out_dir.with_pytest_raises_DvcIgn.dvc_add_dir_": {"doc_hash": "eb25a21dc10bcc81a2cf1c08160b579f9ad422481b87ff5532b2d213215e5a5a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_ignore_collecting_dvcignores_test_ignore_collecting_dvcignores.assert_": {"doc_hash": "89156be40c706f857eaf8c6d47e0574a69a892de18bdb3c383f0f420a7f7deb0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_match_nested_test_match_nested.assert_result_dvcig": {"doc_hash": "c12adefe583321f0dfc46d8f1a68d04fb0261b682a741a42cc99b869ddfa431e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_ignore_external_test_ignore_external.None_2": {"doc_hash": "ea67010034cf0afb206ebec89423a97785ca4b8bdfefb03698ef70fdb2e04f89"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_ignore_subrepo_test_ignore_subrepo.for___in_subrepo_brancher.assert_subrepo_tree_exist": {"doc_hash": "4ec25fabb63c7b2e2fd760ec6c069497909b2aca3356c1921a5976d1e792cbfe"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_ignore_resurface_subrepo_test_ignore_blank_line.assert_set_dvc_tree_walk_": {"doc_hash": "3ce5b5c44bb6ace928ff1a5377606bbc716e53674ac05316e7ad5225a4a70650"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py__It_is_not_possible_to_r_test_ignore_file_in_parent_path.assert_set_dvc_tree_walk_": {"doc_hash": "591d5af23c406c51b6c161a31977293b1d60343c9bea93134ca8f232e4c91132"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py__If_there_is_a_separator_test_ignore_sub_directory.assert_set_dvc_tree_walk_": {"doc_hash": "3d8eb45ca33ff1d58b52b6c04cc508d34f2c0697cbb560f7828c18606d3a5d21"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py__however_frotz_matches__test_ignore_directory.assert_set_dvc_tree_walk_": {"doc_hash": "93a9e807e9ac6fc042c6ebc88f9006cd891ebda71678f017c012e444bdfbfa66"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_multi_ignore_file_test_multi_ignore_file.assert_set_dvc_tree_walk_": {"doc_hash": "c62907baaa8b498d41dbf88150fbfe6c55baf34ae8367d364e6a5d16303479aa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_pattern_trie_tree_test_pattern_trie_tree.None_3": {"doc_hash": "6eeca75529cd03f0fcd9e381394dc9c3267ac163744addb1f041bfe677cc6b16"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_ignore_in_added_dir_": {"doc_hash": "7b7d3bd75e251baee6b9d73ca9abb8eaee869c06ef16d653983410286a2ebe3f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_filecmp_from_tests_unit_tree_test": {"doc_hash": "cdfb70ebce04fdc07675ddce21ec516940828b6ebd61cbd6da9a7ccf37c4f585"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_test_import.assert_stage_deps_0_def_": {"doc_hash": "1ad8cfd0bbfe0a9ee78d8f00997813c5ccd89c41880cf7497d7463410ce5e906"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_file_from_dir_to_dir_test_import_file_from_dir_to_dir.None_2": {"doc_hash": "8bc69924d540df902e967ad289312c1759cba9741c7a7e4827fffd6609f2d412"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_pipeline_tracked_outs_test_import_pipeline_tracked_outs.with_erepo_dir_chdir_.assert_erepo_dir_baz_": {"doc_hash": "af6e0f7bdc4bfd1d9458dab3c41b107e2297948351a90a8640021bde342344ac"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_local_import_test_import_mixed_dir.assert_tmp_dir_dir_": {"doc_hash": "eeb23c6dc07faaaafdbe0141d2f0ff3a1a6ca7ef4fba92a1807bc3ed14b119a3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_subrepos_test_import_subrepos.None_2": {"doc_hash": "de2029617cab24847b4c80ce8510909b28811dddf5d5c18f1e3f845464e54f61"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_granular_import_from_subrepos_test_granular_import_from_subrepos.None_2": {"doc_hash": "dc04cc0ecaf99402d973182fd74544bad5ddfd7659a2888a3b476c01475f0165"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_pull_imported_stage_from_subrepos_test_pull_imported_stage_from_subrepos.assert_tmp_dir_out_": {"doc_hash": "4b1bc51754fb6cfeccaeae3e33afa547eb4d0e11cd6cfa249002cfe6d4f530dd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_install.py_TestInstall.test_pre_push_hook_TestInstall.test_pre_push_hook.None_2": {"doc_hash": "ee94da9f04e4853118c22bdac943993221bf69351926d3552d86bf72a41b1fd7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_install.py_test_merge_driver_no_ancestor_test_merge_driver_no_ancestor.None_2": {"doc_hash": "ad5659c51cce917b8e172123d5fa086c542ba1563ff5b4a34829f4f5d4deb2cb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_install.py_test_merge_driver_": {"doc_hash": "188861b87e5dec42924383eb0b9b75435a837f271d7bbc2bcca03880c52baf87"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_lock.py_pytest_": {"doc_hash": "c036ecc364e62b40f76d6bac25d7833e6e89b11ee767b124cfc51431fc3c8526"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_path_file_out_test_ls_repo_with_missed_path_dvc_only.assert_exc_info_value_dvc": {"doc_hash": "1726ccb758fe19e242942d00c3b4c7fd52740544bd4c6691f56c331e65b7556c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_removed_dvc_dir_test_ls_repo_with_removed_dvc_dir.match_files_": {"doc_hash": "c22f487efc32cc594fcdb24dc5de5dab3917947eacc3dc6f08072fc774435b1d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_granular_test_ls_granular.None_1": {"doc_hash": "e142e21d5939f1ec5185fb2bb6a0fb1956c66823e0d3da5be96baf4d8b968f61"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_target_test_ls_target.None_2": {"doc_hash": "a260531f07b1efe6ac18ee76b3f460957070aa833c9f3b366eb054bc52a24cfa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_subrepo_": {"doc_hash": "22a0748cda1ac5008b6b5cee3d379d45a93091db2107501455ad97c8d1cca5ac"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_merge_driver.py_os_test_merge.assert_tmp_dir_our_": {"doc_hash": "7c306908d148e3528f144fe195fa4f0e8957feee66e4597a217ef489bd0391a8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_merge_driver.py_test_merge_conflict_test_merge_conflict.assert_error_in_caplog_te": {"doc_hash": "6b5c6a6c4149c36ca717293b2ebe07bf8ac90086df4be25a4f8bdff1fa3d19fe"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_merge_driver.py_test_merge_different_output_types_test_merge_different_output_types.assert_error_in_caplog_te": {"doc_hash": "098d5af8879021bc9e9516e99f5f4526bd0ce7d013710bc6eb6920e06135c434"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_merge_driver.py_test_merge_different_output_options_test_merge_different_output_options.assert_error_in_caplog_te": {"doc_hash": "76f32d6206bfbffe545918d4b86fee056d9f2551a444aba5f9ba180881de36ee"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_merge_driver.py_test_merge_file_test_merge_file.assert_err_in_caplog_text": {"doc_hash": "0623b9226b06a1d7d30e3beeccce8dd78bfc17a75c46082c8d98d793296abb15"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_merge_driver.py_test_merge_non_dvc_add_": {"doc_hash": "33473dc2756859fdfb7a593c48ecf77b33fa8e3e5d8b696cc50eefdea8d85854"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remote_modify_local_on_repo_config_test_remote_modify_local_on_repo_config.assert_dvc_config_remote": {"doc_hash": "c1ecdd77dd794122f7d74a2c0ce44bf37deed504f153e3ce1e55785e0da6502d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_push_order_test_push_order.assert_paths_index_foo_pa": {"doc_hash": "484b15a3156a87fe4cfff957e8533e6b35f0e10d3acb0a9171dfb60976245230"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remote_modify_validation_test_remote_modify_validation.assert_unsupported_config": {"doc_hash": "58428576adaef7b6cd6dc4a511d9ec50817b01b099fb3987c363f01a2210fbe1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remote_default_test_remote_default.None_11": {"doc_hash": "4481f3c6df736fe4bb5e44e0c6c95a0cffc94246617e5f246aea50b58e086d15"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_protect_local_remote_test_push_incomplete_dir.assert_remote_tree_exists": {"doc_hash": "2fce0bba8d60d7c501f3a15952637df7c9f34af2cc284d2f5d9576f6865f2e09"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_upload_exists_": {"doc_hash": "9c074905ab56423ce7b06d8ae6e44132a63ef3c73418fbd9c2eb8ea6544ae2c8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproPhony_TestReproDataSource.test.self_assertEqual_": {"doc_hash": "621a0579cb69d151e4c9c3c4a5f285fedc8983d86428f260886a9102875b460d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_cache.py_test_memory_runs_of_multiple_stages_test_memory_runs_of_multiple_stages.None_11": {"doc_hash": "30c6660cdc093b8b7f3ab557dcad2098ab24713adc5d9f554b30e055f9d6e7b2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_cache.py_test_restore_pull_": {"doc_hash": "371cdd3ffca6cd490b632ce126783c102cacb0e8ef411dd9a676558210b7b97b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_params_no_exec_test_run_without_cmd.assert_command_is_not_sp": {"doc_hash": "6f262249815707cd9afa97d1eb2771eb6d61ebe7b43b490b23b2619c87af9133"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_overwrite_order_test_run_overwrite_order.assert_list_data_stages_": {"doc_hash": "bde6859e890be655e09c2ce77e871b4a7d0488ca0fb5d8ea7abaa69c468351f0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_test_metrics_dir_test_metrics_dir.assert_": {"doc_hash": "0f4118a95eade6229fd84a8d7f57b3f84faf8480f62eaa3259e086256298be65"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_s3.py_from_functools_import_wra_test_copy_singlepart_preserve_etag.S3Tree__copy_s3_from_inf": {"doc_hash": "2b3673061bef87107b348ed2a74e6fde2dc3dea5da4420bb9534c4c3fef9afee"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_stage_remove_pipeline_stage_test_stage_remove_pipeline_stage.assert_copy_bar_foobar_": {"doc_hash": "3b2465bc6cd8c7bb4c6c2b50a1800393b6d1dab6b73558451598313dfaa3fd26"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_stage_remove_pointer_stage_": {"doc_hash": "5a81f281fdf6d3a087190041780d5b6476d277c4cb73734c18349e3aac9564c3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_status.py_os_test_implied_cloud.assert_mock_status_called": {"doc_hash": "ca8af5626166f5efd1ca63334c4cc7c44be916e43e6704f91474445114da0f17"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_status.py_test_status_recursive_test_status_recursive.assert_dvc_status_targets": {"doc_hash": "5e9d56214cdf1b1c64b9cea4f3fe37a44da62802e92d7774b312d1d2c158920a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_status.py_test_status_outputs_": {"doc_hash": "2051bcb6b9eeeb1c8a0d7bf30ab11d19867be3c5a22da1358a7345296876a448"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_os_TestLocalTree.test_isfile.None_2": {"doc_hash": "2491d432bf6679f690377e7bfcb2ac439312a261627ec7ac990fa122d0718fc5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_GitTreeTests_GitTreeTests.test_open.None_3.tree_open_self_DATA_DIR_": {"doc_hash": "c48911cb3953ae8426d5d3ae9f3f0b46ddd03449ce5256efa02d091f1b0b8f14"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_GitTreeTests.test_exists_GitTreeTests.test_exists.None_8": {"doc_hash": "8327e39d93f7d684ab7d5c8b46eec762168f9dc4854631ae30f1855381476e4c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_GitTreeTests.test_isdir_GitTreeTests.test_isfile.None_4": {"doc_hash": "a9f1138a0df7dcc3683a11586d35e55d058c6f4b0b098f1793b1e51645ad4963"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_test_cleantree_subrepo_test_cleantree_subrepo.assert_subrepo_tree_isdir": {"doc_hash": "a06c8ba3a18c5833186271bc56270611e0b79e56f39c1aff25d5aa0e40e0fdb4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_test_walk_dont_ignore_subrepos_": {"doc_hash": "ba3f3a4f2d71464e584fa5279aa42e0d324353de5d173be85fb13c72947c8f61"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_update.py_test_update_recursive_test_update_recursive.None_9": {"doc_hash": "1a434969cb0b5f909ce91bbdbbbde1625561bb9f72143c88c7a9f829b8de7d60"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_update.py_test_update_from_subrepos_": {"doc_hash": "2f4c1b187e03df0cab92998a2cad14eca674232ccb08b9c9849f65a2d6ab93df"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_version.py_re_": {"doc_hash": "bf242a045df2b5d30f672b7ed9eb95c31bcec84cdcea70a88a62c29326b3599b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/__init__.py_subprocess_docker_compose_project_name.return._pytest_dvc_test_": {"doc_hash": "da67d477e985a11e7e04cd77a19d4d5c25db4073d8f3ed356b83fe1fcd2b659e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/__init__.py_docker_services_docker_services.return.Services_executor_": {"doc_hash": "2ef4d6e43a90f7ddfbe746b33df0ecb79d6de80e70ef8925b55f7c25c70a882c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/__init__.py_remote_": {"doc_hash": "b9a1cd240c7c9df00ab6ff14809bb018e47b5712e892d1bc7d85983759a497d7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/hdfs.py_locale_HDFS.read_text.return.self_read_bytes_decode_": {"doc_hash": "f61ae8b051fbe19fac8455cf0324df138bb0a1a3869b4dd95b6b10c5a82cbdb7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/ssh.py_locale_SSHMocked.get_url.return.url": {"doc_hash": "3671a75bc50b56097867f6d2c27dd575cd37561c6fc1f0683e53378bb3ce9698"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_collections_test_digest.assert_expected__diges": {"doc_hash": "37b029d3da980d0e2418898eac7c81860848fa122692d50147982e902979f11a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_default_test_default.assert_": {"doc_hash": "36b7d1fcb04118995dcbfafa6ce74444e688556149f96b8fea4039f40605a81a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_show_json_test_show_json.assert_not_in_cache_": {"doc_hash": "655df95f03f0e64a8ec9ecc8faad00afacaf5b989d035c8e8cabef6c2d9937fb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_show_json_and_hash_test_show_json_and_hash.assert_not_in_cache_": {"doc_hash": "7f93dc33329be594da0dc29f2f64961294d2a52738e48ad2d545d2f2ba8958fd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_show_json_hide_missing_test_show_json_hide_missing.assert_not_in_cache_": {"doc_hash": "a8eb8830271cb3927ff431444c7f6a192d15cd7627f497b65053f7a82a71e566"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_diff_show_md_and_hash_test_diff_show_md_and_hash.mock_show_md_assert_calle": {"doc_hash": "03a2444380ef2533e1f4eb9c912d58b44bcef9966b7a457fd5f428d100181956"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_show_md_test_show_md.assert__show_md_diff_": {"doc_hash": "ab5adb80e330fc8c56c3602410ccc71ff7b23ce9ce84cca711412417ed674c0e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_show_md_with_hash_test_show_md_with_hash.assert__show_md_diff_sho": {"doc_hash": "dfa7abf8424cf64a02d6a191c29d8fc7db1b1c6ae1f91c04e453becf79f21a54"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_show_md_hide_missing_test_show_md_hide_missing.assert__show_md_diff_hid": {"doc_hash": "d32daba549b91a88edb22a516648a25a0115e6d640ede95e2d221482833d9845"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_hide_missing_": {"doc_hash": "8da8a03a97d70b8c5ea55cde0f7262ab56bdb85e2ae7313a75ca5db14352c518"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_experiments.py_test_experiments_show_test_experiments_show.m_assert_called_once_with": {"doc_hash": "af38c458048de74c1eafc879e54c9c32a533046f00190e8a10a5cfde68be4579"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_plots.py_from_dvc_cli_import_parse_test_plots_diff.m_assert_called_once_with": {"doc_hash": "303742c8e9ec26d16c8850469b708e06d254e9ea40f81eb1d28fb825deeabf27"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_plots.py_test_plots_show_test_plots_show.m_assert_called_once_with": {"doc_hash": "cd9bf3ffcc07154a1155d4fb6b9b76cdf1f13757754dca4c07f7a4f212df53b2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_params.py_pytest_test_loads_params.assert_not_deps_2_hash_i": {"doc_hash": "070251b7aef896ddfbbafd6323861dde23d8641a66f73415e9dd0ad544f2b343"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_params.py_test_params_error_test_read_params_toml.assert_dep_read_params_": {"doc_hash": "a2d49c974f10575d631fb85dba949424e7774b5ca20820468ab1ab14c09f4baf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_params.py_test_read_params_py_test_read_params_py.None_3": {"doc_hash": "1342954c7daab51e989a0c40c068cd202f5f8aea644236ccd13ccd9345e5a3be"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_params.py_test_get_hash_missing_config_": {"doc_hash": "30b4c9127c7b89c04953ca0dcb2a22c2a743b290dd36ddbc92e2674b64433fce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_webdav.py__": {"doc_hash": "2acb69bf3d8732e63469e4569d2ec91c880e499da7efcb2342cb80e8fa80f11a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_ssh_allow_agent_test_ssh_allow_agent.assert_tree_allow_agent_": {"doc_hash": "f5cc4c2d8340ca3ef012ec0a98727e3d8b7a6d8ccb7864c964c206823093688b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_base.py_math_test_cmd_error.with_mock_patch_object_.with_pytest_raises_Remote.BaseTree_dvc_config_rem": {"doc_hash": "ea5ac9469a296d4267143cc9c7409ef1d18fd683b80d78897caf96ec404a0939"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_http.py_test_digest_auth_method_test_digest_auth_method.assert_isinstance_tree__a": {"doc_hash": "97c0dc33bdf06b75589715c18b910b6c960c13b8951343b0041866b10ab839c1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_http.py_test_custom_auth_method_test_ssl_verify_disable.assert_tree__session_veri": {"doc_hash": "4894f502e0ffe084c542f826604d51b650b0915371625f4d4d633e3642c3edce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_oss.py_from_dvc_tree_oss_import__": {"doc_hash": "645d9afa00bcc377e8f21f6484c5ee5e096f0b0197f18d1175408800a9751355"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote_tree.py_test_walk_files_test_walk_files.assert_": {"doc_hash": "1d0e911d0cf1afb06a615c7da41fba5e28bd9bd38ad7f9d142e5a3ddd43eb45b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/plots/test_diff.py_pytest_test_revisions.assert__revisions_mock_re": {"doc_hash": "30dc78e820fdfa349b80ada4e859e93ab5057fc5d78eb5a147b464fc0aded229"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/plots/test_diff.py_test_revisions_experiment_": {"doc_hash": "1a90689bdaff75c09d8f3c24078afeb5dfada00e9b1555f0902379ac8aa2ab44"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/test_repo.py_test_used_cache_test_used_cache.assert_": {"doc_hash": "01cd01ec3ded15ff1173e2aa41a8cf1d574edfc739ede84a88d1efd48fc86e87"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/test_repo.py_test_branch_config_": {"doc_hash": "e46d0dd3da745c45a8cc88e99ba47784bb1c68ff4caf8da7b13477cd83b08355"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_scm.py_from_unittest_import_Test_TestScmContext.test_should_successfully_perform_method.self_assertEqual_0_self_": {"doc_hash": "6ac7592be6a58e86c9f171458e44aab2df7b43ba2ee7ffa4093a4eedb8b1e5fa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_scm.py_TestScmContext.test_should_check_autostage_": {"doc_hash": "e317a26ef56ed32a20093e04b4a18637c7d478cf6590d1eeb4515ec4cc918004"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_cache.py_test_stage_cache_wdir_test_stage_cache_wdir.None_11": {"doc_hash": "8bfe44360658899e8811efd9c16930f5fbccf797399ef4fec29bc7364458309d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_fill_from_lock_deps_outs_test_fill_from_lock_deps_outs.assert_stage_outs_0_hash": {"doc_hash": "56a55a0a52cbfd57eb026271f827c26c427c54b76bbd2075363bb346e539b505"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_fill_from_lock_params_test_fill_from_lock_params.assert_": {"doc_hash": "0b8493236bbf6ee651bb7e71c7231c6a23e27f9af860c65654373d4ff6f1f11e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_fill_from_lock_use_appropriate_checksum_test_fill_from_lock_use_appropriate_checksum.assert_stage_outs_0_hash": {"doc_hash": "c1c06cb0c7f8f6a6255ee97f3b6629ca1b276bf608506ad9634639c99a630f30"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_load_stage_test_load_stage.assert_stage_outs_0_hash": {"doc_hash": "e3ecab9ffb5559492d55bcb6ba049631aff5a02a25c6d8ab86ac72cc824605d0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_load_stage_with_params_test_load_stage_with_params.assert_stage_outs_0_hash": {"doc_hash": "c319571aa24f4b7395c9a71a0959ed99a54b3b5fa1e4dbeb4de36856977df896"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_load_stage_with_metrics_and_plots_test_load_stage_with_metrics_and_plots.assert_stage_outs_0_hash": {"doc_hash": "17e200d88f6bd2d5ca4958d63cf02813a92006c9bcd5c0495a759fabca67f809"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_dump_nondefault_hash_test_dump_nondefault_hash.assert_to_single_stage_lo": {"doc_hash": "c36720315e143ba8deeaba2558b375f22f1b7119dd52fa1adfc876b211fc9cbb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_config.py_os_test_to_relpath.assert_Config__to_relpath": {"doc_hash": "f25c87a0a20535ef72fbd51d5a15fb234f0b9b7a26ba723774baf98dfeb437cd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_config.py_test_get_tree_": {"doc_hash": "81d47a12f6e29539cad42050e420ce1d76c0bd0936de5e6a47e47706a2b1463c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_external_repo.py_os_test_hook_is_called.with_external_repo_str_er.spy_assert_has_calls_cal": {"doc_hash": "81845ab0a7d8aa5e2776d46c23f1ef710b73f9c27756aa8623868b3131ac1428"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_info.py_os_PYTHON_VERSION_REGEX.r_Python_d_d_d_S_": {"doc_hash": "0edbbe038ae22dac6a2cc2331b01a2077b2a28333de9c387ac6989411c008971"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_info.py_test_info_in_repo_test_info_in_repo.if_scm_init_.else_.assert_Repo_dvc_no_scm": {"doc_hash": "9cc738952afb591908a395cfc2c6bfd82760037fd0ea64267b8f82a8d791d7e2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_info.py_test_info_outside_of_repo_": {"doc_hash": "ee62a576c5ff72e6eeac3019527766c96c82c2a843bee86b3a1ae4b1b38c0721"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_lockfile.py_pytest_test_stage_dump_no_outs_deps.assert_lockfile_load_": {"doc_hash": "ab86eaa93a75ba1762dd23378050c69d18b5854b71202afdee8d726e3ebe19f5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_lockfile.py_test_stage_dump_when_already_exists_test_stage_dump_when_already_exists.assert_lockfile_load_": {"doc_hash": "6d2517650933a29256b615690811d99ba20972544172324d1b4a09128dee5686"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_pathspec_math.py_pytest_": {"doc_hash": "9a3e87ea49422b5e26f8ede562922d497269f715f049aa9f6d8e2aa79f0455f1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_updater.py_test_is_enabled_test_check_update_respect_config.assert_result_mock_che": {"doc_hash": "30d2fb730f1043299f897a6984b833b8d6441f493518d3eee466d45b490a884d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_os_test_open_dirty_no_hash.with_pytest_raises_FileNo.with_tree_open_file_r.pass": {"doc_hash": "aea28b8fa8c0e90baefb7a6db3839d786c65f5f0e8df1f341a154fe73b717687"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_open_in_history_test_open_in_history.for_rev_in_dvc_brancher_r.with_tree_open_foo_r_.assert_fobj_read_fo": {"doc_hash": "7bc3255806a30fdb34ded1f735cc12aaf28789dc316cb4f2b7d3b56165dd9ba3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_isdir_isfile_test_isdir_mixed.assert_not_tree_isfile_d": {"doc_hash": "359dd9ac9cba404c6b3771ffe73e71a9fe6a94200954e848c00639fa193afc31"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_walk_test_walk.assert_len_actual_len": {"doc_hash": "943811cfaf07871be2a3a303385c1579f2bd2361ea69f5ac21710e14d53d3a5a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_walk_dir_test_walk_dir.assert_len_actual_len": {"doc_hash": "305265cee733c3f7fb37d6e7b8349fe85c68d6776cc03a963e153c34db097d2c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_walk_onerror_test_walk_onerror.None_3.for___in_tree_walk_foo_.pass": {"doc_hash": "dc0ad74b71ec3120dfc07ff54cdc265782373fe7a7aed5ba6e0d7010e64c9b67"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_isdvc_test_get_hash_file.assert_tree_get_hash_Path": {"doc_hash": "93bbf5700e358a596e59a0ba53415c0fc977f2a65f984875f9e3966c17232d28"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_get_hash_dir_test_get_hash_dir.assert_not_get_file_hash_": {"doc_hash": "d9e59fdc32f966041f4fa23ea4a48663a35295b0766dc643f45d826ab490ac59"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_get_hash_granular_test_get_hash_granular.None_1": {"doc_hash": "789eb137fc0b3f12e1867b16f3ca7a0da2f9292e48ede802a1ad94e68cdd5ba4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_get_hash_dirty_file_": {"doc_hash": "a855d9d486df24d02f5e6cdf24884d8bf75262357f689e5ac02854fa103c5343"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_os_test_open_dirty_no_hash.with_tree_open_file_r.assert_fobj_read_fi": {"doc_hash": "8163894db3abde92fac604b79dea6f72e66bc10a682e2658da8e355369c97c11"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_open_in_history_test_open_in_history.for_rev_in_dvc_brancher_r.with_tree_open_foo_r_.assert_fobj_read_fo": {"doc_hash": "9bb94b2efcfe9d4384113d184a8c538dfb793ec924d2cf68355a48bba3cba552"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_isdir_isfile_test_isdir_isfile.assert_tree_isdvc_datafi": {"doc_hash": "6360142c8f00ddb388999413c032c8d17261856a65486cda7c7c8df25a388601"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_exists_isdir_isfile_dirty_test_isdir_mixed.assert_not_tree_isfile_d": {"doc_hash": "b2e026c92438125287d4e5bf9a7fa9b840a58186ef8d0a62fd02c79ce925bade"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_walk_test_walk.assert_len_actual_len": {"doc_hash": "a1fabca183774ee98ebcdc2ac6288ad50a25fdf70c774f149e3f945f5b92fb05"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_walk_dirty_test_walk_dirty.assert_len_actual_len": {"doc_hash": "4a150ad816d9460e0c09ffd66b717622cd4788e0663bc3ed1917c6d5edc1c1c3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_walk_dirty_cached_dir_test_walk_dirty_cached_dir.assert_actual_data_": {"doc_hash": "7a01b134006e2e9bf4974499903e4f9ac0b3ae28a6a8e5733eca73f381162aea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_walk_mixed_dir_test_walk_mixed_dir.assert_len_actual_len": {"doc_hash": "6a94df84af172910357bebf914a21fd1486de158ef1e55d352af77768e63ac19"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_walk_onerror_test_walk_onerror.None_3.for___in_tree_walk_foo_.pass": {"doc_hash": "e04defd4c2daeb4d7571ea5ee753caed9659fbc4b0a92e0c1163474798501aed"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_isdvc_make_subrepo.with_dir__chdir_.if_config_.dir__add_remote_config_co": {"doc_hash": "ca8364680f6ef0bf97bbd61e94000bb09850ea487326e19a022fad8ea501ff3b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_subrepos_test_subrepos.None_2.assert_tree_isdvc_subrepo": {"doc_hash": "ea65b4040e58f2be3c43a5868692747b3959719e3e997dbf4096256a10d3d90f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_subrepo_walk_test_subrepo_walk.assert_len_actual_len": {"doc_hash": "ca26ba9b8d6c5152dcf1c4ab0ce255dc9bb2ed7f939a2adfa4b7becb67b1b4f0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_repo_tree_no_subrepos_test_repo_tree_no_subrepos.None_9": {"doc_hash": "9d8e3cf54c7b3988b73e4dab0506362edea37eab48c60b23e3ec0954402f079d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_get_hash_cached_file_test_get_hash_cached_file.assert_dvc_tree_spy_calle": {"doc_hash": "927ef560f7a4121f0fa30483dde45b1a0357c5cb0c2dee0fc8948c6390de2f68"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_get_hash_cached_dir_test_get_hash_cached_dir.assert_dvc_tree_spy_calle": {"doc_hash": "9f3ed7dd2f201e3ebae4bd3cde5712e9aa6c3d9add84f0565f65637c748e16e4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_get_hash_cached_granular_test_get_hash_cached_granular.assert_dvc_tree_spy_calle": {"doc_hash": "228bcb020f18eb1e4d2cd63625a4eab0194581f75b674128705aa0f75464478f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_get_hash_mixed_dir_test_get_hash_mixed_dir.assert_actual_expected": {"doc_hash": "db87559659fad0900611ad7b30c26f6e9d62f503fd0c55128b2932540f1cfa81"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_walk_nested_subrepos_": {"doc_hash": "396dfb770fa0f7ff30111d70ccff863eedcba7f6d8cc242e3c035ce59b07ed0f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo_metadata.py_test_metadata_not_existing_test_metadata_git_tracked_file.assert_not_meta_outs": {"doc_hash": "0482b7e8a25035c7d8424b0d2f7e3c0daf85eed99868e8dca52e0c4f13b821a1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo_metadata.py_test_metadata_dvc_tracked_file_test_metadata_dvc_tracked_file.assert_out_path_info_for": {"doc_hash": "9f25a4e50aa69b8527c2c129c2a1b8ed0e338257942fa190a5bb5a0976d56c43"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo_metadata.py_test_metadata_git_only_dirs_test_metadata_git_only_dirs.assert_not_meta_outs": {"doc_hash": "dc99f6c5987386252ad1cf9993b0163887267b4d56dac59f77af9b7a2cc57461"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo_metadata.py_test_metadata_git_dvc_mixed_dirs_test_metadata_git_dvc_mixed_dirs.assert_out_path_info_for": {"doc_hash": "73fb5684e68362821202443a099eafa06e0c25374ca15f930052170d585a8482"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo_metadata.py_test_metadata_dvc_only_dirs_test_metadata_dvc_only_dirs.assert_out_path_info_for": {"doc_hash": "2a5ea865480c6fd16c14aa72f35aa95670ed50d9a889b7b467707714207af2a1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo_metadata.py_test_metadata_on_subrepos_": {"doc_hash": "fc938a695ed74afc336a273c5ecae7f1384befb37846427ff683831fa065ef64"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_s3.py_pytest_test_init.assert_tree_path_info_": {"doc_hash": "888e304af2368aabd3c277af72aecd0fa1b3c26fe6cb88c0794e5d36dfbdc21c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_s3.py_test_grants_test_grants.None_3": {"doc_hash": "670a955f32efe59623992bc705239f5dbd03921a64ce4b2e70366905b370a5b5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_s3.py_test_grants_mutually_exclusive_acl_error_": {"doc_hash": "4a18f1547488353a0ffb31e476ce7f3fe25d169c854b21f4be9fe7f57d631152"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/serialize/test_yaml.py__": {"doc_hash": "091494c969b92cd8b7428c7848398663fe41cbffadbf86560b1e3acabb393a0d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__format_time__format_field.return.str_val_": {"doc_hash": "6b92b7b5849f7a398962d5527d5ac2a842fa7c27d791a2284f1a14655a6a37d8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__extend_row__parse_list.return.ret": {"doc_hash": "680a0f9312ba9cfc78a61075f03dddb36e4d2095af214e306202a7f8b2dba360"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_add_parser_add_parser.None_13": {"doc_hash": "abac5dd143988a9767ac87db41fa7449965293559d433fc8c26e76bdaddf13cc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_PathInfo.__str___PathInfo.relative_to.return.self___class___path_": {"doc_hash": "ce3c447e7072eb02bd0b92189f3dbd40eae5138ffbdb2d728162b4a930d626cd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/init.py_logging_": {"doc_hash": "950d8abb4908edd61323ad259cd6450bb125fd36d72ba775a150a627da4e5830"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.run_Stage.run.if_not_dry_.if_not_no_commit_.self_commit_allow_missing": {"doc_hash": "77173edc4373378eee2d0381e3ca507af8f7882a177515c405b679bdacc7f96f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/oss.py__pylint_disable_abstract_OSS.should_test.return.False": {"doc_hash": "c80c946c5a13e26d4435ced6bb33b7819e4a7e998d8ade2917ac5dc44bc13c4c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/oss.py_oss_server_oss_server.return.endpoint": {"doc_hash": "a5d2e8a915f50b1eef52f6cdfea498e4d0158255779d58c5f0192127b1f4da83"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/oss.py_oss_": {"doc_hash": "41bc35e08eefe47c5480df9ac3268cae7d66dd024a5b2b69821825dcfb7d0473"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_connection.py_test_symlink_test_move.assert_not_os_path_exists": {"doc_hash": "5efd68bea2b69184ad92bf963cc23c2eb6349416f53c25f678ad2bc283bab724"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_connection.py_test_escapes_filepaths_for_md5_calculation_test_escapes_filepaths_for_copy.ssh_connection_execute_as": {"doc_hash": "dfced99cb09d1b9a48d818b10b0ec48987c5b8e06aeefa6578370fc798d354a3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_connection.py_test_escapes_filepaths_for_reflink_": {"doc_hash": "7f7162cd24e07015a6c4c95e414b88b584337cde92ca107fe5165fe1bb106c49"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_cache.py_test_shared_stage_cache_test_shared_stage_cache.assert__mode_cache_file_": {"doc_hash": "6c448e1f4ee347407a2ce6b32af382f306e38bc44a04d29e6245e34073fdb8e2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_from_dataclasses_import_a_test_context_dict_ignores_keys_except_str.None_3": {"doc_hash": "42c3d9abf84932a07a0f8b6ed1c34f2d1993813fb2d799f321c335fcb0be8a15"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_context_list_test_context_list.None_4": {"doc_hash": "9b07e768e39f97b08fe06e979b1ec435aa15b2d7675378c325f3141a9bf00126"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_context_setitem_getitem_test_context_setitem_getitem.with_pytest_raises_TypeEr.context_set_1_2_3": {"doc_hash": "b458db7abde5c47baaaa63f05893fc0871e611fcd258e316815adcc8d3e948fc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_loop_context_test_repr.assert_str_context_st": {"doc_hash": "6412f26f8c7d233cf72b3b6eb96255c5e81e5740a7f340d4cdd085e66acd087e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_select_test_select.for_i___in_enumerate_d_.None_1": {"doc_hash": "bba95c0694925a5769be147ff985d7dc2063376e6697d5b4fc577050b9910717"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_merge_list_test_overwrite_with_setitem.assert_context_d_Va": {"doc_hash": "2ba289ac054feba96246908d99580000b83b9cc5f1ca605888458b6131ffef2e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_load_from_test_load_from.None_5": {"doc_hash": "57f01a12d9568cd50813f37372664c8f5a960bf9ec6be6e8b24563e0e579d5bd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_path_info.py_test_path_info_as_posix_test_path_info_as_posix.assert_PathInfo_path_as_": {"doc_hash": "34cce92f4c7f0a4dabb06101571a025ace9b2490b1eeeee976c5da840cebe3a4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_path_info.py_test_url_replace_path_": {"doc_hash": "0eef52bc8d4e8994491f0bc759334354f3c5d43d90eed1f9a2fd076b8d9d04c0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py_RemoteCacheRequiredError_MergeError.pass": {"doc_hash": "0144fdd3190cecd976907c10fda1a94425d5112ecb34ffd6bc3a9cd4345e7191"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py_CacheLinkError_": {"doc_hash": "ea8b3615ec1f9504265d6dcc271c9c199dd1d719814e072dfaa8426896f23488"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo._get_repo_dirs_Repo._get_repo_dirs.return.root_dir_dvc_dir_tmp_di": {"doc_hash": "5a5ab5ab3c3dc30d241ba67b31e1be67e5e72eb98fbd331b97d35a17a3d88b44"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.__init___Repo.__repr__.return.f_self___class_____name_": {"doc_hash": "8fc874a1af64a971e49238949043e71dd45f12eb74b0e3601f985eb091f549e2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.find_root_Repo.find_root.raise_NotDvcRepoError_mes": {"doc_hash": "32232be55a7f2c636640c83ccadb48c638494c35aa73f833c98f9f3906071cfd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/add.py__process_stages__process_stages.return.link_failures": {"doc_hash": "b0df3e409b28732cfb78941d05274290b339c9f0ba89ed8e2d875b106b725355"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.dumpd_Stage.commit.if_link_failures_.raise_CacheLinkError_link": {"doc_hash": "c44414475353176300f96fc1158ba071ae52d39b8a1416b180adb71bb17051fa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_get_baseline_test_get_baseline.None_6": {"doc_hash": "f5d7e96111b3ea30b160ba668b1a9e0d4d13a54fc2b1215e5d31c46a37b7583c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestShouldPlaceStageInDataDirIfRepositoryBelowSymlink_TestShouldPlaceStageInDataDirIfRepositoryBelowSymlink.test.with_patch_object_.self_assertTrue_os_path_e": {"doc_hash": "aaa04dfd480bcf43536dd37f65db14c54902260acdb10267c339158a0a8749f0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_symlink_file_test_add_symlink_file.None_3": {"doc_hash": "ec0ad54e5dd49cc7fed288c58bed43846426a4d0728cf1b13516c7f460b9315b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_symlink_dir_test_add_symlink_dir.with_pytest_raises_DvcExc.dvc_add_dir_": {"doc_hash": "ef86e3fc2bce7708b2333881ba00beae595ea2080450b1639415e328f394b85b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_file_in_symlink_dir_test_add_file_in_symlink_dir.with_pytest_raises_DvcExc.dvc_add_os_path_join_dir": {"doc_hash": "2f55a9a011dbd25c7535c304fdd9a0a61ea6de8546c219edca93d3498dd36330"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_logging_test_get_repo_file.assert_tmp_dir_file_i": {"doc_hash": "c1a858ceb63f7b734d8c748191063c4e659e74038cff260d8a0b317f30e8b0ce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_repo_file_replace_without_confirmation_test_get_repo_file_replace_without_confirmation.assert_tmp_dir_file_i": {"doc_hash": "a248fe38684b7849bd493cbf76a25f8669790a9b8d37dbf87b093b39acb5c7a1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_repo_file_replace_yes_test_get_repo_file_replace_yes.assert_tmp_dir_file_i": {"doc_hash": "5b421e11a8bd873f41e7956dbc8ec82a184592ea1a995d1c81eb5f32e1dda691"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_repo_file_replace_no_test_get_repo_file_replace_no.assert_tmp_dir_file_i": {"doc_hash": "7f78f519b39b6cc3469f1383a29237dad010feac7bc7a4f342bbc9f78ba9e2de"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_repo_dir_test_get_git_file.assert_tmp_dir_dst_re": {"doc_hash": "1f0addb36bb9e8b6dd38cd106814eaa9d3ba81ed7eef963133edf1e451adc7ac"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/gs.py_GCP_": {"doc_hash": "fb0c1d51f53717b4f77ec12ae798c7f9913f7e06f10d34d6b90eec002be4ba21"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_imp.py_from_dvc_cli_import_parse_test_import.m_assert_called_once_with": {"doc_hash": "bd7931a9aadb85ea74c1a08ead8d08acffbc9f7feae43b301045c5a23570084c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_imp.py_test_import_no_exec_": {"doc_hash": "f3758d2fed90c29c92189566db5bdd8a49687872d2f58c0cc2a6860506f37246"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_is_tracked_unicode_test_is_tracked_unicode.assert_not_scm_is_tracked": {"doc_hash": "11355bbcddf080b677c6d331f0256d5c7dcebe0e89c2f8b13b914d2d582ab520"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_external_repo.py_test_subrepo_is_constructed_properly_test_subrepo_is_constructed_properly.with_external_repo_.if_root_is_dvc_.assert_repo_config_remot": {"doc_hash": "5d6766bf40a391a1e59f5b85ae065d517c9fac0fde26d2d5d08cacb353cda826"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_external_repo.py_test_fetch_external_repo_jobs_": {"doc_hash": "6fe38f7372a2a000d925f4e34b6638515dbf4b150ad7614a6acf0a53c759692f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_interpolate.py_from_math_import_inf_pi_test_resolve_primitive_values.assert_context_resolve_te": {"doc_hash": "a343df0b61cb35208839ffd2df48087b00bcd7131dc7f6cfd036ca4b72d60e2b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_interpolate.py_test_escape_test_escape.assert_context_resolve_te": {"doc_hash": "2660182d363843ba2c8d7b9c0db1b483bff619a6509c456404b8d4cfc3fcc4dc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_interpolate.py_test_resolve_str_test_resolve_primitives_dict_access.assert_context_resolve_N": {"doc_hash": "38edb03c9e436750880f1c5804a0f9f1da8a2ec7c406ce76284e31fcfb956e87"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/__init__.py__Manages_cache_of_a_DVC__get_cache.return.get_cloud_cache_tree_": {"doc_hash": "62e07854e2c1da3d18c24a2f33af9daec5df2a5eae5a830a7c0c632a92c6ac03"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/__init__.py_Cache_Cache.by_scheme.yield_from_self__cache_it": {"doc_hash": "7a6c1ad2a369c82b3da2ba0b65786043310e9408cbc5f717e18a86efb13b2f6f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_itertools_use_state.with_tree_state_.return.call_": {"doc_hash": "4c386b66ec214065cfc51ee07b5b707875d584179b7e8e38ebeee43b2603e513"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.load_dir_cache_CloudCache.load_dir_cache.return.DirInfo_from_list_d_": {"doc_hash": "bb69e9555b0a0fc35865277f7ebd259ef920f6d0d7d30e402b4076ed84cc1abd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._changed_dir_cache_CloudCache.safe_remove.self_tree_remove_path_inf": {"doc_hash": "25e82b85b7a9146ddd0e51a0bdca7ab26a5ce7d81698d1a397a2fa1aabc849ef"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._checkout_CloudCache.set_dir_info.hash_info.nfiles.hash_info_dir_info_nfiles": {"doc_hash": "d23437da691aae271bed798643e4f008926ab5565fd90e3fcfa77b5a2043d77e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._list_paths_CloudCache._list_paths.if_progress_callback_.else_.yield_from_self_tree_walk": {"doc_hash": "fb83bdfa885dc7f07f9cc8555495648009250e61a2e62ba358be3220e1f9fac6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._path_to_hash_CloudCache._max_estimation_size.return.max_": {"doc_hash": "4c011006dd25a64aabb87797ffa0efa3e32d18ac0c76b9cc43222ae7602304e2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._estimate_remote_size_CloudCache._estimate_remote_size.return.remote_size_remote_hashe": {"doc_hash": "511abf3f309446ab58e38774ed03418af04af3b6fe550cd3fb1423561b558f29"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.list_hashes_traverse_CloudCache.list_hashes_traverse.with_Tqdm_.with_ThreadPoolExecutor_.yield_from_itertools_chai": {"doc_hash": "54277b0602a2a0b94d1b6a87d757c50888f9486948db6843ed5b275b99457201"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.all_CloudCache.all.return.self_list_hashes_traverse": {"doc_hash": "83aefcb5ffe3d76e3e4a52e490ae27c099838277456537cd3a85f48f876ad00f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._remove_unpacked_dir_CloudCache.gc.return.removed": {"doc_hash": "55d879b60a9b66c4dc922b270694156e04d614dd7fe0ca21a0cf4a260cfe29f2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.list_hashes_exists_CloudCache.list_hashes_exists.with_Tqdm_.with_ThreadPoolExecutor_.return.ret": {"doc_hash": "1ae458fafa08fdd8f37c7b3831c2571d40467bff358e0b0b513393330725dc65"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.hashes_exist_": {"doc_hash": "ac3f2f02b720ed3075a1e55139c327b885a2062a974cf398b910cec49df48c9f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/local.py_logging_": {"doc_hash": "7eadc327f789f270b3d12aa0450c584599fa884f8458a9a6377a4c6c69a9c3a4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/ssh.py_errno_SSHCache.batch_exists.with_self_tree_ssh_path_i.return.results": {"doc_hash": "e1d7be5da1fd2cf66c08e369d56e6b41359f2be6bff53194abdb5164e68748e9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/ssh.py_SSHCache.hashes_exist_SSHCache.hashes_exist.with_Tqdm_.with_ThreadPoolExecutor_.return.ret": {"doc_hash": "10d10915b4c046f6dfe1b3cb25b2cbb51074a9382902ef2d53864128930e5dab"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/ssh.py_SSHCache._list_paths_": {"doc_hash": "70d5a2f88e845b4c4c69cc795a1ef17977e529f795e44ee1d4f0ff28a80b37c2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/dag.py_argparse__transform.return.nx_relabel_nodes_G__rela": {"doc_hash": "3fa813db978a8038a75b9542b237203cbd800f78cea584b12537560d284fd69b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/dag.py__filter__filter.return.H": {"doc_hash": "4db486f7e64fa693900f1361c2a1370c4012c78e1e015247d4d3fe072033b39e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/dag.py__build_CmdDAG.run.return.0": {"doc_hash": "ba9d2286b1e2f2a3160414f431d54b83d2bf8c53603626739c980509d9df0305"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_CmdExperimentsGC_CmdExperimentsGC.run.return.0": {"doc_hash": "bf00faef096b8c8c054fc63e170af5a20af56eba2082c003a23155e60e40c391"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__add_run_common_": {"doc_hash": "423505396323af00ae070de1dfec58085c2a5b316c36976630bfcc40ea1bd7d0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_Config._load_paths_Config._load_paths.return.Config__map_dirs_conf_re": {"doc_hash": "24245343c5bbfede3ff26f31d26fbd5fe02fd61f83942f7890a2a4caf2a7ec32"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_Config._to_relpath_Config._save_paths.return.Config__map_dirs_conf_re": {"doc_hash": "95662197f00259edf2a71516d746ebbf6c30edb7bb49b248f01cd2d93664cb2f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/data_cloud.py_DataCloud._init_remote_DataCloud.push.return.remote_push_": {"doc_hash": "62e4ff1d45a601b826b7e32132155deba70cb6f0f5596ba3b2ac7afdf8018ea9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/data_cloud.py_DataCloud.pull_DataCloud.pull.return.remote_pull_": {"doc_hash": "4160ca702ab5db8caabe6f04559694ddc3d0bc572cda952a4a00c56eaf5e85f6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/base.py_from_typing_import_Type_": {"doc_hash": "3cf4b966a137c528e8cb4aa096b90c92d81e79f07feb3c4c8dbd9e4b6bc7a033"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/webhdfs.py__": {"doc_hash": "6d55b98b2dcf76cf4340fdcfc81940d20898286f852587cef52bb680df696bb1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dir_info.py_posixpath__merge.return.patch_our_diff_their_di": {"doc_hash": "961ffb62a08cdc1b94245f30323d8a2d688f8f74e1ea57ab4b8925105c400453"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dir_info.py_DirInfo_DirInfo.from_list.return.ret": {"doc_hash": "aecfd1c907d26ce5af1f122c34aacfd96b1b85f18f1f7d712882f973c1bec1bf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dir_info.py_DirInfo.to_list_": {"doc_hash": "06d0503a0f72edda34d0159cb7b551513d9471585e9f5d3f2013ff4959ef6142"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_PipelineFile_PipelineFile._check_if_parametrized.if_stage_raw_data_paramet.raise_ParametrizedDumpErr": {"doc_hash": "3ed3b6bfe25fe69e83e3173564aea14a9d4f7d0565f03961a87b52a1d2ca58db"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_PipelineFile.stage_PipelineFile.merge.raise_NotImplementedError": {"doc_hash": "550436796c58d80238c32bd109bc7e6a591919a7ba094895dc3b03a74b5e9bc3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/hash_info.py_from_collections_import_O_": {"doc_hash": "559e00d3ca5bbe8090191037acb223eeeb9f4f472d9974e72c72aad84d7828b8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/info.py__get_caches__get_remotes.return._join_schemes_or_No": {"doc_hash": "7bc5ecf06792e63ddd62b15475869c96b80bbe4549131e92cdc6e18c2fdc96e5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/main.py__Main_entry_point_for_d_debug.try_.except_Exception_.raise": {"doc_hash": "bc90ad0e09387065be42040c9a37c6d704984a11a06e6122c37b96ba34c25ef1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_BaseOutput.dumpd_BaseOutput.dumpd.return.ret": {"doc_hash": "17c635a540f8135ecbd1b5670fa0bedbf628d085e2fb578a96bf51767707b46d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/webhdfs.py__": {"doc_hash": "2ad1a351231bbc4f43f65a1a9eb108b09d5ad8315ff096f7056e29ad60ba9162"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_MergeError_MergeError.__init__.super___init___": {"doc_hash": "757f205fb57f63b2a8a9905767aff36af9de10e1b6009d5d9465c356032b6e77"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Meta_Meta.path.return._join_self_dpaths_": {"doc_hash": "c619173a0000988c66a9005723f20be474b023456b492169007bff7690cc9a57"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py__default_meta_PRIMITIVES._int_float_str_bytes_": {"doc_hash": "1463f561c8967cf469e8f52216a3c49b1ec98b64ee596faf2e727d6044d908d7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Container_Container._convert_with_meta.if_value_is_None_or_isins.else_.raise_TypeError_msg_": {"doc_hash": "162f4645fee576477d7b13c3109f280682a66beca710b09c073b4d8a17fa7099"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Container.__repr___Container.__eq__.return.container_o_self": {"doc_hash": "ab9393610d92d3f7df39f3350fb73cee0f8856c8a6a164493bee1fb9ace633b6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Container.select_Container.get_sources.return._": {"doc_hash": "8f4c038d7cd0706f476982e6948022904e492aa472461769b49575b1c632b101"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Context.select_Context.select.return.node_value_if_unwrap_else": {"doc_hash": "ed1634a32714d075166a23593c593ad8113be69790af0205be11c45835cf20c3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/interpolate.py_str_interpolate_": {"doc_hash": "a6a33cca6bcd69f5730bb46bbe46374bbed5dac88281c3bcf82d5bddc105ae91"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_errno_STATUS_MAP._": {"doc_hash": "99fd8e7d53d3cf0610e83bbedbd4323ba5e16b3c0a9fde8a5fdaa0e565b7dd96"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py__log_exceptions_index_locked.return.wrapper": {"doc_hash": "5d65bde8072df727516e8337a1bde50355f2254c4a0bff435e83c673c986be25"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote_Remote.gc.return.removed": {"doc_hash": "19a5f11ec851101f47e95fb3288c3a1b6aafc81cf77ef0f4dfeb3008c3e52cad"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote.status_Remote.hashes_exist.return.indexed_hashes_self_cac": {"doc_hash": "9a5dd49684660487fef0da147da633a5a017a8a21906c6c6b9893f22fa3daaa5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote._status_Remote._status.return.self__make_status_": {"doc_hash": "720f34ad7d9569899b587f6a83101d153f91b9ce8ee93ca51a41811633d9a102"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote._make_status_Remote._make_status.return.dir_status_file_status_": {"doc_hash": "264533bb513eccb9155c313d0a512803808b3bd98686c194d21a1cec74a69f1f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote._indexed_dir_hashes_Remote._indexed_dir_hashes.for_dir_hash_in_dir_exist.yield_from_file_hashes": {"doc_hash": "3e6bb78f3cd4fbf0bb952358436961fcf755ad6eafeb3f4674355c6f4d018368"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote._fill_statuses_Remote._get_plans.return._from_infos_to_infos_na": {"doc_hash": "00fb9a36a88d0e30ac80982da37fc13a8e49816b1952134012bf50770989ea8f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote._process_Remote._process.return.len_dir_plans_0_len_f": {"doc_hash": "55c8e33d16fc478142fcb3ec480fb449908e37632f1578379814be2c739ec544"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote._dir_upload_Remote.push.return.self__process_": {"doc_hash": "5f55f5bbdeb06ddd2b2196bba831d7bbac14f88922aa0fbfde46feb525e420f6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote.pull_Remote.pull.return.ret": {"doc_hash": "4d9a9b416a58e18ad0d501caa057a7caf7bf34698a18fd99b474c9567a441dc7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote._log_missing_caches_": {"doc_hash": "76d79c54b1f5dc18b8a758d0f8576861fac8d6bc6bb4973caaf87bdf11fbacee"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/slow_link_detection.py__type_ignore_this.message._": {"doc_hash": "db2caeb843b3ea09e7ecf7ef49d22a9e438f9f3a4a899c866bd3dc0336d2d26b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo_Repo.get_url.staticmethod__get_url_": {"doc_hash": "ef6938d98545b9aab7b063238781652a26a48dce82e3314fdb94458d27945d26"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.check_modified_graph_Repo.check_modified_graph.if_not_getattr_self__sk.build_graph_self_stages_": {"doc_hash": "33efb0ebf1690f7092eb3d0fddae4d67c3ecda10dd8f6a98348ec4ad8e804b83"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/__init__.py_Experiments._update_params_Experiments._update_params.self_scm_add_list_params_": {"doc_hash": "67e85fab3b0d1654895dc39271a8ef052ca7dbdbae789425fa5f3139e5c36a25"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/__init__.py_Experiments._resume_checkpoint_Experiments._get_last_checkpoint.raise_DvcException_No_ex": {"doc_hash": "46c4fba687c80bf3638d2cbe6317a93bd91029a59998150209de0b40cd787e82"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/gc.py_logging_": {"doc_hash": "463fb6e8eb4ae70df2ac98528ad803893aeed3f029eef735e2833e4feb782670"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/gc.py_logging_": {"doc_hash": "1256f2497bdb835b87e212d0af11e4d17564eb6b44d59c7037b983c7da3dd771"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/graph.py_build_graph_build_graph.return.G": {"doc_hash": "2ca4ef7daff3a1eb52b5346084dac85c6177c474a1d1d4b98bcddb5ec50c4ca7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/graph.py__NOTE_using_stage_graph_": {"doc_hash": "b44f3626d9dd03323d7067613769a4b156366f61f5c2de877d640ec5d5f5e0ea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py_Plots.render_Plots.render.return.result": {"doc_hash": "b0cb5c398f05ec6b02b23a23cbc592779fa75cec30d5dcb30e5cdd771389d2a0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py_Plots.show_Plots._unset.for_prop_in_props_.out_plot_pop_prop_": {"doc_hash": "4c7dc9c0b6cdb111cc17c4df7c302bb8553ed7cf0ee563717a18ae2ac8362ddd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py_Plots.modify_Plots.templates.return.PlotTemplates_self_repo_d": {"doc_hash": "07637f65fdd048c74783cf5e0b588436c7eca5740089d8b647f98e2ce3a2a121"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_NormalizedConfusionTemplate_NormalizedConfusionTemplate.DEFAULT_CONTENT._": {"doc_hash": "d06aa3f9f59a7b59b250567d3b9e8874807ff3a0b528dc70c94cec242c0eecb0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/reproduce.py__reproduce_stages__reproduce_stages.return.result": {"doc_hash": "b0d374959dbe830c348771b9e69ae044807f8dffa02653ca7db8ea9e99b961fe"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/trie.py_from_funcy_import_first_": {"doc_hash": "c378d7d9ced088db7e4c5ca09068bf2cbaedbfc832806367ad7a8bdfd69c42b6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage_Stage.is_checkpoint.return.any_out_checkpoint_for_ou": {"doc_hash": "c3240d1c14af48e7dcf9fdbbe48d1a9d0dfadce7bd9374c4a2b082cf99b3419f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.changed_deps_Stage.remove.if_purge_.self_dvcfile_remove_stage": {"doc_hash": "46fc006665d15e98a1c01ee916fe1cf2b0af00fe25d8d4ac325f888b81bf73df"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/loader.py_logging_logger.logging_getLogger___name_": {"doc_hash": "1b3aec27b7c677897ae977aeb6073eeb3a2c1d7c5809bf615abce44b52b7160c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/loader.py_StageLoader.fill_from_lock_StageLoader.fill_from_lock.for_key_item_in_items_.item.hash_info.HashInfo_from_dict_info_": {"doc_hash": "0f7251448cb902ff0c46523a164c47c0baaea53186090536adf26a19b4460256"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/run.py__checkpoint_run__checkpoint_run.while_True_.if_done_wait_1_.return": {"doc_hash": "baf50ff7473a4bd594937ad7a73ffbf265636c2cae364b25b41f175f0b1b117c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/run.py__kill_": {"doc_hash": "77fbb0f216cf5657426e32dc2fd4bfee649d03fdeb5095d9d7080ea48f224354"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/serialize.py_from_collections_import_O_sort_by_path.partial_sorted_key_attrg": {"doc_hash": "82704fda7d908f9d2d33983b39d8bd1aaca3e1a1d42d3c4991313ba1a7c168c4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/serialize.py__get_flags__serialize_outs.return.outs_metrics_plots": {"doc_hash": "e682a7be932f23e31fee427ef61bdf95fed6e7572a67a701aaa0c57e3e372abc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State.get_State.get.return.HashInfo_md5_value_si": {"doc_hash": "81e3852fa3d44428708afcee880d9d9fee9ae6a8789dbf9fc0c862059a74faca"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/__init__.py_posixpath_get_tree_config.return._resolve_remote_refs_conf": {"doc_hash": "b61922fe6c62091c9042c88ca08aebcb78473ba53be891fccbb36d37c2ac9c9e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_logging_use_state.with_tree_state_.return.call_": {"doc_hash": "15ba12e9dd52e46fb144934b7a623d49a8d0be3a351450d01e55002cc509526b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree._collect_dir_BaseTree._collect_dir.return.dir_info": {"doc_hash": "6af209f8128a6f2362c3cdb115c8ad8871fc3a64868dabc289cd972ef809e66b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree._download_file_": {"doc_hash": "b48aab5fa0f04ae6385dbcd6aacc3b849e1135fba3f2eb829e3e4639f24df844"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/dvc.py_DvcTree.exists_DvcTree._add_dir.for_key_in_out_dir_cache_.trie_base_key_None": {"doc_hash": "6ced97e2b12d9e361317a1ca4d22f3ce927116dd339e54c5f5f2981332a4d1b3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/hdfs.py_HDFSTree._group_HDFSTree.get_file_hash.return.hash_info": {"doc_hash": "251217ccceb7057a509377845366a8b3de7fd4aa9dc732f97c63bd54e38553b8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree.is_hardlink_LocalTree.chmod.try_.except_OSError_as_exc_.if_actual_mode_.raise": {"doc_hash": "6a5eaea3dbedde49dd626080eb1c54695105c247abc4a251a8bd2f3b685c5c4c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree._unprotect_file_LocalTree._unprotect_file.os_chmod_path_self_file_": {"doc_hash": "24a48a11c58f8663f48fa927e52c1c0ae100a3e3bfcb372b4371cb9c5587e01d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree._unprotect_dir_LocalTree.getsize.return.os_path_getsize_path_info": {"doc_hash": "da38e66b8b451c7798b9f3074c20032d3158e57dd40df71f0383cfdc8b8d5cf8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree._upload_": {"doc_hash": "0d1d4555de4910b450d0b74d10b5c5d0c94f6237bb672dfaf6dc4bf44f2eac25"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_logging_RepoFactory.Union_Callable_str_Re": {"doc_hash": "bdc06fb36b168e4cf62de3eee85377169e9313a0909616d25b0f225000bc3018"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webhdfs.py_logging_update_pbar.return.update": {"doc_hash": "b4b2085ec8f05008332922312536c9ad787124690a7764c247c3e384b8423b09"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webhdfs.py_WebHDFSTree_WebHDFSTree.__init__.self.alias.config_get_webhdfs_alias": {"doc_hash": "7596e6e6baed440a2f7cd451b457e76ed657c93372d90d73a1ae3ccc9338c09d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webhdfs.py_WebHDFSTree.hdfs_client_WebHDFSTree.hdfs_client.return.client": {"doc_hash": "da0bc4ca228f1da9df497bf69ea9551498bad06aeffd16a4508cae32d093d23c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webhdfs.py_WebHDFSTree.open_": {"doc_hash": "de6af147e8573233d690a33a3554aa2722595b027f9822d2f8f316058a948468"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/types.py__": {"doc_hash": "a9bc2f3c0b8e72860c2aa0a85bddb642a348673b4936b326ded2ca26f98a86a2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py_tmp_fname_colorize.return._style_color_message_": {"doc_hash": "806187131d2b111659b750d6b644fbe4c88511bc480e7d3a98709f13a92b49f4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/setup.py_install_requires_ssh_gssapi._paramiko_invoke_gssapi_": {"doc_hash": "33c8f343a87dad2361e354026da8b3bbb04615510eaefd41d51d1a4e7d15784c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/setup.py_all_remotes_tests_requirements._": {"doc_hash": "87c03c9147a63cbd0ab8fc499c85b5c0821c6aae67362909ffa5de07bd9fbf52"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/setup.py_setup__": {"doc_hash": "3f29b70386e461f6ba3a2bbc7ee0356dbce1667f75217b914e0512f3eeaf413b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/conftest.py_os__get_opt.return.f_action_remote_name": {"doc_hash": "6cc0ecd29f29100ffc03d8d58d3a7bca2a0e45347251a97e0f6fbc08a9e7393d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/conftest.py_pytest_addoption_pytest_addoption.for_remote_name_in_REMOTE.for_action_in_enable_.parser_addoption_": {"doc_hash": "bf6e611513ad876a43f61777606083341d51b6044a9c0af873090f8388861ba6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/conftest.py_DVCTestConfig_test_config.return.request_config_dvc_config": {"doc_hash": "3b327d3e3109cdcdc0943583a187858daf6eab62540849d25730417504d6f01b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/conftest.py_pytest_configure_": {"doc_hash": "66b5e076f22be64766f5e6b5893862c16a9b6bbde5c0d66fb16dcbe5290ab415"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/conftest.py_from_textwrap_import_dede_CHECKPOINT_SCRIPT.CHECKPOINT_SCRIPT_FORMAT_": {"doc_hash": "54fe5ba2043090a30487df23e911aa4ec49845839b57aea78a8c0b4f74ed9607"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/conftest.py_exp_stage_exp_stage.return.stage": {"doc_hash": "dae77c6ed606deaabb5aea0c3bac2f48ac8f9cc7c6e696b102fa3dd3e09a3e8d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/conftest.py_checkpoint_stage_": {"doc_hash": "8bd45b402936326f0b3ea4655de9a6532f9976a94d5a7644ebc89849e0e4c42b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_checkpoints.py_test_resume_branch_": {"doc_hash": "bba55fc9c4d14827de39def05ea22b8fbf03fcea902cfa684d4d8f9a89b8f7d4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_file_permissions_test_file_permissions.assert_stat_S_IMODE_os_st": {"doc_hash": "0bb02e7cacb6bce3f0ed013d54b4555b770a6642cc2bf6ffa1c64ff427936b28"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_failed_exp_test_failed_exp.with_caplog_at_level_logg.assert_Failed_to_reprodu": {"doc_hash": "42cb39065daabb3ea07316f720a83eb42516b8e31114cffc457b10990f2fecf1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_gc.py_pytest_test_workspace.assert_removed_expecte": {"doc_hash": "d87c3951ce460012a3f7d1f54e87948a0304397c9cdec2a8163b6ccb18f70277"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_gc.py_test_all_commits_test_all_commits.assert_removed_expecte": {"doc_hash": "e27ea77ec1816b28b64f7d2c7b4acf1f6c49d2ed40957e8c1aa97abb6e875484"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_gc.py_test_all_branches_test_all_branches.assert_removed_expecte": {"doc_hash": "6cd27c7c9b96621d764949900544d90ff1a52fa8463e88f3513fafc7420280c8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_gc.py_test_all_tags_": {"doc_hash": "bd0742be7d5767803f47850fdebb314ed3a1a40a0873424e345ba459bf510855"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_show.py_test_show_queued_test_show_queued.None_5": {"doc_hash": "73aa836f1d93e735343cd4665f9eac7476a702cb3f85b96ed8e6db789d8eae1b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_filtered_files_in_dir_test_add_filtered_files_in_dir.for_stage_in_stages_.assert_stage_outs_0_def_": {"doc_hash": "bbc43b88c079154bd17cd47a1250ea9da7d169794d118000218def0e4a4b9f2f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cache.py_TestCacheLoadBadDirCache_TestCacheLoadBadDirCache.test.self_assertEqual_dir_info": {"doc_hash": "78c625401727c91f307072f7705ad45a7c8eea995d1dc58cbd46d8a09b1fe3e2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_dvcfile_dump_preserves_desc_test_dvcfile_dump_preserves_desc.None_4": {"doc_hash": "34d73cc54e83c29ce5339d27d3d27fb4c44f7dab84bfe489d9a001a574923f1f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_dvcfile_dump_preserves_comments_test_dvcfile_dump_preserves_comments.assert_dvcfile__load_1_": {"doc_hash": "f7e2fdb19db52338814e6a5a3cfaa057fa0c497c035ff43d89dd87b9afd32c07"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_dvcfile_try_dumping_parametrized_stage_": {"doc_hash": "a710a94b5e1432e1d8e05c9288ef965b6cfcdaf6b458a6f33f5ebf82fe679450"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_test_dvc_formatting_retained__format_dvc_line.if_cache_in_line_or_m.else_.return.line": {"doc_hash": "dd1d88cbc730faf1aa2bc124f66f48f34f956a262b2bae20a8f8f390d4d95736"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_desc_is_preserved_test_desc_is_preserved.assert_new_data_outs_0": {"doc_hash": "65b2bbd02d775e8b67fe3ffef82b582c7dcb4d559b95ecac111f0bb10ea9f998"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_test_repotree_walk_fetch_test_repotree_walk_fetch.for___hi_in_out_dir_cach.assert_os_path_exists_dvc": {"doc_hash": "1c3feab98be0e48e778cc1058832aefd70bdcafe5c48b9c1b6d4007c1dbecb4e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/hdfs.py_hdfs_server_hdfs.yield_HDFS_url_": {"doc_hash": "7f581c9d835c141c6d59af6cf3592f2c4cea89dc674b7cbf1252b45cd885a5fa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/hdfs.py_WebHDFS_": {"doc_hash": "ea0a0eda7c9851e968fd77132a277a42f7199dc84d6157e6cbc014d685c1aaf0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/webdav.py__pylint_disable_abstract_Webdav.write_text.Path_self_path_write_tex": {"doc_hash": "39465be148d1441c5c05ac3fddd6d5634ed2b432a9dd86db332d9db943c34bc1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/webdav.py_webdav_server_": {"doc_hash": "2646a88d4196a4713e779894086c8f068719d7a147cfffb3cc44d94919ff1059"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_add.py_from_dvc_cli_import_parse_": {"doc_hash": "df3dbcccfc91cb85ee097ca70384d93246e64fb0a36cc64ca300e20806aa1818"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_dag.py_repo_repo.return.dvc": {"doc_hash": "3d4569e6fa07ca535374975b33bc1d72bbc23bd53a80374be177c6ba7b588b79"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_dag.py__NOTE_granular_or_not__test_build_full_outs.assert_set_G_edges_": {"doc_hash": "4a575640296d4d8bb516f79bf7df323692ba1f93bbeeb4a735edc31a6ca999dc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_dag.py_test_show_ascii_test_show_ascii.assert_": {"doc_hash": "f9ac93b98e09ee48bda5a7c6f6f7591f405ae35b4fdbbfbe67347634fda93d65"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_experiments.py_test_experiments_run_test_experiments_run.cmd_repo_experiments_run_": {"doc_hash": "b5099ffc06bf4d2c23fa6848b6f5ac9f7dfee174a866dde639200df393cb6a91"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_imp_url.py_test_failed_import_url_test_failed_import_url.with_caplog_at_level_logg.assert_expected_error_in_": {"doc_hash": "58fa7c57894ed853bf25666eb01ff36eb5234d302cc1a214a8f0c27bc982ad85"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_imp_url.py_test_import_url_no_exec_": {"doc_hash": "64223621ebcd7d477ce7c6f15ed05a6c4a59118117b7f1589959eedd34d54ce3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_http.py_test_http_method_test_http_method.assert_isinstance_tree__a": {"doc_hash": "e9259f75f5cc3b0abe5576b2bfaba957885ad867a5de3fde956c03624ba55f9b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_http.py_test_exists_": {"doc_hash": "6eb966c964dacdd1528eb9acc2bba365812430baff2275ec867b196793b23273"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_webdav.py_pytest_": {"doc_hash": "0dc928050ab711734773d4777d93ae10378f696aedbb6f8eb192e90ebee7c144"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_webhdfs.py_from_dvc_tree_webhdfs_imp_": {"doc_hash": "62d7fb8c162e1b7274661bd918943221d59f1135f8077389e5261179a7ffbad2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_select_unwrap_test_select_unwrap.assert_node_1_2_3_": {"doc_hash": "bfb6296cfda07f2cb69278da797c59d85490d441ec1a2922714d48c0a8827cb5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_merge_dict_test_merge_dict.assert_node_layers_": {"doc_hash": "2e42456458ccfff68d63bc682a62afbebfa1f38d58e1447124d6d417e37787a5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_node_value_test_node_value.assert_context_foo_val": {"doc_hash": "bf7049d70cf25db4b51bee93c512e3fd821dcf0f31c7a179e383fddf40297f68"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_resolve_resolves_dict_keys_": {"doc_hash": "ab80a45876c5afec96d0592bb97f6c90d92ce5ed7e37180fe274b1bd44b12f57"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dir_info.py_from_operator_import_item_test_list.assert_dir_info_to_list_": {"doc_hash": "281e182f8395cb81bd12b0252b2919e8c37ec3f548379d998721693a417af52d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dir_info.py_test_size_test_size.assert_dir_info_size_s": {"doc_hash": "55582a4ec74fbc42e06e866dc8db46d3e136efe93b722dba3e2f523eca1e62f8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dir_info.py_test_nfiles_test_nfiles.assert_dir_info_nfiles_": {"doc_hash": "551f21cb44abe726713c8a173d90377fe5b6c10b20a1a867e9e922bda8cc1aa3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dir_info.py_test_items_test_items.assert_list_dir_info_item": {"doc_hash": "455e08d51555368b5846934ad6c4d096de948d2bda94bfa6f9e1894a80cd797d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dir_info.py_test_items_with_path_test_items_with_path.assert_list_dir_info_item": {"doc_hash": "231cd660c777063382c6d4da1656f7156e44c6018345611ad18a16e339164925"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dir_info.py_test_merge_": {"doc_hash": "ea384f59ec4755044d87dcc5ed757796067175068765ddba2615a4de12184cfd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_info.py_test_info_in_subdir_test_remotes_empty.assert_Remotes_None_in": {"doc_hash": "8223c416cebe7d9d53e8205cbbaa23cb76f952ac92f655bc101d23a11a68c952"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_info.py_test_remotes_test_fs_info_in_repo.assert_re_search_r_Worksp": {"doc_hash": "36842bf6b55ae33ec848b6514c4a97af42f279ff2b74fe90847fe60f6c15376e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_interpolate.py_test_resolve_primitives_list_access_test_resolve_primitives_list_access.None_4": {"doc_hash": "1ca3412593fe12ea308a958de7abe2e3123f874844e826586234bffc6d57f054"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_interpolate.py_test_resolve_collection_": {"doc_hash": "ec02419b2fbccf66d1aceae3671505542c530db8e4f199bd80bb9e104cb77e97"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_get_hash_dirty_file_test_get_hash_dirty_dir.assert_actual_dir_info_nf": {"doc_hash": "cff65f512183ac9fc36054bc6457672e61bbfd89a932ae4a780afe1b2c775909"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo_metadata.py_pytest_repo_tree.yield_RepoTree_dvc_fetch": {"doc_hash": "8789db0dcc74c967ce892aa9d8866e1ef6df18d0100c362de19848349eae09fb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_tree.py_os_test_get_cloud_tree.None_2": {"doc_hash": "037963ef933a445c94318e6ee1d6a32b1e9de6beade3f2d1972e8e591126ad37"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_tree.py_test_get_cloud_tree_validate_test_get_cloud_tree_validate.with_pytest_raises_Config.get_cloud_tree_dvc_name_": {"doc_hash": "a51d0d02473ab50ffb20208ec733046928c6884d9a72132ae6f097d2d0d2cd0e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_tree.py_test_upload_file_mode_": {"doc_hash": "a40ae1d49ea04f104604639d61901ffc0d7c846b08cccf6c13274e652daf44e5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/utils/httpd.py_run_server_on_thread_": {"doc_hash": "91469d79a8b6ac88b86d6baa5c3606754b95ead6d9d30c3fa97b95a510555d8f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/__init__.py_logging__format_preamble.return.f_failed_to_parse_msg_i": {"doc_hash": "dbde507e93f469ca9ab325c13ce293565b805b5a2a91c9ea51d4c498e474c70f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.find_dvc_dir_Repo._ignore.self_scm_ignore_list_flis": {"doc_hash": "a77959a279506da52dabb7dedc07db76226d748e2914ff16dd36bc64568911d3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/checkout.py__collect_pairs__collect_pairs.return.pairs": {"doc_hash": "37ab63c7dddcef6f1b426e75682e1652e91b7b3a2aca2f58b7f71d78b03db03c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/graph.py_from_typing_import_TYPE_C_collect_inside_path.return._stage_for_stage_in_stage": {"doc_hash": "46659e1c93e366b2ec4d1e7fd6d7f4ad672aa0f91f60a0a8949774478dce8cd8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/stage.py_fnmatch__maybe_collect_from_dvc_yaml.return._collect_with_deps_stages": {"doc_hash": "24c9314dca3a4136001869e556b0d9b1dfad490feda6c0284e106279e0385a53"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/stage.py__collect_specific_target__collect_specific_target.return._file_name": {"doc_hash": "9053793768b7b4fc1e77e4abde4719e078938469130180eeffcaaf1639251bef"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/stage.py_StageLoad_StageLoad._get_keys.return._name_": {"doc_hash": "3eb923654d714987a45cbaa65e725e1d91f9ab4e2ca49310cfed93702ff4d458"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/stage.py_StageLoad.load_all_StageLoad.load_all.return._stages_key_for_key_in_k": {"doc_hash": "266a940f21de9eac4bf2de820156e7d9e7eba5b47d55f5936892c78997c8485a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/stage.py_StageLoad.load_one_StageLoad.graph.return.self_repo_graph": {"doc_hash": "826ad2841e92560b0ada2ab91c2ec7e75f04cac642ba816b6a31ccf6046e11e6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/stage.py_StageLoad.collect_StageLoad.collect.return._collect_with_deps_stages": {"doc_hash": "57a674fb46bd3175414d26de28c2ec9052a142e155e2aab33873d013abb8bd07"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/__init__.py__Manages_Git__logger.logging_getLogger___name_": {"doc_hash": "8796c1c648205e7684032ced2ab37e12a0262813e2039a8a733c6aa459d41bba"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/__init__.py_Git.install_Git.install.with_modify_yaml_config_p.if_entry_not_in_config_r.config_repos_append_en": {"doc_hash": "a2fbed383d8cba9f3b41ab9a91ac4bd6101c7ee3df0074c6893a1636c008198c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/__init__.py_Git.detach_head_": {"doc_hash": "10d87cad4d57f236742246c4d63abf83bb4257a062cb185ce282cd8001451466"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/base.py_BaseGitBackend.get_ref_BaseGitBackend.get_refs_containing._Iterate_over_all_git_r": {"doc_hash": "52bf89d37984d859b0393c76011032df011daf69a8faa56bf0f4f3fe650ced82"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/base.py_BaseGitBackend.push_refspec_BaseGitBackend.push_refspec._Push_refspec_to_a_remo": {"doc_hash": "ba86891e7c26e9717a50137ff624fc3fef6f62ed4a1933030dcf9e17a8e653ae"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/base.py_BaseGitBackend.fetch_refspecs_BaseGitBackend.fetch_refspecs._Fetch_refspecs_from_a_": {"doc_hash": "24a18c22dc8a4e787421ae51c5a71870ec8bf29c2abb444adfc763ea682bd780"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/dulwich.py_DulwichBackend.set_ref_DulwichBackend.set_ref.if_not_self_repo_refs_set.raise_SCMError_f_Failed_t": {"doc_hash": "a3eee3b2680bd465c53a16637d2d99b86f012c17d838f27d891a84977450f3bf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/dulwich.py_DulwichBackend.fetch_refspecs_DulwichBackend.fetch_refspecs.for_lh_rh___in_fetch_.self_repo_refs_rh_fetc": {"doc_hash": "85081beeb5b5a90fb554f558d7230b345adadfcca582155ede1d19adbdb61877"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/stash.py__git_stash_convenience__Stash.list.return.list_iter_self_": {"doc_hash": "5a4e3787a8c55e401f5e3cf07c4627ca3eee1fe7f7f8f2a85ea9b970f9bf1b7f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/stash.py_Stash.drop_": {"doc_hash": "5ffb28a0bc911091b3a7057e2cfde7826441dd215d8dbaea42bf4428b6651e5a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_logging_INVALID_STAGENAME_CHARS.set_string_punctuation_": {"doc_hash": "6bbbbc529d7c6d8a8fc34bf6642ea9cd0828ed6b9dd50060e6b63f3149f0b693"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_loads_from_RawData.generated_from.None": {"doc_hash": "fe216dd3333396c38c89b47691e2091a17264c83774fcce8dbf2e6e1b3021b5c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.update_Stage.reload.return.self_dvcfile_stage": {"doc_hash": "db4f547a895e7e53485100d515bc51c224631598d2667f194a634ebe7a1ac09c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.is_cached_Stage.is_cached.return.True": {"doc_hash": "8c8db6e139765643565f109e8e98fbcf2f50c6efc8fe8b1f24696f04e48e48a4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/loader.py_StageLoader.__getitem___StageLoader.is_foreach_generated.return._": {"doc_hash": "8c055a0aef2c1e73cc454530eb555c40bfee23deed4ab96f573856f96d45f632"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/serialize.py_to_single_stage_lockfile_to_single_stage_lockfile.return.res": {"doc_hash": "caee8429ee908e2db416f20986f92e7fdca36f6ea4ec75622c72927eadebdcc4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/serialize.py_to_lockfile_": {"doc_hash": "81aacfc78c2173d354589ad22656ab302cea0e445356ee9144fe3d0171e796c6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py_resolve_paths_error_link.return.format_link_f_https_err": {"doc_hash": "d0ea67e3733dfaba3f17929e7754b49197d728ce88cd1a981d897ace7e7d81ee"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py_parse_target_": {"doc_hash": "c809e224dfb8474e924df4a735944f171c342213c0e76e56239f2e2b13a9040b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_with_cache_link_error_test_add_with_cache_link_error.assert_tmp_dir_dvc_": {"doc_hash": "fc5344a0a40e8e8f4690cb9faedcef6f515c38edd2b020984f3f4722ff81fa1d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_preserve_meta_": {"doc_hash": "4e451dbae9c2fb3854e77ddc963db7679b4b5b20508dd51f79deb4f6f17f2adb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkout_for_external_outputs_test_checkout_for_external_outputs.assert_file_path_read_tex": {"doc_hash": "9bb63663c621780274601f969a70ac748c158c58185f2bd87704c789e45e60b4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_test_import_url_dir_test_import_url_dir.assert_dvc_status_": {"doc_hash": "ca2862dd628d85c74ac9f8883bd6831c704dd2e27398b241292c67307dfb9c08"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_test_import_url_preserve_meta_": {"doc_hash": "16a8ad450f3b08ec193284ea2c130cbef079fefb7441beee96ecc159f4e4dacf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_init.py_test_subdir_init_no_option_test_subdir_init_no_option.assert_": {"doc_hash": "6f1f16e468aa05188ff7a17e3907cbfbddab9e39ae903f2b0cfaa42fcf635fed"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_init.py_test_gen_dvcignore_": {"doc_hash": "5247153bc421610d551cdf663c438d1de31ca986b738a0dddbddf5925814ea69"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repo.py_from_dvc_cache_import_Cac_": {"doc_hash": "86b1073d28a0c573b262272b0abde771c887539550d042ae8b712adaf40ece98"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_test_run_force_preserves_comments_and_meta_": {"doc_hash": "2667ff078372435403feda6af38d8a2bbe1db1860e678648bc2841c88444b271"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_TestSCMGitSubmodule_test_ignored.assert_not_scm_is_ignored": {"doc_hash": "e71964d62556a6098dcf92a1b9079c160174d07bf826058df437a355007e336c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_gitignore_should_end_with_newline_test_gitignore_should_append_newline_to_gitignore.assert_contents_splitline": {"doc_hash": "ce65f4ee6d1aaa28a402eca171dd7ed67aed08f2edf0844348e651c818d3d3bb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_git_detach_head_test_git_stash_workspace.assert_1_tmp_dir_": {"doc_hash": "7dcc6210189cf2eb1d2508c60f4e670598327e6fa064921f43076238f72b4895"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_git_stash_push_test_git_stash_push.assert_os_path_exists_": {"doc_hash": "c461a880393c7451a731640ccc7413b0deb6ecfe74abbf74bf983759f10afd76"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_git_stash_drop_test_git_stash_drop.assert_len_stash_1": {"doc_hash": "901755f1d1fc14c4c90cda822b8415dcbe766bdbbf25fa26c7c6dbc9322734cb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_git_stash_pop_test_git_stash_pop.assert_2_tmp_dir_": {"doc_hash": "ada4fc62f1ad43bf0534f1fd5149b7ee4f13d9abf713f059d06fd0c884666faf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_git_stash_clear_": {"doc_hash": "4b660378496d717a22f03df6269cbb834fdfdb588a872a74a6e1fd681e172eb9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_dir_recursive_test_collect_with_not_existing_output_or_stage_name.with_pytest_raises_StageN.dvc_stage_collect_some_f": {"doc_hash": "7465929a5f7215b923a82ba0c1cf81dbee59b4e63802f373749b6c55b90040fa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_stages_test_stages.None_1": {"doc_hash": "6354f5eed089d89ce91f9cc38ba49a716bd9a6ef3b1fe534b43a9ff443cd31af"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_stages_stages.return._": {"doc_hash": "0701c0b89699780eb982b2b3f595e535c3cfb9ce3949af4674bfe62a5a061527"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_not_a_group_stage_with_group_flag_test_collect_not_a_group_stage_with_group_flag.None_3": {"doc_hash": "3315ddc305f9b2968bab6f27db8d55a102569af88d623967a2b0b5aa38cd885d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_glob_test_collect_granular_with_no_target.assert_list_map_itemgette": {"doc_hash": "31ab6e72954c1698e6c87ee8704e93c9c1b362c99eaee9102428d2779d9dc495"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_granular_with_target_test_collect_granular_with_target.None_6": {"doc_hash": "4db30ddd7a6bbf277cb41aa6df64bf434e3df929da23beee0aac11f15cb8aa69"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_with_not_existing_dvcfile_test_collect_granular_with_not_existing_output_or_stage_name.None_1.dvc_stage_collect_granula": {"doc_hash": "114c2f27c496f1a9b867a441bcac08081e4025ade7ca874a79693bb532187cd4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_granular_with_deps_test_collect_granular_with_deps.None_2": {"doc_hash": "83af6a22a76c117e7299133578de4f796147e43aff3d42295a80afb0e867f7d4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_granular_same_output_name_stage_name_test_collect_granular_same_output_name_stage_name.None_6": {"doc_hash": "dd6f17e06714448d6fb95d04e1de99e2f1f4e737f9f31ca842c27d1b62f5d398"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_granular_priority_on_collision_test_collect_granular_priority_on_collision.None_4": {"doc_hash": "baaf95f7735049f43d9083fc8836bc523e32e02ee529cdb5e986808f18d00a41"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_granular_collision_output_dir_stage_name_test_collect_granular_collision_output_dir_stage_name.None_3": {"doc_hash": "95bd33e9ec56873dc54651b642a7b21f67b8de249f7b4694a555ad7ca34a84f7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_granular_not_existing_stage_name_test_collect_granular_not_existing_stage_name.with_pytest_raises_StageN.dvc_stage_collect_granula": {"doc_hash": "29bcb873ecf5e778bea163850c79ae58b12484724597e0ea1c265f4952ff0cd5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_get_stages_test_get_stages.with_pytest_raises_StageN.dvc_stage_load_all_path_P": {"doc_hash": "e8d0eb6b931bba5ff24734ea4b21d73d44428b605cd1832bfc863a9864a24385"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_get_stages_old_dvcfile_test_get_stages_old_dvcfile.with_pytest_raises_StageF.dvc_stage_load_all_path_r": {"doc_hash": "ee2d39aaba548cb8666fe2634752e9659caac3cfbbdc4142914a342cf393d6b3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_get_stage_test_get_stage.None_3.dvc_stage_load_one_name_": {"doc_hash": "d19c156eae572b25ec5305922b1d792a5b3733a2cb3d3fa9d3aae2c610724476"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_get_stage_single_stage_dvcfile_test_collect_optimization.dvc_stage_collect_granula": {"doc_hash": "43a9dd188a6f937b5a9c4364bdca5c7353db3f901f532f9c3e5b996566455ff7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/test_repo.py_test_locked_test_skip_graph_checks.None_2": {"doc_hash": "1019fac78a7016d13bec9b927894548cb4cde705ff172272f92913d4a4945ce1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_no_commits_test_branch_revs.assert_len_expected_0": {"doc_hash": "59ff52618752fe4ebddc7fadbfbe7ef0bc925558296a8c1a02ab63e1090480d2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_set_ref_test_set_ref.None_2": {"doc_hash": "0f6a55b5903e4ef36cb7c32e51e96227041bfab1bfe834e0c9a489000e7ba995"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_remove_ref_test_remove_ref.assert_not_tmp_dir_g": {"doc_hash": "7c3d8487b147fe7600e6ec0f6b95ebdac6f99ae44ffdba5286dd191673eab50a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_refs_containing_test_refs_containing.assert_expected_set_sc": {"doc_hash": "97ab63fc3984332f3010966d12c066b4ef29e9f731a894edeb9b87e2d3654dc3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_push_refspec_test_push_refspec.assert_remote_dir_scm_get": {"doc_hash": "5fb3395362a0e114aa53e4f28cce9b1b0a9e15e28bc2f0122328b157e9ff54e3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_utils.py_test_parse_target_test_parse_target.assert_parse_target_inp_": {"doc_hash": "b05915b6dbab0ff4255afcc2c009161496fa7d7a3515a157582bb7b07e4e3813"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_utils.py_test_hint_on_lockfile_": {"doc_hash": "9a9693f7f32bf3ef6b1a7c1b6dcccf2094584f984aab3285cd13dadc5b42a166"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/config.py_argparse__name_type.return._": {"doc_hash": "1d40d4715acb2acb3c1edc2431e0d01119a4fbf57e53abbac6ed7a9241be8855"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/config.py_CmdConfig_CmdConfig.run.return.0": {"doc_hash": "b0758b5e47754b90e78eaca003e5f3ae110be1062ed0556d6dc65d46df2bd21c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_CmdExperimentsApply__show_diff.return.table_header_rows_markd": {"doc_hash": "de1989d5d9af5b791a960d8f60404be980de27903715437abf2da27b5b1ae802"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_CmdExperimentsRun__raise_error_if_all_disabled.if_not_any_kwargs_values_.raise_InvalidArgumentErro": {"doc_hash": "a51fd93c3d2c08b54a622dd11789689055c2c7452b25839c63dc8af56f32afb0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_CmdExperimentsBranch_CmdExperimentsList.run.return.0": {"doc_hash": "f8062562aac73687e348e7d39729df3315d925ac8b5057a137fbc3161623f393"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_CmdExperimentsPush_CmdExperimentsPush.run.return.0": {"doc_hash": "eada8d62d29dda6929a3b74c28440e01544b6f0e6f2bc522cafa5870d58f468f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_CmdExperimentsPull_CmdExperimentsPull.run.return.0": {"doc_hash": "a58c052e165766eb852853718787ade20e99bbc983e4ceb701acf739a9c2f7a4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_add_parser.None_14_add_parser.experiments_run_parser_ad": {"doc_hash": "24288b4d595a8a9ec8f97597bdd40eec941293e3401da336704ae784b890ff18"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_add_parser.experiments_run_parser_se_add_parser.EXPERIMENTS_LIST_HELP._List_local_and_remote_ex": {"doc_hash": "2c2328a92a72f4d3f32d1306eabee735551442bed43f0f100069ddbd73fd273b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_add_parser.experiments_list_parser_add_parser.experiments_pull_parser_a": {"doc_hash": "e04b94b1ca894c3482c3d3f4cd14d0251fde2c3589a68471674333f3a9a4eeb1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_add_parser.None_57_add_parser.experiments_pull_parser_s": {"doc_hash": "a13c58cc90706bd6cd07a935924d85cae241a28c12054e6ae478e90e06a23c9b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/metrics.py_argparse__show_metrics.return.table_header_rows_markd": {"doc_hash": "5d322b2307145f4afb3695055e4f8fff2b66615cfb8dc4fc443108016b2e9ecb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/metrics.py_add_parser_add_parser.metrics_diff_parser.add_argument(\n \"--targets\",\n nargs=\"*\",\n help=(\n \"Limit command scope to these metrics files. Using -R, \"\n \"directories to search metrics files in can also be given.\"\n ),\n metavar=\"\",\n ).complete.completion_FILE": {"doc_hash": "af7d7cda96246fdc1cc114b69e9706ff34ecf4704f3ea4444dd9e6239fbf93a5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/repro.py_argparse_CmdRepro._repro_kwargs.return._": {"doc_hash": "c4468a4935f75c8203585d13a6945e896ecd559c0c03200cdfcf1e426b669b8b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/repro.py_add_arguments_add_arguments.None_13": {"doc_hash": "77fdf543d5ffa63aecaede6729dde2edf5bfd289f27da168eab7862c02c64561"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py_NotDvcRepoError_FileOwnershipError.__init__.super___init___f_file_": {"doc_hash": "ed14ac44e427314a85a2f127ae3628c3d6c138e547c8406e6d177d67cffa16ab"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py_DvcIgnoreInCollectedDirError_HTTPError.__init__.super___init___f_code": {"doc_hash": "dfd016938a6c27e927a0f77c8dd232b9dfdf519e9430faeb496a77ddf71bd343"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py__unshallow__unshallow.git_pull_unshallow_True_": {"doc_hash": "5b02dbe709adb28c07514e950db9147b8285da8f535aca04b26f63f9f1bff1a4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py__git_checkout_": {"doc_hash": "a12b6d1582a1e4027fad2a6254e1d03b42783b2388ee5d46c2e3c1bd4f4e8638"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnoreFilter._update_DvcIgnoreFilter._update.if_not_matches_and_self_t.elif_old_pattern_.self_ignores_trie_tree_di": {"doc_hash": "7576dd5ca8abb3e67c2e28c8d0aa6d354e640afb46ed1eb30d608500150bf668"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnoreFilter._update_sub_repo_DvcIgnoreFilter._update_sub_repo.if_old_pattern_.else_.self_ignores_trie_tree_ro": {"doc_hash": "0e85964a0ec9891fe8218a92b5d4cc036159d9b9cad19026ebb9baaebc03ba11"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/__init__.py_from_collections_import_d_SCHEMA_BaseOutput_PARAM_I": {"doc_hash": "29a6e8309f63b44bc359b7fabfa68420d77b711f5cce8a1b9c7c445c42a35cf9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_BaseOutput_BaseOutput.dir_cache.return.self_cache_get_dir_cache_": {"doc_hash": "7cf00746f65b13c32e48df1fc3fdbf6c27b1fecd4051af201dadadcc59c6b937"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_BaseOutput.supported_BaseOutput._pylint_enable_no_membe": {"doc_hash": "a728469219981713566d240c554f5b59976cf34587702e67dc3a117c944d1bfb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_BaseOutput.save_BaseOutput.commit.if_self_use_cache_.self_set_exec_": {"doc_hash": "138cce233243725779ac745cac52fef54e377aa54ba26da76441814213ce8d2e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_BaseOutput.verify_metric_BaseOutput.checkout.return.res": {"doc_hash": "fdd4cf0e6af946e766def8565f4e0a4ef3dc7f573215df7ef6718050261564e1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/__init__.py_format_and_raise_format_and_raise._reraise_err_ResolveError": {"doc_hash": "5a4808306ec29be181fb02fea0f93306234b0468403d3b44ec69a6a51d371eb6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/__init__.py__reraise_err_make_definition.return.EntryDefinition_args_": {"doc_hash": "e8955f5b178c9991dd7745edd35edcbe76c2843b7171539aa87f1579869e08ab"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/__init__.py_DataResolver_DataResolver.__init__.self.definitions._": {"doc_hash": "5ee70b099798a9bcea68916f11f18b06471a120539030f6920911e9b16264512"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/__init__.py_DataResolver.resolve_one_DataResolver.resolve_one.return.definition_resolve_one_ke": {"doc_hash": "908a5c268f6e51ad5deb70127a7afa7240a41260b445d5a5f1a2a58da385d2a7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/__init__.py_DataResolver.resolve_DataResolver.track_vars.self_tracked_vars_name_": {"doc_hash": "d035c1d1c6469e5e43fe240c90394675ee127e8199a96cedc2d669ef93714de4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/__init__.py_EntryDefinition_EntryDefinition.resolve.try_.except_ContextError_as_ex.format_and_raise_exc_f_s": {"doc_hash": "a73fa0adc7dd86655cf18d36974b0416bd7bfe0b20b7a9c1e880ec8c87a5acb8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/__init__.py_EntryDefinition.resolve_stage_EntryDefinition._resolve.try_.except_ParseError_KeyNo.format_and_raise_": {"doc_hash": "02e9e89ddd4159b37dc41e4c973bd9cbeab11786f8ffffcc71ff4d2c1e5efd02"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/__init__.py_IterationPair_ForeachDefinition.resolved_iterable.return.self__resolve_foreach_dat": {"doc_hash": "209eec7ad3e493cc455e584ec213c24026130b36b5aadfcb6193b6521d2181ac"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/__init__.py_ForeachDefinition._resolve_foreach_data_ForeachDefinition._resolve_foreach_data.return.iterable": {"doc_hash": "76807e28edd4aafb2b63666c46308b5c51065f5a9926b6fe017ff22851a3036e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/__init__.py_ForeachDefinition._check_is_map_or_seq_ForeachDefinition._inserted_keys.return.keys": {"doc_hash": "cd50a2db7a706358b3108cc73e2253028542e149d2edc269cd78654ea8afc84f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/__init__.py_ForeachDefinition.normalized_iterable_ForeachDefinition.resolve_one.return.self__each_iter_key_": {"doc_hash": "fa6f644521120228a33c2544fc2e2ff7ad0e4daf319eedc6453ef87b486f8cef"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/__init__.py_ForeachDefinition._each_iter_": {"doc_hash": "dbf0d2aab5de396e075ed2a4c7980cfe28335028136a51bbe648d62d5a4ce11c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_logging_ReservedKeyError.__init__.super___init___msg_": {"doc_hash": "b8ee39a29fee9064311caaffd50d919386e31d84449f6fb4d7f03ef8d199ae46"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_CtxList_CtxList.__deepcopy__.return.new": {"doc_hash": "f056a9a9ea83d245b5ebb4b5f0f3fe6141bcda98def98d7e4782d0a634410b00"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_CtxDict_CtxDict.__deepcopy__.return.new": {"doc_hash": "962668c0d74e190b6623e33d21b7c6eca65dc14c2faceb7c8104e167baa9b2c5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Context_Context._track_data.for_source_keys_in_node_.params_file_update_key_": {"doc_hash": "7ac909a6ae3a4f3601c0c9d735bc649eab70f74fa48741ba10ec4004b94d0143"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Context.load_from_Context.load_from.return.ctx": {"doc_hash": "ce84cc131087432e591da8928b16c217f5481eedd254b2168ca9bc5ccd0ebcdc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Context.merge_update_Context.merge_from.if_abspath_not_in_self_im.elif_cp_.self_imports_abspath_ext": {"doc_hash": "62eb5632b99ca62294cd80c5725669e683678fbfc5cfd2c59d1ab36bec059241"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Context.check_loaded_Context.check_loaded.if_not_keys_and_isinstanc.elif_keys_and_isinstance_.if_not_set_keys_isdisjoi.raise_VarsAlreadyLoaded_": {"doc_hash": "feb629c0e87c15304325dfab02f86f77caf599e24e5906db9b7a1809990574f9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Context.load_from_vars_Context.load_from_vars.for_index_item_in_enumer.if_isinstance_item_str_.else_.self_merge_update_Context": {"doc_hash": "e4e3e015b5eed5156ad14e44cb9c76b0d1cb812a7f444ad91cb746bdd9f0b108"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Context.__deepcopy___Context.reserved.try_.finally_.for_key_in_new_keys_.self__reserved_keys_pop_k": {"doc_hash": "7cbdb29e93f219b0578abd68600d51700da1b0af12486882de16befedcbb88e3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Context.set_temporarily_Context.set_temporarily.try_.finally_.for_key_in_non_existing_.self_data_pop_key_None_": {"doc_hash": "313e001c5b861eebfff0142952661218ac5da4db19b2f70540c0a62c92a3b5f3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Context.resolve_Context.resolve.return.func_src_unwrap_skip_in": {"doc_hash": "840276a173b1fb787fe386196c7905414071e347f7d9b56445a27720ce1d4fa5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Context.resolve_str_": {"doc_hash": "46bf6c8a5f0cbdd56f2bf691fed54d5d870ffd5e059dd09acb42b90e741a23c6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/interpolate.py_re__.return._true_if_obj_else_false": {"doc_hash": "f0542c662bbd9c6b7f73c0edc9fdb916311ea230c636097bbb2bcf97e25597ab"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/interpolate.py__format_exc_msg__format_exc_msg.return._n_join_pstr_pointer_": {"doc_hash": "758ddd232a394290853dba890e310e3d2dc5883a7a35412afcc50820d3418711"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/interpolate.py_recurse_get_expression.return.inner_if_skip_checks_else": {"doc_hash": "8a944ff3c1a4df5f7ceb6d5230932221a1a4d3499e29816853c3713b64022c29"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.outs_trie_Repo.stages.return.self_stage_collect_repo_o": {"doc_hash": "5892fcb41a86d5e75af2cbbe433bf3b047f543a4810055aa0214c837220c3037"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/add.py_logging_logger.logging_getLogger___name_": {"doc_hash": "1939eba10ac37d22c58fa74446726bf66359b873d20b961ca758281b571a9897"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/add.py_add_add.return.stages_list": {"doc_hash": "9dfd50c078cd407fc375159e4c3153c60e3c80e0a3b218e6e297f8cb410d8206"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/__init__.py_logging_unlocked_repo.return.wrapper": {"doc_hash": "dc030bfd8d1d799ccb00f6f7df407821bf3b1859656e046e7dd548442f2c55e3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/__init__.py_Experiments_Experiments.stash.return.Stash_self_scm_EXPS_STAS": {"doc_hash": "5321e2b8a29fde9abf7a7f13a82215b597e475c19788618450a7d46ccff2b5ad"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/__init__.py_Experiments.stash_revs_Experiments.stash_revs.return.revs": {"doc_hash": "41a6beca36cb24f35f6cca396b5217c98f64bfe635619464c233056fa2710acc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/__init__.py_Experiments._stash_exp_Experiments._stash_exp.return.stash_rev": {"doc_hash": "10d3c786447990bd64790cdb7c936bd992f0e33a9df31f525fae4d50c781c218"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/__init__.py_Experiments._prune_lockfiles_Experiments._stash_msg.return.msg": {"doc_hash": "08df5d555c6ae110267fab403b3608e87c47d2fe04394ad19d0ebb507228b021"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/__init__.py_Experiments._pack_args_Experiments._pack_args.self_scm_add_self_args_fi": {"doc_hash": "ee895b670c86b737f47db2fa54dd2b2c80c21ed3f3a90939a53d1801d8fdc465"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/__init__.py_Experiments._reproduce_revs_Experiments._reproduce_revs.return.result": {"doc_hash": "db626a662bdd883daeca4442f6252a51b26a5469fd6f0ded0ad141d9f4291834"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/__init__.py_Experiments._init_executors_Experiments._init_executors.return.executors": {"doc_hash": "40b8078968c68d9b46c19b43632b2ea9d041a4fa70df82d4c8e7b66d52df9c67"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/__init__.py_Experiments._executors_repro_Experiments._executors_repro.return.result": {"doc_hash": "1d9a7b0722ae93cb638419fa365ed7ec3a104eaace0a2e5f48356658e9263ed8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/__init__.py_Experiments._collect_executor_Experiments._collect_executor.return.results": {"doc_hash": "c1b9929afbf2db5a04f80894387b7149ccbfd093970b6f91ed6de9b8583b8053"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/__init__.py_Experiments._workspace_repro_Experiments._workspace_repro.with_self_scm_detach_head.try_.finally_.if_entry_branch_.self_scm_remove_ref_EXEC_": {"doc_hash": "96922d730a799731f1e327578abe346d3c65bbccad683ec0d1f0a2957f45ab19"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/__init__.py_Experiments.check_baseline_Experiments.check_baseline.raise_BaselineMismatchErr": {"doc_hash": "5bf1c4cdcb5da094cee6baf0f7517ffabb8a879d02855f49d82a2b878aca8008"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/__init__.py_Experiments.get_baseline_": {"doc_hash": "c225f46371fb911b874dfcc16df8bd6e3236ce18498754c9e95f1f8c08bdbb5f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/apply.py_logging_": {"doc_hash": "1d44ba66f02fe41d7b04a70bdb569678f634b5c0dacd4c69c258b75cb2b592ce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/base.py_from_typing_import_Option_BaselineMismatchError.__init__.self.expected_rev.expected": {"doc_hash": "7b5388bb59a6647224422a1a297507a54c998625e96d01e40a0b4a5bb8a1df0b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/base.py_ExperimentExistsError_ExperimentExistsError.__init__.self.name.name": {"doc_hash": "a8cd73860e355eecbdca3f727bcf45b2972fed73aec9726a7620e42ac612d9f5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/base.py_CheckpointExistsError_CheckpointExistsError.__init__.self.name.name": {"doc_hash": "97da451fcfef147b6c1b75fbc60fb2f519c373eaf198e9f61b348fcf6680b349"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/base.py_InvalidExpRefError_ApplyConflictError.__init__.self.name.name": {"doc_hash": "9a2fa519d18e8b9ab811bf55870ba38e2cff6a0b8d07d83f53822d1a708a1c46"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/base.py_ExpRefInfo_ExpRefInfo.parts.return._": {"doc_hash": "af82c5656c215b26a94588a03ebc9e304dd047e286677f3df7678fa248e95f92"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/base.py_ExpRefInfo.from_ref_": {"doc_hash": "89b98f3e7b56db3efb9162536c7426986f5441f235c8786bf2fb0e19bbf328d1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/branch.py_logging_": {"doc_hash": "1720148754a2ffe5ff60729c335a91e0bfad9bf79b16a1b2336bf61e530b6741"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/executor/base.py_logging_ExecutorResult.force": {"doc_hash": "1106a1e4dcc649fca09693fb405cd5973484d9e014ff9c3a12fe1e78e6b091d2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/executor/base.py_BaseExecutor_BaseExecutor.__init__.self.name.name": {"doc_hash": "9c76ecb4ed91aa43cb35efb8dabb988b06db8a79bf0ba7a5fa4574a1b396b976"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/executor/base.py_BaseExecutor._init_git_BaseExecutor._init_git.try_.finally_.os_chdir_cwd_": {"doc_hash": "55a426b4619540ec1799712866c8f8c7cb2791769df2a8dd1267ae689e3e94e8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/executor/base.py_BaseExecutor.scm_BaseExecutor._TODO_come_up_with_bett": {"doc_hash": "3589fea27e92fdf67cceda86adaa7eafff68dbc6c97fcad64711062d5d22f9e6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/executor/base.py_BaseExecutor.pack_repro_args_BaseExecutor.unpack_repro_args.return.data_args_data_kwarg": {"doc_hash": "2b90f9b2f54cd7b30cde811a3e13505fb7a2667ebf5928fb5e11d8eb350e17ec"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/executor/base.py_BaseExecutor.fetch_exps_BaseExecutor.fetch_exps.for_ref_in_self_scm_iter_.if_not_ref_startswith_EXE.refs_append_ref_": {"doc_hash": "5254cd76a86b98c197dcbecc096c66a6fa21c4d2387fc1510c2c45b7f82bdd35"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/executor/base.py_BaseExecutor.fetch_exps.on_diverged_ref_BaseExecutor.fetch_exps.return.refs": {"doc_hash": "b26d2483333abf77eb0bad2aef78b4bce60e7a775a4f617084a7a18c7b7788e5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/executor/base.py_BaseExecutor.reproduce_BaseExecutor.reproduce.repro_force.False": {"doc_hash": "11d7e1b0cdb3d44ba1305e386c77b7f3c0de490d396ae3a21806c00702ebb517"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/executor/base.py_BaseExecutor.reproduce.try__BaseExecutor.reproduce.return.ExecutorResult_exp_hash_": {"doc_hash": "c50ec7f93ef11b772e74366b2127181a616fb4819c701f23f231f8662e632cea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/executor/base.py_BaseExecutor.checkpoint_callback_BaseExecutor.checkpoint_callback.try_.except_UnchangedExperimen.pass": {"doc_hash": "98ccfb91d5fce047ba8f26e79b31c70b7b86f4526253a961518dfb0ef5dacc5a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/executor/base.py_BaseExecutor.commit_": {"doc_hash": "c9916c8340db6c396ba6a36207256e9372d2fa4d01bbb414d68812178ece8a04"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/executor/local.py_logging_": {"doc_hash": "04d1fd0a7fa39606e346c3c34d8f1e863f33844842ab1effe1f13daab4eb1182"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/ls.py_logging_": {"doc_hash": "5af377def8bd7cd62a15fed33870c50d7e5b678f8a90fed961ccd568bb2ffc05"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/pull.py_logging_pull.if_pull_cache_._pull_cache_repo_exp_ref": {"doc_hash": "2171408e7ed1be656669e359694f4d266d26d401a3207c839793ab2c10ee3db9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/pull.py__get_exp_ref_": {"doc_hash": "c70f0677bb7b45de86123c2842bc5a182152cd9c5ca60a6815a0d7bcddb79889"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/push.py_logging_push.if_push_cache_._push_cache_repo_exp_ref": {"doc_hash": "4b6a87fad4ea7951e05826ea06c74545d4d99f1f5a0e85b8217d97bb11ec3cd1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/push.py__get_exp_ref_": {"doc_hash": "0d037e2c1757c0c272f19801938e19f8dbd939f775c3b1af431e0da83076c84d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/show.py_logging__collect_experiment_commit.return.res": {"doc_hash": "2c129b4b744d3c90090493b2650d8e3c5a7b217ec81eeff52f53a728df80f54a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/show.py__collect_experiment_branch__collect_experiment_branch.return.res": {"doc_hash": "6102ce0f909d4decd5fe28c09bdc1af4e1f6b82d8d852d530f5c53a1409137de"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/utils.py_from_typing_import_TYPE_C_": {"doc_hash": "90734ca1de5faffa12fdc824f72d2ab7ec0806f7051d0cfc1e47f1deb0613508"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/params/show.py_logging__collect_vars.return.vars_params": {"doc_hash": "0f8257f4546be325f6c323141dea47fc32d703f3a0081e194d241cfc882ac822"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_DefaultTemplate_DefaultTemplate.DEFAULT_CONTENT._": {"doc_hash": "3bc9829e5e0cca320ba037f40fbf8c6cce816ce6052a620daf49d25b63c6ad3c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_ConfusionTemplate_ConfusionTemplate.DEFAULT_CONTENT._": {"doc_hash": "b1ef1794e2ee54ce83573416b6d482bb3b82fd33b8ac55e560c2cf5bb04537f0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_ScatterTemplate_ScatterTemplate.DEFAULT_CONTENT._": {"doc_hash": "e243137fd20296d00e235ae165c29485f7524ff83676a9afa1463c263a79b898"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_LinearTemplate_LinearTemplate.DEFAULT_CONTENT._": {"doc_hash": "84c02aace7c27fff701e9f58cd387e87841ee03044cb55ca8c164559dab9cc6f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/reproduce.py_reproduce_reproduce.return._reproduce_stages_self_gr": {"doc_hash": "1beaa4200739a3ef97d69078c26ebfe2941987804a0d99402bedd179f858627b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/reproduce.py__get_steps_": {"doc_hash": "443d6957c819692bf01e3edb01c875aab8f79f78898bdb35a413adfabb077a5a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/stage.py_StageLoad.collect_granular_StageLoad.collect_granular.return._StageInfo_stage_for_sta": {"doc_hash": "4361e5389fd6a201248944f4e840818a1177057a3441b3acad266ef2e6a3d606"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/stage.py_StageLoad.collect_repo_": {"doc_hash": "b5f0e347c5170ea10622bcb6d9f0a74e11ecfb5801e3a8c4b56ffccdb44f5d80"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/__init__.py_Git_Git.ignore_file.return.self_GITIGNORE": {"doc_hash": "df947f399c5fe769d701197a7378eb06d3631cc7c3fb6abcc9c75f92750daf8b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/__init__.py_Git._get_gitignore_Git.ignore.self_ignored_paths_append": {"doc_hash": "dd2b7abfccf2b96823767b9c67401866fb86ea4025af2aa503cbcb3adfb66197"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/__init__.py_Git._add_entry_to_gitignore_Git._add_entry_to_gitignore.with_open_gitignore_a_.if_new_entry_not_in_uniqu.fobj_write_new_entry_": {"doc_hash": "87b98d53fb9e8e4bc2d57ca1820302a9f74027edb84a5b7b4a8e767f7fca14e6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/__init__.py_Git.ignore_remove_Git._install_merge_driver.None_1": {"doc_hash": "f9cad8df9b3fd91b519264f2cf3924fc1e8c959adaab2d87905126d4dec2a7ec"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/__init__.py_Git.cleanup_ignores_Git.branch_revs.partialmethod__backend_fu": {"doc_hash": "9a84008796edd603202b6e73de531d6d128ff41c36ac9720466a20800a117cee"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/__init__.py_Git.resolve_rev_Git.resolve_rev.try_.except_RevError_.raise": {"doc_hash": "8a8796bd8bcd1c81b7d64d954b66c57ce86c9afaa3b5494c1661bd82d5ea900e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/base.py_os_BaseGitBackend.branch_revs.pass": {"doc_hash": "105ab19cf89ee98b6d3aa8fce6bf7f21eed5b5eb85b11e35f09367c1e6be4909"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/base.py_BaseGitBackend.set_ref_BaseGitBackend.set_ref._Set_the_specified_git_": {"doc_hash": "d12cad17a713eb6f3d7ce408a65647ecd071ec8bdbed1aaa65c79651fdc787dc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/base.py_BaseGitBackend._stash_iter_BaseGitBackend.reflog_delete._Delete_the_specified_r": {"doc_hash": "3369f670a7cdf9a67f231431fb5a4913d8fb9308ffee87f679304af4032ea3ac"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/dulwich.py_fnmatch_DulwichObject.scandir.for_entry_in_tree_iterite.yield_DulwichObject_": {"doc_hash": "6bf654fe675f933b77afe69cc628eb5049a63b23cbec74f5359f9c0bc37d44aa"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/dulwich.py_DulwichBackend_DulwichBackend.__init__.self._stashes._": {"doc_hash": "5d1ece23c9cec95831b55d21cbeb13de9a797123116abb29fe251061097526b1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/dulwich.py_DulwichBackend._find_submodules_DulwichBackend.dir.return.self_repo_commondir_": {"doc_hash": "813dbce6d371407fb745fcc2207b9ca6fedb84e2ba473a5bf45be045cd5bdbe3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/dulwich.py_DulwichBackend.add_DulwichBackend.add.for_fpath_in_files_.self_repo_stage_relpath_f": {"doc_hash": "35efeb0d9ae9764a89e0f323775521cc39ae40e0e2adfc037b3081b5c02b9220"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/dulwich.py_DulwichBackend.commit_DulwichBackend.is_ignored.return.manager_is_ignored_relpat": {"doc_hash": "0cf26627c312cd726bac4d647fd5dfeadd31cc2112b608d7e712670383709d49"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/dulwich.py_DulwichBackend.get_ref_DulwichBackend.iter_refs.for_key_in_self_repo_refs.if_base_.else_.yield_os_fsdecode_key_": {"doc_hash": "81dcbc5a6b1963fef4f92bde07272a4333e57e1a201fb2e6887f4d1e478551b3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/dulwich.py_DulwichBackend.iter_remote_refs_DulwichBackend.get_refs_containing.raise_NotImplementedError": {"doc_hash": "3c9e454c8852a7a454fcc06b5ae3abf2707e99ed7ccd8b5f05d5c0e15a79ce27"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/dulwich.py_DulwichBackend.push_refspec_DulwichBackend.push_refspec.try_.except_Exception_as_exc_.raise_SCMError_": {"doc_hash": "77ff264b13d6a0b60642c7de31bc1f5da531e9555cb4904620929c3eee659917"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/dulwich.py_DulwichBackend.push_refspec.update_refs_DulwichBackend.push_refspec.update_refs.return.new_refs": {"doc_hash": "9573ada5aaae7e5a1804633727310cd2332281db7cf368819485fd7f3a35d90f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/dulwich.py_DulwichBackend.push_refspec.None_1_DulwichBackend.push_refspec.None_1.except_NotGitRepository_.raise_SCMError_Git_faile": {"doc_hash": "4753298278a1e9ca6f941b76568907083f6d83768c4fe504f1fa5b074e6fc8e9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/dulwich.py_DulwichBackend._push_dest_refs_DulwichBackend._push_dest_refs.return.dest_refs_values": {"doc_hash": "772af895e4d0038c6d98cd6276e0c1bbb8d53385cff077582c2951360de02482"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/dulwich.py_DulwichBackend._stash_iter_DulwichBackend._stash_push.return.os_fsdecode_rev_True": {"doc_hash": "d258a9d42bc43352c337aa8022963815dbf292b4b5083eda89345af9e48faeb0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/dulwich.py_DulwichBackend._stash_apply_DulwichBackend.describe.return.None": {"doc_hash": "e20f724f8edc9afd0a155442d99aa36cf610d15e591a91d57f5d271f3d5f374e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/gitpython.py_io_TqdmGit.code2desc.return.ops_get_op_code_OP_OP_M": {"doc_hash": "b19f16b2c533ab853ab424c0251cacc4afd745768a15b6091b0fd76513613630"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/gitpython.py_GitPythonObject_GitPythonObject.scandir.for_obj_in_self_obj_.yield_GitPythonObject_obj": {"doc_hash": "9fc3b4e124dfd961771c46e5569f1753d78981de43e62ec826cdba3384ea9d9b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/gitpython.py_GitPythonBackend_GitPythonBackend.root_dir.return.self_repo_working_tree_di": {"doc_hash": "df310d38b421128a67904e15db2e6f238d44e411f95a7187a3739b9be5b9ca94"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/gitpython.py_GitPythonBackend.clone_GitPythonBackend.clone.if_rev_.try_.except_git_exc_GitCommand.raise_RevError_": {"doc_hash": "bda45a942f315836cd0f91ef8408e846a3a500b55f28e8db04bb120591c8d58e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/gitpython.py_GitPythonBackend.is_sha_GitPythonBackend.add.try_.except_AssertionError_.logger_exception_msg_": {"doc_hash": "0dfea9c08be6fef8232428fb6a00392419a7d84e894d8295d5bb72a8e60481cf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/gitpython.py_GitPythonBackend.commit_GitPythonBackend.get_rev.return.self_repo_rev_parse_HEAD": {"doc_hash": "84d22f42614c6b16abc135b13a1a7aaf9b2754c34bc83b509ca303a49db816e7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/gitpython.py_GitPythonBackend.resolve_rev_GitPythonBackend.resolve_rev.raise_RevError_f_unknown_": {"doc_hash": "761b8b150562998f2bedd361ff71f2c763a5c1bfe36975ecb336dee2f84daa0e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/gitpython.py_GitPythonBackend.resolve_commit_GitPythonBackend.branch_revs.while_commit_is_not_None_.if_commit_and_commit_hexs.return": {"doc_hash": "30f96e11c2c227836df072e1f9a1b615753f5346d84ce46ab14d326ec9b84d82"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/gitpython.py_GitPythonBackend.set_ref_GitPythonBackend.set_ref.try_.except_GitCommandError_as.raise_SCMError_f_Failed_t": {"doc_hash": "2bc75a0cc2f546dffe591991d13bd35bc5540301016387fd60eb5e0f4ad23fc4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/gitpython.py_GitPythonBackend.get_ref_GitPythonBackend.get_ref.return.None": {"doc_hash": "1ac5bb98aa4d0a95938a053adb18007989f366177536e7ea704b41baa2669c52"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/gitpython.py_GitPythonBackend.remove_ref_GitPythonBackend._stash_iter.raise_NotImplementedError": {"doc_hash": "7e9647a74e8e97d262b63ccff06a36a3b78ea9eca8b93a64a86225c8bbd7b056"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/gitpython.py_GitPythonBackend._stash_push_GitPythonBackend._stash_push.return.commit_hexsha_False": {"doc_hash": "e711bcfbba91fd3046822af05f637c22b22e29255e142cc411660f40c5185eaf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/gitpython.py_GitPythonBackend._stash_apply_": {"doc_hash": "8075c8640ee8c7be7f0c3fa482a7de81998da0336e9a6431cd422d762d5f83c5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/pygit2.py_locale_Pygit2Object.scandir.for_entry_in_self_obj_.yield_Pygit2Object_entry_": {"doc_hash": "6d866669cdfd4d8a57a7457dbd29e1ce1333144b80e82793f5d3ec7e02f127a7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/pygit2.py_Pygit2Backend_Pygit2Backend.push_refspec.raise_NotImplementedError": {"doc_hash": "0879b23ddd9ccc94eb7c4f921e0fd278f25886970dfc636d3962d555f52f3930"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/pygit2.py_Pygit2Backend.fetch_refspecs_": {"doc_hash": "727dc4a8a847392f98cef6e2fb474809c8c17acc2fe41406389413ee3f0db521"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/objects.py_os_GitObject.issubmodule.return.S_ISGITLINK_self_mode_": {"doc_hash": "dc07fd595c06a1df77c6ef31cd633a9b5a069622820e4f78b01869dc1f9f2368"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/objects.py_GitTrie_GitTrie.isfile.return.obj_isfile": {"doc_hash": "6cb1891bd99b94e0fc68f350ab082996fc1ab0668149ded93d4dd835c8e355df"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/objects.py_GitTrie.walk_": {"doc_hash": "4ad4843a1df7a5663157183fd696499c5019985c2359b9a16f3c235483518154"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_create_stage_create_stage.return.stage": {"doc_hash": "5c48c10b0a7fcf157d5b4ead31e4353535dbfe8cccc36d8b1b07edeebc0721b8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_restore_meta_restore_meta.for_out_in_stage_outs_.out.desc.old_desc_get_out_def_path": {"doc_hash": "4a5d8b4d66ed2e96aa4ca8e62d557c27e8f5c209cee30da3da83bbd87bf49d0f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/loader.py_StageLoader_StageLoader.lockfile_data.return.self__lockfile_data": {"doc_hash": "e1a7abfa09dfaa5d1801d9ad757991c5356b026e96404cd1a9a4c34672545c8d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/loader.py_StageLoader.load_stage_StageLoader.lockfile_needs_update.logger_debug_Lockfile_": {"doc_hash": "12d6a18e21616f599926ac2dcc337c5bd3d11b2a33d49e4b19f60a569ceaf585"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/run.py_logging__make_cmd.return._executable_opts_get_n": {"doc_hash": "17ca9c90cebe038a14d12cf30d3112ac5e75ff187348bc6d780b709085d1b21c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/run.py_warn_if_fish__enforce_cmd_list.return.cmd_if_isinstance_cmd_li": {"doc_hash": "dca30ad04041aed27d5ed5a1be5ab1953d7677e2f2f02f0c18bf32f5a52b0fd9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/run.py_prepare_kwargs_prepare_kwargs.return.kwargs": {"doc_hash": "306eddcdb3f6acbd38f8fffa25c87c88f5c2018dbfa244870bb5adf3f1ca05d0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/run.py_display_command__run.if_retcode_0_.raise_StageCmdFailedError": {"doc_hash": "94070ccabdd18d5f1a71ac4784f1c838675c2679b32d68a6477c4b11104dabe9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/run.py_cmd_run_cmd_run.for_cmd_in_commands_._run_stage_executable_c": {"doc_hash": "de844bdf256e62189c336d6a1614db1c0f74f03a87708dc93cf02657edfe1996"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/run.py_run_stage__checkpoint_env.return._DVC_CHECKPOINT_1_DVC": {"doc_hash": "7d69d9499f84c7caa3a66a589b89b491905865d46b5e90815ddce6078a9cfd79"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/run.py_checkpoint_monitor_checkpoint_monitor.try_.finally_.monitor_thread_join_": {"doc_hash": "3ca48c13efc07235499ab8f8e467c18c9fafe0d89b724de8091536c132528fa2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/git.py_errno_GitTree.dvcignore.return.cls_self_root_": {"doc_hash": "79ac3a688e1a47b5e1839170069a8989c67e2789c9a085a00e771a96551a42e1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/git.py_GitTree.open_GitTree.open.try_.except_IsADirectoryError_.raise_IsADirectoryError_": {"doc_hash": "56b1db388c4f803cadbcc2b8b13e936598494a2388da49f4bf5ea04dd6c2b252"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/git.py_GitTree.exists_GitTree.isfile.return.self_trie_isfile_key_": {"doc_hash": "7a4337c3ad47d37e710dde556ae31405e959cf1a857ef7d76d07dd6c9af28e1a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/git.py_GitTree.walk_GitTree.walk.for_prefix_dirs_files_i.yield_root_dirs_files": {"doc_hash": "94706862f892274e0c3cb2ebdef16438d485dbcfc99d22aa5380f89ab941fd69"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/git.py_GitTree.isexec_": {"doc_hash": "f1e5932b38138ff019572e3968e0b514831555e595bb5752cb4019be4bca016b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/hdfs.py_HDFSTree.open_HDFSTree.exists.with_self_hdfs_path_info_.return.file_info_type_pyarrow": {"doc_hash": "c342c82571a90442eb0514385b12218f7a070fc6883b03ca5b5ef294b765cca7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/hdfs.py_HDFSTree._walk_HDFSTree._walk.if_not_topdown_.yield_root_dirs_nondirs": {"doc_hash": "fbbfea25e8dd95fa70ce47243758c78f4e87f4851d158d34f55785d779cf44cc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/hdfs.py_HDFSTree.walk_HDFSTree.makedirs.with_self_hdfs_path_info_.hdfs_create_dir_path_info": {"doc_hash": "37504a86d315f4f7de037377d7493940a399f86a4386f0bb09530ad9386423d3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/hdfs.py_HDFSTree.copy_HDFSTree.isdir.with_self_hdfs_path_info_.return.file_info_type_pyarrow": {"doc_hash": "1272217ca604667e9eb15cef7629f90004c6d985abf8406200d19fbc36131599"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/hdfs.py_HDFSTree.hadoop_fs_HDFSTree.hadoop_fs.return.out_decode_utf_8_": {"doc_hash": "c38d771e450502c39e6de85d275d2e155716d773e1b1c4d473d25e484c47ba75"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/hdfs.py_HDFSTree._upload_HDFSTree._upload.with_self_hdfs_to_info_a.hdfs_move_tmp_file_to_in": {"doc_hash": "95522e6a2f2ebd207dcf3430d50d16890b626a6226dd3a1a77ca3dd669945de4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_checkpoints.py_logging_test_new_checkpoint.None_2.assert_tmp_dir_metric": {"doc_hash": "53c65d5e8e2d760a8acdcda55a80b6ec95cf7cadf056d8840e64177af4d0f47b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_checkpoints.py_test_resume_checkpoint_test_resume_checkpoint.assert_scm_get_ref_EXEC_C": {"doc_hash": "7b11c5dcb50547be010b3f409a14b9c4970a98e7521fcdc9366af83b784dc7a4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_checkpoints.py_test_reset_checkpoint_test_reset_checkpoint.assert_scm_get_ref_EXEC_C": {"doc_hash": "ddb845946f03fd974ea1995f5198913fdefc39497b7075412c8df45cf9e704f6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_diff.py_from_funcy_import_first_test_diff_head.assert_dvc_experiments_di": {"doc_hash": "d594753f60d5281d77d4597ae44da8f9176b7dff66b0d04e7b1aa54e51c43efc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_diff.py_test_diff_exp_": {"doc_hash": "ebe621bcff77e9a127b25e07be1e0902d597f8f572afa1c3f809b53640f831bb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_logging_test_new_simple.assert_scm_resolve_rev_ex": {"doc_hash": "1549677600f8d280888c9865256a8467e3f1e1b0db38e5aefebcfa4b31e19e21"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_experiment_exists_test_experiment_exists.with_tree_open_tmp_dir_.assert_fobj_read_strip_": {"doc_hash": "5f72cda9b6db53465fb113fbc89e42ef79c98148fb926b8887cfc28e9b05120c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_modify_params_test_modify_params.with_tree_open_tmp_dir_.assert_fobj_read_strip_": {"doc_hash": "28d25e0b224332333cd52cd7849579d6799e00dc8626c4e788f8721ee5a77372"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_apply_test_apply.None_3": {"doc_hash": "52728e72eb901ea4a1d4a1425493896066849c2ab6334e9eb1389ffbe2a0a918"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_update_py_params_test_update_py_params.with_pytest_raises_Python.dvc_experiments_run_": {"doc_hash": "268bce9f837433ee2da31e623a033cc6f24a746df54c56c6048d3f31e11b8441"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_detached_parent_test_detached_parent.assert_tmp_dir_params": {"doc_hash": "70588e212f409dba61088941d514e212fbf8f330b4c56f531585fe56798750f8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_branch_test_branch.assert_scm_resolve_rev_b": {"doc_hash": "55097e3a071a45c8d2365df33c0fb624453197d0412e1a7482a3b210084395fe"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_no_scm_test_no_scm.for_cmd_in_.with_pytest_raises_NoSCME.getattr_dvc_experiments_": {"doc_hash": "a56a2e7f8f0e772a350e74b92070e1905803725edbbba3baf01072367a2095e8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_untracked_test_untracked.with_tree_open_tmp_dir_.assert_fobj_read_strip_": {"doc_hash": "bd323c3573de8ff3e4c575e7ce3091c0fa971d927c20ee8480bb273eb934ab7e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_dirty_lockfile_test_packed_args_exists.with_caplog_at_level_logg.assert_Temporary_DVC_fil": {"doc_hash": "1de38835cddeb21b5e091d242c084431ff14121ddd493cc60b80e7ecb782312f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_list_test_list.None_2": {"doc_hash": "2361cbf8457e972afc927e64fce3381be6ae0d3e5cfd0dfcf430d5b4d693b610"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_subdir_test_subdir.assert_scm_resolve_rev_re": {"doc_hash": "27fa4fafb9749860cf4b285df58b15c370b7d503190ca397293fc127607b0e76"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_subrepo_test_subrepo.assert_scm_resolve_rev_re": {"doc_hash": "4da0e26924668a685c27fd2c87507b32a42376e8c693eebaf190e84501bd1181"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_queue_": {"doc_hash": "f64127e2aea023f7c1bf92827199790c35a9707d15a5faab580be3061fd4f281"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_remote.py_os_git_downstream.return.erepo_dir": {"doc_hash": "3eda0aa68a42f47afd8ca992a467efccfccab7fd063f0965f8cc3d3bfcb06ad6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_remote.py_test_push_test_push.None_1": {"doc_hash": "85c5472db992ce90cc5319ac23af62606dd80a7a8e32d8b7f65d5c482676c861"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_remote.py_test_push_diverged_test_push_diverged.None_1": {"doc_hash": "fa55da4fadecfed887ea473f2ef228597e8128c8acff048e0fb70463b842748e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_remote.py_test_push_checkpoint_test_push_checkpoint.None_1": {"doc_hash": "edbf042c6f4bf424d7d1bf586e52e071edebdb87ca9b22dfe3bd5d8611d72154"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_remote.py_test_push_ambiguous_name_test_push_ambiguous_name.None_1": {"doc_hash": "fc8e30e2ae774dc51a731a369d331d8319be966cdbbdac3ee363761741ddd9c4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_remote.py_test_list_remote_test_list_remote.None_3": {"doc_hash": "e25d0313a35e32685db9cfcb93629f7addb43f1115356d99679763cd5b0a52bf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_remote.py_test_pull_test_pull.None_1": {"doc_hash": "eef79e9ec1caececbb5d321ad44edc92286ebd04b0cf34eb243b24620cd05e2c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_remote.py_test_pull_diverged_test_pull_diverged.None_1": {"doc_hash": "c36bde6a08f7140576411c922565d8c6b9d04b19da0d39108022adb0d7302056"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_remote.py_test_pull_checkpoint_test_pull_checkpoint.None_1": {"doc_hash": "0ad3053a27447557abcd766c9275b3334be61688cd0266f44a6452e5e85bfe36"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_remote.py_test_pull_ambiguous_name_test_pull_ambiguous_name.None_1": {"doc_hash": "37b7f062f9bcb9afec4469021a7325f51c7343ed692f0a67eed24dfb05fd186c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_remote.py_test_push_pull_cache_": {"doc_hash": "cca666c5d58d5400999d5ac86a22f27385c2630e5c76df457808f85486df7cfc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_show.py_os_test_show_simple.assert_dvc_experiments_sh": {"doc_hash": "059d126b47f22831fdf281c5f62cc40f4fc3ccae34c1e095c4423109ad55c9ad"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_show.py_test_show_checkpoint_test_show_checkpoint.for_i_rev_in_enumerate_c.assert_f_tree_name_i": {"doc_hash": "db6e548e439d31a9f4205a7a37c30c0ae4320ab39cfd1542ecef2052972a3fec"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_show.py_test_show_checkpoint_branch_test_show_checkpoint_branch.assert_f_branch_rev_7_": {"doc_hash": "8d86a0a8dbc4f27fabb94a452e67042023469bbd6512f482c1ef476f57a7ef6b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_show.py_test_show_filter_": {"doc_hash": "fe18caa5a938169ea6c10f835fe8d207d57b9721f92c88084371010f29dbd464"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/metrics/test_diff.py_json_test_metrics_diff_simple.assert_dvc_metrics_diff_a": {"doc_hash": "a30b90af016e6de057989dd25be5cb292e67cc761cb842219bbab330abf47a15"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/metrics/test_diff.py_test_metrics_diff_yaml_test_metrics_diff_yaml.assert_dvc_metrics_diff_a": {"doc_hash": "3deff5b6f76918e11274970ca72156e1b213053821cdda1e04d753b6442da395"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/metrics/test_diff.py_test_metrics_diff_json_test_metrics_diff_json.assert_dvc_metrics_diff_a": {"doc_hash": "4e3e7a181d56a35ad1ec8f9078ad6620e432a8ec027b22dd9de1f5bdb9cf2d34"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/metrics/test_diff.py_test_metrics_diff_json_unchanged_test_metrics_diff_json_unchanged.assert_dvc_metrics_diff_a": {"doc_hash": "96d80f2ecbd7bc07a5bc085ecf7e34613b12c4533f0a9eb0e748ce865bae68eb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/metrics/test_diff.py_test_metrics_diff_broken_json_test_metrics_diff_broken_json.assert_dvc_metrics_diff_": {"doc_hash": "28bc554d2b3288018e4a54b090b597b5c26f73ec050f9fd3ad7035e521579572"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/metrics/test_diff.py_test_metrics_diff_no_metrics_test_metrics_diff_new_metric.assert_dvc_metrics_diff_": {"doc_hash": "4970efd8cd9eaef4975df9066a8ca5714b4c51e6c97801bf710077161552ff24"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/metrics/test_diff.py_test_metrics_diff_deleted_metric_test_metrics_diff_deleted_metric.assert_dvc_metrics_diff_": {"doc_hash": "e038243d769d764d7b4d4294be22f886d2bfee0110210d2f6b038e128b6bf879"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/metrics/test_diff.py_test_metrics_diff_with_unchanged_test_metrics_diff_with_unchanged.assert_dvc_metrics_diff_a": {"doc_hash": "3ae385f231598d0de916cce3b2a9acacc6ae106f4ea19163eadb2cf3de8e2f85"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/metrics/test_diff.py_test_no_commits_test_metrics_diff_dirty.assert_dvc_metrics_diff_": {"doc_hash": "dd9a11f4d36af18f03505d2bd062ab36580ba41d8bcdfe51988359ac4cac61ae"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/metrics/test_diff.py_test_metrics_diff_cli_test_metrics_diff_cli.assert_info_": {"doc_hash": "e73759ab251ac6568c465eb7ed6c8029a90a012c86bc505d5f0e6af2e5e2d2ea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/metrics/test_diff.py_test_metrics_diff_non_metrics_": {"doc_hash": "bb91040487b4b602df943e27fb258a40ea6cb1e41adfe6cca4fd1098d71ddea9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/metrics/test_show.py_os_test_show.assert_dvc_metrics_show_": {"doc_hash": "01a78a9da940f17bb9a491555b120bd288f004bac6ca3d711e071d46f3d1f68e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/metrics/test_show.py_test_show_multiple_test_show_multiple.assert_dvc_metrics_show_": {"doc_hash": "52502b0a8d9fbb07919886be94fa3cac55276191a1e19de29dafd960f4f8fe1d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/metrics/test_show.py_test_show_branch_test_show_branch.assert_dvc_metrics_show_r": {"doc_hash": "522cd30a5df73ce71c81ca3bc79e6246cbde33cda2ee8c0f8e678ad6a3277b6e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/metrics/test_show.py_test_show_subrepo_with_preexisting_tags_test_show_subrepo_with_preexisting_tags.assert_dvc_metrics_show_a": {"doc_hash": "f48f2818b9eabf33cd7730b37dc82389ba6240b4e686292120a4e9a11a68d43b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/metrics/test_show.py_test_missing_cache_test_missing_cache.assert_dvc_metrics_show_": {"doc_hash": "08362b64ee5739108c3911840d7ee2faee255e744bf25ae71e96f025fa9b4064"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/metrics/test_show.py_test_show_non_metric_test_show_non_metric.if_not_use_dvc_.assert_not_tmp_dir_d": {"doc_hash": "398f7a6cca0c5515701bce597227935288952590819d9545ed262faafd161c47"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/metrics/test_show.py_test_show_non_metric_branch_test_show_non_metric_branch.if_not_use_dvc_.assert_not_tmp_dir_d": {"doc_hash": "90111aad7d8cdf9eca203493f51e8d95c7cfe98c2aff306cb459043a81b9a16d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/metrics/test_show.py_test_non_metric_and_recurisve_show_test_non_metric_and_recurisve_show.assert_dvc_metrics_show_": {"doc_hash": "66da3e335930c24bebd62d1035c091d79e88773873aca5c1ed0166a8a3121774"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/metrics/test_show.py_test_show_falsey_test_show_no_metrics_files.with_pytest_raises_NoMetr.dvc_metrics_show_": {"doc_hash": "56fbecd9a288d6e835c60251f12d375fded81e6fef3d854292a25e6c77f84c8b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/metrics/test_show.py_test_metrics_show_overlap_": {"doc_hash": "9d368819e9d18eea3374988aaa5448c8269c5d2b371e123f426230f919d81c98"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_diff.py_from_dvc_utils_import_rel_test_diff_no_changes.assert_dvc_params_diff_": {"doc_hash": "91bb114aadab167d302d09fca7544ba0209f5ffd6538c6ff3b0720ad278a3da8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_diff.py_test_diff_test_diff.assert_dvc_params_diff_a_": {"doc_hash": "cd2318e2fec0f9f19e6d5019259b33f300818e260477fa515227676225b537bc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_diff.py_test_pipeline_tracked_params_test_no_commits.assert_Repo_init_params": {"doc_hash": "c4b39cd29f572148b8130915aa3ed3a44662c92e71dbccc14eb2241be8665735"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_diff.py_test_vars_shows_on_params_diff_test_vars_shows_on_params_diff.with_data_dir_chdir_.assert_dvc_params_diff_": {"doc_hash": "e5cf725f43494e17fafabaf936f003715e702b14c17ab0742bf58406b4068f1b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_diff.py_test_diff_targeted_": {"doc_hash": "7bd0936042331a59a60af23018896c52b9aa9bb700fb55f06e5a78e36da78d55"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/__init__.py_from_dvc_parsing_import_D_": {"doc_hash": "addcbe3f191cd3a3c42f01776c347e55c7952c148a0892d2e200d2cad53f2384"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_errors.py__Negative_tests_for_the_escape_ansi.return.ansi_escape_sub_line_": {"doc_hash": "beb6cc1fc03dbdafdff8ddaa0f31e4c5dd0a070b166a0235a4ac76afb0c479bd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_errors.py__Tests_for_the_interpola_test_vars_interpolation_errors.assert_": {"doc_hash": "b0016eea7397993fc6e8b52c89ed8d2ff34956b04cfe9e1906cd3b196b4853a2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_errors.py_test_failed_to_interpolate_test_failed_to_interpolate.assert_definition_context": {"doc_hash": "6b9aed3761a400ab9cb4ff7d713886c2ea574b376b70e3a2b6c9be36a8e9ba9e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_errors.py_test_local_vars_params_file_not_exist_test_local_vars_params_file_not_exist.assert_not_definition_con": {"doc_hash": "b67e883422ccf1468542b55e0b4c5c4bebe942fcf61f27df3bf7c4e370345ac9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_errors.py_test_specified_key_does_not_exist_test_specified_key_does_not_exist.assert_definition_context": {"doc_hash": "be7993c15d5378a1fd9d3ff4f23974cac86b5e77ce59c79d04cfbe05e0f16f2f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_errors.py_test_wdir_failed_to_interpolate_test_wdir_failed_to_interpolate.assert_definition_context": {"doc_hash": "60a47fb9e46b7a260f690b50f6e5633ca6207f8f9e431d9a4c677d3f9eefad80"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_errors.py_test_interpolate_non_string_test_interpolate_non_string.assert_definition_context": {"doc_hash": "c0df70d3c0ffe5a538394eca87b565289f93af9dd490229f1f8f3cde449253a2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_errors.py_test_partial_vars_doesnot_exist_test_partial_vars_doesnot_exist.assert_not_definition_con": {"doc_hash": "11e85dc5989aa71cee5a22de8302646165f15d311324bf17e6d72144ae990d70"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_errors.py__Tests_foreach_generated_test_foreach_data_syntax_error.assert_escape_ansi_str_ex": {"doc_hash": "8c7dd7b0eab0325a5bbc541d625cea9eb52a920847b93b30c1138fca18168947"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_errors.py_test_foreach_data_key_does_not_exists_test_foreach_data_key_does_not_exists.assert_str_exc_info_value": {"doc_hash": "cf2a00c3b123e522ee0d2d262ec5907177c39021c489241a0f8951a94fb0eeda"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_errors.py_test_foreach_data_expects_list_or_dict_test_foreach_data_expects_list_or_dict.assert_str_exc_info_value": {"doc_hash": "2727ab083746646fbfa9a0fae0818f4edae62b60692e8ef91bb06fad1aff132c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_errors.py_test_foreach_overwriting_item_in_list_test_foreach_overwriting_item_in_list.assert_caplog_messages_": {"doc_hash": "7b86a9727f5a06edbfb76b6de4aa2e56f6490a6a907a6edb324c6a0bf74232a6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_errors.py_test_foreach_do_syntax_errors_test_foreach_do_syntax_errors.assert_escape_ansi_str_ex": {"doc_hash": "2a80325856d67a153fd77230c95ad9882a53faa6db5a624bf870520c4edb7339"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_errors.py_test_foreach_do_definition_item_does_not_exist_test_foreach_do_definition_item_does_not_exist.assert_context_foo_": {"doc_hash": "fbe1348b23c1c5a7289188febc844444e057173a89cd091c6761a37f054dfc4a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_errors.py_test_item_key_in_generated_stage_vars_test_item_key_in_generated_stage_vars.assert_context_foo_": {"doc_hash": "43d52ce3c780142ae1ed528fd8923019a630db410308b7c1b3e31a53f5d06fd8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_errors.py_test_foreach_wdir_key_does_not_exist_": {"doc_hash": "2d16e258933d75c5698a8ca86773ba386d427338a90408c2b45d0b63cf36173a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_foreach.py__Testing_happy_paths_fo_test_with_simple_list_data.None_4": {"doc_hash": "a48b5bd903af4ec8080029bc8ab6d4f65f3356ef7156e47b3dc65194f266aff9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_foreach.py_test_with_dict_data_test_with_dict_data.None_4": {"doc_hash": "e8fff8ef39961f79da30f8aea400eff89a03745fca44fe6f76c8a94a1214b5ba"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_foreach.py_test_with_composite_list_test_with_composite_list.assert_not_resolver_track": {"doc_hash": "d3175c2e129cd21fbd94126abca8811201ab099b58ed2cbf1252cccc48fe7679"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_foreach.py_test_foreach_interpolated_simple_list_test_foreach_interpolated_simple_list.assert_not_any_item_for_i": {"doc_hash": "809ee3f34ba06d61362d666eeff74d2158ab5213e603f352f11347267a45bebd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_foreach.py_test_foreach_interpolate_with_composite_data_test_foreach_interpolate_with_composite_data.assert_not_any_item_for_i": {"doc_hash": "2c1e95cb64e2eefcce26ece1b1606b8ead2ae566cd5f2538bece1d9d97dbec54"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_foreach.py_test_params_file_with_dict_tracked_test_params_file_with_dict_tracked.assert_resolver_tracked_v": {"doc_hash": "302a4e6688d2574a958e05db6d4e2475fea732cc7e62e49238aa6457c809980d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_foreach.py_test_params_file_tracked_for_composite_list_test_params_file_tracked_for_composite_list.assert_resolver_tracked_v": {"doc_hash": "9e167b0f1c82b3aa24f86d488ee492451321ca8ba59f92f0568f123fa325c699"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_foreach.py_test_foreach_data_from_nested_vars_test_foreach_data_from_nested_vars.assert_not_any_item_for_i": {"doc_hash": "77b6edc6866adab0c40e75002bb3c6789d6b5435122c6ad399c4b3f884d43be9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_foreach.py_test_foreach_partial_interpolations_test_foreach_partial_interpolations.assert_not_any_item_for_i": {"doc_hash": "afed85ab406b3b08259f597cd622505abd3a4e855d575c76af0751a4813965a9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_foreach.py_test_mixed_vars_for_foreach_data_test_mixed_vars_for_foreach_data.assert_resolver_tracked_v": {"doc_hash": "101649d67df19d01cc61e5b23fc5223d016a7294d3a4487be0d37cadf6965af6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_foreach.py_test_mixed_vars_for_foreach_data_2_test_mixed_vars_for_foreach_data_2.assert_resolver_tracked_v": {"doc_hash": "eda847a013ebe69cb1e1f330ef4604843233d3e898b824160c9d2dd9d2eb6254"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_foreach.py_test_foreach_with_interpolated_wdir_test_foreach_with_interpolated_wdir.assert_not_any_item_for_i": {"doc_hash": "c1f4aff6b893fdfe0ddbf35662ffc22c06335c2708e008be1dd16750e5be3b49"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_foreach.py_test_foreach_with_local_vars_test_foreach_with_local_vars.assert_not_any_item_for_i": {"doc_hash": "aca253e5d0c86b325a226973cfc874caee077b87ac7647af2090604221c7d8bc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_foreach.py_test_foreach_with_imported_vars_test_foreach_with_imported_vars.assert_resolver_tracked_v": {"doc_hash": "875749ddd0889d65def48caf4b10819af09327eb11704954722b5a933a147116"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_foreach.py_test_foreach_with_interpolated_wdir_and_local_vars_test_foreach_with_interpolated_wdir_and_local_vars.assert_resolver_context_i": {"doc_hash": "e28bbbc34f98425adf5dfa50189ce1fffeb36d6d966541bfea50e5d316d681ce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_foreach.py_test_foreach_do_syntax_is_checked_once_": {"doc_hash": "0dac6116389e3352fa94d71795d2dd5c9f97488b44606dc1547304e1ef6d6e98"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_interpolated_entry.py_from_copy_import_deepcopy_assert_stage_equal.assert_d1_d2": {"doc_hash": "acbfe5c42b87777dc59d2855b7d8d0a727a190b25a8c241a41ef8fe5baf7051b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_interpolated_entry.py_test_simple_test_simple.assert_resolver_tracked_v": {"doc_hash": "4b1b039d9ad6178f898a30a2a30fe53909758f25db506c4fd8ad49e14072931d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_interpolated_entry.py_test_vars_import_test_vars_import.assert_resolver_tracked_v": {"doc_hash": "c3d2adfa8e655f58e65a0345126b133952857c621adff18e237a3cd83d92e04a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_interpolated_entry.py_test_vars_and_params_import_test_vars_and_params_import.assert_resolver_tracked_v": {"doc_hash": "be3ef7344b6b6f3a8716967958ea64a364818cef4b87da0f5de15d901f8bdffb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_interpolated_entry.py_test_stage_with_wdir_test_stage_with_wdir.assert_resolver_tracked_v": {"doc_hash": "70e2e470a158a5b145c43da27c400e0f5cfa1b6ae1fe9a3c1bdb68585f970368"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_interpolated_entry.py_test_with_templated_wdir_test_with_templated_wdir.assert_resolver_context_": {"doc_hash": "1c852c8e33fc3023f89a77ae710783adb1f3f3fcc93b190bac43cc3359c48aad"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_interpolated_entry.py_test_resolve_local_tries_to_load_globally_used_files_test_resolve_local_tries_to_load_globally_used_files.assert_resolver_tracked_v": {"doc_hash": "a3809bf7ec598d4e5fedc514ffcbb47e9892240992604097f50ce73c15e4902c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_interpolated_entry.py_test_resolve_local_tries_to_load_globally_used_params_yaml_test_resolve_local_tries_to_load_globally_used_params_yaml.assert_resolver_tracked_v": {"doc_hash": "54ad21d3aca9f159e44a63281c294051904233884e0ed604a0b82acd092d3943"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_interpolated_entry.py_test_vars_relpath_overwrite_test_vars_relpath_overwrite.assert_resolver_context_i": {"doc_hash": "3709e55d9f332a06f74083c560bff49cdc2e73441a4a5c3660dee0ff8c196ab0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_interpolated_entry.py_test_vars_load_partial_": {"doc_hash": "48f4c06ea6d046f91c1046e1fe1d1aea4955eb9ee71944f7d0355769ea9c6d44"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_resolver.py_from_copy_import_deepcopy_test_partial_vars_doesnot_exist.assert_": {"doc_hash": "6cd25502294f9ac2ce061483a0497b708ee02cc145841074e070ac9fd703b083"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_resolver.py_test_global_overwrite_error_on_imports_test_global_overwrite_error_on_imports.assert_str_exc_info_value": {"doc_hash": "87f1f4a4df6605b0c778730e0fd592ef7cfd2ee7c51e5691736695d1a1ca9611"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_resolver.py_test_global_overwrite_vars_test_global_overwrite_vars.assert_str_exc_info_value": {"doc_hash": "4727f7b1121d7a54e4eb08aa080f91a774e9457912b998b57a82918db2f3c048"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_resolver.py_test_local_declared_vars_overwrite_test_specified_params_file_not_exist.assert_str_exc_info_value": {"doc_hash": "2f4b30753d0db4515b54cc19296bf857d5ad57786c4ec47d5cd9b6567fb71815"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_resolver.py_test_vars_already_loaded_message_test_vars_already_loaded_message.assert_partially_in_str": {"doc_hash": "e69c28d2e058f58bd8ae161131e84ed63110bd88f8d04af321d8242a62a6bb17"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/parsing/test_resolver.py_test_local_overwrite_error_": {"doc_hash": "1dc52463798261e9b26252191ae16fffb07508de1e3be74e51cfba8b8946e362"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/conftest.py__": {"doc_hash": "091e43d172145ed0521625dd097079dbcbfe15a9827d8ecd51323538aeb8305b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_diff.py_json_": {"doc_hash": "ffdcc8e728224fc3554465e1f8933dbbcac7a07e0be2f409b932ffc7eca46f72"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_modify.py_pytest_test_plots_modify_existing_template.assert_stage_outs_0_plot": {"doc_hash": "8848a9638592d0f1b88fe583c2cd41687390398c01cbeb8df6065d078d538cda"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_modify.py_test_plots_modify_should_not_change_lockfile_test_plots_modify_should_not_change_lockfile.assert_not_tmp_dir_PIP": {"doc_hash": "f9c1cd2b9d62e8d1009f27dae63452841d30e8221c8d9788993557b85d4084fc"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_modify.py_test_plots_modify_not_existing_template_": {"doc_hash": "135d7aa304c2e7f18ea6690008b2b7f1c08e581853f90ff48882a5142e8adee9"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_json_from_tests_func_plots_uti": {"doc_hash": "673798674a34e1ccbc2205ba34d729c7074579e66732a5f6cec9ce5278335cdb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_plot_csv_one_column_test_plot_csv_one_column.None_5": {"doc_hash": "3cc977e60a02450c64c009f8bfd14644a912ad565995eb5016390b7ac386b5d8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_plot_csv_multiple_columns_test_plot_csv_multiple_columns.None_2": {"doc_hash": "4db9abf4ae1ac70ff1b202160a91486afbf3d8f20fd6ac7c319cdb37d8622acb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_plot_csv_choose_axes_test_plot_csv_choose_axes.None_2": {"doc_hash": "3462096af891477d275549cda860453f50ff9aacf80423102a1d42405eb36195"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_plot_json_single_val_test_plot_json_single_val.None_2": {"doc_hash": "8149dd9676796f670aa7bc5575f2168f31da9aa46a00089514d24237de12e7fb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_plot_json_multiple_val_test_plot_json_multiple_val.None_2": {"doc_hash": "e3bbe03c67c40b84225bc2f2f479470c6fdacf5674a0661921fd5097721954cf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_plot_confusion_test_plot_confusion.None_3": {"doc_hash": "df9e72d380e5b6372614b6b0045dc87adc7523d27671f68733827d1abc868395"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_plot_confusion_normalized_test_plot_confusion_normalized.None_4": {"doc_hash": "04107157ccf94584f4b2f463bae00eb1762a9ee0737678460f3bbbc582d65d6b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_plot_multiple_revs_default_test_plot_multiple_revs_default.None_2": {"doc_hash": "b9054a4c6f11fc0225112bb64cff8d219e56e711834dcbb3af909d2f1a25c677"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_plot_multiple_revs_test_plot_multiple_revs.None_4": {"doc_hash": "5a6d2edd551820c627d5c3fe5046ac3a7e6cfdae53288c746e6702636de716cb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_plot_even_if_metric_missing_test_plot_even_if_metric_missing.None_2": {"doc_hash": "2a17fa240ce184aa52845c6eb8c2cf749a9010b1a0ef4cceef2a79311bd66fbd"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_plot_cache_missing_test_plot_cache_missing.assert_plot_content_data": {"doc_hash": "72b43a1f3da64a9fdaa632d684e5742cdcc7d4c8f84efe4384b397da19768a19"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_throw_on_no_metric_at_all_test_throw_on_no_metric_at_all.assert_str_error_value_": {"doc_hash": "7e0512e63235e84c36cc1429ef14cc7c0b89b777d65e72a73447b3757c413828"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_custom_template_test_custom_template.None_2": {"doc_hash": "fe7d63d7fcb2a7ad077305c2f38ff53c9f3cd706973af73749c7882fae63ea9c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py__replace_test_should_raise_on_no_template.with_pytest_raises_Templa.dvc_plots_show_metric_js": {"doc_hash": "7134a48fb5852b7d6312b5b1564c510bb48164f9789ea4204feea439c23848cb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_bad_template_test_plot_wrong_metric_type.with_pytest_raises_PlotMe.dvc_plots_show_targets_": {"doc_hash": "e6aa2bca48da54774730b104986ac483ed894f8c9e3b5cf9eb2e8044b3b2252e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_plot_choose_columns_test_plot_choose_columns.None_2": {"doc_hash": "89c63106de6aed7b95ac9399eab953766cdceaf6ae2c12bd0d5babff7d3bdd4d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_plot_default_choose_column_test_plot_default_choose_column.None_2": {"doc_hash": "60a93bcebff11ed98b64fd4cab0ad3097e6c9175f827672793335310887b7c71"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_plot_yaml_test_plot_yaml.assert_plot_content_data": {"doc_hash": "0c6a111a296a74eec93cf4decbdd486c7a02a4133445a4551da1c4606b09785b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_raise_on_wrong_field_test_raise_on_wrong_field.None_1.dvc_plots_show_metric_js": {"doc_hash": "8c4145522d69e9d7d6cf364322e534ef96cecc6d12328bbf05abb141a1c60b2b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_load_metric_from_dict_json_test_load_metric_from_dict_yaml.assert_list_map_dict_plo": {"doc_hash": "375c167a7f659c6437d5e296f2dc61be42cd124eb27bfa82292d1e45519a141b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_multiple_plots_test_multiple_plots.assert_len_dvc_plots_show": {"doc_hash": "98aeae23e5e64d069404417bb9e4195f13f2d35f26a520292272abf176b4df50"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_show_non_plot_test_show_non_plot.if_not_use_dvc_.assert_not_tmp_dir_d": {"doc_hash": "62ccbcee39c223bcb9893ef57015a81988eec76245d91a8b3148dda40f38fe72"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_show_non_plot_and_plot_with_params_test_show_non_plot_and_plot_with_params.None_2": {"doc_hash": "f99757aadfd116477750d435624f63cfa53cc48bc5879de94c8bf516f988c858"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_show_no_repo_test_show_from_subdir.assert_subdir_plots_h": {"doc_hash": "6371d536d9216e62008d7c4fbbddc3283acc3051ea7d229af5587efdc1f24bea"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_plots_show_overlap_": {"doc_hash": "840596ad9c1904fddca4158731bf0667f46c2abc311570355eccb6293040176d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/utils.py_csv_": {"doc_hash": "a70efab4151fd8982c881132f4abb4be0570c7229f956fcf983f754339458033"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_executable_test_add_executable.assert_os_stat_foo_st_": {"doc_hash": "3e6435a9da75703adb1f71b1b12b230e190736eb6595b93f3997731af6ca124c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkout_external_modified_file_test_checkout_external_modified_file.assert_workspace_foo_": {"doc_hash": "6da55bf2ab40be143d475cc756c67240b37e7def7a6fa01874a8bc164c1b3822"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkout_executable_": {"doc_hash": "a64edc55c4f3c4e875b8ae95baed0009d9f8a4605bb2af765191670bf563aa92"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cli.py_TestPull_TestGCMultipleDvcRepos.test.self_assertEqual_args_rep": {"doc_hash": "12aff100cf04664c082a055dd22c5f25580bc3b7ef0b322c09212f9b75c90a65"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cli.py_TestConfig_TestConfig.test_config_list.self_assertIsNone_args_va": {"doc_hash": "a342f1c9bef4eff6b25c6119c35795bd2bc4b43ecec71cb523be440e9925fdb5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cli.py_TestCheckout_": {"doc_hash": "a3fb0b4b371a7784078f76a1f9bd73f7441ad6a7e1db9ac17aacbaa86bd68e6f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_config.py_test_load_relative_paths_test_load_relative_paths.assert_cfg_remote_tes": {"doc_hash": "fbdc91471c4ff1c76d79dad670ec473a1ea6416f11eef34926aa8b4b160d80de"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_test_diff_dirty_test_diff_dirty.assert_result_": {"doc_hash": "29c6cd83ef250d5e6efacec4465dc283db94b02832150932d800bdbdfef2514b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_test_no_changes_test_targets_single_file.assert_dvc_diff_targets_": {"doc_hash": "f77db9f959c373c37290ebc7d7c83bf052b7da4ba133375e802a9b34f3e6767d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_test_targets_single_dir_test_targets_single_dir.None_1": {"doc_hash": "ab825123fba9ac0c62a51f3039de05d196f7ae06c7b7e4eb05b85a4cc0c99893"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_test_targets_single_file_in_dir_test_targets_two_files_in_dir.assert_dvc_diff_": {"doc_hash": "a8054a9c148a9d3ef8b5c3ecd5327a2fe6b6a3524f7f273e4b2ce139e7b9d0b1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_test_targets_file_and_dir_test_targets_file_and_dir.assert_dvc_diff_targets_": {"doc_hash": "59a0c1cb2afa5d873b71127ec9469abf934e354e29a4484b4cccbe08cf97d4e7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_test_targets_single_dir_with_file_": {"doc_hash": "75a9bfc58b9c0e20047320a634562d57de37ee98fa03b8c89d02c401d8e7598e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_gc_external_output_test_gc_external_output.None_5": {"doc_hash": "1c8c9d7d6748e20fc7eea11ef3affacf99b73f0d1936e7b5a22fd679f6593a4c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_gc_all_experiments_": {"doc_hash": "a8b9c6033b3f9870f35fcf65468842de4b60e9537add9a16fe5a82d5fc7e9b85"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_cache_type_is_properly_overridden_test_cache_type_is_properly_overridden.assert_scm_is_ignored_fo": {"doc_hash": "34f0c8c9c2b907fdcf66b65fb22238bbe10ca395d504db74e426fb18b100be42"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_pull_wildcard_imported_directory_stage_test_pull_wildcard_imported_directory_stage.assert_tmp_dir_dir_im": {"doc_hash": "e288de5ec225622637d0d3c599c82d20e06784d8366a519514916a8799d3596e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_try_import_complete_repo_test_try_import_complete_repo.assert_expected_message_": {"doc_hash": "7915e40fb812fd621b85281fd8dddb4236c32b8736e53f945abe625f2d3dab68"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_with_no_exec_": {"doc_hash": "ff8b105eadd408fc3964938a40c26d20f4cb50a7a432edb038bf37b44ba9feda"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_frozen_test_repro_frozen.assert_stages_data_st": {"doc_hash": "11f5bf2c1994fd0000cce762c512a748f0687faad2d7d43f1dd63d4eb00c8535"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_multiple_params_test_repro_multiple_params.assert_dvc_reproduce_stag": {"doc_hash": "979b4fecdfc62290f30eb581f327c286886d9c51101e8b27158f8a3aef0bf0c6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_list_of_commands_in_order_test_repro_list_of_commands_in_order.assert_tmp_dir_bar_": {"doc_hash": "7941a95b1319f428e8fc4845a915b528c6388025932667638c9a8314da4eddb8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_list_of_commands_raise_and_stops_after_failure_": {"doc_hash": "15aa242494f00ef3a35fbfd4bc89e1d47e78296ad38e54c8df258734437426e0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_os_from_dvc_utils_serialize_": {"doc_hash": "c8fe7e2fa80e439cd12885e0957fad80ec48fa2455916e8266ae7287cd57e21d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_test_collect.None_10": {"doc_hash": "3b8081f3ca6f17b8d09e2664a7e1af4cd0225532da9822dafbd58a251eb3ac72"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_generated_test_collect_generated.None_7": {"doc_hash": "fdf2b16d2110021a0008a32bbf46466df8433d5b47ee90128199d173d4848eae"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_optimization_on_stage_name_test_collect_optimization_on_stage_name.None_1": {"doc_hash": "674b22014064cb6cdd95593fed067a70b8c93628cb64ded8b9aec284c5b788f2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_repo_callback_": {"doc_hash": "47025dc8f990530b9b3b7d1e89c5e688dd19dff8bea290b5c03fe77e34b22656"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/hdfs.py_hadoop_hadoop.os_environ_CLASSPATH_": {"doc_hash": "1e853137d6654763af31ffdb90b59db72f5e9e19cd25648137c63098e60ad2e1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_config.py_pytest_": {"doc_hash": "7cb7bbe50e1aee26883272673f8e34f9a04e1944d56d65ac3a1d8e152599a584"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_experiments.py_pytest_test_experiments_apply.m_assert_called_once_with": {"doc_hash": "65eb077063fa4c96db2218506864e12538d489d8c94fe901ddd2a6193e81cc1c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_experiments.py_test_experiments_diff_test_experiments_diff.m_assert_called_once_with": {"doc_hash": "e1763c3ccda17d4750eae15b9562badd82232cec81c09d83e0213b415dba762b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_experiments.py_test_experiments_gc_test_experiments_gc.with_pytest_raises_Invali.cmd_run_": {"doc_hash": "061cd3d8a1c6dbc019389291fea3e90f210657a7282dee6611a53ef303f3f36b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_experiments.py_test_experiments_branch_test_experiments_list.m_assert_called_once_with": {"doc_hash": "f45a317db6d7410796da258eae4bcbb4515dc3658b41d2310088704c660db5f4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_experiments.py_test_experiments_push_test_experiments_push.m_assert_called_once_with": {"doc_hash": "35471e9cee61748c33bad14043d747ece6e54a84acf43d0bed1d682eda952476"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_experiments.py_test_experiments_pull_": {"doc_hash": "3cc41bff59e667a616d9bf9e4d123837259f635e043d9b98273ccfb597702e64"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_show_with_valid_falsey_values_test_metrics_show_with_valid_falsey_values.assert__show_metrics_": {"doc_hash": "b535f55c230cddd3e2ee9892ea729202b9cffdf9c3d325bfb8b4498b94fc5165"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_show_with_no_revision_test_metrics_show_with_non_dict_values.assert__show_metrics_": {"doc_hash": "3e4ce36c8f98fc13e4f2c96b0cd556a453d68d1ea8a55c64d9a8f8e18abb7455"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_show_with_multiple_revision_test_metrics_show_with_multiple_revision.assert__show_metrics_": {"doc_hash": "373cc5620a75ab6a45851caf7c696d0c5d07e8254992e18ce4597b4f767e1582"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_show_with_one_revision_multiple_paths_test_metrics_show_with_one_revision_multiple_paths.assert__show_metrics_": {"doc_hash": "7031fc10065129a09274f7662da5f51127f681e7f358bf66128e66752653e798"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_show_with_different_metrics_header_test_metrics_show_with_different_metrics_header.assert__show_metrics_": {"doc_hash": "35b298e6e76c479a7c220534027618837ba6b128f1756bcd95b5eacde755a644"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/test_repo.py_os_test_find_outs_by_path_does_graph_checks.with_pytest_raises_Output.dvc_find_outs_by_path_fo": {"doc_hash": "f70f009edc2e3c1a5e8b81b2b31f239d5c129f72665bf67a03a22323270d9fb5"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/test_reproduce.py_mock_": {"doc_hash": "07bb184bafbea0a4468c95f72914f250a857c95b2ec315d592edf21ee4e1773d"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_os_git.git__close_": {"doc_hash": "9abb2b36435a14aa4e7a950480eec245f70a87124fa5dacfcdc9043185888ed8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_TestGit_TestGit.test_belongs_to_scm_false.self_assertFalse_self_dvc": {"doc_hash": "a0f52854756114a57f4196345b64cfac726fa360e45c07eaea7212f27daf408b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_get_ref_test_get_ref.assert_git_get_ref_refs_": {"doc_hash": "b0152c3a993560d63fbcdac4d8168f55e4fe3bba889bcc83f90bdb034d571919"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_fetch_refspecs_test_fetch_refspecs.assert_0_remote_dir": {"doc_hash": "bedda26e9b2d4c2f5d2a52c265f00217a253ebc05f2dc7bf9900c1495a48e6b8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_fill_from_lock_outs_isexec_test_fill_from_lock_outs_isexec.assert_stage_outs_0_isex": {"doc_hash": "3f4ea491d3545a6af7161404431818dd62ac16db8783a2c54e09ce90e99e73b8"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_load_stage_cmd_with_list_test_load_stage_no_lock.assert_not_stage_outs_0_": {"doc_hash": "7c229a7bf5df54eba55d535db6bed325490405a90b451c2fd255f665ef8d8022"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_run.py_logging_": {"doc_hash": "2bbc16143876c699d0248990f7269dd45339c7245f5692fcb02ad0fd952089b4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_lock_outs_isexec_test_lock_outs_isexec.assert_to_single_stage_lo": {"doc_hash": "a715c1b15ee56240c3ca537f9feaebd4c385bc541be515b68de191412190dd17"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_collect.py__": {"doc_hash": "b7a019647958f19f33f22f25b19cb10fc8bd7fe7a55601d3d9c7591c7da89d3f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_clone_test_clone.with_pytest_raises_KeyNot.c2_select_lst_1_not_exis": {"doc_hash": "44b2fdeba59c7651969a4815689d14a180048b2e19d08713dfab79d6c4e66fa6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_track_test_track.with_context_track_as_t.None_4": {"doc_hash": "a35eebf4897d64ff4c8189887e8600ed0ccdbc5525c2df18ece5063cd3800706"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_track_from_multiple_files_test_track_from_multiple_files.None_1.assert_not_key_tracked_": {"doc_hash": "04ac010a91e5df826b484d0cef69bd8fd61404b5c9834d3c55b9bb049fe344c6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_base.py_pytest_": {"doc_hash": "42d008e881cc5cbe4a82ec84bf6a69b78821b8288b18996df7d7c9d3ec767edb"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/cache.py_argparse_CmdCacheDir.run.return.0": {"doc_hash": "fa9a5fd93bfe684bead917dba5379c0e3d59c9611116b7386d415c2514c21eca"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/cache.py_add_parser_": {"doc_hash": "04dcd859d95245b4f34c45042b0699d8b830f5edf6a54e9d1677cec26138885e"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/config.py_CmdConfig._check_CmdConfig._config_file_prefix.return.fname_t_": {"doc_hash": "e132f03d7a489ffae69b49948812aea329116be3de8a76f0ce6e249c25e45073"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/data_sync.py_add_parser_add_parser.None_17": {"doc_hash": "5578408407a1adb8c01653a9d62c14befa64b2cd47cc07adf5ba81769075ff56"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/data_sync.py_add_parser.push_parser_set_defaults__": {"doc_hash": "e7fcb768f139e8c472bada626fad7c641adba0790a793e283bc1a96df43b0206"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/metrics.py_add_parser.None_11_": {"doc_hash": "922eea066e60bb38f9923b162f5f70118bbe4ac29d49a4f08ff96781e0eeb85b"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_COMPILED_SCHEMA_Config.init.return.Config_dvc_dir_": {"doc_hash": "f8811f718fe8a7a9e28c1881ae005b1b873670363dd8b6b78ce6a9e92d7997d7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_Config.load_Config.load.if_not_self_cache_get_.self_cache_dir_os": {"doc_hash": "51544f330422da46e92243782865fda9ce1943c7fbf559804d3576d99ca0a0a6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_Config._get_tree_Config.load_one.return.conf": {"doc_hash": "52d7409eaf93fcb656181dc196074a45e9fa69e07cb434091a69d39b40593569"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_Config._map_dirs_Config.read.return.self_load_one_level_": {"doc_hash": "c9ef0aeebfccebb1df2e7beca429e8da572d5894af4cbd66db877f48351de511"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_Config.edit_Config.validate.try_.except_Invalid_as_exc_.raise_ConfigError_str_exc": {"doc_hash": "cfbcbc7d7a2d4d931551f8960d563e448ec3d13cb23e9f6e39ad4428d127d505"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py_external_repo_external_repo.try_.finally_.if_for_write_._remove_path_": {"doc_hash": "ed7ed97a6804b52646c4467b698c8a556ce0599b72c456795af05af777f46e00"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py_CLONES__get_remote_config.None_1.finally_.repo_close_": {"doc_hash": "f5298c75dadce2e65e783335166e267715594a2a2a3a51c089a6a461fd8fc3a4"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py_ExternalRepo._get_tree_for_ExternalRepo._get_cache_dir.return.cache_dir": {"doc_hash": "60078f1ef2b61679492ae69565df991817d498b9460a8118733ba5cbf28ab0af"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_ParamsLoadError_recurse_not_a_node.return.recurse_func_data_": {"doc_hash": "29a09577fa34c0d0d51009ce2084948724e2e66bc421178c3b06bbdbc9eb297f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/__init__.py_Experiments.reproduce_one_Experiments.reproduce_one.return.results": {"doc_hash": "864e6e06749ce4777f8269e611067e90e0dfbe422814d5d77fa9732b2ec50947"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/__init__.py_Experiments.reproduce_queued_Experiments.new.return.self__stash_exp_args_": {"doc_hash": "a5f066ccb88a5b92d3f21a83f56e9e29d474e3d61a9df147f7f5157d884c8c99"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/get_url.py__": {"doc_hash": "df908db377ad05fce8a73e25f5e43fa3feac10c79e8d9e4c309bb2bc73edff5a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/push.py_glob_targets_": {"doc_hash": "10060e689a0fdf993f7b878370ac4aaacae97f2485faf5177aef73e695d1ebce"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/reproduce.py_logging__reproduce_stage.return._stage_": {"doc_hash": "1d08469a1b6ea5d09bbdf411a974f93546ace2bdefd9f4144fd4695f2eb40c79"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/reproduce.py__dump_stage__track_stage.stage_repo_scm_track_chan": {"doc_hash": "b15a622ae8c969a1e1b0638f8c16f9af40e2f036e7a152db688dd441b4d0e8f7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/__init__.py_Git.set_ref_Git.status.partialmethod__backend_fu": {"doc_hash": "31879162d68f78cb8be291dab1ade50e7481198df41c19d6e2d212532f2e4f16"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/base.py_BaseGitBackend.describe_BaseGitBackend.describe._Return_the_first_ref_w": {"doc_hash": "601b2cd0366a804a4b461fbfca80e9a2f0e74900d76ce11fd4cf9af06b65ff66"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/base.py_BaseGitBackend.diff_": {"doc_hash": "19c829273a0d896cd675be84224a1a1a93c11ea7f23715fcd9d2a2c6c21ee43c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/dulwich.py_DulwichBackend.diff_DulwichBackend.checkout_paths.raise_NotImplementedError": {"doc_hash": "f1fdc47264641eb676e8183fd168f34c0499ddb86679da178e53455cf3c48f81"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/dulwich.py_DulwichBackend.status_": {"doc_hash": "9352329da1ab7202ab88e4ef523faba65ceaf676ab6b46c1d22128ba38eddc96"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/stash.py_Stash.push_Stash.push.return.rev": {"doc_hash": "dfbbaf2e524ea8b16a3d06ad70b9af3d1b54926cec6bc1cd854344fad3d934da"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/stash.py_Stash.pop_Stash.apply._pylint_disable_protect": {"doc_hash": "e3105d8e2fa18572e7d4ca629ee758d7149a3675b1744680251dfdcff6ec5fa7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/plots/test_show.py_test_show_malformed_plots_test_show_no_plots_files.with_pytest_raises_NoMetr.dvc_plots_show_": {"doc_hash": "8a978e6b201eaa7d2dc6df8d1e8752707ae8cf5bc8e24849a5a4216898efa986"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cache.py_test_default_cache_type_test_shared_cache.for_root_dnames_fnames_.for_fname_in_fnames_.assert_stat_S_IMODE_os_st": {"doc_hash": "df254f86f06c3da6911926f39fbdc9e78bad6e5b623d378877babd8d4b3a01e1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cache.py_test_cache_dir_local_": {"doc_hash": "9df3d52e3f0f2b3538334e3afd022bf77bc0eee93525b011830903fa8bcf2caf"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_config.py_os_test_config_set.None_8": {"doc_hash": "92273f31a9156e74af73c47260c770587a9b174e0f4b2fe33bffe895001d04f0"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_config.py_test_config_set_local_test_config_set_local.None_8": {"doc_hash": "f210dc3683c8b09e21f6043645a877cc85ec509ac9da98c8e0b66efe13e86254"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_config.py_test_config_get_test_config_get.assert_msg_in_caplog_text": {"doc_hash": "6825333e6ecf44e2141c8f093f737418997e50a2ac309389da76107c4adf8ff6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_config.py_test_config_list_test_config_list.assert_core_remote_myrem": {"doc_hash": "a27f5a35c822375cd27eed459f66ba3855cdf266437bddbb56bff1c946190243"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_config.py_test_list_bad_args_test_set_invalid_key.with_pytest_raises_Config.with_dvc_config_edit_as.conf_core_invalid_key": {"doc_hash": "c3f166726c4ccd90bc0bbd68ae748d54dde700daebb9bb6de77809bdc9195d16"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_config.py_test_merging_two_levels_test_config_loads_without_error_for_non_dvc_repo.Config_validate_True_": {"doc_hash": "b132433f768bfef04936e8084b1422febfaceec5dcc9b6bc575dae5e8baa2c09"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_config.py_test_config_remote_test_config_remote.assert_myregion_in_capl": {"doc_hash": "e19947948d951a618307636d24c2731ae8d2d2769573f894155e3af6923b1742"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_config.py_test_config_show_origin_": {"doc_hash": "909a4219a97a633f7788b397589c6904f6c5acc525188f08450991c47b6bdbc1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_push_wildcard_from_bare_git_repo_test_push_wildcard_from_bare_git_repo.with_dvc_repo_chdir_.with_pytest_raises_Collec.dvc_repo_dvc_imp_os_fspat": {"doc_hash": "6fc6a0d7244c6cf2108c4d86aa9b8db283630b233814717c6263799146ee0fae"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remove.py_os_test_remove.assert_not_tmp_dir_g": {"doc_hash": "bd8dd7cfd59c0aad369c4c220a86988d3f00d29bc27b58265c18d2e9b45c657f"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remove.py_test_cmd_remove_test_cmd_remove.assert_not_tmp_dir_fo": {"doc_hash": "b684b84a0719dfc6ae21deb9a87bf825b19550355b7585703a3e11745748960a"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remove.py_test_cmd_remove_gitignore_single_stage_test_cmd_remove_gitignore_single_stage.assert_not_tmp_dir_g": {"doc_hash": "b2ef9251d4571b7c817240728ff9562b89d7befa2a892a155c2bf85854b8c6ed"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remove.py_test_cmd_remove_gitignore_multistage_": {"doc_hash": "bfed3bb9fa8a68360acadb4ff1eab4de6c232c9e041e523a69fb88f2387bf094"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_root.py__": {"doc_hash": "f200f9ddb7fbc2551aa0f923ca77c4eb62746726a0720139302d055c50db4eab"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_show_precision_test_metrics_show_precision.None_2": {"doc_hash": "439db47d24f6ba7530b32985601ea60ea4a2f77c4b80268d4ecdd1bdd11f3db7"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_show_default_test_metrics_show_default.assert__show_metrics_": {"doc_hash": "b57316df56aa10c6f491d5e2667f5521fb4804acd85f406ac319cfabab9d7f12"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_show_md_": {"doc_hash": "4aeae8372fa975f27348eb626a158c77f3eb27504261fdd0d4322e9171fa9ef2"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_list_all_commits_test_list_all_commits.assert_rev_a_rev_b_": {"doc_hash": "d13501974fa9333910d9db2b0969d9523eb89c180aa1889ae34a8565ad50fdc6"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_ignore_remove_empty_test_ignore_remove_empty.assert_not_path_to_gitign": {"doc_hash": "6e8f943c9853680977e25757c463afdfce0eeeaa16b9e6df66a8d164141dc8ee"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_commit_no_verify_": {"doc_hash": "5721cf80954e7a7e344e47409acc06b4e819fd112e090cb81d1539081cde069c"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_cache.py_test_unhashable_": {"doc_hash": "b0452577db6a20100e6442e08c811e6a5f2bcd051a9932157ebde906eb51fd87"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_http.py_io_test_open_url.with_open_url_http_sa.assert_fd_read_": {"doc_hash": "aff8be01de48c258dae6eec4f5dc17c059520b1442c7618ea2d0278fb9aac5c3"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_http.py_test_open_url_peek_rb_": {"doc_hash": "4cf929049f2e126b36933dc0560ce31f1708a94463062e5edd6de6905ff389ed"}}, "docstore/data": {"/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/__main__.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/__main__.py__", "embedding": null, "metadata": {"file_path": "dvc/__main__.py", "file_name": "__main__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 8, "span_ids": ["docstring"], "tokens": 39}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Main entry point for DVC command line tool.\"\"\"\nimport sys\n\nfrom dvc.main import main\n\nif __name__ == \"__main__\":\n sys.exit(main(sys.argv[1:]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/base.py_CmdBase_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/base.py_CmdBase_", "embedding": null, "metadata": {"file_path": "dvc/command/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 31, "end_line": 58, "span_ids": ["CmdBaseNoRepo.__init__", "CmdBase", "CmdBase.__init__", "CmdBase.run", "CmdBaseNoRepo"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdBase(ABC):\n UNINITIALIZED = False\n\n def __init__(self, args):\n from dvc.repo import Repo\n from dvc.updater import Updater\n\n os.chdir(args.cd)\n\n self.repo = Repo(uninitialized=self.UNINITIALIZED)\n self.config = self.repo.config\n self.args = args\n if self.repo.tmp_dir:\n hardlink_lock = self.config[\"core\"].get(\"hardlink_lock\", False)\n updater = Updater(self.repo.tmp_dir, hardlink_lock=hardlink_lock)\n updater.check()\n\n @abstractmethod\n def run(self):\n pass\n\n\nclass CmdBaseNoRepo(CmdBase):\n def __init__(self, args): # pylint: disable=super-init-not-called\n self.args = args\n\n os.chdir(args.cd)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/commit.py_add_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/commit.py_add_parser_", "embedding": null, "metadata": {"file_path": "dvc/command/commit.py", "file_name": "commit.py", "file_type": "text/x-python", "category": "implementation", "start_line": 34, "end_line": 75, "span_ids": ["add_parser"], "tokens": 271}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n COMMIT_HELP = (\n \"Record changes to files or directories tracked by DVC\"\n \" by storing the current versions in the cache.\"\n )\n\n commit_parser = subparsers.add_parser(\n \"commit\",\n parents=[parent_parser],\n description=append_doc_link(COMMIT_HELP, \"commit\"),\n help=COMMIT_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n commit_parser.add_argument(\n \"-f\",\n \"--force\",\n action=\"store_true\",\n default=False,\n help=\"Commit even if hash value for dependencies/outputs changed.\",\n )\n commit_parser.add_argument(\n \"-d\",\n \"--with-deps\",\n action=\"store_true\",\n default=False,\n help=\"Commit all dependencies of the specified target.\",\n )\n commit_parser.add_argument(\n \"-R\",\n \"--recursive\",\n action=\"store_true\",\n default=False,\n help=\"Commit cache for subdirectories of the specified directory.\",\n )\n commit_parser.add_argument(\n \"targets\",\n nargs=\"*\",\n help=\"DVC-files to commit. Optional. \"\n \"(Finds all DVC-files in the workspace by default.)\",\n ).complete = completion.DVC_FILE\n commit_parser.set_defaults(func=CmdCommit)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/daemon.py_add_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/daemon.py_add_parser_", "embedding": null, "metadata": {"file_path": "dvc/command/daemon.py", "file_name": "daemon.py", "file_type": "text/x-python", "category": "implementation", "start_line": 36, "end_line": 72, "span_ids": ["add_parser"], "tokens": 265}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n DAEMON_HELP = \"Service daemon.\"\n daemon_parser = subparsers.add_parser(\n \"daemon\",\n parents=[parent_parser],\n description=DAEMON_HELP,\n add_help=False,\n )\n\n daemon_subparsers = daemon_parser.add_subparsers(\n dest=\"cmd\",\n help=\"Use `dvc daemon CMD --help` for command-specific \" \"help.\",\n )\n\n fix_subparsers(daemon_subparsers)\n\n DAEMON_UPDATER_HELP = \"Fetch latest available version.\"\n daemon_updater_parser = daemon_subparsers.add_parser(\n \"updater\",\n parents=[parent_parser],\n description=DAEMON_UPDATER_HELP,\n help=DAEMON_UPDATER_HELP,\n )\n daemon_updater_parser.set_defaults(func=CmdDaemonUpdater)\n\n DAEMON_ANALYTICS_HELP = \"Send dvc usage analytics.\"\n daemon_analytics_parser = daemon_subparsers.add_parser(\n \"analytics\",\n parents=[parent_parser],\n description=DAEMON_ANALYTICS_HELP,\n help=DAEMON_ANALYTICS_HELP,\n )\n daemon_analytics_parser.add_argument(\n \"target\", help=\"Analytics file.\",\n ).complete = completion.FILE\n daemon_analytics_parser.set_defaults(func=CmdDaemonAnalytics)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/destroy.py_add_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/destroy.py_add_parser_", "embedding": null, "metadata": {"file_path": "dvc/command/destroy.py", "file_name": "destroy.py", "file_type": "text/x-python", "category": "implementation", "start_line": 37, "end_line": 55, "span_ids": ["add_parser"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n DESTROY_HELP = \"Remove DVC-files, local DVC config and data cache.\"\n\n destroy_parser = subparsers.add_parser(\n \"destroy\",\n parents=[parent_parser],\n description=append_doc_link(DESTROY_HELP, \"destroy\"),\n help=DESTROY_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n destroy_parser.add_argument(\n \"-f\",\n \"--force\",\n action=\"store_true\",\n default=False,\n help=\"Force destruction.\",\n )\n destroy_parser.set_defaults(func=CmdDestroy)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/gc.py_add_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/gc.py_add_parser_", "embedding": null, "metadata": {"file_path": "dvc/command/gc.py", "file_name": "gc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 65, "end_line": 154, "span_ids": ["add_parser"], "tokens": 554}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n GC_HELP = \"Garbage collect unused objects from cache or remote storage.\"\n GC_DESCRIPTION = (\n \"Removes all files in the cache or a remote which are not in\\n\"\n \"use by the specified Git revisions (defaults to just HEAD).\"\n )\n gc_parser = subparsers.add_parser(\n \"gc\",\n parents=[parent_parser],\n description=append_doc_link(GC_DESCRIPTION, \"gc\"),\n help=GC_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n gc_parser.add_argument(\n \"-w\",\n \"--workspace\",\n action=\"store_true\",\n default=False,\n help=\"Keep data files used in the current workspace.\",\n )\n gc_parser.add_argument(\n \"-a\",\n \"--all-branches\",\n action=\"store_true\",\n default=False,\n help=\"Keep data files for the tips of all Git branches.\",\n )\n gc_parser.add_argument(\n \"-T\",\n \"--all-tags\",\n action=\"store_true\",\n default=False,\n help=\"Keep data files for all Git tags.\",\n )\n gc_parser.add_argument(\n \"--all-commits\",\n action=\"store_true\",\n default=False,\n help=\"Keep data files for all Git commits.\",\n )\n gc_parser.add_argument(\n \"--all-experiments\",\n action=\"store_true\",\n default=False,\n help=\"Keep data files for all experiments.\",\n )\n gc_parser.add_argument(\n \"-c\",\n \"--cloud\",\n action=\"store_true\",\n default=False,\n help=\"Collect garbage in remote repository.\",\n )\n gc_parser.add_argument(\n \"-r\",\n \"--remote\",\n help=\"Remote storage to collect garbage in\",\n metavar=\"\",\n )\n gc_parser.add_argument(\n \"-f\",\n \"--force\",\n action=\"store_true\",\n default=False,\n help=\"Force garbage collection - automatically agree to all prompts.\",\n )\n gc_parser.add_argument(\n \"-j\",\n \"--jobs\",\n type=int,\n help=(\n \"Number of jobs to run simultaneously. \"\n \"The default value is 4 * cpu_count(). \"\n \"For SSH remotes, the default is 4. \"\n ),\n metavar=\"\",\n )\n gc_parser.add_argument(\n \"-p\",\n \"--projects\",\n dest=\"repos\",\n type=str,\n nargs=\"*\",\n help=\"Keep data files required by these projects \"\n \"in addition to the current one. \"\n \"Useful if you share a single cache across repos.\",\n metavar=\"\",\n )\n gc_parser.set_defaults(func=CmdGC)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/imp.py_add_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/imp.py_add_parser_", "embedding": null, "metadata": {"file_path": "dvc/command/imp.py", "file_name": "imp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 34, "end_line": 98, "span_ids": ["add_parser"], "tokens": 415}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n IMPORT_HELP = (\n \"Download file or directory tracked by DVC or by Git \"\n \"into the workspace, and track it.\"\n )\n\n import_parser = subparsers.add_parser(\n \"import\",\n parents=[parent_parser],\n description=append_doc_link(IMPORT_HELP, \"import\"),\n help=IMPORT_HELP,\n formatter_class=argparse.RawTextHelpFormatter,\n )\n import_parser.add_argument(\n \"url\", help=\"Location of DVC or Git repository to download from\"\n )\n import_parser.add_argument(\n \"path\", help=\"Path to a file or directory within the repository\",\n ).complete = completion.FILE\n import_parser.add_argument(\n \"-o\",\n \"--out\",\n nargs=\"?\",\n help=\"Destination path to download files to\",\n metavar=\"\",\n ).complete = completion.DIR\n import_parser.add_argument(\n \"--rev\",\n nargs=\"?\",\n help=\"Git revision (e.g. SHA, branch, tag)\",\n metavar=\"\",\n )\n import_parser.add_argument(\n \"--file\",\n help=\"Specify name of the DVC-file this command will generate.\",\n metavar=\"\",\n )\n import_parser.add_argument(\n \"--no-exec\",\n action=\"store_true\",\n default=False,\n help=\"Only create DVC-file without actually downloading it.\",\n )\n import_parser.add_argument(\n \"--desc\",\n type=str,\n metavar=\"\",\n help=(\n \"User description of the data (optional). \"\n \"This doesn't affect any DVC operations.\"\n ),\n )\n import_parser.add_argument(\n \"-j\",\n \"--jobs\",\n type=int,\n help=(\n \"Number of jobs to run simultaneously. \"\n \"The default value is 4 * cpu_count(). \"\n \"For SSH remotes, the default is 4. \"\n ),\n metavar=\"\",\n )\n import_parser.set_defaults(func=CmdImport)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/repro.py_add_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/repro.py_add_parser_", "embedding": null, "metadata": {"file_path": "dvc/command/repro.py", "file_name": "repro.py", "file_type": "text/x-python", "category": "implementation", "start_line": 175, "end_line": 188, "span_ids": ["add_parser"], "tokens": 102}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n REPRO_HELP = (\n \"Reproduce complete or partial pipelines by executing their stages.\"\n )\n repro_parser = subparsers.add_parser(\n \"repro\",\n parents=[parent_parser],\n description=append_doc_link(REPRO_HELP, \"repro\"),\n help=REPRO_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n add_arguments(repro_parser)\n repro_parser.set_defaults(func=CmdRepro)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/daemon.py__spawn_posix__spawn_posix._pylint_disable_protect": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/daemon.py__spawn_posix__spawn_posix._pylint_disable_protect", "embedding": null, "metadata": {"file_path": "dvc/daemon.py", "file_name": "daemon.py", "file_type": "text/x-python", "category": "implementation", "start_line": 40, "end_line": 76, "span_ids": ["_spawn_posix"], "tokens": 271}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _spawn_posix(cmd, env):\n from dvc.main import main\n\n # NOTE: using os._exit instead of sys.exit, because dvc built\n # with PyInstaller has trouble with SystemExit exception and throws\n # errors such as \"[26338] Failed to execute script __main__\"\n try:\n pid = os.fork()\n if pid > 0:\n return\n except OSError:\n logger.exception(\"failed at first fork\")\n os._exit(1) # pylint: disable=protected-access\n\n os.setsid()\n\n try:\n pid = os.fork()\n if pid > 0:\n os._exit(0) # pylint: disable=protected-access\n except OSError:\n logger.exception(\"failed at second fork\")\n os._exit(1) # pylint: disable=protected-access\n\n sys.stdin.close()\n sys.stdout.close()\n sys.stderr.close()\n\n if platform.system() == \"Darwin\":\n # workaround for MacOS bug\n # https://github.com/iterative/dvc/issues/4294\n _popen(cmd, env=env).communicate()\n else:\n os.environ.update(env)\n main(cmd)\n\n os._exit(0) # pylint: disable=protected-access", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py_AsciiCanvas.point_AsciiCanvas.point.self_canvas_y_x_char": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py_AsciiCanvas.point_AsciiCanvas.point.self_canvas_y_x_char", "embedding": null, "metadata": {"file_path": "dvc/dagascii.py", "file_name": "dagascii.py", "file_type": "text/x-python", "category": "implementation", "start_line": 103, "end_line": 120, "span_ids": ["AsciiCanvas.point"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AsciiCanvas:\n\n def point(self, x, y, char):\n \"\"\"Create a point on ASCII canvas.\n\n Args:\n x (int): x coordinate. Should be >= 0 and < number of columns in\n the canvas.\n y (int): y coordinate. Should be >= 0 an < number of lines in the\n canvas.\n char (str): character to place in the specified point on the\n canvas.\n \"\"\"\n assert len(char) == 1\n assert x >= 0\n assert x < self.cols\n assert y >= 0\n assert y < self.lines\n\n self.canvas[y][x] = char", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py_AsciiCanvas.line_AsciiCanvas.line.if_dx_0_and_dy_0_.else_.for_y_in_range_y1_y0_1.self_point_x_y_char_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py_AsciiCanvas.line_AsciiCanvas.line.if_dx_0_and_dy_0_.else_.for_y_in_range_y1_y0_1.self_point_x_y_char_", "embedding": null, "metadata": {"file_path": "dvc/dagascii.py", "file_name": "dagascii.py", "file_type": "text/x-python", "category": "implementation", "start_line": 122, "end_line": 162, "span_ids": ["AsciiCanvas.line"], "tokens": 394}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AsciiCanvas:\n\n def line(self, x0, y0, x1, y1, char):\n \"\"\"Create a line on ASCII canvas.\n\n Args:\n x0 (int): x coordinate where the line should start.\n y0 (int): y coordinate where the line should start.\n x1 (int): x coordinate where the line should end.\n y1 (int): y coordinate where the line should end.\n char (str): character to draw the line with.\n \"\"\"\n # pylint: disable=too-many-arguments, too-many-branches\n if x0 > x1:\n x1, x0 = x0, x1\n y1, y0 = y0, y1\n\n dx = x1 - x0\n dy = y1 - y0\n\n if dx == 0 and dy == 0:\n self.point(x0, y0, char)\n elif abs(dx) >= abs(dy):\n for x in range(x0, x1 + 1):\n if dx == 0:\n y = y0\n else:\n y = y0 + int(round((x - x0) * dy / float(dx)))\n self.point(x, y, char)\n elif y0 < y1:\n for y in range(y0, y1 + 1):\n if dy == 0:\n x = x0\n else:\n x = x0 + int(round((y - y0) * dx / float(dy)))\n self.point(x, y, char)\n else:\n for y in range(y1, y0 + 1):\n if dy == 0:\n x = x0\n else:\n x = x1 + int(round((y - y1) * dx / float(dy)))\n self.point(x, y, char)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py_AsciiCanvas.text_AsciiCanvas.box.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py_AsciiCanvas.text_AsciiCanvas.box.None_3", "embedding": null, "metadata": {"file_path": "dvc/dagascii.py", "file_name": "dagascii.py", "file_type": "text/x-python", "category": "implementation", "start_line": 164, "end_line": 201, "span_ids": ["AsciiCanvas.text", "AsciiCanvas.box"], "tokens": 306}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AsciiCanvas:\n\n def text(self, x, y, text):\n \"\"\"Print a text on ASCII canvas.\n\n Args:\n x (int): x coordinate where the text should start.\n y (int): y coordinate where the text should start.\n text (str): string that should be printed.\n \"\"\"\n for i, char in enumerate(text):\n self.point(x + i, y, char)\n\n def box(self, x0, y0, width, height):\n \"\"\"Create a box on ASCII canvas.\n\n Args:\n x0 (int): x coordinate of the box corner.\n y0 (int): y coordinate of the box corner.\n width (int): box width.\n height (int): box height.\n \"\"\"\n assert width > 1\n assert height > 1\n\n width -= 1\n height -= 1\n\n for x in range(x0, x0 + width):\n self.point(x, y0, \"-\")\n self.point(x, y0 + height, \"-\")\n\n for y in range(y0, y0 + height):\n self.point(x0, y, \"|\")\n self.point(x0 + width, y, \"|\")\n\n self.point(x0, y0, \"+\")\n self.point(x0 + width, y0, \"+\")\n self.point(x0, y0 + height, \"+\")\n self.point(x0 + width, y0 + height, \"+\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py__build_sugiyama_layout__build_sugiyama_layout.return.sug": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py__build_sugiyama_layout__build_sugiyama_layout.return.sug", "embedding": null, "metadata": {"file_path": "dvc/dagascii.py", "file_name": "dagascii.py", "file_type": "text/x-python", "category": "implementation", "start_line": 204, "end_line": 242, "span_ids": ["_build_sugiyama_layout"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _build_sugiyama_layout(vertexes, edges):\n #\n # Just a reminder about naming conventions:\n # +------------X\n # |\n # |\n # |\n # |\n # Y\n #\n\n vertexes = {v: Vertex(f\" {v} \") for v in vertexes}\n # NOTE: reverting edges to correctly orientate the graph\n edges = [Edge(vertexes[e], vertexes[s]) for s, e in edges]\n vertexes = vertexes.values()\n graph = Graph(vertexes, edges)\n\n for vertex in vertexes:\n vertex.view = VertexViewer(vertex.data)\n\n # NOTE: determine min box length to create the best layout\n minw = min(v.view.w for v in vertexes)\n\n for edge in edges:\n edge.view = EdgeViewer()\n\n sug = SugiyamaLayout(graph.C[0])\n graph = graph.C[0]\n roots = list(filter(lambda x: len(x.e_in()) == 0, graph.sV))\n\n sug.init_all(roots=roots, optimize=True)\n\n sug.yspace = VertexViewer.HEIGHT\n sug.xspace = minw\n sug.route_edge = route_with_lines\n\n sug.draw()\n\n return sug", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py_draw_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py_draw_", "embedding": null, "metadata": {"file_path": "dvc/dagascii.py", "file_name": "dagascii.py", "file_type": "text/x-python", "category": "implementation", "start_line": 245, "end_line": 319, "span_ids": ["draw"], "tokens": 636}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def draw(vertexes, edges):\n \"\"\"Build a DAG and draw it in ASCII.\n\n Args:\n vertexes (list): list of graph vertexes.\n edges (list): list of graph edges.\n \"\"\"\n # pylint: disable=too-many-locals\n # NOTE: coordinates might me negative, so we need to shift\n # everything to the positive plane before we actually draw it.\n Xs = [] # pylint: disable=invalid-name\n Ys = [] # pylint: disable=invalid-name\n\n sug = _build_sugiyama_layout(vertexes, edges)\n\n for vertex in sug.g.sV:\n # NOTE: moving boxes w/2 to the left\n Xs.append(vertex.view.xy[0] - vertex.view.w / 2.0)\n Xs.append(vertex.view.xy[0] + vertex.view.w / 2.0)\n Ys.append(vertex.view.xy[1])\n Ys.append(vertex.view.xy[1] + vertex.view.h)\n\n for edge in sug.g.sE:\n for x, y in edge.view._pts: # pylint: disable=protected-access\n Xs.append(x)\n Ys.append(y)\n\n minx = min(Xs)\n miny = min(Ys)\n maxx = max(Xs)\n maxy = max(Ys)\n\n canvas_cols = int(math.ceil(math.ceil(maxx) - math.floor(minx))) + 1\n canvas_lines = int(round(maxy - miny))\n\n canvas = AsciiCanvas(canvas_cols, canvas_lines)\n\n # NOTE: first draw edges so that node boxes could overwrite them\n for edge in sug.g.sE:\n # pylint: disable=protected-access\n assert len(edge.view._pts) > 1\n for index in range(1, len(edge.view._pts)):\n start = edge.view._pts[index - 1]\n end = edge.view._pts[index]\n\n start_x = int(round(start[0] - minx))\n start_y = int(round(start[1] - miny))\n end_x = int(round(end[0] - minx))\n end_y = int(round(end[1] - miny))\n\n assert start_x >= 0\n assert start_y >= 0\n assert end_x >= 0\n assert end_y >= 0\n\n canvas.line(start_x, start_y, end_x, end_y, \"*\")\n\n for vertex in sug.g.sV:\n # NOTE: moving boxes w/2 to the left\n x = vertex.view.xy[0] - vertex.view.w / 2.0\n y = vertex.view.xy[1]\n\n canvas.box(\n int(round(x - minx)),\n int(round(y - miny)),\n vertex.view.w,\n vertex.view.h,\n )\n\n canvas.text(\n int(round(x - minx)) + 1, int(round(y - miny)) + 1, vertex.data\n )\n\n return canvas.draw()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/gs.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/gs.py__", "embedding": null, "metadata": {"file_path": "dvc/dependency/gs.py", "file_name": "gs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["imports", "GSDependency"], "tokens": 31}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.dependency.base import BaseDependency\nfrom dvc.output.gs import GSOutput\n\n\nclass GSDependency(BaseDependency, GSOutput):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/hdfs.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/hdfs.py__", "embedding": null, "metadata": {"file_path": "dvc/dependency/hdfs.py", "file_name": "hdfs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["imports", "HDFSDependency"], "tokens": 34}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.dependency.base import BaseDependency\nfrom dvc.output.hdfs import HDFSOutput\n\n\nclass HDFSDependency(BaseDependency, HDFSOutput):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/local.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/local.py__", "embedding": null, "metadata": {"file_path": "dvc/dependency/local.py", "file_name": "local.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["imports", "LocalDependency"], "tokens": 30}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.dependency.base import BaseDependency\nfrom dvc.output.local import LocalOutput\n\n\nclass LocalDependency(BaseDependency, LocalOutput):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/s3.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/s3.py__", "embedding": null, "metadata": {"file_path": "dvc/dependency/s3.py", "file_name": "s3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["imports", "S3Dependency"], "tokens": 34}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.dependency.base import BaseDependency\nfrom dvc.output.s3 import S3Output\n\n\nclass S3Dependency(BaseDependency, S3Output):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/ssh.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/ssh.py__", "embedding": null, "metadata": {"file_path": "dvc/dependency/ssh.py", "file_name": "ssh.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["imports", "SSHDependency"], "tokens": 31}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.dependency.base import BaseDependency\nfrom dvc.output.ssh import SSHOutput\n\n\nclass SSHDependency(BaseDependency, SSHOutput):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/gs.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/gs.py__", "embedding": null, "metadata": {"file_path": "dvc/output/gs.py", "file_name": "gs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 8, "span_ids": ["GSOutput", "imports"], "tokens": 30}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.output.base import BaseOutput\n\nfrom ..tree.gs import GSTree\n\n\nclass GSOutput(BaseOutput):\n TREE_CLS = GSTree", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/prompt.py__Manages_user_prompts__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/prompt.py__Manages_user_prompts__", "embedding": null, "metadata": {"file_path": "dvc/prompt.py", "file_name": "prompt.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 57, "span_ids": ["ask", "password", "confirm", "docstring"], "tokens": 267}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Manages user prompts.\"\"\"\n\nimport logging\nimport sys\nfrom getpass import getpass\n\nlogger = logging.getLogger(__name__)\n\n\ndef ask(prompt, limited_to=None):\n if not sys.stdout.isatty():\n return None\n\n while True:\n try:\n answer = input(prompt + \" \").lower()\n except EOFError:\n return None\n\n if not limited_to:\n return answer\n\n if answer in limited_to:\n return answer\n\n logger.info(\n \"Your response must be one of: {options}. \"\n \"Please try again.\".format(options=limited_to)\n )\n\n\ndef confirm(statement):\n \"\"\"Ask the user for confirmation about the specified statement.\n\n Args:\n statement (unicode): statement to ask the user confirmation about.\n\n Returns:\n bool: whether or not specified statement was confirmed.\n \"\"\"\n prompt = f\"{statement} [y/n]\"\n answer = ask(prompt, limited_to=[\"yes\", \"no\", \"y\", \"n\"])\n return answer and answer.startswith(\"y\")\n\n\ndef password(statement):\n \"\"\"Ask the user for a password.\n\n Args:\n statement (str): string to prompt the user with.\n\n Returns:\n str: password entered by the user.\n \"\"\"\n logger.info(f\"{statement}: \")\n return getpass(\"\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.used_cache_Repo.used_cache.return.cache": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.used_cache_Repo.used_cache.return.cache", "embedding": null, "metadata": {"file_path": "dvc/repo/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 284, "end_line": 350, "span_ids": ["Repo.used_cache"], "tokens": 438}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Repo:\n\n def used_cache(\n self,\n targets=None,\n all_branches=False,\n with_deps=False,\n all_tags=False,\n all_commits=False,\n all_experiments=False,\n remote=None,\n force=False,\n jobs=None,\n recursive=False,\n used_run_cache=None,\n revs=None,\n ):\n \"\"\"Get the stages related to the given target and collect\n the `info` of its outputs.\n\n This is useful to know what files from the cache are _in use_\n (namely, a file described as an output on a stage).\n\n The scope is, by default, the working directory, but you can use\n `all_branches`/`all_tags`/`all_commits`/`all_experiments` to expand\n the scope.\n\n Returns:\n A dictionary with Schemes (representing output's location) mapped\n to items containing the output's `dumpd` names and the output's\n children (if the given output is a directory).\n \"\"\"\n from dvc.cache import NamedCache\n\n cache = NamedCache()\n\n for branch in self.brancher(\n revs=revs,\n all_branches=all_branches,\n all_tags=all_tags,\n all_commits=all_commits,\n all_experiments=all_experiments,\n ):\n targets = targets or [None]\n\n pairs = cat(\n self.stage.collect_granular(\n target, recursive=recursive, with_deps=with_deps\n )\n for target in targets\n )\n\n suffix = f\"({branch})\" if branch else \"\"\n for stage, filter_info in pairs:\n used_cache = stage.get_used_cache(\n remote=remote,\n force=force,\n jobs=jobs,\n filter_info=filter_info,\n )\n cache.update(used_cache, suffix=suffix)\n\n if used_run_cache:\n used_cache = self.stage_cache.get_used_cache(\n used_run_cache, remote=remote, force=force, jobs=jobs,\n )\n cache.update(used_cache)\n\n return cache", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/destroy.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/destroy.py__", "embedding": null, "metadata": {"file_path": "dvc/repo/destroy.py", "file_name": "destroy.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 18, "span_ids": ["_destroy_stages", "imports", "destroy"], "tokens": 106}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.utils.fs import remove\n\nfrom . import locked\n\n\n@locked\ndef _destroy_stages(repo):\n for stage in repo.stages:\n stage.unprotect_outs()\n stage.dvcfile.remove(force=True)\n\n\n# NOTE: not locking `destroy`, as `remove` will need to delete `.dvc` dir,\n# which will cause issues on Windows, as `.dvc/lock` will be busy.\ndef destroy(repo):\n _destroy_stages(repo)\n remove(repo.dvc_dir)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/install.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/install.py__", "embedding": null, "metadata": {"file_path": "dvc/repo/install.py", "file_name": "install.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["install"], "tokens": 19}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def install(self, use_pre_commit_tool):\n self.scm.install(use_pre_commit_tool)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/move.py_os_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/move.py_os_", "embedding": null, "metadata": {"file_path": "dvc/repo/move.py", "file_name": "move.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 75, "span_ids": ["imports", "_expand_target_path", "move"], "tokens": 471}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nfrom dvc.exceptions import MoveNotDataSourceError\nfrom dvc.repo.scm_context import scm_context\n\nfrom . import locked\n\n\ndef _expand_target_path(from_path, to_path):\n if os.path.isdir(to_path):\n return os.path.join(to_path, os.path.basename(from_path))\n return to_path\n\n\n@locked\n@scm_context\ndef move(self, from_path, to_path):\n \"\"\"\n Renames an output file and modifies the stage associated\n to reflect the change on the pipeline.\n\n If the output has the same name as its stage, it would\n also rename the corresponding DVC-file.\n\n E.g.\n Having: (hello, hello.dvc)\n\n $ dvc move hello greetings\n\n Result: (greeting, greeting.dvc)\n\n It only works with outputs generated by `add` or `import`,\n also known as data sources.\n \"\"\"\n import dvc.output as Output\n from dvc.stage import Stage\n\n from ..dvcfile import DVC_FILE_SUFFIX, Dvcfile\n\n from_out = Output.loads_from(Stage(self), [from_path])[0]\n assert from_out.scheme == \"local\"\n\n to_path = _expand_target_path(from_path, to_path)\n\n outs = self.find_outs_by_path(from_out.fspath)\n assert len(outs) == 1\n out = outs[0]\n stage = out.stage\n\n if not stage.is_data_source:\n raise MoveNotDataSourceError(stage.addressing)\n\n stage_name = os.path.splitext(os.path.basename(stage.path))[0]\n from_name = os.path.basename(from_out.fspath)\n if stage_name == from_name:\n os.unlink(stage.path)\n\n stage.path = os.path.join(\n os.path.dirname(to_path),\n os.path.basename(to_path) + DVC_FILE_SUFFIX,\n )\n\n stage.wdir = os.path.abspath(\n os.path.join(os.curdir, os.path.dirname(to_path))\n )\n\n to_path = os.path.relpath(to_path, stage.wdir)\n\n to_out = Output.loads_from(stage, [to_path], out.use_cache, out.metric)[0]\n\n out.move(to_out)\n stage.save()\n\n Dvcfile(self, stage.path).dump(stage)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/remove.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/remove.py__", "embedding": null, "metadata": {"file_path": "dvc/repo/remove.py", "file_name": "remove.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 20, "span_ids": ["imports", "remove"], "tokens": 83}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport typing\n\nfrom . import locked\n\nif typing.TYPE_CHECKING:\n from dvc.repo import Repo\n\nlogger = logging.getLogger(__name__)\n\n\n@locked\ndef remove(self: \"Repo\", target: str, outs: bool = False):\n stages = self.stage.from_target(target)\n\n for stage in stages:\n stage.remove(remove_outs=outs, force=outs)\n\n return stages", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/status.py__cloud_status__cloud_status.return.ret": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/status.py__cloud_status__cloud_status.return.ret", "embedding": null, "metadata": {"file_path": "dvc/repo/status.py", "file_name": "status.py", "file_type": "text/x-python", "category": "implementation", "start_line": 39, "end_line": 109, "span_ids": ["_cloud_status"], "tokens": 408}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _cloud_status(\n self,\n targets=None,\n jobs=None,\n remote=None,\n all_branches=False,\n with_deps=False,\n all_tags=False,\n recursive=False,\n all_commits=False,\n):\n \"\"\"Returns a dictionary with the files that are new or deleted.\n\n - new: Remote doesn't have the file\n - deleted: File is no longer in the local cache\n - missing: File doesn't exist neither in the cache, neither in remote\n\n Example:\n Given the following commands:\n\n $ echo \"foo\" > foo\n $ echo \"bar\" > bar\n $ dvc add foo bar\n $ dvc status -c\n\n It will return something like:\n\n { \"foo\": \"new\", \"bar\": \"new\" }\n\n Now, after pushing and removing \"bar\" from the local cache:\n\n $ dvc push\n $ rm .dvc/cache/c1/57a79031e1c40f85931829bc5fc552\n\n The result would be:\n\n { \"bar\": \"deleted\" }\n \"\"\"\n import dvc.remote.base as cloud\n\n used = self.used_cache(\n targets,\n all_branches=all_branches,\n all_tags=all_tags,\n all_commits=all_commits,\n with_deps=with_deps,\n force=True,\n remote=remote,\n jobs=jobs,\n recursive=recursive,\n )\n\n ret = {}\n status_info = self.cloud.status(\n used, jobs, remote=remote, log_missing=False\n )\n for info in status_info.values():\n name = info[\"name\"]\n status_ = info[\"status\"]\n if status_ == cloud.STATUS_OK:\n continue\n\n prefix_map = {\n cloud.STATUS_DELETED: \"deleted\",\n cloud.STATUS_NEW: \"new\",\n cloud.STATUS_MISSING: \"missing\",\n }\n\n ret[name] = prefix_map[status_]\n\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/status.py_status_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/status.py_status_", "embedding": null, "metadata": {"file_path": "dvc/repo/status.py", "file_name": "status.py", "file_type": "text/x-python", "category": "implementation", "start_line": 106, "end_line": 148, "span_ids": ["status"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@locked\ndef status(\n self,\n targets=None,\n jobs=None,\n cloud=False,\n remote=None,\n all_branches=False,\n with_deps=False,\n all_tags=False,\n all_commits=False,\n recursive=False,\n):\n if isinstance(targets, str):\n targets = [targets]\n\n if cloud or remote:\n return _cloud_status(\n self,\n targets,\n jobs,\n all_branches=all_branches,\n with_deps=with_deps,\n remote=remote,\n all_tags=all_tags,\n all_commits=all_commits,\n recursive=True,\n )\n\n ignored = list(\n compress(\n [\"--all-branches\", \"--all-tags\", \"--all-commits\", \"--jobs\"],\n [all_branches, all_tags, all_commits, jobs],\n )\n )\n if ignored:\n msg = \"The following options are meaningless for local status: {}\"\n raise InvalidArgumentError(msg.format(\", \".join(ignored)))\n\n return _local_status(\n self, targets, with_deps=with_deps, recursive=recursive\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/__init__.py__Manages_source_control_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/__init__.py__Manages_source_control_", "embedding": null, "metadata": {"file_path": "dvc/scm/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 34, "span_ids": ["NoSCM", "SCM", "NoSCM.__getattr__", "docstring"], "tokens": 225}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Manages source control systems (e.g. Git).\"\"\"\n\nfrom dvc.scm.base import Base, NoSCMError\nfrom dvc.scm.git import Git\n\n\n# Syntactic sugar to signal that this is an actual implementation for a DVC\n# project under no SCM control.\nclass NoSCM(Base):\n def __getattr__(self, name):\n raise NoSCMError\n\n\ndef SCM(\n root_dir, search_parent_directories=True, no_scm=False\n): # pylint: disable=invalid-name\n \"\"\"Returns SCM instance that corresponds to a repo at the specified\n path.\n\n Args:\n root_dir (str): path to a root directory of the repo.\n search_parent_directories (bool): whether to look for repo root in\n parent directories.\n no_scm (bool): return NoSCM if True.\n\n Returns:\n dvc.scm.base.Base: SCM instance.\n \"\"\"\n\n if no_scm:\n return NoSCM(root_dir)\n\n return Git(root_dir, search_parent_directories=search_parent_directories)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State._prepare_db_State._prepare_db.None_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State._prepare_db_State._prepare_db.None_4", "embedding": null, "metadata": {"file_path": "dvc/state.py", "file_name": "state.py", "file_type": "text/x-python", "category": "implementation", "start_line": 199, "end_line": 244, "span_ids": ["State._prepare_db"], "tokens": 356}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class State(StateBase):\n\n def _prepare_db(self, empty=False):\n from dvc import __version__\n\n if not empty:\n cmd = \"PRAGMA user_version;\"\n self._execute(cmd)\n ret = self._fetchall()\n assert len(ret) == 1\n assert len(ret[0]) == 1\n assert isinstance(ret[0][0], int)\n version = ret[0][0]\n\n if version > self.VERSION:\n raise StateVersionTooNewError(\n __version__, self.VERSION, version\n )\n elif version < self.VERSION:\n logger.warning(\n \"State file version '%d' is too old. \"\n \"Reformatting to the current version '%d'.\",\n version,\n self.VERSION,\n )\n cmd = \"DROP TABLE IF EXISTS {};\"\n self._execute(cmd.format(self.STATE_TABLE))\n self._execute(cmd.format(self.STATE_INFO_TABLE))\n self._execute(cmd.format(self.LINK_STATE_TABLE))\n\n # Check that the state file is indeed a database\n cmd = \"CREATE TABLE IF NOT EXISTS {} ({})\"\n self._execute(cmd.format(self.STATE_TABLE, self.STATE_TABLE_LAYOUT))\n self._execute(\n cmd.format(self.STATE_INFO_TABLE, self.STATE_INFO_TABLE_LAYOUT)\n )\n self._execute(\n cmd.format(self.LINK_STATE_TABLE, self.LINK_STATE_TABLE_LAYOUT)\n )\n\n cmd = (\n \"INSERT OR IGNORE INTO {} (count) SELECT 0 \"\n \"WHERE NOT EXISTS (SELECT * FROM {})\"\n )\n self._execute(cmd.format(self.STATE_INFO_TABLE, self.STATE_INFO_TABLE))\n\n cmd = \"PRAGMA user_version = {};\"\n self._execute(cmd.format(self.VERSION))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State.load_State._vacuum.self.database.isolation_level_1._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State.load_State._vacuum.self.database.isolation_level_1._", "embedding": null, "metadata": {"file_path": "dvc/state.py", "file_name": "state.py", "file_type": "text/x-python", "category": "implementation", "start_line": 246, "end_line": 282, "span_ids": ["State.load", "State._vacuum"], "tokens": 295}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class State(StateBase):\n\n def load(self):\n \"\"\"Loads state database.\"\"\"\n retries = 1\n while True:\n assert self.database is None\n assert self.cursor is None\n assert self.inserts == 0\n empty = not os.path.exists(self.state_file)\n # NOTE: we use nolock option because fcntl() lock sqlite uses\n # doesn't work on some older NFS/CIFS filesystems.\n # This opens a possibility of data corruption by concurrent writes,\n # which is prevented by repo lock.\n self.database = _connect_sqlite(self.state_file, {\"nolock\": 1})\n self.cursor = self.database.cursor()\n\n # Try loading once to check that the file is indeed a database\n # and reformat it if it is not.\n try:\n self._prepare_db(empty=empty)\n return\n except sqlite3.DatabaseError:\n self.cursor.close()\n self.database.close()\n self.database = None\n self.cursor = None\n self.inserts = 0\n if retries > 0:\n os.unlink(self.state_file)\n retries -= 1\n else:\n raise\n\n def _vacuum(self):\n # NOTE: see https://bugs.python.org/issue28518\n self.database.isolation_level = None\n self._execute(\"VACUUM\")\n self.database.isolation_level = \"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State.dump_State.dump.self.inserts.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State.dump_State.dump.self.inserts.0", "embedding": null, "metadata": {"file_path": "dvc/state.py", "file_name": "state.py", "file_type": "text/x-python", "category": "implementation", "start_line": 284, "end_line": 331, "span_ids": ["State.dump"], "tokens": 355}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class State(StateBase):\n\n def dump(self):\n \"\"\"Saves state database.\"\"\"\n assert self.database is not None\n\n cmd = \"SELECT count from {} WHERE rowid=?\".format(\n self.STATE_INFO_TABLE\n )\n self._execute(cmd, (self.STATE_INFO_ROW,))\n ret = self._fetchall()\n assert len(ret) == 1\n assert len(ret[0]) == 1\n count = self._from_sqlite(ret[0][0]) + self.inserts\n\n if count > self.row_limit:\n msg = \"cleaning up state, this might take a while.\"\n logger.warning(msg)\n\n delete = count - self.row_limit\n delete += int(self.row_limit * (self.row_cleanup_quota / 100.0))\n cmd = (\n \"DELETE FROM {} WHERE timestamp IN (\"\n \"SELECT timestamp FROM {} ORDER BY timestamp ASC LIMIT {});\"\n )\n self._execute(\n cmd.format(self.STATE_TABLE, self.STATE_TABLE, delete)\n )\n\n self._vacuum()\n\n cmd = \"SELECT COUNT(*) FROM {}\"\n\n self._execute(cmd.format(self.STATE_TABLE))\n ret = self._fetchall()\n assert len(ret) == 1\n assert len(ret[0]) == 1\n count = ret[0][0]\n\n cmd = \"UPDATE {} SET count = ? WHERE rowid = ?\".format(\n self.STATE_INFO_TABLE\n )\n self._execute(cmd, (self._to_sqlite(count), self.STATE_INFO_ROW))\n\n self.database.commit()\n self.cursor.close()\n self.database.close()\n self.database = None\n self.cursor = None\n self.inserts = 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/system.py_System._reflink_darwin_System._reflink_darwin.return.clonefile_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/system.py_System._reflink_darwin_System._reflink_darwin.return.clonefile_", "embedding": null, "metadata": {"file_path": "dvc/system.py", "file_name": "system.py", "file_type": "text/x-python", "category": "implementation", "start_line": 48, "end_line": 77, "span_ids": ["System._reflink_darwin"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class System:\n\n @staticmethod\n def _reflink_darwin(src, dst):\n import ctypes\n\n LIBC = \"libc.dylib\"\n LIBC_FALLBACK = \"/usr/lib/libSystem.dylib\"\n try:\n clib = ctypes.CDLL(LIBC)\n except OSError as exc:\n logger.debug(\n \"unable to access '{}' (errno '{}'). \"\n \"Falling back to '{}'.\".format(LIBC, exc.errno, LIBC_FALLBACK)\n )\n if exc.errno != errno.ENOENT:\n raise\n # NOTE: trying to bypass System Integrity Protection (SIP)\n clib = ctypes.CDLL(LIBC_FALLBACK)\n\n if not hasattr(clib, \"clonefile\"):\n return -1\n\n clonefile = clib.clonefile\n clonefile.argtypes = [ctypes.c_char_p, ctypes.c_char_p, ctypes.c_int]\n clonefile.restype = ctypes.c_int\n\n return clonefile(\n ctypes.c_char_p(os.fsencode(src)),\n ctypes.c_char_p(os.fsencode(dst)),\n ctypes.c_int(0),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/system.py_System.inode_System.inode.return.inode": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/system.py_System.inode_System.inode.return.inode", "embedding": null, "metadata": {"file_path": "dvc/system.py", "file_name": "system.py", "file_type": "text/x-python", "category": "implementation", "start_line": 160, "end_line": 186, "span_ids": ["System.inode"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class System:\n\n @staticmethod\n def inode(path):\n path = os.fspath(path)\n\n if System.is_unix():\n import ctypes\n\n inode = os.lstat(path).st_ino\n # NOTE: See https://bugs.python.org/issue29619 and\n # https://stackoverflow.com/questions/34643289/\n # pythons-os-stat-is-returning-wrong-inode-value\n inode = ctypes.c_ulong(inode).value\n else:\n # getdirinfo from ntfsutils works on both files and dirs\n info = System._getdirinfo(path)\n inode = abs(\n hash(\n (\n info.dwVolumeSerialNumber,\n info.nFileIndexHigh,\n info.nFileIndexLow,\n )\n )\n )\n assert inode >= 0\n assert inode < 2 ** 64\n return inode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/hooks/hook-google_compute_engine.logger.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/hooks/hook-google_compute_engine.logger.py__", "embedding": null, "metadata": {"file_path": "scripts/hooks/hook-google_compute_engine.logger.py", "file_name": "hook-google_compute_engine.logger.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["imports"], "tokens": 39}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from PyInstaller.utils.hooks import ( # pylint:disable=import-error\n copy_metadata,\n)\n\ndatas = copy_metadata(\"google-compute-engine\")\nhiddenimports = [\"google_cloud_engine\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/innosetup/config_gen.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/innosetup/config_gen.py__", "embedding": null, "metadata": {"file_path": "scripts/innosetup/config_gen.py", "file_name": "config_gen.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 12, "span_ids": ["docstring"], "tokens": 68}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# This script generates config.ini for setup.iss script\nimport configparser\n\nfrom dvc import __version__\n\nconfig = configparser.ConfigParser()\nconfig.add_section(\"Version\")\nconfig.set(\"Version\", \"Version\", __version__)\n\nwith open(\"scripts/innosetup/config.ini\", \"w\") as f:\n config.write(f)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/add.py_add_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/add.py_add_parser_", "embedding": null, "metadata": {"file_path": "dvc/command/add.py", "file_name": "add.py", "file_type": "text/x-python", "category": "implementation", "start_line": 33, "end_line": 86, "span_ids": ["add_parser"], "tokens": 327}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n ADD_HELP = \"Track data files or directories with DVC.\"\n\n parser = subparsers.add_parser(\n \"add\",\n parents=[parent_parser],\n description=append_doc_link(ADD_HELP, \"add\"),\n help=ADD_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n parser.add_argument(\n \"-R\",\n \"--recursive\",\n action=\"store_true\",\n default=False,\n help=\"Recursively add files under directory targets.\",\n )\n parser.add_argument(\n \"--no-commit\",\n action=\"store_true\",\n default=False,\n help=\"Don't put files/directories into cache.\",\n )\n parser.add_argument(\n \"--external\",\n action=\"store_true\",\n default=False,\n help=\"Allow targets that are outside of the DVC repository.\",\n )\n parser.add_argument(\n \"--glob\",\n action=\"store_true\",\n default=False,\n help=\"Allows targets containing shell-style wildcards.\",\n )\n parser.add_argument(\n \"--file\",\n help=\"Specify name of the DVC-file this command will generate.\",\n metavar=\"\",\n )\n parser.add_argument(\n \"--desc\",\n type=str,\n metavar=\"\",\n help=(\n \"User description of the data (optional). \"\n \"This doesn't affect any DVC operations.\"\n ),\n )\n parser.add_argument(\n \"targets\", nargs=\"+\", help=\"Input files/directories to add.\",\n ).complete = completion.FILE\n parser.set_defaults(func=CmdAdd)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/init.py_add_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/init.py_add_parser_", "embedding": null, "metadata": {"file_path": "dvc/command/init.py", "file_name": "init.py", "file_type": "text/x-python", "category": "implementation", "start_line": 30, "end_line": 72, "span_ids": ["add_parser"], "tokens": 283}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n \"\"\"Setup parser for `dvc init`.\"\"\"\n INIT_HELP = \"Initialize DVC in the current directory.\"\n INIT_DESCRIPTION = (\n \"Initialize DVC in the current directory. Expects directory\\n\"\n \"to be a Git repository unless --no-scm option is specified.\"\n )\n\n init_parser = subparsers.add_parser(\n \"init\",\n parents=[parent_parser],\n description=append_doc_link(INIT_DESCRIPTION, \"init\"),\n help=INIT_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n init_parser.add_argument(\n \"--no-scm\",\n action=\"store_true\",\n default=False,\n help=\"Initiate DVC in directory that is \"\n \"not tracked by any SCM tool (e.g. Git).\",\n )\n init_parser.add_argument(\n \"-f\",\n \"--force\",\n action=\"store_true\",\n default=False,\n help=(\n \"Overwrite existing '.dvc/' directory. \"\n \"This operation removes local cache.\"\n ),\n )\n init_parser.add_argument(\n \"--subdir\",\n action=\"store_true\",\n default=False,\n help=(\n \"Necessary for running this command inside a subdirectory of a \"\n \"parent SCM repository.\"\n ),\n )\n init_parser.set_defaults(func=CmdInit)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/metrics/show.py_show_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/metrics/show.py_show_", "embedding": null, "metadata": {"file_path": "dvc/repo/metrics/show.py", "file_name": "show.py", "file_type": "text/x-python", "category": "implementation", "start_line": 80, "end_line": 129, "span_ids": ["show"], "tokens": 272}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@locked\ndef show(\n repo,\n targets=None,\n all_branches=False,\n all_tags=False,\n recursive=False,\n revs=None,\n all_commits=False,\n):\n res = {}\n metrics_found = False\n\n for rev in repo.brancher(\n revs=revs,\n all_branches=all_branches,\n all_tags=all_tags,\n all_commits=all_commits,\n ):\n metrics = _collect_metrics(repo, targets, rev, recursive)\n\n if not metrics_found and metrics:\n metrics_found = True\n\n vals = _read_metrics(repo, metrics, rev)\n\n if vals:\n res[rev] = vals\n\n if not res:\n if metrics_found:\n raise NoMetricsParsedError(\"metrics\")\n elif targets:\n raise MetricDoesNotExistError(targets)\n else:\n raise NoMetricsFoundError(\"metrics\", \"-m/-M\")\n\n # Hide workspace metrics if they are the same as in the active branch\n try:\n active_branch = repo.scm.active_branch()\n except (TypeError, SCMError):\n # TypeError - detached head\n # SCMError - no repo case\n pass\n else:\n if res.get(\"workspace\") == res.get(active_branch):\n res.pop(\"workspace\", None)\n\n return res", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/base.py_Base_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/base.py_Base_", "embedding": null, "metadata": {"file_path": "dvc/scm/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 37, "end_line": 177, "span_ids": ["Base.untracked_files", "Base.checkout", "Base.tag", "Base.close", "Base.dir", "Base.ignore", "Base.reset_ignores", "Base.track_changed_files", "Base.is_repo", "Base.commit", "Base.reset_tracked_files", "Base.root_dir", "Base.list_tags", "Base.branch", "Base.cleanup_ignores", "Base.belongs_to_scm", "Base.add", "Base.install", "Base.list_all_commits", "Base.is_ignored", "Base.remind_to_track", "Base.ignore_file", "Base.active_branch", "Base.is_tracked", "Base.is_dirty", "Base.__repr__", "Base", "Base.track_file", "Base.__init__", "Base.ignore_list", "Base.is_submodule", "Base.ignore_remove", "Base.list_branches"], "tokens": 907}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Base:\n \"\"\"Base class for source control management driver implementations.\"\"\"\n\n def __init__(self, root_dir=os.curdir):\n self._root_dir = os.path.realpath(root_dir)\n\n @property\n def root_dir(self) -> str:\n return self._root_dir\n\n def __repr__(self):\n return \"{class_name}: '{directory}'\".format(\n class_name=type(self).__name__, directory=self.dir\n )\n\n @property\n def dir(self):\n \"\"\"Path to a directory with SCM specific information.\"\"\"\n return None\n\n @staticmethod\n def is_repo(root_dir): # pylint: disable=unused-argument\n \"\"\"Returns whether or not root_dir is a valid SCM repository.\"\"\"\n return True\n\n @staticmethod\n def is_submodule(root_dir): # pylint: disable=unused-argument\n \"\"\"Returns whether or not root_dir is a valid SCM repository\n submodule.\n \"\"\"\n return True\n\n def is_ignored(self, path): # pylint: disable=unused-argument\n \"\"\"Returns whether or not path is ignored by SCM.\"\"\"\n return False\n\n def ignore(self, path): # pylint: disable=unused-argument\n \"\"\"Makes SCM ignore a specified path.\"\"\"\n\n def ignore_remove(self, path): # pylint: disable=unused-argument\n \"\"\"Makes SCM stop ignoring a specified path.\"\"\"\n\n @property\n def ignore_file(self):\n \"\"\"Filename for a file that contains ignored paths for this SCM.\"\"\"\n\n def ignore_list(self, p_list):\n \"\"\"Makes SCM ignore all paths specified in a list.\"\"\"\n return [self.ignore(path) for path in p_list]\n\n def add(self, paths):\n \"\"\"Makes SCM start tracking every path from a specified list of paths.\n \"\"\"\n\n def commit(self, msg):\n \"\"\"Makes SCM create a commit.\"\"\"\n\n def checkout(self, branch, create_new=False):\n \"\"\"Makes SCM checkout a branch.\"\"\"\n\n def branch(self, branch):\n \"\"\"Makes SCM create a branch with a specified name.\"\"\"\n\n def tag(self, tag):\n \"\"\"Makes SCM create a tag with a specified name.\"\"\"\n\n def untracked_files(self): # pylint: disable=no-self-use\n \"\"\"Returns a list of untracked files.\"\"\"\n return []\n\n def is_tracked(self, path): # pylint: disable=no-self-use, unused-argument\n \"\"\"Returns whether or not a specified path is tracked.\"\"\"\n return False\n\n def is_dirty(self):\n \"\"\"Return whether the SCM contains uncommitted changes.\"\"\"\n return False\n\n def active_branch(self): # pylint: disable=no-self-use\n \"\"\"Returns current branch in the repo.\"\"\"\n return \"\"\n\n def list_branches(self): # pylint: disable=no-self-use\n \"\"\"Returns a list of available branches in the repo.\"\"\"\n return []\n\n def list_tags(self): # pylint: disable=no-self-use\n \"\"\"Returns a list of available tags in the repo.\"\"\"\n return []\n\n def list_all_commits(self): # pylint: disable=no-self-use\n \"\"\"Returns a list of commits in the repo.\"\"\"\n return []\n\n def install(self, use_pre_commit_tool=False):\n \"\"\"\n Adds dvc commands to SCM hooks for the repo.\n\n If use_pre_commit_tool is set and pre-commit is\n installed it will be used to install the hooks.\n \"\"\"\n\n def cleanup_ignores(self):\n \"\"\"\n This method should clean up ignores (eg. entries in .gitignore),\n use, when method editing ignores (eg. add, run, import) fails to\n perform its task.\n \"\"\"\n\n def reset_ignores(self):\n \"\"\"\n Method to reset in-memory ignore storing mechanism.\n \"\"\"\n\n def reset_tracked_files(self):\n \"\"\"\n Method to reset in-memory tracked files storing mechanism.\n \"\"\"\n\n def remind_to_track(self):\n \"\"\"\n Method to remind user to track newly created files handled by scm\n \"\"\"\n\n def track_changed_files(self):\n \"\"\"\n Method to stage files that have changed\n \"\"\"\n\n def track_file(self, path):\n \"\"\"\n Method to add file to mechanism that will remind user\n to track new files\n \"\"\"\n\n def belongs_to_scm(self, path):\n \"\"\"Return boolean whether file belongs to scm\"\"\"\n\n def close(self):\n \"\"\" Method to close the files \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_gs.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_gs.py__", "embedding": null, "metadata": {"file_path": "tests/unit/dependency/test_gs.py", "file_name": "test_gs.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 8, "span_ids": ["imports", "TestGSDependency", "TestGSDependency._get_cls"], "tokens": 44}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.dependency.gs import GSDependency\nfrom tests.unit.dependency.test_local import TestLocalDependency\n\n\nclass TestGSDependency(TestLocalDependency):\n def _get_cls(self):\n return GSDependency", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_hdfs.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_hdfs.py__", "embedding": null, "metadata": {"file_path": "tests/unit/dependency/test_hdfs.py", "file_name": "test_hdfs.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 13, "span_ids": ["TestHDFSDependency", "imports", "TestHDFSDependency._get_cls"], "tokens": 82}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.dependency.hdfs import HDFSDependency\nfrom tests import PY39, PYARROW_NOT_AVAILABLE\nfrom tests.unit.dependency.test_local import TestLocalDependency\n\n\n@pytest.mark.skipif(PY39, reason=PYARROW_NOT_AVAILABLE)\n@pytest.mark.hdfs\nclass TestHDFSDependency(TestLocalDependency):\n def _get_cls(self):\n return HDFSDependency", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_http.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_http.py__", "embedding": null, "metadata": {"file_path": "tests/unit/dependency/test_http.py", "file_name": "test_http.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 8, "span_ids": ["imports", "TestHTTPDependency._get_cls", "TestHTTPDependency"], "tokens": 41}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.dependency.http import HTTPDependency\nfrom tests.unit.dependency.test_local import TestLocalDependency\n\n\nclass TestHTTPDependency(TestLocalDependency):\n def _get_cls(self):\n return HTTPDependency", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_local.py_mock_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_local.py_mock_", "embedding": null, "metadata": {"file_path": "tests/unit/dependency/test_local.py", "file_name": "test_local.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 21, "span_ids": ["imports", "TestLocalDependency.test_save_missing", "TestLocalDependency._get_dependency", "TestLocalDependency", "TestLocalDependency._get_cls"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import mock\n\nfrom dvc.dependency import LocalDependency\nfrom dvc.stage import Stage\nfrom tests.basic_env import TestDvc\n\n\nclass TestLocalDependency(TestDvc):\n def _get_cls(self):\n return LocalDependency\n\n def _get_dependency(self):\n stage = Stage(self.dvc)\n return self._get_cls()(stage, \"path\")\n\n def test_save_missing(self):\n d = self._get_dependency()\n with mock.patch.object(d.tree, \"exists\", return_value=False):\n with self.assertRaises(d.DoesNotExistError):\n d.save()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_s3.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_s3.py__", "embedding": null, "metadata": {"file_path": "tests/unit/dependency/test_s3.py", "file_name": "test_s3.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 8, "span_ids": ["imports", "TestS3Dependency", "TestS3Dependency._get_cls"], "tokens": 45}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.dependency.s3 import S3Dependency\nfrom tests.unit.dependency.test_local import TestLocalDependency\n\n\nclass TestS3Dependency(TestLocalDependency):\n def _get_cls(self):\n return S3Dependency", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_ssh.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_ssh.py__", "embedding": null, "metadata": {"file_path": "tests/unit/dependency/test_ssh.py", "file_name": "test_ssh.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 8, "span_ids": ["TestSSHDependency", "imports", "TestSSHDependency._get_cls"], "tokens": 42}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.dependency.ssh import SSHDependency\nfrom tests.unit.dependency.test_local import TestLocalDependency\n\n\nclass TestSSHDependency(TestLocalDependency):\n def _get_cls(self):\n return SSHDependency", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_gs.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_gs.py__", "embedding": null, "metadata": {"file_path": "tests/unit/output/test_gs.py", "file_name": "test_gs.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 8, "span_ids": ["imports", "TestGSOutput._get_cls", "TestGSOutput"], "tokens": 39}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.output.gs import GSOutput\nfrom tests.unit.output.test_local import TestLocalOutput\n\n\nclass TestGSOutput(TestLocalOutput):\n def _get_cls(self):\n return GSOutput", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_hdfs.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_hdfs.py__", "embedding": null, "metadata": {"file_path": "tests/unit/output/test_hdfs.py", "file_name": "test_hdfs.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 13, "span_ids": ["imports", "TestHDFSOutput._get_cls", "TestHDFSOutput"], "tokens": 79}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.output.hdfs import HDFSOutput\nfrom tests import PY39, PYARROW_NOT_AVAILABLE\nfrom tests.unit.output.test_local import TestLocalOutput\n\n\n@pytest.mark.skipif(PY39, reason=PYARROW_NOT_AVAILABLE)\n@pytest.mark.hdfs\nclass TestHDFSOutput(TestLocalOutput):\n def _get_cls(self):\n return HDFSOutput", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_local.py_TestGetFilesNumber_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_local.py_TestGetFilesNumber_", "embedding": null, "metadata": {"file_path": "tests/unit/output/test_local.py", "file_name": "test_local.py", "file_type": "text/x-python", "category": "test", "start_line": 72, "end_line": 102, "span_ids": ["TestGetFilesNumber.test_return_multiple_for_dir", "TestGetFilesNumber.test_return_0_on_no_cache", "TestGetFilesNumber", "TestGetFilesNumber.test_return_1_on_single_file_cache", "TestGetFilesNumber._get_output"], "tokens": 245}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestGetFilesNumber(TestDvc):\n def _get_output(self):\n stage = Stage(self.dvc)\n return LocalOutput(stage, \"path\")\n\n def test_return_0_on_no_cache(self):\n o = self._get_output()\n o.use_cache = False\n self.assertEqual(0, o.get_files_number())\n\n @patch.object(\n LocalCache,\n \"get_dir_cache\",\n return_value=DirInfo.from_list(\n [\n {\"relpath\": \"foo\", \"md5\": \"asdf\"},\n {\"relpath\": \"bar\", \"md5\": \"qwe\"},\n ]\n ),\n )\n def test_return_multiple_for_dir(self, _mock_get_dir_cache):\n o = self._get_output()\n o.hash_info = HashInfo(\"md5\", \"12345678.dir\")\n self.assertEqual(2, o.get_files_number())\n\n @patch.object(LocalOutput, \"is_dir_checksum\", False)\n def test_return_1_on_single_file_cache(self):\n o = self._get_output()\n o.hash_info = HashInfo(\"md5\", \"12345678\")\n self.assertEqual(1, o.get_files_number())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_s3.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_s3.py__", "embedding": null, "metadata": {"file_path": "tests/unit/output/test_s3.py", "file_name": "test_s3.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 8, "span_ids": ["imports", "TestS3Output._get_cls", "TestS3Output"], "tokens": 43}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.output.s3 import S3Output\nfrom tests.unit.output.test_local import TestLocalOutput\n\n\nclass TestS3Output(TestLocalOutput):\n def _get_cls(self):\n return S3Output", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_ssh.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_ssh.py__", "embedding": null, "metadata": {"file_path": "tests/unit/output/test_ssh.py", "file_name": "test_ssh.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 8, "span_ids": ["imports", "TestSSHOutput", "TestSSHOutput._get_cls"], "tokens": 40}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.output.ssh import SSHOutput\nfrom tests.unit.output.test_local import TestLocalOutput\n\n\nclass TestSSHOutput(TestLocalOutput):\n def _get_cls(self):\n return SSHOutput", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_prompt.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_prompt.py__", "embedding": null, "metadata": {"file_path": "tests/unit/test_prompt.py", "file_name": "test_prompt.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 16, "span_ids": ["TestConfirm.test_eof", "imports", "TestConfirm"], "tokens": 88}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from unittest import TestCase\n\nimport mock\n\nfrom dvc.prompt import confirm\n\n\nclass TestConfirm(TestCase):\n @mock.patch(\"sys.stdout.isatty\", return_value=True)\n @mock.patch(\"dvc.prompt.input\", side_effect=EOFError)\n def test_eof(self, mock_input, mock_isatty):\n ret = confirm(\"message\")\n mock_isatty.assert_called()\n mock_input.assert_called()\n self.assertFalse(ret)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_TestContainsLink_TestContainsLink.test_should_return_false_on_no_more_dirs_below_path.dirname_patch_assert_call": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_TestContainsLink_TestContainsLink.test_should_return_false_on_no_more_dirs_below_path.dirname_patch_assert_call", "embedding": null, "metadata": {"file_path": "tests/unit/utils/test_fs.py", "file_name": "test_fs.py", "file_type": "text/x-python", "category": "test", "start_line": 38, "end_line": 62, "span_ids": ["TestContainsLink.test_should_return_false_on_path_eq_to_base_path", "TestContainsLink.test_should_return_false_on_no_more_dirs_below_path", "TestContainsLink.test_should_raise_exception_on_base_path_not_in_path", "TestContainsLink.test_should_return_true_on_symlink_in_path", "TestContainsLink"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestContainsLink(TestCase):\n def test_should_raise_exception_on_base_path_not_in_path(self):\n with self.assertRaises(BasePathNotInCheckedPathException):\n contains_symlink_up_to(os.path.join(\"foo\", \"path\"), \"bar\")\n\n @patch.object(System, \"is_symlink\", return_value=True)\n def test_should_return_true_on_symlink_in_path(self, _):\n base_path = \"foo\"\n path = os.path.join(base_path, \"bar\")\n self.assertTrue(contains_symlink_up_to(path, base_path))\n\n @patch.object(System, \"is_symlink\", return_value=False)\n def test_should_return_false_on_path_eq_to_base_path(self, _):\n path = \"path\"\n self.assertFalse(contains_symlink_up_to(path, path))\n\n @patch.object(System, \"is_symlink\", return_value=False)\n @patch.object(os.path, \"dirname\", side_effect=lambda arg: arg)\n def test_should_return_false_on_no_more_dirs_below_path(\n self, dirname_patch, _\n ):\n self.assertFalse(\n contains_symlink_up_to(os.path.join(\"foo\", \"path\"), \"foo\")\n )\n dirname_patch.assert_called_once()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/diff.py_add_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/diff.py_add_parser_", "embedding": null, "metadata": {"file_path": "dvc/command/diff.py", "file_name": "diff.py", "file_type": "text/x-python", "category": "implementation", "start_line": 161, "end_line": 216, "span_ids": ["add_parser"], "tokens": 358}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n DIFF_DESCRIPTION = (\n \"Show added, modified, or deleted data between commits in the DVC\"\n \" repository, or between a commit and the workspace.\"\n )\n diff_parser = subparsers.add_parser(\n \"diff\",\n parents=[parent_parser],\n description=append_doc_link(DIFF_DESCRIPTION, \"diff\"),\n help=DIFF_DESCRIPTION,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n diff_parser.add_argument(\n \"--targets\",\n nargs=\"*\",\n help=(\n \"Limit command scope to these tracked files or directories. \"\n \"Accepts one or more file paths.\"\n ),\n ).complete = completion.FILE\n diff_parser.add_argument(\n \"a_rev\",\n help=\"Old Git commit to compare (defaults to HEAD)\",\n nargs=\"?\",\n default=\"HEAD\",\n )\n diff_parser.add_argument(\n \"b_rev\",\n help=(\"New Git commit to compare (defaults to the current workspace)\"),\n nargs=\"?\",\n )\n diff_parser.add_argument(\n \"--show-json\",\n help=\"Format the output into a JSON\",\n action=\"store_true\",\n default=False,\n )\n diff_parser.add_argument(\n \"--show-hash\",\n help=\"Display hash value for each entry\",\n action=\"store_true\",\n default=False,\n )\n diff_parser.add_argument(\n \"--show-md\",\n help=\"Show tabulated output in the Markdown format (GFM).\",\n action=\"store_true\",\n default=False,\n )\n diff_parser.add_argument(\n \"--hide-missing\",\n help=\"Hide missing cache file status.\",\n action=\"store_true\",\n )\n diff_parser.set_defaults(func=CmdDiff)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/daemon.py__spawn_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/daemon.py__spawn_", "embedding": null, "metadata": {"file_path": "dvc/daemon.py", "file_name": "daemon.py", "file_type": "text/x-python", "category": "implementation", "start_line": 79, "end_line": 110, "span_ids": ["_spawn", "daemon"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _spawn(cmd, env):\n logger.debug(f\"Trying to spawn '{cmd}'\")\n\n if os.name == \"nt\":\n _spawn_windows(cmd, env)\n elif os.name == \"posix\":\n _spawn_posix(cmd, env)\n else:\n raise NotImplementedError\n\n logger.debug(f\"Spawned '{cmd}'\")\n\n\ndef daemon(args):\n \"\"\"Launch a `dvc daemon` command in a detached process.\n\n Args:\n args (list): list of arguments to append to `dvc daemon` command.\n \"\"\"\n if os.environ.get(DVC_DAEMON):\n logger.debug(\"skipping launching a new daemon.\")\n return\n\n cmd = [\"daemon\", \"-q\"] + args\n\n env = fix_env()\n file_path = os.path.abspath(inspect.stack()[0][1])\n env[\"PYTHONPATH\"] = os.path.dirname(os.path.dirname(file_path))\n env[DVC_DAEMON] = \"1\"\n\n _spawn(cmd, env)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/env.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/env.py__", "embedding": null, "metadata": {"file_path": "dvc/env.py", "file_name": "env.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 5, "span_ids": ["impl"], "tokens": 42}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "DVC_CHECKPOINT = \"DVC_CHECKPOINT\"\nDVC_DAEMON = \"DVC_DAEMON\"\nDVC_PAGER = \"DVC_PAGER\"\nDVC_ROOT = \"DVC_ROOT\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/logger.py_setup_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/logger.py_setup_", "embedding": null, "metadata": {"file_path": "dvc/logger.py", "file_name": "logger.py", "file_type": "text/x-python", "category": "implementation", "start_line": 182, "end_line": 238, "span_ids": ["setup"], "tokens": 364}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def setup(level=logging.INFO):\n colorama.init()\n\n addLoggingLevel(\"TRACE\", logging.DEBUG - 5)\n logging.config.dictConfig(\n {\n \"version\": 1,\n \"filters\": {\n \"exclude_errors\": {\"()\": excludeFilter(logging.WARNING)},\n \"exclude_info\": {\"()\": excludeFilter(logging.INFO)},\n \"exclude_debug\": {\"()\": excludeFilter(logging.DEBUG)},\n },\n \"formatters\": {\"color\": {\"()\": ColorFormatter}},\n \"handlers\": {\n \"console_info\": {\n \"class\": \"dvc.logger.LoggerHandler\",\n \"level\": \"INFO\",\n \"formatter\": \"color\",\n \"stream\": \"ext://sys.stdout\",\n \"filters\": [\"exclude_errors\"],\n },\n \"console_debug\": {\n \"class\": \"dvc.logger.LoggerHandler\",\n \"level\": \"DEBUG\",\n \"formatter\": \"color\",\n \"stream\": \"ext://sys.stdout\",\n \"filters\": [\"exclude_info\"],\n },\n \"console_trace\": {\n \"class\": \"dvc.logger.LoggerHandler\",\n \"level\": \"TRACE\",\n \"formatter\": \"color\",\n \"stream\": \"ext://sys.stdout\",\n \"filters\": [\"exclude_debug\"],\n },\n \"console_errors\": {\n \"class\": \"dvc.logger.LoggerHandler\",\n \"level\": \"WARNING\",\n \"formatter\": \"color\",\n \"stream\": \"ext://sys.stderr\",\n },\n },\n \"loggers\": {\n \"dvc\": {\n \"level\": level,\n \"handlers\": [\n \"console_info\",\n \"console_debug\",\n \"console_trace\",\n \"console_errors\",\n ],\n },\n },\n \"disable_existing_loggers\": False,\n }\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State._file_metadata_changed_State._update_state_for_path_changed.self__execute_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State._file_metadata_changed_State._update_state_for_path_changed.self__execute_", "embedding": null, "metadata": {"file_path": "dvc/state.py", "file_name": "state.py", "file_type": "text/x-python", "category": "implementation", "start_line": 333, "end_line": 363, "span_ids": ["State._update_state_record_timestamp_for_inode", "State._file_metadata_changed", "State._update_state_for_path_changed"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class State(StateBase):\n\n @staticmethod\n def _file_metadata_changed(actual_mtime, mtime, actual_size, size):\n return actual_mtime != mtime or actual_size != size\n\n def _update_state_record_timestamp_for_inode(self, actual_inode):\n cmd = \"UPDATE {} SET timestamp = ? WHERE inode = ?\".format(\n self.STATE_TABLE\n )\n self._execute(\n cmd, (current_timestamp(), self._to_sqlite(actual_inode))\n )\n\n def _update_state_for_path_changed(\n self, actual_inode, actual_mtime, actual_size, checksum\n ):\n cmd = (\n \"UPDATE {} SET \"\n \"mtime = ?, size = ?, \"\n \"md5 = ?, timestamp = ? \"\n \"WHERE inode = ?\"\n ).format(self.STATE_TABLE)\n self._execute(\n cmd,\n (\n actual_mtime,\n actual_size,\n checksum,\n current_timestamp(),\n self._to_sqlite(actual_inode),\n ),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State._insert_new_state_record_State.get_state_record_for_inode.return.None": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State._insert_new_state_record_State.get_state_record_for_inode.return.None", "embedding": null, "metadata": {"file_path": "dvc/state.py", "file_name": "state.py", "file_type": "text/x-python", "category": "implementation", "start_line": 365, "end_line": 397, "span_ids": ["State.get_state_record_for_inode", "State._insert_new_state_record"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class State(StateBase):\n\n def _insert_new_state_record(\n self, actual_inode, actual_mtime, actual_size, checksum\n ):\n assert checksum is not None\n\n cmd = (\n \"INSERT INTO {}(inode, mtime, size, md5, timestamp) \"\n \"VALUES (?, ?, ?, ?, ?)\"\n ).format(self.STATE_TABLE)\n self._execute(\n cmd,\n (\n self._to_sqlite(actual_inode),\n actual_mtime,\n actual_size,\n checksum,\n current_timestamp(),\n ),\n )\n self.inserts += 1\n\n def get_state_record_for_inode(self, inode):\n cmd = (\n \"SELECT mtime, size, md5, timestamp from {} WHERE \"\n \"inode=?\".format(self.STATE_TABLE)\n )\n self._execute(cmd, (self._to_sqlite(inode),))\n results = self._fetchall()\n if results:\n # uniqueness constrain on inode\n assert len(results) == 1\n return results[0]\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State.save_State.save.self__update_state_for_pa": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State.save_State.save.self__update_state_for_pa", "embedding": null, "metadata": {"file_path": "dvc/state.py", "file_name": "state.py", "file_type": "text/x-python", "category": "implementation", "start_line": 400, "end_line": 424, "span_ids": ["State.save"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class State(StateBase):\n\n def save(self, path_info, hash_info):\n \"\"\"Save hash for the specified path info.\n\n Args:\n path_info (dict): path_info to save hash for.\n hash_info (HashInfo): hash to save.\n \"\"\"\n assert isinstance(path_info, str) or path_info.scheme == \"local\"\n assert hash_info\n assert isinstance(hash_info, HashInfo)\n assert os.path.exists(path_info)\n\n actual_mtime, actual_size = get_mtime_and_size(path_info, self.tree)\n actual_inode = get_inode(path_info)\n\n existing_record = self.get_state_record_for_inode(actual_inode)\n if not existing_record:\n self._insert_new_state_record(\n actual_inode, actual_mtime, actual_size, hash_info.value\n )\n return\n\n self._update_state_for_path_changed(\n actual_inode, actual_mtime, actual_size, hash_info.value\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/updater.py_Updater._notify_Updater._notify.logger_info_boxify_messag": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/updater.py_Updater._notify_Updater._notify.logger_info_boxify_messag", "embedding": null, "metadata": {"file_path": "dvc/updater.py", "file_name": "updater.py", "file_type": "text/x-python", "category": "implementation", "start_line": 98, "end_line": 116, "span_ids": ["Updater._notify"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Updater:\n\n def _notify(self, latest):\n if not sys.stdout.isatty():\n return\n\n message = (\n \"Update available {red}{current}{reset} -> {green}{latest}{reset}\"\n + \"\\n\"\n + self._get_update_instructions()\n ).format(\n red=colorama.Fore.RED,\n reset=colorama.Fore.RESET,\n green=colorama.Fore.GREEN,\n yellow=colorama.Fore.YELLOW,\n blue=colorama.Fore.BLUE,\n current=self.current,\n latest=latest,\n )\n\n logger.info(boxify(message, border_color=\"yellow\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py_boxify_boxify.return.box_str": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py_boxify_boxify.return.box_str", "embedding": null, "metadata": {"file_path": "dvc/utils/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 311, "end_line": 355, "span_ids": ["boxify"], "tokens": 324}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def boxify(message, border_color=None):\n \"\"\"Put a message inside a box.\n\n Args:\n message (unicode): message to decorate.\n border_color (unicode): name of the color to outline the box with.\n \"\"\"\n lines = message.split(\"\\n\")\n max_width = max(_visual_width(line) for line in lines)\n\n padding_horizontal = 5\n padding_vertical = 1\n\n box_size_horizontal = max_width + (padding_horizontal * 2)\n\n chars = {\"corner\": \"+\", \"horizontal\": \"-\", \"vertical\": \"|\", \"empty\": \" \"}\n\n margin = \"{corner}{line}{corner}\\n\".format(\n corner=chars[\"corner\"], line=chars[\"horizontal\"] * box_size_horizontal\n )\n\n padding_lines = [\n \"{border}{space}{border}\\n\".format(\n border=colorize(chars[\"vertical\"], color=border_color),\n space=chars[\"empty\"] * box_size_horizontal,\n )\n * padding_vertical\n ]\n\n content_lines = [\n \"{border}{space}{content}{space}{border}\\n\".format(\n border=colorize(chars[\"vertical\"], color=border_color),\n space=chars[\"empty\"] * padding_horizontal,\n content=_visual_center(line, max_width),\n )\n for line in lines\n ]\n\n box_str = \"{margin}{padding}{content}{padding}{margin}\".format(\n margin=colorize(margin, color=border_color),\n padding=\"\".join(padding_lines),\n content=\"\".join(content_lines),\n )\n\n return box_str", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/version.py__Used_in_setup_py_so_do__generate_version.return._base_version_short_sh": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/version.py__Used_in_setup_py_so_do__generate_version.return._base_version_short_sh", "embedding": null, "metadata": {"file_path": "dvc/version.py", "file_name": "version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 26, "span_ids": ["_generate_version", "docstring"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Used in setup.py, so don't pull any additional dependencies\n#\n# Based on:\n# - https://github.com/python/mypy/blob/master/mypy/version.py\n# - https://github.com/python/mypy/blob/master/mypy/git.py\nimport os\nimport subprocess\n\n_BASE_VERSION = \"1.11.0\"\n\n\ndef _generate_version(base_version):\n \"\"\"Generate a version with information about the Git repository.\"\"\"\n pkg_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\n if not _is_git_repo(pkg_dir) or not _have_git():\n return base_version\n\n if _is_release(pkg_dir, base_version) and not _is_dirty(pkg_dir):\n return base_version\n\n return \"{base_version}+{short_sha}{dirty}\".format(\n base_version=base_version,\n short_sha=_git_revision(pkg_dir).decode(\"utf-8\")[0:6],\n dirty=\".mod\" if _is_dirty(pkg_dir) else \"\",\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/version.py__is_git_repo_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/version.py__is_git_repo_", "embedding": null, "metadata": {"file_path": "dvc/version.py", "file_name": "version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 30, "end_line": 76, "span_ids": ["_have_git", "_is_dirty", "_is_release", "impl:3", "_git_revision", "_is_git_repo"], "tokens": 279}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _is_git_repo(dir_path):\n \"\"\"Is the given directory version-controlled with Git?\"\"\"\n return os.path.exists(os.path.join(dir_path, \".git\"))\n\n\ndef _have_git():\n \"\"\"Can we run the git executable?\"\"\"\n try:\n subprocess.check_output([\"git\", \"--help\"])\n return True\n except subprocess.CalledProcessError:\n return False\n except OSError:\n return False\n\n\ndef _is_release(dir_path, base_version):\n try:\n output = subprocess.check_output(\n [\"git\", \"describe\", \"--tags\", \"--exact-match\"],\n cwd=dir_path,\n stderr=subprocess.STDOUT,\n ).decode(\"utf-8\")\n tag = output.strip()\n return tag == base_version\n except subprocess.CalledProcessError:\n return False\n\n\ndef _git_revision(dir_path):\n \"\"\"Get SHA of the HEAD of a Git repository.\"\"\"\n return subprocess.check_output(\n [\"git\", \"rev-parse\", \"HEAD\"], cwd=dir_path\n ).strip()\n\n\ndef _is_dirty(dir_path):\n \"\"\"Check whether a git repository has uncommitted changes.\"\"\"\n try:\n subprocess.check_call([\"git\", \"diff\", \"--quiet\"], cwd=dir_path)\n return False\n except subprocess.CalledProcessError:\n return True\n\n\n__version__ = _generate_version(_BASE_VERSION)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestAddLocalRemoteFile_TestAddLocalRemoteFile.test.None_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestAddLocalRemoteFile_TestAddLocalRemoteFile.test.None_4", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 211, "end_line": 236, "span_ids": ["TestAddLocalRemoteFile.test", "TestAddLocalRemoteFile"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestAddLocalRemoteFile(TestDvc):\n def test(self):\n \"\"\"\n Making sure that 'remote' syntax is handled properly for local outs.\n \"\"\"\n cwd = os.getcwd()\n remote = \"myremote\"\n\n ret = main([\"remote\", \"add\", remote, cwd])\n self.assertEqual(ret, 0)\n\n self.dvc = DvcRepo()\n\n foo = f\"remote://{remote}/{self.FOO}\"\n ret = main([\"add\", foo])\n self.assertEqual(ret, 0)\n\n d = load_yaml(\"foo.dvc\")\n self.assertEqual(d[\"outs\"][0][\"path\"], foo)\n\n bar = os.path.join(cwd, self.BAR)\n ret = main([\"add\", bar])\n self.assertEqual(ret, 0)\n\n d = load_yaml(\"bar.dvc\")\n self.assertEqual(d[\"outs\"][0][\"path\"], self.BAR)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestCmdAdd_TestDoubleAddUnchanged.test_dir.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestCmdAdd_TestDoubleAddUnchanged.test_dir.None_1", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 200, "end_line": 222, "span_ids": ["TestCmdAdd.test", "TestDoubleAddUnchanged.test_file", "TestDoubleAddUnchanged", "TestDoubleAddUnchanged.test_dir", "TestCmdAdd"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCmdAdd(TestDvc):\n def test(self):\n ret = main([\"add\", self.FOO])\n self.assertEqual(ret, 0)\n\n ret = main([\"add\", \"non-existing-file\"])\n self.assertNotEqual(ret, 0)\n\n\nclass TestDoubleAddUnchanged(TestDvc):\n def test_file(self):\n ret = main([\"add\", self.FOO])\n self.assertEqual(ret, 0)\n\n ret = main([\"add\", self.FOO])\n self.assertEqual(ret, 0)\n\n def test_dir(self):\n ret = main([\"add\", self.DATA_DIR])\n self.assertEqual(ret, 0)\n\n ret = main([\"add\", self.DATA_DIR])\n self.assertEqual(ret, 0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestShouldThrowProperExceptionOnCorruptedStageFile_TestShouldThrowProperExceptionOnCorruptedStageFile.test.assert_expected_error_in_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestShouldThrowProperExceptionOnCorruptedStageFile_TestShouldThrowProperExceptionOnCorruptedStageFile.test.assert_expected_error_in_", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 427, "end_line": 447, "span_ids": ["TestShouldThrowProperExceptionOnCorruptedStageFile", "TestShouldThrowProperExceptionOnCorruptedStageFile.test"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestShouldThrowProperExceptionOnCorruptedStageFile(TestDvc):\n def test(self):\n ret = main([\"add\", self.FOO])\n assert 0 == ret\n\n foo_stage = relpath(self.FOO + DVC_FILE_SUFFIX)\n\n # corrupt stage file\n with open(foo_stage, \"a+\") as file:\n file.write(\"this will break yaml file structure\")\n\n self._caplog.clear()\n\n ret = main([\"add\", self.BAR])\n assert 1 == ret\n\n expected_error = (\n f\"unable to read: '{foo_stage}', YAML file structure is corrupted\"\n )\n\n assert expected_error in self._caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestAddFilename_TestAddFilename.test.None_10": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestAddFilename_TestAddFilename.test.None_10", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 450, "end_line": 475, "span_ids": ["TestAddFilename", "TestAddFilename.test"], "tokens": 251}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestAddFilename(TestDvc):\n def test(self):\n ret = main([\"add\", self.FOO, self.BAR, \"--file\", \"error.dvc\"])\n self.assertNotEqual(0, ret)\n\n ret = main([\"add\", \"-R\", self.DATA_DIR, \"--file\", \"error.dvc\"])\n self.assertNotEqual(0, ret)\n\n with self.assertRaises(RecursiveAddingWhileUsingFilename):\n self.dvc.add(self.DATA_DIR, recursive=True, fname=\"error.dvc\")\n\n ret = main([\"add\", self.DATA_DIR, \"--file\", \"data_directory.dvc\"])\n self.assertEqual(0, ret)\n self.assertTrue(os.path.exists(\"data_directory.dvc\"))\n\n ret = main([\"add\", self.FOO, \"--file\", \"bar.dvc\"])\n self.assertEqual(0, ret)\n self.assertTrue(os.path.exists(\"bar.dvc\"))\n self.assertFalse(os.path.exists(\"foo.dvc\"))\n\n os.remove(\"bar.dvc\")\n\n ret = main([\"add\", self.FOO, \"--file\", \"bar.dvc\"])\n self.assertEqual(0, ret)\n self.assertTrue(os.path.exists(\"bar.dvc\"))\n self.assertFalse(os.path.exists(\"foo.dvc\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cache.py_TestExternalCacheDir_TestExternalCacheDir.test_remote_references.assert_self_dvc_cache_ssh": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cache.py_TestExternalCacheDir_TestExternalCacheDir.test_remote_references.assert_self_dvc_cache_ssh", "embedding": null, "metadata": {"file_path": "tests/func/test_cache.py", "file_name": "test_cache.py", "file_type": "text/x-python", "category": "test", "start_line": 69, "end_line": 95, "span_ids": ["TestExternalCacheDir.test_remote_references", "TestExternalCacheDir.test", "TestExternalCacheDir"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestExternalCacheDir(TestDvc):\n def test(self):\n cache_dir = TestDvc.mkdtemp()\n\n ret = main([\"config\", \"cache.dir\", cache_dir])\n self.assertEqual(ret, 0)\n\n self.assertFalse(os.path.exists(self.dvc.cache.local.cache_dir))\n\n ret = main([\"add\", self.FOO])\n self.assertEqual(ret, 0)\n\n ret = main([\"add\", self.DATA_DIR])\n self.assertEqual(ret, 0)\n\n self.assertFalse(os.path.exists(\".dvc/cache\"))\n self.assertNotEqual(len(os.listdir(cache_dir)), 0)\n\n def test_remote_references(self):\n ssh_url = \"ssh://user@localhost:23\"\n assert main([\"remote\", \"add\", \"storage\", ssh_url]) == 0\n assert main([\"remote\", \"add\", \"cache\", \"remote://storage/tmp\"]) == 0\n assert main([\"config\", \"cache.ssh\", \"cache\"]) == 0\n\n self.dvc.__init__()\n\n assert self.dvc.cache.ssh.tree.path_info == ssh_url + \"/tmp\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cache.py_TestSharedCacheDir_TestSharedCacheDir.test.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cache.py_TestSharedCacheDir_TestSharedCacheDir.test.None_5", "embedding": null, "metadata": {"file_path": "tests/func/test_cache.py", "file_name": "test_cache.py", "file_type": "text/x-python", "category": "test", "start_line": 91, "end_line": 135, "span_ids": ["TestSharedCacheDir", "TestSharedCacheDir.test"], "tokens": 332}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSharedCacheDir(TestDir):\n def test(self):\n cache_dir = os.path.abspath(os.path.join(os.curdir, \"cache\"))\n for d in [\"dir1\", \"dir2\"]:\n os.mkdir(d)\n os.chdir(d)\n\n ret = main([\"init\", \"--no-scm\"])\n self.assertEqual(ret, 0)\n\n ret = main([\"config\", \"cache.dir\", cache_dir])\n self.assertEqual(ret, 0)\n\n self.assertFalse(os.path.exists(os.path.join(\".dvc\", \"cache\")))\n\n with open(\"common\", \"w+\") as fd:\n fd.write(\"common\")\n\n with open(\"unique\", \"w+\") as fd:\n fd.write(d)\n\n ret = main([\"add\", \"common\", \"unique\"])\n self.assertEqual(ret, 0)\n\n os.chdir(\"..\")\n\n self.assertFalse(os.path.exists(os.path.join(\"dir1\", \".dvc\", \"cache\")))\n self.assertFalse(os.path.exists(os.path.join(\"dir2\", \".dvc\", \"cache\")))\n\n subdirs = list(\n filter(\n lambda x: os.path.isdir(os.path.join(cache_dir, x)),\n os.listdir(cache_dir),\n )\n )\n self.assertEqual(len(subdirs), 3)\n self.assertEqual(\n len(os.listdir(os.path.join(cache_dir, subdirs[0]))), 1\n )\n self.assertEqual(\n len(os.listdir(os.path.join(cache_dir, subdirs[1]))), 1\n )\n self.assertEqual(\n len(os.listdir(os.path.join(cache_dir, subdirs[2]))), 1\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckout_TestCheckout._test_checkout.self_assertTrue_filecmp_c": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckout_TestCheckout._test_checkout.self_assertTrue_filecmp_c", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 34, "end_line": 57, "span_ids": ["TestCheckout._test_checkout", "TestCheckout.setUp", "TestCheckout.test", "TestCheckout"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCheckout(TestRepro):\n def setUp(self):\n super().setUp()\n\n stages = self.dvc.add(self.DATA_DIR)\n self.assertEqual(len(stages), 1)\n self.data_dir_stage = stages[0]\n self.assertTrue(self.data_dir_stage is not None)\n\n self.orig = \"orig\"\n shutil.copy(self.FOO, self.orig)\n os.unlink(self.FOO)\n\n self.orig_dir = \"orig_dir\"\n shutil.copytree(self.DATA_DIR, self.orig_dir)\n shutil.rmtree(self.DATA_DIR)\n\n def test(self):\n self.dvc.checkout(force=True)\n self._test_checkout()\n\n def _test_checkout(self):\n self.assertTrue(os.path.isfile(self.FOO))\n self.assertTrue(filecmp.cmp(self.FOO, self.orig, shallow=False))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutSingleStage_TestCheckoutCorruptedCacheFile.test.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutSingleStage_TestCheckoutCorruptedCacheFile.test.None_2", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 60, "end_line": 83, "span_ids": ["TestCheckoutCorruptedCacheFile", "TestCheckoutCorruptedCacheFile.test", "TestCheckoutSingleStage", "TestCheckoutSingleStage.test"], "tokens": 160}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCheckoutSingleStage(TestCheckout):\n def test(self):\n ret = main([\"checkout\", \"--force\", self.foo_stage.path])\n self.assertEqual(ret, 0)\n\n ret = main([\"checkout\", \"--force\", self.data_dir_stage.path])\n self.assertEqual(ret, 0)\n\n self._test_checkout()\n\n\nclass TestCheckoutCorruptedCacheFile(TestRepro):\n def test(self):\n cache = self.foo_stage.outs[0].cache_path\n\n os.chmod(cache, 0o644)\n with open(cache, \"a\") as fd:\n fd.write(\"1\")\n\n with pytest.raises(CheckoutError):\n self.dvc.checkout(force=True)\n\n self.assertFalse(os.path.isfile(self.FOO))\n self.assertFalse(os.path.isfile(cache))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutCorruptedCacheDir_TestCheckoutCorruptedCacheDir.test.self_assertFalse_os_path_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutCorruptedCacheDir_TestCheckoutCorruptedCacheDir.test.self_assertFalse_os_path_", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 89, "end_line": 117, "span_ids": ["TestCheckoutCorruptedCacheDir.test", "TestCheckoutCorruptedCacheDir"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCheckoutCorruptedCacheDir(TestDvc):\n def test(self):\n # NOTE: using 'copy' so that cache and link don't have same inode\n ret = main([\"config\", \"cache.type\", \"copy\"])\n self.assertEqual(ret, 0)\n\n self.dvc = DvcRepo(\".\")\n stages = self.dvc.add(self.DATA_DIR)\n self.assertEqual(len(stages), 1)\n self.assertEqual(len(stages[0].outs), 1)\n out = stages[0].outs[0]\n\n # NOTE: modifying cache file for one of the files inside the directory\n # to check if dvc will detect that the cache is corrupted.\n _, entry_hash = next(\n self.dvc.cache.local.load_dir_cache(out.hash_info).items()\n )\n cache = os.fspath(\n self.dvc.cache.local.tree.hash_to_path_info(entry_hash.value)\n )\n\n os.chmod(cache, 0o644)\n with open(cache, \"w+\") as fobj:\n fobj.write(\"1\")\n\n with pytest.raises(CheckoutError):\n self.dvc.checkout(force=True)\n\n self.assertFalse(os.path.exists(cache))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCmdCheckout_CheckoutBase.outs_info.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCmdCheckout_CheckoutBase.outs_info.return._", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 114, "end_line": 148, "span_ids": ["TestCmdCheckout", "CheckoutBase", "CheckoutBase.outs_info", "CheckoutBase.commit_data_file", "TestCmdCheckout.test", "CheckoutBase.read_ignored"], "tokens": 250}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCmdCheckout(TestCheckout):\n def test(self):\n ret = main([\"checkout\", \"--force\"])\n self.assertEqual(ret, 0)\n self._test_checkout()\n\n\nclass CheckoutBase(TestDvcGit):\n GIT_IGNORE = \".gitignore\"\n\n def commit_data_file(self, fname, content=\"random text\"):\n with open(fname, \"w\") as fd:\n fd.write(content)\n stages = self.dvc.add(fname)\n self.assertEqual(len(stages), 1)\n self.assertTrue(stages[0] is not None)\n self.dvc.scm.add([fname + \".dvc\", \".gitignore\"])\n self.dvc.scm.commit(\"adding \" + fname)\n\n def read_ignored(self):\n with open(self.GIT_IGNORE) as f:\n return [s.strip(\"\\n\") for s in f.readlines()]\n\n def outs_info(self, stage):\n FileInfo = collections.namedtuple(\"FileInfo\", \"path inode\")\n\n paths = [\n path\n for output in stage[\"outs\"]\n for path in self.dvc.tree.walk_files(output[\"path\"])\n ]\n\n return [\n FileInfo(path=path, inode=System.inode(path)) for path in paths\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestRemoveFilesWhenCheckout_TestRemoveFilesWhenCheckout.test.self_assertFalse_os_path_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestRemoveFilesWhenCheckout_TestRemoveFilesWhenCheckout.test.self_assertFalse_os_path_", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 147, "end_line": 170, "span_ids": ["TestRemoveFilesWhenCheckout.test", "TestRemoveFilesWhenCheckout"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRemoveFilesWhenCheckout(CheckoutBase):\n def test(self):\n fname = \"file_in_a_branch\"\n branch_master = \"master\"\n branch_1 = \"b1\"\n\n self.dvc.scm.add(self.dvc.scm.untracked_files())\n self.dvc.scm.commit(\"add all files\")\n\n # add the file into a separate branch\n self.dvc.scm.checkout(branch_1, True)\n ret = main([\"checkout\", \"--force\"])\n self.assertEqual(ret, 0)\n self.commit_data_file(fname)\n\n # Checkout back in master\n self.dvc.scm.checkout(branch_master)\n self.assertTrue(os.path.exists(fname))\n\n # Make sure `dvc checkout` removes the file\n # self.dvc.checkout()\n ret = main([\"checkout\", \"--force\"])\n self.assertEqual(ret, 0)\n self.assertFalse(os.path.exists(fname))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutCleanWorkingDir_TestCheckoutCleanWorkingDir.test.self_assertFalse_os_path_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutCleanWorkingDir_TestCheckoutCleanWorkingDir.test.self_assertFalse_os_path_", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 173, "end_line": 187, "span_ids": ["TestCheckoutCleanWorkingDir.test", "TestCheckoutCleanWorkingDir"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCheckoutCleanWorkingDir(CheckoutBase):\n @patch(\"dvc.prompt.confirm\", return_value=True)\n def test(self, mock_prompt):\n mock_prompt.return_value = True\n\n stages = self.dvc.add(self.DATA_DIR)\n stage = stages[0]\n\n working_dir_change = os.path.join(self.DATA_DIR, \"not_cached.txt\")\n with open(working_dir_change, \"w\") as f:\n f.write(\"not_cached\")\n\n ret = main([\"checkout\", stage.relpath])\n self.assertEqual(ret, 0)\n self.assertFalse(os.path.exists(working_dir_change))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutCleanWorkingDir.test_force_TestCheckoutCleanWorkingDir.test_force.self_assertRaises_DvcExce": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutCleanWorkingDir.test_force_TestCheckoutCleanWorkingDir.test_force.self_assertRaises_DvcExce", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 189, "end_line": 206, "span_ids": ["TestCheckoutCleanWorkingDir.test_force"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCheckoutCleanWorkingDir(CheckoutBase):\n\n @patch(\"dvc.prompt.confirm\", return_value=False)\n def test_force(self, mock_prompt):\n mock_prompt.return_value = False\n\n stages = self.dvc.add(self.DATA_DIR)\n self.assertEqual(len(stages), 1)\n stage = stages[0]\n\n working_dir_change = os.path.join(self.DATA_DIR, \"not_cached.txt\")\n with open(working_dir_change, \"w\") as f:\n f.write(\"not_cached\")\n\n ret = main([\"checkout\", stage.relpath])\n self.assertNotEqual(ret, 0)\n\n mock_prompt.assert_called()\n self.assertNotEqual(ret, 0)\n self.assertRaises(DvcException)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutSelectiveRemove_TestCheckoutSelectiveRemove.test.None_7": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutSelectiveRemove_TestCheckoutSelectiveRemove.test.None_7", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 215, "end_line": 241, "span_ids": ["TestCheckoutSelectiveRemove.test", "TestCheckoutSelectiveRemove"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCheckoutSelectiveRemove(CheckoutBase):\n def test(self):\n # Use copy to test for changes in the inodes\n ret = main([\"config\", \"cache.type\", \"copy\"])\n self.assertEqual(ret, 0)\n\n ret = main([\"add\", self.DATA_DIR])\n self.assertEqual(0, ret)\n\n stage_path = self.DATA_DIR + DVC_FILE_SUFFIX\n stage = load_yaml(stage_path)\n staged_files = self.outs_info(stage)\n\n # move instead of remove, to lock inode assigned to stage_files[0].path\n # if we were to use remove, we might end up with same inode assigned to\n # newly checked out file\n shutil.move(staged_files[0].path, \"random_name\")\n\n ret = main([\"checkout\", \"--force\", stage_path])\n self.assertEqual(ret, 0)\n\n checkedout_files = self.outs_info(stage)\n\n self.assertEqual(len(staged_files), len(checkedout_files))\n self.assertEqual(staged_files[0].path, checkedout_files[0].path)\n self.assertNotEqual(staged_files[0].inode, checkedout_files[0].inode)\n self.assertEqual(staged_files[1].inode, checkedout_files[1].inode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestGitIgnoreBasic_TestGitIgnoreBasic.test.None_9": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestGitIgnoreBasic_TestGitIgnoreBasic.test.None_9", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 244, "end_line": 271, "span_ids": ["TestGitIgnoreBasic.test", "TestGitIgnoreBasic"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestGitIgnoreBasic(CheckoutBase):\n def test(self):\n fname1 = \"file_1\"\n fname2 = \"file_2\"\n fname3 = \"file_3\"\n\n self.dvc.scm.add(self.dvc.scm.untracked_files())\n self.dvc.scm.commit(\"add all files\")\n\n self.assertFalse(os.path.exists(self.GIT_IGNORE))\n\n self.commit_data_file(fname1)\n self.commit_data_file(fname2)\n self.dvc.run(\n single_stage=True,\n cmd=f\"python {self.CODE} {self.FOO} {fname3}\",\n deps=[self.CODE, self.FOO],\n outs_no_cache=[fname3],\n )\n\n self.assertTrue(os.path.exists(self.GIT_IGNORE))\n\n ignored = self.read_ignored()\n\n self.assertEqual(len(ignored), 2)\n\n self.assertIn(\"/\" + fname1, ignored)\n self.assertIn(\"/\" + fname2, ignored)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestGitIgnoreWhenCheckout_TestGitIgnoreWhenCheckout.test.None_12": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestGitIgnoreWhenCheckout_TestGitIgnoreWhenCheckout.test.None_12", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 267, "end_line": 296, "span_ids": ["TestGitIgnoreWhenCheckout.test", "TestGitIgnoreWhenCheckout"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestGitIgnoreWhenCheckout(CheckoutBase):\n def test(self):\n fname_master = \"file_in_a_master\"\n branch_master = \"master\"\n fname_branch = \"file_in_a_branch\"\n branch_1 = \"b1\"\n\n self.dvc.scm.add(self.dvc.scm.untracked_files())\n self.dvc.scm.commit(\"add all files\")\n self.commit_data_file(fname_master)\n\n self.dvc.scm.checkout(branch_1, True)\n ret = main([\"checkout\", \"--force\"])\n self.assertEqual(ret, 0)\n self.commit_data_file(fname_branch)\n\n self.dvc.scm.checkout(branch_master)\n ret = main([\"checkout\", \"--force\"])\n self.assertEqual(ret, 0)\n\n ignored = self.read_ignored()\n\n self.assertEqual(len(ignored), 1)\n self.assertIn(\"/\" + fname_master, ignored)\n\n self.dvc.scm.checkout(branch_1)\n ret = main([\"checkout\", \"--force\"])\n self.assertEqual(ret, 0)\n ignored = self.read_ignored()\n self.assertIn(\"/\" + fname_branch, ignored)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutMissingMd5InStageFile_TestCheckoutEmptyDir.test.self_assertEqual_len_os_l": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutMissingMd5InStageFile_TestCheckoutEmptyDir.test.self_assertEqual_len_os_l", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 309, "end_line": 338, "span_ids": ["TestCheckoutMissingMd5InStageFile.test", "TestCheckoutEmptyDir.test", "TestCheckoutEmptyDir", "TestCheckoutMissingMd5InStageFile"], "tokens": 228}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCheckoutMissingMd5InStageFile(TestRepro):\n def test(self):\n d = load_yaml(self.file1_stage)\n del d[Stage.PARAM_OUTS][0][LocalTree.PARAM_CHECKSUM]\n del d[Stage.PARAM_DEPS][0][LocalTree.PARAM_CHECKSUM]\n dump_yaml(self.file1_stage, d)\n\n with pytest.raises(CheckoutError):\n self.dvc.checkout(force=True)\n\n\nclass TestCheckoutEmptyDir(TestDvc):\n def test(self):\n dname = \"empty_dir\"\n os.mkdir(dname)\n\n stages = self.dvc.add(dname)\n self.assertEqual(len(stages), 1)\n stage = stages[0]\n self.assertTrue(stage is not None)\n self.assertEqual(len(stage.outs), 1)\n\n stage.outs[0].remove()\n self.assertFalse(os.path.exists(dname))\n\n stats = self.dvc.checkout(force=True)\n assert stats[\"added\"] == [dname + os.sep]\n\n self.assertTrue(os.path.isdir(dname))\n self.assertEqual(len(os.listdir(dname)), 0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutNotCachedFile_TestCheckoutDirectory.test.self_assertTrue_os_path_e": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutNotCachedFile_TestCheckoutDirectory.test.self_assertTrue_os_path_e", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 339, "end_line": 381, "span_ids": ["TestCheckoutWithDeps", "TestCheckoutNotCachedFile.test", "TestCheckoutNotCachedFile", "TestCheckoutDirectory", "TestCheckoutDirectory.test", "TestCheckoutWithDeps.test"], "tokens": 274}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCheckoutNotCachedFile(TestDvc):\n def test(self):\n cmd = \"python {} {} {}\".format(self.CODE, self.FOO, \"out\")\n\n self.dvc.add(self.FOO)\n stage = self.dvc.run(\n cmd=cmd,\n deps=[self.FOO, self.CODE],\n outs_no_cache=[\"out\"],\n single_stage=True,\n )\n self.assertTrue(stage is not None)\n\n stats = self.dvc.checkout(force=True)\n assert not any(stats.values())\n\n\nclass TestCheckoutWithDeps(TestRepro):\n def test(self):\n os.unlink(self.FOO)\n os.unlink(self.file1)\n\n self.assertFalse(os.path.exists(self.FOO))\n self.assertFalse(os.path.exists(self.file1))\n\n ret = main([\"checkout\", \"--force\", self.file1_stage, \"--with-deps\"])\n self.assertEqual(ret, 0)\n\n self.assertTrue(os.path.exists(self.FOO))\n self.assertTrue(os.path.exists(self.file1))\n\n\nclass TestCheckoutDirectory(TestRepro):\n def test(self):\n stage = self.dvc.add(self.DATA_DIR)[0]\n\n shutil.rmtree(self.DATA_DIR)\n self.assertFalse(os.path.exists(self.DATA_DIR))\n\n ret = main([\"checkout\", stage.path])\n self.assertEqual(ret, 0)\n\n self.assertTrue(os.path.exists(self.DATA_DIR))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutHook_TestCheckoutHook.test.with_self_assertRaises_Co.self_dvc_checkout_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutHook_TestCheckoutHook.test.with_self_assertRaises_Co.self_dvc_checkout_", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 385, "end_line": 400, "span_ids": ["TestCheckoutHook", "TestCheckoutHook.test"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCheckoutHook(TestDvc):\n @patch(\"sys.stdout.isatty\", return_value=True)\n @patch(\"dvc.prompt.input\", side_effect=EOFError)\n def test(self, _mock_input, _mock_isatty):\n \"\"\" Test that dvc checkout handles EOFError gracefully, which is what\n it will experience when running in a git hook.\n \"\"\"\n stages = self.dvc.add(self.DATA_DIR)\n self.assertEqual(len(stages), 1)\n stage = stages[0]\n self.assertNotEqual(stage, None)\n\n self.create(os.path.join(self.DATA_DIR, \"test\"), \"test\")\n\n with self.assertRaises(ConfirmRemoveError):\n self.dvc.checkout()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cli.py_os_TestArgParse.test.self_assertIsInstance_arg": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cli.py_os_TestArgParse.test.self_assertIsInstance_arg", "embedding": null, "metadata": {"file_path": "tests/func/test_cli.py", "file_name": "test_cli.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 22, "span_ids": ["imports", "TestArgParse", "TestArgParse.test"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nfrom dvc.cli import parse_args\nfrom dvc.command.add import CmdAdd\nfrom dvc.command.base import CmdBase\nfrom dvc.command.checkout import CmdCheckout\nfrom dvc.command.config import CmdConfig\nfrom dvc.command.data_sync import CmdDataPull, CmdDataPush\nfrom dvc.command.gc import CmdGC\nfrom dvc.command.init import CmdInit\nfrom dvc.command.remove import CmdRemove\nfrom dvc.command.repro import CmdRepro\nfrom dvc.command.run import CmdRun\nfrom dvc.command.status import CmdDataStatus\nfrom dvc.exceptions import DvcException, DvcParserError\nfrom tests.basic_env import TestDvc\n\n\nclass TestArgParse(TestDvc):\n def test(self):\n args = parse_args([\"init\"])\n self.assertIsInstance(args.func(args), CmdInit)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cli.py_TestRun_TestRun.test.self_assertEqual_args_com": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cli.py_TestRun_TestRun.test.self_assertEqual_args_com", "embedding": null, "metadata": {"file_path": "tests/func/test_cli.py", "file_name": "test_cli.py", "file_type": "text/x-python", "category": "test", "start_line": 25, "end_line": 69, "span_ids": ["TestRun.test", "TestRun"], "tokens": 268}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRun(TestDvc):\n def test(self):\n dep1 = \"dep1\"\n dep2 = \"dep2\"\n\n out1 = \"out1\"\n out2 = \"out2\"\n\n out_no_cache1 = \"out_no_cache1\"\n out_no_cache2 = \"out_no_cache2\"\n\n fname = \"dvc.dvc\"\n cmd = \"cmd\"\n arg1 = \"arg1\"\n arg2 = \"arg2\"\n\n args = parse_args(\n [\n \"run\",\n \"-d\",\n dep1,\n \"--deps\",\n dep2,\n \"-o\",\n out1,\n \"--outs\",\n out2,\n \"-O\",\n out_no_cache1,\n \"--outs-no-cache\",\n out_no_cache2,\n \"--file\",\n fname,\n cmd,\n arg1,\n arg2,\n ]\n )\n\n self.assertIsInstance(args.func(args), CmdRun)\n self.assertEqual(args.deps, [dep1, dep2])\n self.assertEqual(args.outs, [out1, out2])\n self.assertEqual(args.outs_no_cache, [out_no_cache1, out_no_cache2])\n self.assertEqual(args.file, fname)\n self.assertEqual(args.command, [cmd, arg1, arg2])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_TestGCBranchesTags_TestGCBranchesTags.test.self__check_cache_1_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_TestGCBranchesTags_TestGCBranchesTags.test.self__check_cache_1_", "embedding": null, "metadata": {"file_path": "tests/func/test_gc.py", "file_name": "test_gc.py", "file_type": "text/x-python", "category": "test", "start_line": 52, "end_line": 109, "span_ids": ["TestGCBranchesTags.test", "TestGCBranchesTags", "TestGCBranchesTags._check_cache"], "tokens": 495}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestGCBranchesTags(TestDvcGit):\n def _check_cache(self, num):\n total = 0\n for _, _, files in os.walk(os.path.join(\".dvc\", \"cache\")):\n total += len(files)\n self.assertEqual(total, num)\n\n def test(self):\n fname = \"file\"\n\n with open(fname, \"w+\") as fobj:\n fobj.write(\"v1.0\")\n\n stages = self.dvc.add(fname)\n self.assertEqual(len(stages), 1)\n self.dvc.scm.add([\".gitignore\", stages[0].relpath])\n self.dvc.scm.commit(\"v1.0\")\n self.dvc.scm.tag(\"v1.0\")\n\n self.dvc.scm.checkout(\"test\", create_new=True)\n self.dvc.remove(stages[0].relpath)\n with open(fname, \"w+\") as fobj:\n fobj.write(\"test\")\n stages = self.dvc.add(fname)\n self.assertEqual(len(stages), 1)\n self.dvc.scm.add([\".gitignore\", stages[0].relpath])\n self.dvc.scm.commit(\"test\")\n\n self.dvc.scm.checkout(\"master\")\n self.dvc.remove(stages[0].relpath)\n with open(fname, \"w+\") as fobj:\n fobj.write(\"trash\")\n stages = self.dvc.add(fname)\n self.assertEqual(len(stages), 1)\n self.dvc.scm.add([\".gitignore\", stages[0].relpath])\n self.dvc.scm.commit(\"trash\")\n\n self.dvc.remove(stages[0].relpath)\n with open(fname, \"w+\") as fobj:\n fobj.write(\"master\")\n stages = self.dvc.add(fname)\n self.assertEqual(len(stages), 1)\n self.dvc.scm.add([\".gitignore\", stages[0].relpath])\n self.dvc.scm.commit(\"master\")\n\n self._check_cache(4)\n\n self.dvc.gc(all_tags=True, all_branches=True)\n\n self._check_cache(3)\n\n self.dvc.gc(all_tags=False, all_branches=True)\n\n self._check_cache(2)\n\n self.dvc.gc(all_tags=True, all_branches=False)\n\n self._check_cache(1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_TestGCMultipleDvcRepos_TestGCMultipleDvcRepos.setUp.self.additional_dvc_7.DvcRepo_self_additional_p": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_TestGCMultipleDvcRepos_TestGCMultipleDvcRepos.setUp.self.additional_dvc_7.DvcRepo_self_additional_p", "embedding": null, "metadata": {"file_path": "tests/func/test_gc.py", "file_name": "test_gc.py", "file_type": "text/x-python", "category": "test", "start_line": 112, "end_line": 134, "span_ids": ["TestGCMultipleDvcRepos", "TestGCMultipleDvcRepos.setUp", "TestGCMultipleDvcRepos._check_cache"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestGCMultipleDvcRepos(TestDvcGit):\n def _check_cache(self, num):\n total = 0\n for _, _, files in os.walk(os.path.join(\".dvc\", \"cache\")):\n total += len(files)\n self.assertEqual(total, num)\n\n def setUp(self):\n super().setUp()\n self.additional_path = TestDir.mkdtemp()\n self.additional_git = Repo.init(self.additional_path)\n self.additional_dvc = DvcRepo.init(self.additional_path)\n\n cache_path = os.path.join(self._root_dir, \".dvc\", \"cache\")\n config_path = os.path.join(\n self.additional_path, \".dvc\", \"config.local\"\n )\n cfg = configobj.ConfigObj()\n cfg.filename = config_path\n cfg[\"cache\"] = {\"dir\": cache_path}\n cfg.write()\n\n self.additional_dvc = DvcRepo(self.additional_path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_os_TestMoveNotDataSource.test.self_assertNotEqual_ret_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_os_TestMoveNotDataSource.test.self_assertNotEqual_ret_", "embedding": null, "metadata": {"file_path": "tests/func/test_move.py", "file_name": "test_move.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 61, "span_ids": ["TestMove", "TestMoveNotDataSource", "TestMoveNonExistentFile", "imports", "TestCmdMove.test", "TestMoveNotDataSource.test", "TestMove.test", "TestMoveNonExistentFile.test", "TestMoveDirectory.test", "TestMoveDirectory", "TestCmdMove"], "tokens": 435}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nfrom dvc.dvcfile import DVC_FILE_SUFFIX\nfrom dvc.exceptions import DvcException, MoveNotDataSourceError\nfrom dvc.main import main\nfrom dvc.utils.serialize import load_yaml\nfrom tests.basic_env import TestDvc, TestDvcGit\nfrom tests.func.test_repro import TestRepro\nfrom tests.utils import cd\n\n\nclass TestMove(TestDvc):\n def test(self):\n dst = self.FOO + \"1\"\n self.dvc.add(self.FOO)\n self.dvc.move(self.FOO, dst)\n\n self.assertFalse(os.path.isfile(self.FOO))\n self.assertTrue(os.path.isfile(dst))\n\n\nclass TestMoveNonExistentFile(TestDvc):\n def test(self):\n with self.assertRaises(DvcException):\n self.dvc.move(\"non_existent_file\", \"dst\")\n\n\nclass TestMoveDirectory(TestDvc):\n def test(self):\n dst = \"dst\"\n stages = self.dvc.add(self.DATA_DIR)\n self.assertEqual(len(stages), 1)\n self.assertTrue(stages[0] is not None)\n self.dvc.move(self.DATA_DIR, dst)\n self.assertFalse(os.path.exists(self.DATA_DIR))\n self.assertTrue(os.path.exists(dst))\n\n\nclass TestCmdMove(TestDvc):\n def test(self):\n stages = self.dvc.add(self.FOO)\n self.assertEqual(len(stages), 1)\n self.assertTrue(stages[0] is not None)\n\n ret = main([\"move\", self.FOO, self.FOO + \"1\"])\n self.assertEqual(ret, 0)\n\n ret = main([\"move\", \"non-existing-file\", \"dst\"])\n self.assertNotEqual(ret, 0)\n\n\nclass TestMoveNotDataSource(TestRepro):\n def test(self):\n from dvc.repo import Repo as DvcRepo\n\n self.dvc = DvcRepo(self._root_dir)\n with self.assertRaises(MoveNotDataSourceError):\n self.dvc.move(self.file1, \"dst\")\n\n ret = main([\"move\", self.file1, \"dst\"])\n self.assertNotEqual(ret, 0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_TestMoveFileWithExtension_TestMoveFileWithExtension.test.None_7": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_TestMoveFileWithExtension_TestMoveFileWithExtension.test.None_7", "embedding": null, "metadata": {"file_path": "tests/func/test_move.py", "file_name": "test_move.py", "file_type": "text/x-python", "category": "test", "start_line": 65, "end_line": 81, "span_ids": ["TestMoveFileWithExtension", "TestMoveFileWithExtension.test"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestMoveFileWithExtension(TestDvc):\n def test(self):\n with open(os.path.join(self.dvc.root_dir, \"file.csv\"), \"w\") as fd:\n fd.write(\"1,2,3\\n\")\n\n self.dvc.add(\"file.csv\")\n\n self.assertTrue(os.path.exists(\"file.csv\"))\n self.assertTrue(os.path.exists(\"file.csv.dvc\"))\n\n ret = main([\"move\", \"file.csv\", \"other_name.csv\"])\n self.assertEqual(ret, 0)\n\n self.assertFalse(os.path.exists(\"file.csv\"))\n self.assertFalse(os.path.exists(\"file.csv.dvc\"))\n self.assertTrue(os.path.exists(\"other_name.csv\"))\n self.assertTrue(os.path.exists(\"other_name.csv.dvc\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_TestMoveFileToDirectory_TestMoveFileToDirectory.test.None_6": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_TestMoveFileToDirectory_TestMoveFileToDirectory.test.None_6", "embedding": null, "metadata": {"file_path": "tests/func/test_move.py", "file_name": "test_move.py", "file_type": "text/x-python", "category": "test", "start_line": 85, "end_line": 100, "span_ids": ["TestMoveFileToDirectory.test", "TestMoveFileToDirectory"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestMoveFileToDirectory(TestDvc):\n def test(self):\n foo_dvc_file = self.FOO + DVC_FILE_SUFFIX\n ret = main([\"add\", self.FOO])\n self.assertEqual(ret, 0)\n self.assertTrue(os.path.exists(foo_dvc_file))\n\n new_foo_path = os.path.join(self.DATA_DIR, self.FOO)\n new_foo_dvc_path = new_foo_path + DVC_FILE_SUFFIX\n ret = main([\"move\", self.FOO, new_foo_path])\n self.assertEqual(ret, 0)\n\n self.assertFalse(os.path.exists(self.FOO))\n self.assertFalse(os.path.exists(foo_dvc_file))\n self.assertTrue(os.path.exists(new_foo_path))\n self.assertTrue(os.path.exists(new_foo_dvc_path))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_TestMoveFileToDirectoryWithoutSpecifiedTargetName_TestMoveFileToDirectoryWithoutSpecifiedTargetName.test.self_assertEqual_self_FOO": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_TestMoveFileToDirectoryWithoutSpecifiedTargetName_TestMoveFileToDirectoryWithoutSpecifiedTargetName.test.self_assertEqual_self_FOO", "embedding": null, "metadata": {"file_path": "tests/func/test_move.py", "file_name": "test_move.py", "file_type": "text/x-python", "category": "test", "start_line": 101, "end_line": 121, "span_ids": ["TestMoveFileToDirectoryWithoutSpecifiedTargetName", "TestMoveFileToDirectoryWithoutSpecifiedTargetName.test"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestMoveFileToDirectoryWithoutSpecifiedTargetName(TestDvc):\n def test(self):\n foo_stage_file_path = self.FOO + DVC_FILE_SUFFIX\n ret = main([\"add\", self.FOO])\n self.assertEqual(ret, 0)\n self.assertTrue(os.path.exists(foo_stage_file_path))\n\n target_foo_path = os.path.join(self.DATA_DIR, self.FOO)\n target_foo_stage_file_path = target_foo_path + DVC_FILE_SUFFIX\n\n ret = main([\"move\", self.FOO, self.DATA_DIR])\n self.assertEqual(ret, 0)\n\n self.assertFalse(os.path.exists(self.FOO))\n self.assertFalse(os.path.exists(foo_stage_file_path))\n\n self.assertTrue(os.path.exists(target_foo_path))\n self.assertTrue(os.path.exists(target_foo_stage_file_path))\n\n new_stage = load_yaml(target_foo_stage_file_path)\n self.assertEqual(self.FOO, new_stage[\"outs\"][0][\"path\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_TestMoveDirectoryShouldNotOverwriteExisting_TestMoveDirectoryShouldNotOverwriteExisting.test.self_assertEqual_set_os_l": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_TestMoveDirectoryShouldNotOverwriteExisting_TestMoveDirectoryShouldNotOverwriteExisting.test.self_assertEqual_set_os_l", "embedding": null, "metadata": {"file_path": "tests/func/test_move.py", "file_name": "test_move.py", "file_type": "text/x-python", "category": "test", "start_line": 124, "end_line": 148, "span_ids": ["TestMoveDirectoryShouldNotOverwriteExisting", "TestMoveDirectoryShouldNotOverwriteExisting.test"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestMoveDirectoryShouldNotOverwriteExisting(TestDvcGit):\n def test(self):\n dir_name = \"dir\"\n orig_listdir = set(os.listdir(self.DATA_DIR))\n\n self.dvc.add(self.DATA_DIR)\n\n os.mkdir(dir_name)\n new_dir_name = os.path.join(dir_name, self.DATA_DIR)\n\n self.dvc.move(self.DATA_DIR, dir_name)\n\n data_dir_stage = self.DATA_DIR + DVC_FILE_SUFFIX\n self.assertFalse(os.path.exists(self.DATA_DIR))\n self.assertFalse(os.path.exists(data_dir_stage))\n\n self.assertTrue(os.path.exists(dir_name))\n self.assertEqual(\n set(os.listdir(dir_name)),\n {\".gitignore\", data_dir_stage, self.DATA_DIR},\n )\n\n self.assertTrue(os.path.exists(new_dir_name))\n self.assertTrue(os.path.isfile(new_dir_name + DVC_FILE_SUFFIX))\n self.assertEqual(set(os.listdir(new_dir_name)), orig_listdir)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_TestMoveFileBetweenDirectories_TestMoveFileBetweenDirectories.test.self_assertEqual_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_TestMoveFileBetweenDirectories_TestMoveFileBetweenDirectories.test.self_assertEqual_", "embedding": null, "metadata": {"file_path": "tests/func/test_move.py", "file_name": "test_move.py", "file_type": "text/x-python", "category": "test", "start_line": 151, "end_line": 176, "span_ids": ["TestMoveFileBetweenDirectories.test", "TestMoveFileBetweenDirectories"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestMoveFileBetweenDirectories(TestDvc):\n def test(self):\n data_stage_file = self.DATA + DVC_FILE_SUFFIX\n ret = main([\"add\", self.DATA])\n self.assertEqual(ret, 0)\n self.assertTrue(os.path.exists(data_stage_file))\n\n new_data_dir = \"data_dir2\"\n os.makedirs(new_data_dir)\n\n ret = main([\"move\", self.DATA, new_data_dir])\n self.assertEqual(ret, 0)\n\n new_data_path = os.path.join(new_data_dir, os.path.basename(self.DATA))\n new_data_stage_file = new_data_path + DVC_FILE_SUFFIX\n\n self.assertFalse(os.path.exists(self.DATA))\n self.assertFalse(os.path.exists(data_stage_file))\n\n self.assertTrue(os.path.exists(new_data_path))\n self.assertTrue(os.path.exists(new_data_stage_file))\n\n new_stage_file = load_yaml(new_data_stage_file)\n self.assertEqual(\n os.path.basename(self.DATA), new_stage_file[\"outs\"][0][\"path\"]\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_output.py_pytest_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_output.py_pytest_", "embedding": null, "metadata": {"file_path": "tests/func/test_output.py", "file_name": "test_output.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 37, "span_ids": ["imports", "test_scheme", "_get_out"], "tokens": 293}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.output import OUTS_MAP, _get\nfrom dvc.stage import Stage\nfrom tests import PY39, PYARROW_NOT_AVAILABLE\n\nMARKERS = [\n pytest.mark.skipif(PY39, reason=PYARROW_NOT_AVAILABLE),\n pytest.mark.hdfs,\n]\n\nTESTS = [\n (\"s3://bucket/path\", \"s3\"),\n (\"gs://bucket/path\", \"gs\"),\n (\"ssh://example.com:/dir/path\", \"ssh\"),\n (\"path/to/file\", \"local\"),\n (\"path\\\\to\\\\file\", \"local\"),\n (\"file\", \"local\"),\n (\"./file\", \"local\"),\n (\".\\\\file\", \"local\"),\n (\"../file\", \"local\"),\n (\"..\\\\file\", \"local\"),\n (\"unknown://path\", \"local\"),\n pytest.param(\"hdfs://example.com/dir/path\", \"hdfs\", marks=MARKERS),\n pytest.param(\"hdfs://example.com/dir/path\", \"hdfs\", marks=MARKERS),\n]\n\n\ndef _get_out(dvc, path):\n return _get(Stage(dvc), path, None, None, None, None)\n\n\n@pytest.mark.parametrize(\"url,scheme\", TESTS)\ndef test_scheme(dvc, url, scheme):\n # pylint: disable=unidiomatic-typecheck\n assert type(_get_out(dvc, url)) == OUTS_MAP[scheme]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_TestRemote.test_overwrite_TestRemote.test_referencing_other_remotes.assert_config_remote_ba": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_TestRemote.test_overwrite_TestRemote.test_referencing_other_remotes.assert_config_remote_ba", "embedding": null, "metadata": {"file_path": "tests/func/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 52, "end_line": 66, "span_ids": ["TestRemote.test_overwrite", "TestRemote.test_referencing_other_remotes"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRemote(TestDvc):\n\n def test_overwrite(self):\n remote_name = \"a\"\n remote_url = \"s3://bucket/name\"\n self.assertEqual(main([\"remote\", \"add\", remote_name, remote_url]), 0)\n self.assertEqual(main([\"remote\", \"add\", remote_name, remote_url]), 251)\n self.assertEqual(\n main([\"remote\", \"add\", \"-f\", remote_name, remote_url]), 0\n )\n\n def test_referencing_other_remotes(self):\n assert main([\"remote\", \"add\", \"foo\", \"ssh://localhost/\"]) == 0\n assert main([\"remote\", \"add\", \"bar\", \"remote://foo/dvc-storage\"]) == 0\n\n config = configobj.ConfigObj(self.dvc.config.files[\"repo\"])\n assert config['remote \"bar\"'][\"url\"] == \"remote://foo/dvc-storage\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_TestRemoteRemove_TestRemoteDefault.test.None_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_TestRemoteRemove_TestRemoteDefault.test.None_4", "embedding": null, "metadata": {"file_path": "tests/func/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 90, "end_line": 120, "span_ids": ["TestRemoteDefault.test", "TestRemoteRemove", "TestRemoteDefault", "TestRemoteRemove.test"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRemoteRemove(TestDvc):\n def test(self):\n ret = main([\"config\", \"core.checksum_jobs\", \"1\"])\n self.assertEqual(ret, 0)\n\n remote = \"mys3\"\n ret = main([\"remote\", \"add\", remote, \"s3://bucket/name\"])\n self.assertEqual(ret, 0)\n\n ret = main([\"remote\", \"remove\", remote])\n self.assertEqual(ret, 0)\n\n\nclass TestRemoteDefault(TestDvc):\n def test(self):\n remote = \"mys3\"\n ret = main([\"remote\", \"add\", \"mys3\", \"s3://bucket/path\"])\n self.assertEqual(ret, 0)\n\n ret = main([\"remote\", \"default\", \"mys3\"])\n self.assertEqual(ret, 0)\n config_file = os.path.join(self.dvc.dvc_dir, Config.CONFIG)\n config = configobj.ConfigObj(config_file)\n default = config[\"core\"][\"remote\"]\n self.assertEqual(default, remote)\n\n ret = main([\"remote\", \"default\", \"--unset\"])\n self.assertEqual(ret, 0)\n config = configobj.ConfigObj(config_file)\n default = config.get(\"core\", {}).get(\"remote\")\n self.assertEqual(default, None)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestRepro_TestReproFail.test.self_assertNotEqual_ret_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestRepro_TestReproFail.test.self_assertNotEqual_ret_", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 62, "end_line": 87, "span_ids": ["TestRepro.setUp", "TestRepro", "TestReproFail.test", "TestReproFail"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRepro(SingleStageRun, TestDvc):\n def setUp(self):\n super().setUp()\n\n stages = self.dvc.add(self.FOO)\n self.assertEqual(len(stages), 1)\n self.foo_stage = stages[0]\n self.assertTrue(self.foo_stage is not None)\n\n self.file1 = \"file1\"\n self.file1_stage = self.file1 + \".dvc\"\n self.stage = self._run(\n fname=self.file1_stage,\n outs=[self.file1],\n deps=[self.FOO, self.CODE],\n cmd=f\"python {self.CODE} {self.FOO} {self.file1}\",\n name=\"run1\",\n )\n\n\nclass TestReproFail(TestRepro):\n def test(self):\n os.unlink(self.CODE)\n\n ret = main([\"repro\", self._get_stage_target(self.stage)])\n self.assertNotEqual(ret, 0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproCyclicGraph_TestReproCyclicGraph.test.with_self_assertRaises_Cy.self_dvc_reproduce_cycle": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproCyclicGraph_TestReproCyclicGraph.test.with_self_assertRaises_Cy.self_dvc_reproduce_cycle", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 90, "end_line": 114, "span_ids": ["TestReproCyclicGraph.test", "TestReproCyclicGraph"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproCyclicGraph(SingleStageRun, TestDvc):\n def test(self):\n self._run(\n deps=[self.FOO],\n outs=[\"bar.txt\"],\n cmd=\"echo bar > bar.txt\",\n name=\"copybarbar-txt\",\n )\n\n self._run(\n deps=[\"bar.txt\"],\n outs=[\"baz.txt\"],\n cmd=\"echo baz > baz.txt\",\n name=\"copybazbaz-txt\",\n )\n\n stage_dump = {\n \"cmd\": \"echo baz > foo\",\n \"deps\": [{\"path\": \"baz.txt\"}],\n \"outs\": [{\"path\": self.FOO}],\n }\n dump_yaml(\"cycle.dvc\", stage_dump)\n\n with self.assertRaises(CyclicGraphError):\n self.dvc.reproduce(\"cycle.dvc\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproWorkingDirectoryAsOutput_TestReproWorkingDirectoryAsOutput.test.with_self_assertRaises_St.self_dvc_reproduce_faulty": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproWorkingDirectoryAsOutput_TestReproWorkingDirectoryAsOutput.test.with_self_assertRaises_St.self_dvc_reproduce_faulty", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 117, "end_line": 155, "span_ids": ["TestReproWorkingDirectoryAsOutput.test", "TestReproWorkingDirectoryAsOutput"], "tokens": 341}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproWorkingDirectoryAsOutput(TestDvc):\n \"\"\"\n | stage.cwd | out.path | cwd as output |\n |:-----------:|:---------:|:-------------:|\n | dir | dir | True |\n | dir/subdir/ | dir | True |\n | dir | dir-1 | False |\n | . | something | False |\n \"\"\"\n\n def test(self):\n # File structure:\n # .\n # |-- dir1\n # | |__ dir2.dvc (out.path == ../dir2)\n # |__ dir2\n # |__ something.dvc (stage.cwd == ./dir2)\n\n os.mkdir(os.path.join(self.dvc.root_dir, \"dir1\"))\n\n self.dvc.run(\n fname=os.path.join(\"dir1\", \"dir2.dvc\"),\n wdir=\"dir1\",\n outs=[os.path.join(\"..\", \"dir2\")],\n cmd=\"mkdir {path}\".format(path=os.path.join(\"..\", \"dir2\")),\n single_stage=True,\n )\n\n faulty_stage_path = os.path.join(\"dir2\", \"something.dvc\")\n\n output = os.path.join(\"..\", \"something\")\n stage_dump = {\n \"cmd\": f\"echo something > {output}\",\n \"outs\": [{\"path\": output}],\n }\n dump_yaml(faulty_stage_path, stage_dump)\n\n with self.assertRaises(StagePathAsOutputError):\n self.dvc.reproduce(faulty_stage_path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproWorkingDirectoryAsOutput.test_similar_paths_TestReproWorkingDirectoryAsOutput.test_similar_paths.try_.except_StagePathAsOutputE.self_fail_should_not_rai": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproWorkingDirectoryAsOutput.test_similar_paths_TestReproWorkingDirectoryAsOutput.test_similar_paths.try_.except_StagePathAsOutputE.self_fail_should_not_rai", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 204, "end_line": 228, "span_ids": ["TestReproWorkingDirectoryAsOutput.test_similar_paths"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproWorkingDirectoryAsOutput(TestDvc):\n\n def test_similar_paths(self):\n # File structure:\n #\n # .\n # |-- something.dvc (out.path == something)\n # |-- something\n # |__ something-1\n # |-- a\n # |__ a.dvc (stage.cwd == something-1)\n\n self.dvc.run(\n outs=[\"something\"], cmd=\"mkdir something\", single_stage=True\n )\n\n os.mkdir(\"something-1\")\n\n stage = os.path.join(\"something-1\", \"a.dvc\")\n\n stage_dump = {\"cmd\": \"echo a > a\", \"outs\": [{\"path\": \"a\"}]}\n dump_yaml(stage, stage_dump)\n\n try:\n self.dvc.reproduce(stage)\n except StagePathAsOutputError:\n self.fail(\"should not raise StagePathAsOutputError\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproDepDirWithOutputsUnderIt_TestReproDepDirWithOutputsUnderIt.test.None_8": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproDepDirWithOutputsUnderIt_TestReproDepDirWithOutputsUnderIt.test.None_8", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 257, "end_line": 291, "span_ids": ["TestReproDepDirWithOutputsUnderIt", "TestReproDepDirWithOutputsUnderIt.test"], "tokens": 273}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproDepDirWithOutputsUnderIt(SingleStageRun, TestDvc):\n def test(self):\n stages = self.dvc.add(self.DATA)\n self.assertEqual(len(stages), 1)\n self.assertTrue(stages[0] is not None)\n\n stages = self.dvc.add(self.DATA_SUB)\n self.assertEqual(len(stages), 1)\n self.assertTrue(stages[0] is not None)\n\n deps = [self.DATA, self.DATA_SUB]\n stage = self.dvc.run(\n cmd=\"ls {}\".format(\" \".join(deps)),\n fname=\"dvcfile2.dvc\",\n deps=deps,\n single_stage=True,\n )\n self.assertTrue(stage is not None)\n\n file1 = \"file1\"\n file1_stage = file1 + \".dvc\"\n stage = self._run(\n fname=file1_stage,\n deps=[self.DATA_DIR],\n outs=[file1],\n cmd=f\"python {self.CODE} {self.DATA} {file1}\",\n name=\"copy-data-file1\",\n )\n self.assertTrue(stage is not None)\n\n os.unlink(self.DATA)\n shutil.copyfile(self.FOO, self.DATA)\n\n stages = self.dvc.reproduce(self._get_stage_target(stage))\n self.assertEqual(len(stages), 2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproNoDeps_TestReproNoDeps.test.self_assertEqual_len_stag": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproNoDeps_TestReproNoDeps.test.self_assertEqual_len_stag", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 294, "end_line": 313, "span_ids": ["TestReproNoDeps", "TestReproNoDeps.test"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproNoDeps(TestRepro):\n def test(self):\n out = \"out\"\n code_file = \"out.py\"\n stage_file = \"out.dvc\"\n code = (\n 'import uuid\\nwith open(\"{}\", \"w+\") as fd:\\n'\n \"\\tfd.write(str(uuid.uuid4()))\\n\".format(out)\n )\n with open(code_file, \"w+\") as fd:\n fd.write(code)\n stage = self._run(\n fname=stage_file,\n outs=[out],\n cmd=f\"python {code_file}\",\n name=\"uuid\",\n )\n\n stages = self.dvc.reproduce(self._get_stage_target(stage))\n self.assertEqual(len(stages), 1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproForce_TestReproChangedCode.swap_code.self_create_self_CODE_ne": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproForce_TestReproChangedCode.swap_code.self_create_self_CODE_ne", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 312, "end_line": 335, "span_ids": ["TestReproChangedCode", "TestReproChangedCode.swap_code", "TestReproForce.test", "TestReproChangedCode.test", "TestReproForce"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproForce(TestRepro):\n def test(self):\n stages = self.dvc.reproduce(\n self._get_stage_target(self.stage), force=True\n )\n self.assertEqual(len(stages), 2)\n\n\nclass TestReproChangedCode(TestRepro):\n def test(self):\n self.swap_code()\n\n stages = self.dvc.reproduce(self._get_stage_target(self.stage))\n\n self.assertTrue(filecmp.cmp(self.file1, self.BAR, shallow=False))\n self.assertEqual(len(stages), 1)\n\n def swap_code(self):\n os.unlink(self.CODE)\n new_contents = self.CODE_CONTENTS\n new_contents += \"\\nshutil.copyfile('{}', \" \"sys.argv[2])\\n\".format(\n self.BAR\n )\n self.create(self.CODE, new_contents)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproChangedData_TestReproUpToDate.test.self_assertEqual_ret_0_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproChangedData_TestReproUpToDate.test.self_assertEqual_ret_0_", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 338, "end_line": 371, "span_ids": ["TestReproDry", "TestReproChangedData.swap_foo_with_bar", "TestReproDry.test", "TestReproChangedData", "TestReproChangedData.test", "TestReproUpToDate", "TestReproUpToDate.test"], "tokens": 254}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproChangedData(TestRepro):\n def test(self):\n self.swap_foo_with_bar()\n\n stages = self.dvc.reproduce(self._get_stage_target(self.stage))\n\n self.assertTrue(filecmp.cmp(self.file1, self.BAR, shallow=False))\n self.assertEqual(len(stages), 2)\n\n def swap_foo_with_bar(self):\n os.unlink(self.FOO)\n shutil.copyfile(self.BAR, self.FOO)\n\n\nclass TestReproDry(TestReproChangedData):\n def test(self):\n self.swap_foo_with_bar()\n\n stages = self.dvc.reproduce(\n self._get_stage_target(self.stage), dry=True\n )\n\n self.assertTrue(len(stages), 2)\n self.assertFalse(filecmp.cmp(self.file1, self.BAR, shallow=False))\n\n ret = main([\"repro\", \"--dry\", self._get_stage_target(self.stage)])\n self.assertEqual(ret, 0)\n self.assertFalse(filecmp.cmp(self.file1, self.BAR, shallow=False))\n\n\nclass TestReproUpToDate(TestRepro):\n def test(self):\n ret = main([\"repro\", self._get_stage_target(self.stage)])\n self.assertEqual(ret, 0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproDryNoExec_TestReproDryNoExec.test.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproDryNoExec_TestReproDryNoExec.test.None_1", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 378, "end_line": 425, "span_ids": ["TestReproDryNoExec.test", "TestReproDryNoExec"], "tokens": 273}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproDryNoExec(TestDvc):\n def test(self):\n deps = []\n for d in range(3):\n idir = f\"idir{d}\"\n odir = f\"odir{d}\"\n\n deps.append(\"-d\")\n deps.append(odir)\n\n os.mkdir(idir)\n\n f = os.path.join(idir, \"file\")\n with open(f, \"w+\") as fobj:\n fobj.write(str(d))\n\n ret = main(\n [\n \"run\",\n \"--no-exec\",\n \"--single-stage\",\n \"-d\",\n idir,\n \"-o\",\n odir,\n \"python -c 'import shutil; \"\n 'shutil.copytree(\"{}\", \"{}\")\\''.format(idir, odir),\n ]\n )\n self.assertEqual(ret, 0)\n\n ret = main(\n [\n \"run\",\n \"--no-exec\",\n \"--single-stage\",\n \"--file\",\n DVC_FILE,\n *deps,\n \"ls {}\".format(\n \" \".join(dep for i, dep in enumerate(deps) if i % 2)\n ),\n ]\n )\n self.assertEqual(ret, 0)\n\n ret = main([\"repro\", \"--dry\", DVC_FILE])\n self.assertEqual(ret, 0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproChangedDeepData_TestReproChangedDeepData.test.self_assertEqual_len_stag": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproChangedDeepData_TestReproChangedDeepData.test.self_assertEqual_len_stag", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 428, "end_line": 448, "span_ids": ["TestReproChangedDeepData.setUp", "TestReproChangedDeepData", "TestReproChangedDeepData.test"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproChangedDeepData(TestReproChangedData):\n def setUp(self):\n super().setUp()\n\n self.file2 = \"file2\"\n self.stage = self._run(\n fname=self.file2 + \".dvc\",\n outs=[self.file2],\n deps=[self.file1, self.CODE],\n cmd=f\"python {self.CODE} {self.file1} {self.file2}\",\n name=\"copy-file-file2\",\n )\n\n def test(self):\n self.swap_foo_with_bar()\n\n stages = self.dvc.reproduce(self._get_stage_target(self.stage))\n\n self.assertTrue(filecmp.cmp(self.file1, self.BAR, shallow=False))\n self.assertTrue(filecmp.cmp(self.file2, self.BAR, shallow=False))\n self.assertEqual(len(stages), 3)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproMetricsAddUnchanged_TestReproMetricsAddUnchanged.test.None_7": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproMetricsAddUnchanged_TestReproMetricsAddUnchanged.test.None_7", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 637, "end_line": 671, "span_ids": ["TestReproMetricsAddUnchanged.test", "TestReproMetricsAddUnchanged"], "tokens": 268}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproMetricsAddUnchanged(TestDvc):\n def test(self):\n \"\"\"\n Check that adding/removing metrics doesn't affect stage state\n \"\"\"\n stages = self.dvc.add(self.FOO)\n self.assertEqual(len(stages), 1)\n self.assertTrue(stages[0] is not None)\n\n file1 = \"file1\"\n file1_stage = file1 + \".dvc\"\n self.dvc.run(\n fname=file1_stage,\n outs_no_cache=[file1],\n deps=[self.FOO, self.CODE],\n cmd=f\"python {self.CODE} {self.FOO} {file1}\",\n single_stage=True,\n )\n\n stages = self.dvc.reproduce(file1_stage)\n self.assertEqual(len(stages), 0)\n\n d = load_yaml(file1_stage)\n d[\"outs\"][0][\"metric\"] = True\n dump_yaml(file1_stage, d)\n\n stages = self.dvc.reproduce(file1_stage)\n self.assertEqual(len(stages), 0)\n\n d = load_yaml(file1_stage)\n d[\"outs\"][0][\"metric\"] = False\n dump_yaml(file1_stage, d)\n\n stages = self.dvc.reproduce(file1_stage)\n self.assertEqual(len(stages), 0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproChangedDirData_TestReproChangedDirData.test.None_9": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproChangedDirData_TestReproChangedDirData.test.None_9", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 738, "end_line": 779, "span_ids": ["TestReproChangedDirData.test", "TestReproChangedDirData"], "tokens": 339}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproChangedDirData(SingleStageRun, TestDvc):\n def test(self):\n dir_name = \"dir\"\n dir_code = \"dir_code.py\"\n\n with open(dir_code, \"w+\") as fd:\n fd.write(\n \"import os; import sys; import shutil; \"\n \"shutil.copytree(sys.argv[1], sys.argv[2])\"\n )\n\n stage = self._run(\n outs=[dir_name],\n deps=[self.DATA_DIR, dir_code],\n cmd=f\"python {dir_code} {self.DATA_DIR} {dir_name}\",\n name=\"copy-dir\",\n )\n target = self._get_stage_target(stage)\n\n self.assertTrue(stage is not None)\n\n stages = self.dvc.reproduce(target)\n self.assertEqual(len(stages), 0)\n\n with open(self.DATA_SUB, \"a\") as fd:\n fd.write(\"add\")\n\n stages = self.dvc.reproduce(target)\n self.assertEqual(len(stages), 1)\n self.assertTrue(stages[0] is not None)\n\n # Check that dvc indeed registers changed output dir\n shutil.move(self.BAR, dir_name)\n stages = self.dvc.reproduce(target)\n self.assertEqual(len(stages), 1)\n self.assertTrue(stages[0] is not None)\n\n # Check that dvc registers mtime change for the directory.\n System.hardlink(self.DATA_SUB, self.DATA_SUB + \".lnk\")\n stages = self.dvc.reproduce(target)\n self.assertEqual(len(stages), 1)\n self.assertTrue(stages[0] is not None)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproMissingMd5InStageFile_TestCmdRepro.test.self_assertNotEqual_ret_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproMissingMd5InStageFile_TestCmdRepro.test.self_assertNotEqual_ret_", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 759, "end_line": 781, "span_ids": ["TestReproMissingMd5InStageFile.test", "TestCmdRepro.test", "TestReproMissingMd5InStageFile", "TestCmdRepro"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproMissingMd5InStageFile(TestRepro):\n def test(self):\n d = load_yaml(self.file1_stage)\n del d[Stage.PARAM_OUTS][0][LocalTree.PARAM_CHECKSUM]\n del d[Stage.PARAM_DEPS][0][LocalTree.PARAM_CHECKSUM]\n dump_yaml(self.file1_stage, d)\n\n stages = self.dvc.reproduce(self.file1_stage)\n self.assertEqual(len(stages), 1)\n\n\nclass TestCmdRepro(TestReproChangedData):\n def test(self):\n self.swap_foo_with_bar()\n\n ret = main([\"status\"])\n self.assertEqual(ret, 0)\n\n ret = main([\"repro\", self._get_stage_target(self.stage)])\n self.assertEqual(ret, 0)\n\n ret = main([\"repro\", \"non-existing-file\"])\n self.assertNotEqual(ret, 0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproAlreadyCached.test_force_import_TestReproAlreadyCached.test_force_import.with_patch_download_as_mo.with_patch_checkout_as_mo.self_assertEqual_mock_che": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproAlreadyCached.test_force_import_TestReproAlreadyCached.test_force_import.with_patch_download_as_mo.with_patch_checkout_as_mo.self_assertEqual_mock_che", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 934, "end_line": 958, "span_ids": ["TestReproAlreadyCached.test_force_import"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproAlreadyCached(TestRepro):\n\n def test_force_import(self):\n ret = main([\"import-url\", self.FOO, self.BAR])\n self.assertEqual(ret, 0)\n\n patch_download = patch.object(\n LocalTree,\n \"download\",\n side_effect=LocalTree.download,\n autospec=True,\n )\n\n patch_checkout = patch.object(\n BaseOutput,\n \"checkout\",\n side_effect=BaseOutput.checkout,\n autospec=True,\n )\n\n with patch_download as mock_download:\n with patch_checkout as mock_checkout:\n assert main([\"unfreeze\", \"bar.dvc\"]) == 0\n ret = main([\"repro\", \"--force\", \"bar.dvc\"])\n self.assertEqual(ret, 0)\n self.assertEqual(mock_download.call_count, 1)\n self.assertEqual(mock_checkout.call_count, 0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestShouldDisplayMetricsOnReproWithMetricsOption_TestShouldDisplayMetricsOnReproWithMetricsOption.test.self_assertIn_expected_me": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestShouldDisplayMetricsOnReproWithMetricsOption_TestShouldDisplayMetricsOnReproWithMetricsOption.test.self_assertIn_expected_me", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 922, "end_line": 947, "span_ids": ["TestShouldDisplayMetricsOnReproWithMetricsOption", "TestShouldDisplayMetricsOnReproWithMetricsOption.test"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestShouldDisplayMetricsOnReproWithMetricsOption(TestDvc):\n def test(self):\n metrics_file = \"metrics_file\"\n metrics_value = 0.123489015\n ret = main(\n [\n \"run\",\n \"--single-stage\",\n \"-m\",\n metrics_file,\n f\"echo {metrics_value} >> {metrics_file}\",\n ]\n )\n self.assertEqual(0, ret)\n\n self._caplog.clear()\n\n from dvc.dvcfile import DVC_FILE_SUFFIX\n\n ret = main(\n [\"repro\", \"--force\", \"--metrics\", metrics_file + DVC_FILE_SUFFIX]\n )\n self.assertEqual(0, ret)\n\n expected_metrics_display = f\"Path\\n{metrics_file} {metrics_value}\\n\"\n self.assertIn(expected_metrics_display, self._caplog.text)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_s3.py__upload_multipart_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_s3.py__upload_multipart_", "embedding": null, "metadata": {"file_path": "tests/func/test_s3.py", "file_name": "test_s3.py", "file_type": "text/x-python", "category": "test", "start_line": 75, "end_line": 114, "span_ids": ["_upload_multipart", "test_copy_multipart_preserve_etag"], "tokens": 321}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _upload_multipart(s3, Bucket, Key):\n mpu = s3.create_multipart_upload(Bucket=Bucket, Key=Key)\n mpu_id = mpu[\"UploadId\"]\n\n parts = []\n n_parts = 10\n for i in range(1, n_parts + 1):\n # NOTE: Generation parts of variable size. Part size should be at\n # least 5MB:\n # https://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadComplete.html\n part_size = REDUCED_PART_SIZE + i\n body = b\"1\" * part_size\n part = s3.upload_part(\n Bucket=Bucket,\n Key=Key,\n PartNumber=i,\n UploadId=mpu_id,\n Body=body,\n ContentLength=len(body),\n )\n parts.append({\"PartNumber\": i, \"ETag\": part[\"ETag\"]})\n\n s3.complete_multipart_upload(\n Bucket=Bucket,\n Key=Key,\n UploadId=mpu_id,\n MultipartUpload={\"Parts\": parts},\n )\n\n\n@mock_s3\n@reduced_min_part_size\ndef test_copy_multipart_preserve_etag():\n from_info, to_info = _get_src_dst()\n\n s3 = boto3.client(\"s3\")\n s3.create_bucket(Bucket=from_info.bucket)\n _upload_multipart(s3, from_info.bucket, from_info.path)\n S3Tree._copy(s3, from_info, to_info, {})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_TestSCMGit_TestSCMGit.test_is_tracked.None_10": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_TestSCMGit_TestSCMGit.test_is_tracked.None_10", "embedding": null, "metadata": {"file_path": "tests/func/test_scm.py", "file_name": "test_scm.py", "file_type": "text/x-python", "category": "test", "start_line": 36, "end_line": 56, "span_ids": ["TestSCMGit.test_commit", "TestSCMGit", "TestSCMGit.test_is_tracked"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSCMGit(TestGit):\n def test_commit(self):\n G = Git(self._root_dir)\n G.add([\"foo\"])\n G.commit(\"add\")\n self.assertIn(\"foo\", self.git.git.ls_files())\n\n def test_is_tracked(self):\n foo = os.path.abspath(self.FOO)\n G = Git(self._root_dir)\n G.add([self.FOO, self.UNICODE])\n self.assertTrue(G.is_tracked(foo))\n self.assertTrue(G.is_tracked(self.FOO))\n self.assertTrue(G.is_tracked(self.UNICODE))\n G.commit(\"add\")\n self.assertTrue(G.is_tracked(foo))\n self.assertTrue(G.is_tracked(self.FOO))\n G.gitpython.repo.index.remove([self.FOO], working_tree=True)\n self.assertFalse(G.is_tracked(foo))\n self.assertFalse(G.is_tracked(self.FOO))\n self.assertFalse(G.is_tracked(\"not-existing-file\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_TestReload_TestReload.test.self_assertEqual_d_stage_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_TestReload_TestReload.test.self_assertEqual_d_stage_", "embedding": null, "metadata": {"file_path": "tests/func/test_stage.py", "file_name": "test_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 70, "end_line": 91, "span_ids": ["TestReload.test", "TestReload"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReload(TestDvc):\n def test(self):\n stages = self.dvc.add(self.FOO)\n self.assertEqual(len(stages), 1)\n stage = stages[0]\n self.assertTrue(stage is not None)\n\n d = load_yaml(stage.relpath)\n\n # NOTE: checking that reloaded stage didn't change its checksum\n md5 = \"11111111111111111111111111111111\"\n d[stage.PARAM_MD5] = md5\n dump_yaml(stage.relpath, d)\n\n dvcfile = SingleStageFile(self.dvc, stage.relpath)\n stage = dvcfile.stage\n\n self.assertTrue(stage is not None)\n dvcfile.dump(stage)\n\n d = load_yaml(stage.relpath)\n self.assertEqual(d[stage.PARAM_MD5], md5)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_TestExternalRemoteResolution_TestExternalRemoteResolution.test_remote_output.assert_os_path_exists_fil": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_TestExternalRemoteResolution_TestExternalRemoteResolution.test_remote_output.assert_os_path_exists_fil", "embedding": null, "metadata": {"file_path": "tests/func/test_stage.py", "file_name": "test_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 114, "end_line": 137, "span_ids": ["TestExternalRemoteResolution.test_remote_output", "TestExternalRemoteResolution"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestExternalRemoteResolution(TestDvc):\n def test_remote_output(self):\n tmp_path = tempfile.mkdtemp()\n storage = os.path.join(tmp_path, \"storage\")\n file_path = os.path.join(storage, \"file\")\n\n os.makedirs(storage)\n\n assert main([\"remote\", \"add\", \"tmp\", tmp_path]) == 0\n assert main([\"remote\", \"add\", \"storage\", \"remote://tmp/storage\"]) == 0\n assert (\n main(\n [\n \"run\",\n \"--single-stage\",\n \"-O\",\n \"remote://storage/file\",\n f\"echo file > {file_path}\",\n ]\n )\n == 0\n )\n\n assert os.path.exists(file_path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_TestExternalRemoteResolution.test_remote_dependency_TestExternalRemoteResolution.test_remote_dependency.assert_os_path_exists_mo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_TestExternalRemoteResolution.test_remote_dependency_TestExternalRemoteResolution.test_remote_dependency.assert_os_path_exists_mo", "embedding": null, "metadata": {"file_path": "tests/func/test_stage.py", "file_name": "test_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 145, "end_line": 159, "span_ids": ["TestExternalRemoteResolution.test_remote_dependency"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestExternalRemoteResolution(TestDvc):\n\n def test_remote_dependency(self):\n tmp_path = tempfile.mkdtemp()\n storage = os.path.join(tmp_path, \"storage\")\n file_path = os.path.join(storage, \"file\")\n\n os.makedirs(storage)\n\n with open(file_path, \"w\") as fobj:\n fobj.write(\"Isle of Dogs\")\n\n assert main([\"remote\", \"add\", \"tmp\", tmp_path]) == 0\n assert main([\"remote\", \"add\", \"storage\", \"remote://tmp/storage\"]) == 0\n assert main([\"import-url\", \"remote://storage/file\", \"movie.txt\"]) == 0\n\n assert os.path.exists(\"movie.txt\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_system.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_system.py__", "embedding": null, "metadata": {"file_path": "tests/func/test_system.py", "file_name": "test_system.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 18, "span_ids": ["imports", "test_getdirinfo"], "tokens": 104}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nimport pytest\n\nfrom dvc.system import System\n\n\n@pytest.mark.skipif(os.name != \"nt\", reason=\"Windows specific\")\ndef test_getdirinfo(tmp_path):\n # simulate someone holding an exclusive access\n locked = str(tmp_path / \"locked\")\n fd = os.open(locked, os.O_WRONLY | os.O_CREAT | os.O_EXCL)\n try:\n # should not raise WinError\n System._getdirinfo(locked)\n finally:\n os.close(fd)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_TestWalkInGit_TestWalkInGit.test_nobranch.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_TestWalkInGit_TestWalkInGit.test_nobranch.None_1", "embedding": null, "metadata": {"file_path": "tests/func/test_tree.py", "file_name": "test_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 145, "end_line": 159, "span_ids": ["TestWalkInGit.test_nobranch", "TestWalkInGit"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestWalkInGit(AssertWalkEqualMixin, TestGit):\n def test_nobranch(self):\n tree = LocalTree(None, {\"url\": self._root_dir}, use_dvcignore=True)\n self.assertWalkEqual(\n tree.walk(\".\"),\n [\n (\".\", [\"data_dir\"], [\"bar\", \"\u0442\u0435\u0441\u0442\", \"code.py\", \"foo\"]),\n (join(\"data_dir\"), [\"data_sub_dir\"], [\"data\"]),\n (join(\"data_dir\", \"data_sub_dir\"), [], [\"data_sub\"]),\n ],\n )\n self.assertWalkEqual(\n tree.walk(join(\"data_dir\", \"data_sub_dir\")),\n [(join(\"data_dir\", \"data_sub_dir\"), [], [\"data_sub\"])],\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_unprotect.py_os_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_unprotect.py_os_", "embedding": null, "metadata": {"file_path": "tests/func/test_unprotect.py", "file_name": "test_unprotect.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 38, "span_ids": ["imports", "TestUnprotect", "TestUnprotect.test"], "tokens": 295}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nfrom dvc.main import main\nfrom tests.basic_env import TestDvc\n\n\nclass TestUnprotect(TestDvc):\n def test(self):\n ret = main([\"config\", \"cache.type\", \"hardlink\"])\n self.assertEqual(ret, 0)\n\n ret = main([\"add\", self.FOO])\n self.assertEqual(ret, 0)\n\n cache = os.path.join(\n \".dvc\", \"cache\", \"ac\", \"bd18db4cc2f85cedef654fccc4a4d8\"\n )\n\n self.assertFalse(os.access(self.FOO, os.W_OK))\n self.assertFalse(os.access(cache, os.W_OK))\n\n ret = main([\"unprotect\", self.FOO])\n self.assertEqual(ret, 0)\n\n self.assertTrue(os.access(self.FOO, os.W_OK))\n\n if os.name == \"nt\":\n # NOTE: cache is now unprotected, because NTFS doesn't allow\n # deleting read-only files, so we have to try to set write perms\n # on files that we try to delete, which propagates to the cache\n # file. But it should be restored after the next cache check, hence\n # why we call `dvc status` here.\n self.assertTrue(os.access(cache, os.W_OK))\n ret = main([\"status\"])\n self.assertEqual(ret, 0)\n\n self.assertFalse(os.access(cache, os.W_OK))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_TestColorFormatter.test_exception_under_verbose_TestColorFormatter.test_exception_under_verbose.with_caplog_at_level_logg.assert_expected_format": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_TestColorFormatter.test_exception_under_verbose_TestColorFormatter.test_exception_under_verbose.with_caplog_at_level_logg.assert_expected_format", "embedding": null, "metadata": {"file_path": "tests/unit/test_logger.py", "file_name": "test_logger.py", "file_type": "text/x-python", "category": "test", "start_line": 99, "end_line": 120, "span_ids": ["TestColorFormatter.test_exception_under_verbose"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorFormatter:\n\n def test_exception_under_verbose(self, caplog, dt):\n with caplog.at_level(logging.DEBUG, logger=\"dvc\"):\n try:\n raise Exception(\"description\")\n except Exception:\n stack_trace = traceback.format_exc()\n logger.exception(\"\")\n\n expected = (\n \"{green}{datetime}{nc} \"\n \"{red}ERROR{nc}: description\\n\"\n \"{red}{line}{nc}\\n\"\n \"{stack_trace}\"\n \"{red}{line}{nc}\".format(\n line=\"-\" * 60,\n stack_trace=stack_trace,\n **colors,\n datetime=dt,\n )\n )\n\n assert expected == formatter.format(caplog.records[0])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/https.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/https.py__", "embedding": null, "metadata": {"file_path": "dvc/dependency/https.py", "file_name": "https.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["imports", "HTTPSDependency"], "tokens": 32}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from ..tree.https import HTTPSTree\nfrom .http import HTTPDependency\n\n\nclass HTTPSDependency(HTTPDependency):\n TREE_CLS = HTTPSTree", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scheme.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scheme.py__", "embedding": null, "metadata": {"file_path": "dvc/scheme.py", "file_name": "scheme.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 15, "span_ids": ["Schemes"], "tokens": 102}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Schemes:\n SSH = \"ssh\"\n HDFS = \"hdfs\"\n WEBHDFS = \"webhdfs\"\n S3 = \"s3\"\n AZURE = \"azure\"\n HTTP = \"http\"\n HTTPS = \"https\"\n GS = \"gs\"\n GDRIVE = \"gdrive\"\n LOCAL = \"local\"\n OSS = \"oss\"\n WEBDAV = \"webdav\"\n WEBDAVS = \"webdavs\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State_State._from_sqlite.return.num": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State_State._from_sqlite.return.num", "embedding": null, "metadata": {"file_path": "dvc/state.py", "file_name": "state.py", "file_type": "text/x-python", "category": "implementation", "start_line": 96, "end_line": 198, "span_ids": ["State.files", "State._execute", "State._fetchall", "State", "State._to_sqlite", "State.__init__", "State._from_sqlite"], "tokens": 710}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class State(StateBase): # pylint: disable=too-many-instance-attributes\n \"\"\"Class for the state database.\n\n Args:\n repo (dvc.repo.Repo): repo instance that this state belongs to.\n config (configobj.ConfigObj): config for the state.\n\n Raises:\n StateVersionTooNewError: thrown when dvc version is older than the\n state database version.\n \"\"\"\n\n VERSION = 3\n STATE_FILE = \"state\"\n STATE_TABLE = \"state\"\n STATE_TABLE_LAYOUT = (\n \"inode INTEGER PRIMARY KEY, \"\n \"mtime TEXT NOT NULL, \"\n \"size TEXT NOT NULL, \"\n \"md5 TEXT NOT NULL, \"\n \"timestamp TEXT NOT NULL\"\n )\n\n STATE_INFO_TABLE = \"state_info\"\n STATE_INFO_TABLE_LAYOUT = \"count INTEGER\"\n STATE_INFO_ROW = 1\n\n LINK_STATE_TABLE = \"link_state\"\n LINK_STATE_TABLE_LAYOUT = (\n \"path TEXT PRIMARY KEY, \"\n \"inode INTEGER NOT NULL, \"\n \"mtime TEXT NOT NULL\"\n )\n\n STATE_ROW_LIMIT = 100000000\n STATE_ROW_CLEANUP_QUOTA = 50\n\n MAX_INT = 2 ** 63 - 1\n MAX_UINT = 2 ** 64 - 2\n\n def __init__(self, repo):\n from dvc.tree.local import LocalTree\n\n super().__init__()\n\n self.repo = repo\n self.root_dir = repo.root_dir\n self.tree = LocalTree(None, {\"url\": self.root_dir})\n\n state_config = repo.config.get(\"state\", {})\n self.row_limit = state_config.get(\"row_limit\", self.STATE_ROW_LIMIT)\n self.row_cleanup_quota = state_config.get(\n \"row_cleanup_quota\", self.STATE_ROW_CLEANUP_QUOTA\n )\n\n if not repo.tmp_dir:\n self.state_file = None\n return\n\n self.state_file = os.path.join(repo.tmp_dir, self.STATE_FILE)\n\n # https://www.sqlite.org/tempfiles.html\n self.temp_files = [\n self.state_file + \"-journal\",\n self.state_file + \"-wal\",\n ]\n\n self.database = None\n self.cursor = None\n self.inserts = 0\n\n @property\n def files(self):\n return self.temp_files + [self.state_file]\n\n def _execute(self, cmd, parameters=()):\n logger.trace(cmd)\n return self.cursor.execute(cmd, parameters)\n\n def _fetchall(self):\n ret = self.cursor.fetchall()\n logger.trace(\"fetched: %s\", ret)\n return ret\n\n def _to_sqlite(self, num):\n assert num >= 0\n assert num < self.MAX_UINT\n # NOTE: sqlite stores unit as signed ints, so maximum uint is 2^63-1\n # see http://jakegoulding.com/blog/2011/02/06/sqlite-64-bit-integers/\n if num > self.MAX_INT:\n ret = -(num - self.MAX_INT)\n else:\n ret = num\n assert self._from_sqlite(ret) == num\n return ret\n\n def _from_sqlite(self, num):\n assert abs(num) <= self.MAX_INT\n if num < 0:\n return abs(num) + self.MAX_INT\n assert num < self.MAX_UINT\n assert num >= 0\n return num", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/basic_env.py_TestDirFixture.tearDown_TestDirFixture.tearDown.try_.except_OSError_as_exc_.if_os_name_nt_and_ex.else_.raise": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/basic_env.py_TestDirFixture.tearDown_TestDirFixture.tearDown.try_.except_OSError_as_exc_.if_os_name_nt_and_ex.else_.raise", "embedding": null, "metadata": {"file_path": "tests/basic_env.py", "file_name": "basic_env.py", "file_type": "text/x-python", "category": "implementation", "start_line": 95, "end_line": 112, "span_ids": ["TestDirFixture.tearDown"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDirFixture:\n\n def tearDown(self):\n self._popd()\n try:\n remove(self._root_dir)\n except OSError as exc:\n # pylint: disable=no-member\n # We ignore this under Windows with a warning because it happened\n # to be really hard to trace all not properly closed files.\n #\n # Best guess so far is that gitpython is the culprit:\n # it opens files and uses __del__ to close them, which can happen\n # late in current pythons. TestGitFixture and TestDvcFixture try\n # to close that and it works on most of the tests, but not all.\n # Repos and thus git repos are created all over the dvc ;)\n if os.name == \"nt\" and exc.winerror == 32:\n warnings.warn(\"Failed to remove test dir: \" + str(exc))\n else:\n raise", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestAddCmdDirectoryRecursive_TestAddCmdDirectoryRecursive.test_warn_about_large_directories.with_self__caplog_at_leve.assert_warning_in_self__c": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestAddCmdDirectoryRecursive_TestAddCmdDirectoryRecursive.test_warn_about_large_directories.with_self__caplog_at_leve.assert_warning_in_self__c", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 82, "end_line": 109, "span_ids": ["TestAddCmdDirectoryRecursive", "TestAddCmdDirectoryRecursive.test_warn_about_large_directories", "TestAddCmdDirectoryRecursive.test"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestAddCmdDirectoryRecursive(TestDvc):\n def test(self):\n ret = main([\"add\", \"--recursive\", self.DATA_DIR])\n self.assertEqual(ret, 0)\n\n def test_warn_about_large_directories(self):\n warning = (\n \"You are adding a large directory 'large-dir' recursively,\"\n \" consider tracking it as a whole instead.\\n\"\n \"{purple}HINT:{nc} Remove the generated DVC-file and then\"\n \" run `{cyan}dvc add large-dir{nc}`\".format(\n purple=colorama.Fore.MAGENTA,\n cyan=colorama.Fore.CYAN,\n nc=colorama.Style.RESET_ALL,\n )\n )\n\n os.mkdir(\"large-dir\")\n\n # Create a lot of files\n for iteration in range(LARGE_DIR_SIZE + 1):\n path = os.path.join(\"large-dir\", str(iteration))\n with open(path, \"w\") as fobj:\n fobj.write(path)\n\n with self._caplog.at_level(logging.WARNING, logger=\"dvc\"):\n assert main([\"add\", \"--recursive\", \"large-dir\"]) == 0\n assert warning in self._caplog.messages", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/config.py_parent_config_parser_parent_config_parser_set_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/config.py_parent_config_parser_parent_config_parser_set_", "embedding": null, "metadata": {"file_path": "dvc/command/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 133, "end_line": 163, "span_ids": ["impl:5"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "parent_config_parser = argparse.ArgumentParser(add_help=False)\nlevel_group = parent_config_parser.add_mutually_exclusive_group()\nlevel_group.add_argument(\n \"--global\",\n dest=\"level\",\n action=\"store_const\",\n const=\"global\",\n help=\"Use global config.\",\n)\nlevel_group.add_argument(\n \"--system\",\n dest=\"level\",\n action=\"store_const\",\n const=\"system\",\n help=\"Use system config.\",\n)\nlevel_group.add_argument(\n \"--repo\",\n dest=\"level\",\n action=\"store_const\",\n const=\"repo\",\n help=\"Use repo config (.dvc/config).\",\n)\nlevel_group.add_argument(\n \"--local\",\n dest=\"level\",\n action=\"store_const\",\n const=\"local\",\n help=\"Use local config (.dvc/config.local).\",\n)\nparent_config_parser.set_defaults(level=None)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/config.py_add_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/config.py_add_parser_", "embedding": null, "metadata": {"file_path": "dvc/command/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 166, "end_line": 204, "span_ids": ["add_parser"], "tokens": 239}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n CONFIG_HELP = \"Get or set config options.\"\n\n config_parser = subparsers.add_parser(\n \"config\",\n parents=[parent_config_parser, parent_parser],\n description=append_doc_link(CONFIG_HELP, \"config\"),\n help=CONFIG_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n config_parser.add_argument(\n \"-u\",\n \"--unset\",\n default=False,\n action=\"store_true\",\n help=\"Unset option.\",\n )\n config_parser.add_argument(\n \"name\",\n nargs=\"?\",\n type=_name_type,\n help=\"Option name (section.option or remote.name.option).\",\n )\n config_parser.add_argument(\"value\", nargs=\"?\", help=\"Option value.\")\n config_parser.add_argument(\n \"-l\",\n \"--list\",\n default=False,\n action=\"store_true\",\n help=\"List all defined config values.\",\n )\n config_parser.add_argument(\n \"--show-origin\",\n default=False,\n action=\"store_true\",\n help=\"Show the source file containing each config value.\",\n )\n config_parser.set_defaults(func=CmdConfig)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/http.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/http.py__", "embedding": null, "metadata": {"file_path": "dvc/dependency/http.py", "file_name": "http.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 9, "span_ids": ["imports", "HTTPDependency"], "tokens": 47}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.dependency.base import BaseDependency\nfrom dvc.output.base import BaseOutput\n\nfrom ..tree.http import HTTPTree\n\n\nclass HTTPDependency(BaseDependency, BaseOutput):\n TREE_CLS = HTTPTree", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/hdfs.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/hdfs.py__", "embedding": null, "metadata": {"file_path": "dvc/output/hdfs.py", "file_name": "hdfs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 8, "span_ids": ["imports", "HDFSOutput"], "tokens": 34}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.output.base import BaseOutput\n\nfrom ..tree.hdfs import HDFSTree\n\n\nclass HDFSOutput(BaseOutput):\n TREE_CLS = HDFSTree", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/s3.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/s3.py__", "embedding": null, "metadata": {"file_path": "dvc/output/s3.py", "file_name": "s3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 8, "span_ids": ["imports", "S3Output"], "tokens": 34}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.output.base import BaseOutput\n\nfrom ..tree.s3 import S3Tree\n\n\nclass S3Output(BaseOutput):\n TREE_CLS = S3Tree", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/ssh.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/ssh.py__", "embedding": null, "metadata": {"file_path": "dvc/output/ssh.py", "file_name": "ssh.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 8, "span_ids": ["imports", "SSHOutput"], "tokens": 33}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.output.base import BaseOutput\n\nfrom ..tree.ssh import SSHTree\n\n\nclass SSHOutput(BaseOutput):\n TREE_CLS = SSHTree", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_progress.py_logging_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_progress.py_logging_", "embedding": null, "metadata": {"file_path": "tests/unit/test_progress.py", "file_name": "test_progress.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 51, "span_ids": ["test_quiet_notty", "imports", "test_quiet_logging", "test_quiet_logging_disable_false", "test_default"], "tokens": 364}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport sys\n\nimport mock\n\nfrom dvc.progress import Tqdm\nfrom dvc.utils import env2bool\n\n\ndef test_quiet_logging(caplog, capsys):\n with caplog.at_level(logging.CRITICAL, logger=\"dvc\"):\n for _ in Tqdm(range(10)):\n pass\n out_err = capsys.readouterr()\n assert out_err.out == \"\"\n assert out_err.err == \"\"\n\n\ndef test_quiet_logging_disable_false(caplog, capsys):\n with caplog.at_level(logging.CRITICAL, logger=\"dvc\"):\n # simulate interactive terminal\n with mock.patch.object(sys.stderr, \"isatty\", return_value=True):\n for _ in Tqdm(range(10), disable=False):\n pass\n out_err = capsys.readouterr()\n assert out_err.out == \"\"\n assert out_err.err == \"\"\n\n\ndef test_quiet_notty(caplog, capsys):\n with caplog.at_level(logging.INFO, logger=\"dvc\"):\n for _ in Tqdm(range(10)):\n pass\n out_err = capsys.readouterr()\n assert out_err.out == \"\"\n if env2bool(\"DVC_IGNORE_ISATTY\"):\n assert \"0/10\" in out_err.err\n else:\n assert out_err.err == \"\"\n\n\ndef test_default(caplog, capsys):\n with caplog.at_level(logging.INFO, logger=\"dvc\"):\n # simulate interactive terminal\n with mock.patch.object(sys.stderr, \"isatty\", return_value=True):\n for _ in Tqdm(range(10)):\n pass\n out_err = capsys.readouterr()\n assert out_err.out == \"\"\n assert \"0/10\" in out_err.err", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/get.py_add_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/get.py_add_parser_", "embedding": null, "metadata": {"file_path": "dvc/command/get.py", "file_name": "get.py", "file_type": "text/x-python", "category": "implementation", "start_line": 53, "end_line": 88, "span_ids": ["add_parser"], "tokens": 261}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n GET_HELP = \"Download file or directory tracked by DVC or by Git.\"\n get_parser = subparsers.add_parser(\n \"get\",\n parents=[parent_parser],\n description=append_doc_link(GET_HELP, \"get\"),\n help=GET_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n get_parser.add_argument(\n \"url\", help=\"Location of DVC or Git repository to download from\"\n )\n get_parser.add_argument(\n \"path\", help=\"Path to a file or directory within the repository\",\n ).complete = completion.FILE\n get_parser.add_argument(\n \"-o\",\n \"--out\",\n nargs=\"?\",\n help=\"Destination path to download files to\",\n metavar=\"\",\n ).complete = completion.DIR\n get_parser.add_argument(\n \"--rev\",\n nargs=\"?\",\n help=\"Git revision (e.g. SHA, branch, tag)\",\n metavar=\"\",\n )\n get_parser.add_argument(\n \"--show-url\",\n action=\"store_true\",\n help=\"Print the storage location (URL) the target data would be \"\n \"downloaded from, and exit.\",\n )\n get_parser.set_defaults(func=CmdGet)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/imp_url.py_add_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/imp_url.py_add_parser_", "embedding": null, "metadata": {"file_path": "dvc/command/imp_url.py", "file_name": "imp_url.py", "file_type": "text/x-python", "category": "implementation", "start_line": 32, "end_line": 81, "span_ids": ["add_parser"], "tokens": 390}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n IMPORT_HELP = (\n \"Download or copy file from URL and take it under DVC control.\"\n )\n\n import_parser = subparsers.add_parser(\n \"import-url\",\n parents=[parent_parser],\n description=append_doc_link(IMPORT_HELP, \"import-url\"),\n help=IMPORT_HELP,\n formatter_class=argparse.RawTextHelpFormatter,\n )\n import_parser.add_argument(\n \"url\",\n help=\"Location of the data to download. Supported URLs:\\n\"\n \"/absolute/path/to/file/or/dir\\n\"\n \"relative/path/to/file/or/dir\\n\"\n \"C:\\\\\\\\path\\\\to\\\\file\\\\or\\\\dir\\n\"\n \"https://example.com/path/to/file\\n\"\n \"s3://bucket/key/path\\n\"\n \"gs://bucket/path/to/file/or/dir\\n\"\n \"hdfs://example.com/path/to/file\\n\"\n \"ssh://example.com/absolute/path/to/file/or/dir\\n\"\n \"remote://remote_name/path/to/file/or/dir (see `dvc remote`)\",\n )\n import_parser.add_argument(\n \"out\", nargs=\"?\", help=\"Destination path to put files to.\",\n ).complete = completion.DIR\n import_parser.add_argument(\n \"--file\",\n help=\"Specify name of the DVC-file this command will generate.\",\n metavar=\"\",\n ).complete = completion.DIR\n import_parser.add_argument(\n \"--no-exec\",\n action=\"store_true\",\n default=False,\n help=\"Only create DVC-file without actually downloading it.\",\n )\n import_parser.add_argument(\n \"--desc\",\n type=str,\n metavar=\"\",\n help=(\n \"User description of the data (optional). \"\n \"This doesn't affect any DVC operations.\"\n ),\n )\n import_parser.set_defaults(func=CmdImportUrl)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/imp.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/imp.py__", "embedding": null, "metadata": {"file_path": "dvc/repo/imp.py", "file_name": "imp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 9, "span_ids": ["imp"], "tokens": 75}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def imp(self, url, path, out=None, fname=None, rev=None, **kwargs):\n erepo = {\"url\": url}\n if rev is not None:\n erepo[\"rev\"] = rev\n\n return self.imp_url(\n path, out=out, fname=fname, erepo=erepo, frozen=True, **kwargs\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State.save_link_State.save_link.self__execute_cmd_relat": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State.save_link_State.save_link.self__execute_cmd_relat", "embedding": null, "metadata": {"file_path": "dvc/state.py", "file_name": "state.py", "file_type": "text/x-python", "category": "implementation", "start_line": 458, "end_line": 477, "span_ids": ["State.save_link"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class State(StateBase):\n\n def save_link(self, path_info):\n \"\"\"Adds the specified path to the list of links created by dvc. This\n list is later used on `dvc checkout` to cleanup old links.\n\n Args:\n path_info (dict): path info to add to the list of links.\n \"\"\"\n assert isinstance(path_info, str) or path_info.scheme == \"local\"\n\n if not self.tree.exists(path_info):\n return\n\n mtime, _ = get_mtime_and_size(path_info, self.tree)\n inode = get_inode(path_info)\n relative_path = relpath(path_info, self.root_dir)\n\n cmd = \"REPLACE INTO {}(path, inode, mtime) \" \"VALUES (?, ?, ?)\".format(\n self.LINK_STATE_TABLE\n )\n self._execute(cmd, (relative_path, self._to_sqlite(inode), mtime))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/__init__.py_os_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/__init__.py_os_", "embedding": null, "metadata": {"file_path": "tests/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 48, "span_ids": ["imports"], "tokens": 406}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport sys\n\n# FIXME: Search and replace these from the tests if pyarrow wheel is available\nPY39 = sys.version_info >= (3, 9, 0)\nPYARROW_NOT_AVAILABLE = \"pyarrow not available yet for Python3.9\"\n\n\n# Increasing fd ulimit for tests\nif os.name == \"nt\":\n import subprocess\n\n import win32file # pylint: disable=import-error\n\n win32file._setmaxstdio(4096)\n\n # Workaround for two bugs:\n #\n # 1) gitpython-developers/GitPython#546\n # GitPython leaves git cat-file --batch/--batch-check processes that are\n # not cleaned up correctly, so Popen._active list has their defunct\n # process handles, that it is not able to cleanup because of bug 2)\n #\n # 2) https://bugs.python.org/issue37380\n # subprocess.Popen._internal_poll on windows is getting\n #\n # \tOSError: [WinError 6] The handle is invalid\n #\n # exception, which it doesn't ignore and so Popen is not able to cleanup\n # old processes and that prevents it from creating any new processes at\n # all, which results in our tests failing whenever they try to use Popen.\n # This patch was released in 3.9.0 and backported to some earlier\n # versions.\n if sys.version_info < (3, 9, 0):\n\n def noop():\n pass\n\n subprocess._cleanup = noop\n subprocess._active = None\nelse:\n import resource\n\n resource.setrlimit(resource.RLIMIT_NOFILE, (4096, 4096))\n\n nproc_soft, nproc_hard = resource.getrlimit(resource.RLIMIT_NPROC)\n resource.setrlimit(resource.RLIMIT_NPROC, (nproc_hard, nproc_hard))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/basic_env.py_TestGitSubmoduleFixture_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/basic_env.py_TestGitSubmoduleFixture_", "embedding": null, "metadata": {"file_path": "tests/basic_env.py", "file_name": "basic_env.py", "file_type": "text/x-python", "category": "implementation", "start_line": 143, "end_line": 210, "span_ids": ["TestDvc", "TestGitSubmodule", "TestDvcFixture.setUp", "TestDvcGit.inject_fixtures", "TestDvcGit", "TestGit", "TestDvcGitFixture.tearDown", "TestGit.__init__", "TestDvcGitFixture", "TestDir.__init__", "TestGitSubmoduleFixture.setUp", "TestGitSubmoduleFixture", "TestDvc.inject_fixtures", "TestDvcFixture", "TestDvc.__init__", "TestDir", "TestDvcGit.__init__", "TestDvcGitFixture.setUp", "TestGitSubmodule.__init__"], "tokens": 443}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestGitSubmoduleFixture(TestGitFixture):\n def setUp(self):\n super().setUp()\n subrepo = Repo.init()\n subrepo_path = \"subrepo\"\n self.git.create_submodule(subrepo_path, subrepo_path, subrepo.git_dir)\n self._pushd(subrepo_path)\n\n\nclass TestDvcFixture(TestDirFixture):\n def setUp(self):\n super().setUp()\n self.dvc = DvcRepo.init(self.root_dir, no_scm=True)\n\n\nclass TestDvcGitFixture(TestGitFixture):\n def setUp(self):\n super().setUp()\n self.dvc = DvcRepo.init(self.root_dir)\n self.dvc.scm.commit(\"init dvc\")\n\n def tearDown(self):\n self.dvc.scm.close()\n super().tearDown()\n\n\n# NOTE: Inheritance order in the classes below is important.\n\n\nclass TestDir(TestDirFixture, TestCase):\n def __init__(self, methodName):\n TestDirFixture.__init__(self)\n TestCase.__init__(self, methodName)\n\n\nclass TestGit(TestGitFixture, TestCase):\n def __init__(self, methodName):\n TestGitFixture.__init__(self)\n TestCase.__init__(self, methodName)\n\n\nclass TestGitSubmodule(TestGitSubmoduleFixture, TestCase):\n def __init__(self, methodName):\n TestGitSubmoduleFixture.__init__(self)\n TestCase.__init__(self, methodName)\n\n\nclass TestDvc(TestDvcFixture, TestCase):\n def __init__(self, methodName):\n TestDvcFixture.__init__(self)\n TestCase.__init__(self, methodName)\n self._caplog = None\n\n @pytest.fixture(autouse=True)\n def inject_fixtures(self, caplog):\n self._caplog = caplog\n\n\nclass TestDvcGit(TestDvcGitFixture, TestCase):\n def __init__(self, methodName):\n TestDvcGitFixture.__init__(self)\n TestCase.__init__(self, methodName)\n self._caplog = None\n\n @pytest.fixture(autouse=True)\n def inject_fixtures(self, caplog):\n self._caplog = caplog", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_open_external_test_open_external.assert_api_read_version_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_open_external_test_open_external.assert_api_read_version_", "embedding": null, "metadata": {"file_path": "tests/func/test_api.py", "file_name": "test_api.py", "file_type": "text/x-python", "category": "test", "start_line": 73, "end_line": 110, "span_ids": ["test_open_external"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"cloud\",\n [\n pytest.lazy_fixture(cloud)\n for cloud in [\n \"s3\",\n \"gs\",\n \"azure\",\n \"gdrive\",\n \"oss\",\n \"http\",\n \"hdfs\",\n \"ssh\",\n \"webdav\",\n ]\n ],\n)\ndef test_open_external(tmp_dir, erepo_dir, cloud):\n erepo_dir.add_remote(config=cloud.config)\n\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\"version\", \"master\", commit=\"add version\")\n\n with erepo_dir.branch(\"branch\", new=\"True\"):\n # NOTE: need file to be other size for Mac\n erepo_dir.dvc_gen(\"version\", \"branchver\", commit=\"add version\")\n\n erepo_dir.dvc.push(all_branches=True)\n\n # Remove cache to force download\n remove(erepo_dir.dvc.cache.local.cache_dir)\n\n # Using file url to force clone to tmp repo\n repo_url = f\"file://{erepo_dir}\"\n with api.open(\"version\", repo=repo_url) as fd:\n assert fd.read() == \"master\"\n\n assert api.read(\"version\", repo=repo_url, rev=\"branch\") == \"branchver\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproShell_TestReproShell.test.None_2.self_assertEqual_os_geten": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproShell_TestReproShell.test.None_2.self_assertEqual_os_geten", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 1272, "end_line": 1295, "span_ids": ["TestReproShell.test", "TestReproShell"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproShell(TestDvc):\n def test(self):\n if os.name == \"nt\":\n return\n\n fname = \"shell.txt\"\n stage = fname + \".dvc\"\n\n self.dvc.run(\n fname=stage,\n outs=[fname],\n cmd=f\"echo $SHELL > {fname}\",\n single_stage=True,\n )\n\n with open(fname) as fd:\n self.assertEqual(os.getenv(\"SHELL\"), fd.read().strip())\n\n os.unlink(fname)\n\n self.dvc.reproduce(stage)\n\n with open(fname) as fd:\n self.assertEqual(os.getenv(\"SHELL\"), fd.read().strip())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_state.py_test_state_overflow_mock_get_inode.return.get_inode_mocked": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_state.py_test_state_overflow_mock_get_inode.return.get_inode_mocked", "embedding": null, "metadata": {"file_path": "tests/func/test_state.py", "file_name": "test_state.py", "file_type": "text/x-python", "category": "test", "start_line": 36, "end_line": 53, "span_ids": ["test_state_overflow", "mock_get_inode"], "tokens": 115}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_state_overflow(tmp_dir, dvc):\n # NOTE: trying to add more entries than state can handle,\n # to see if it will clean up and vacuum successfully\n dvc.config[\"state\"][\"row_limit\"] = 10\n\n path = tmp_dir / \"dir\"\n path.mkdir()\n for i in range(20):\n (path / str(i)).write_text(str(i))\n\n dvc.add(\"dir\")\n\n\ndef mock_get_inode(inode):\n def get_inode_mocked(_):\n return inode\n\n return get_inode_mocked", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_state.py_test_get_state_record_for_inode_test_get_state_record_for_inode.with_state_.assert_ret_is_not_None": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_state.py_test_get_state_record_for_inode_test_get_state_record_for_inode.with_state_.assert_ret_is_not_None", "embedding": null, "metadata": {"file_path": "tests/func/test_state.py", "file_name": "test_state.py", "file_type": "text/x-python", "category": "test", "start_line": 54, "end_line": 69, "span_ids": ["test_get_state_record_for_inode"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@mock.patch(\"dvc.state.get_inode\", autospec=True)\ndef test_get_state_record_for_inode(get_inode_mock, tmp_dir, dvc):\n tmp_dir.gen(\"foo\", \"foo content\")\n\n state = State(dvc)\n inode = state.MAX_INT + 2\n assert inode != state._to_sqlite(inode)\n\n foo = tmp_dir / \"foo\"\n md5 = file_md5(foo)[0]\n get_inode_mock.side_effect = mock_get_inode(inode)\n\n with state:\n state.save(PathInfo(foo), HashInfo(\"md5\", md5))\n ret = state.get_state_record_for_inode(inode)\n assert ret is not None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_get_url.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_get_url.py__", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_get_url.py", "file_name": "test_get_url.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 15, "span_ids": ["imports", "test_get_url"], "tokens": 97}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.cli import parse_args\nfrom dvc.command.get_url import CmdGetUrl\n\n\ndef test_get_url(mocker):\n cli_args = parse_args([\"get-url\", \"src\", \"out\"])\n assert cli_args.func == CmdGetUrl\n\n cmd = cli_args.func(cli_args)\n m = mocker.patch(\"dvc.repo.Repo.get_url\")\n\n assert cmd.run() == 0\n\n m.assert_called_once_with(\"src\", out=\"out\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_run.py_from_dvc_cli_import_parse_test_run.m_assert_called_once_with": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_run.py_from_dvc_cli_import_parse_test_run.m_assert_called_once_with", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_run.py", "file_name": "test_run.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 81, "span_ids": ["imports", "test_run"], "tokens": 438}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.cli import parse_args\nfrom dvc.command.run import CmdRun\n\n\ndef test_run(mocker, dvc):\n cli_args = parse_args(\n [\n \"run\",\n \"--name\",\n \"nam\",\n \"--deps\",\n \"deps\",\n \"--outs\",\n \"outs\",\n \"--outs-no-cache\",\n \"outs-no-cache\",\n \"--metrics\",\n \"metrics\",\n \"--metrics-no-cache\",\n \"metrics-no-cache\",\n \"--plots\",\n \"plots\",\n \"--plots-no-cache\",\n \"plots-no-cache\",\n \"--file\",\n \"file\",\n \"--wdir\",\n \"wdir\",\n \"--no-exec\",\n \"--force\",\n \"--no-run-cache\",\n \"--no-commit\",\n \"--outs-persist\",\n \"outs-persist\",\n \"--outs-persist-no-cache\",\n \"outs-persist-no-cache\",\n \"--checkpoints\",\n \"checkpoints\",\n \"--always-changed\",\n \"--params\",\n \"file:param1,param2\",\n \"--params\",\n \"param3\",\n \"--external\",\n \"--desc\",\n \"description\",\n \"command\",\n ]\n )\n assert cli_args.func == CmdRun\n\n cmd = cli_args.func(cli_args)\n m = mocker.patch.object(cmd.repo, \"run\", autospec=True)\n\n assert cmd.run() == 0\n\n m.assert_called_once_with(\n deps=[\"deps\"],\n outs=[\"outs\"],\n outs_no_cache=[\"outs-no-cache\"],\n metrics=[\"metrics\"],\n metrics_no_cache=[\"metrics-no-cache\"],\n plots=[\"plots\"],\n plots_no_cache=[\"plots-no-cache\"],\n outs_persist=[\"outs-persist\"],\n outs_persist_no_cache=[\"outs-persist-no-cache\"],\n checkpoints=[\"checkpoints\"],\n params=[\"file:param1,param2\", \"param3\"],\n fname=\"file\",\n wdir=\"wdir\",\n no_exec=True,\n force=True,\n run_cache=False,\n no_commit=True,\n always_changed=True,\n cmd=\"command\",\n name=\"nam\",\n single_stage=False,\n external=True,\n desc=\"description\",\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_run.py_test_run_args_from_cli_test_run_args_from_cli.m_assert_called_once_with": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_run.py_test_run_args_from_cli_test_run_args_from_cli.m_assert_called_once_with", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_run.py", "file_name": "test_run.py", "file_type": "text/x-python", "category": "test", "start_line": 84, "end_line": 113, "span_ids": ["test_run_args_from_cli"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_run_args_from_cli(mocker, dvc):\n args = parse_args([\"run\", \"echo\", \"foo\"])\n cmd = args.func(args)\n m = mocker.patch.object(cmd.repo, \"run\", autospec=True)\n assert cmd.run() == 0\n m.assert_called_once_with(\n deps=[],\n outs=[],\n outs_no_cache=[],\n metrics=[],\n metrics_no_cache=[],\n plots=[],\n plots_no_cache=[],\n outs_persist=[],\n outs_persist_no_cache=[],\n checkpoints=[],\n params=[],\n fname=None,\n wdir=None,\n no_exec=False,\n force=False,\n run_cache=True,\n no_commit=False,\n always_changed=False,\n cmd=\"echo foo\",\n name=None,\n single_stage=False,\n external=False,\n desc=None,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_run.py_test_run_args_with_spaces_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_run.py_test_run_args_with_spaces_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_run.py", "file_name": "test_run.py", "file_type": "text/x-python", "category": "test", "start_line": 116, "end_line": 146, "span_ids": ["test_run_args_with_spaces"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_run_args_with_spaces(mocker, dvc):\n args = parse_args([\"run\", \"echo\", \"foo bar\"])\n cmd = args.func(args)\n m = mocker.patch.object(cmd.repo, \"run\", autospec=True)\n assert cmd.run() == 0\n m.assert_called_once_with(\n deps=[],\n outs=[],\n outs_no_cache=[],\n metrics=[],\n metrics_no_cache=[],\n plots=[],\n plots_no_cache=[],\n outs_persist=[],\n outs_persist_no_cache=[],\n checkpoints=[],\n params=[],\n fname=None,\n wdir=None,\n no_exec=False,\n force=False,\n run_cache=True,\n no_commit=False,\n always_changed=False,\n cmd='echo \"foo bar\"',\n name=None,\n single_stage=False,\n external=False,\n desc=None,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/analytics.py_json_logger.logging_getLogger___name_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/analytics.py_json_logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "dvc/analytics.py", "file_name": "analytics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 23, "span_ids": ["imports"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import json\nimport logging\nimport os\nimport platform\nimport sys\nimport tempfile\nimport uuid\n\nimport distro\nimport requests\n\nfrom dvc import __version__\nfrom dvc.config import Config, to_bool\nfrom dvc.daemon import daemon\nfrom dvc.exceptions import NotDvcRepoError\nfrom dvc.lock import Lock, LockError\nfrom dvc.repo import Repo\nfrom dvc.scm import SCM, NoSCM\nfrom dvc.scm.base import SCMError\nfrom dvc.utils import env2bool, is_binary\nfrom dvc.utils.fs import makedirs\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/analytics.py_collect_and_send_report_collect_and_send_report.with_tempfile_NamedTempor.daemon_analytics_fobj": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/analytics.py_collect_and_send_report_collect_and_send_report.with_tempfile_NamedTempor.daemon_analytics_fobj", "embedding": null, "metadata": {"file_path": "dvc/analytics.py", "file_name": "analytics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 27, "end_line": 50, "span_ids": ["collect_and_send_report"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def collect_and_send_report(args=None, return_code=None):\n \"\"\"\n Collect information from the runtime/environment and the command\n being executed into a report and send it over the network.\n\n To prevent analytics from blocking the execution of the main thread,\n sending the report is done in a separate process.\n\n The inter-process communication happens through a file containing the\n report as a JSON, where the _collector_ generates it and the _sender_\n removes it after sending it.\n \"\"\"\n report = {}\n\n # Include command execution information on the report only when available.\n if args and hasattr(args, \"func\"):\n report.update({\"cmd_class\": args.func.__name__})\n\n if return_code is not None:\n report.update({\"cmd_return_code\": return_code})\n\n with tempfile.NamedTemporaryFile(delete=False, mode=\"w\") as fobj:\n json.dump(report, fobj)\n daemon([\"analytics\", fobj.name])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/analytics.py__scm_in_use__runtime_info.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/analytics.py__scm_in_use__runtime_info.return._", "embedding": null, "metadata": {"file_path": "dvc/analytics.py", "file_name": "analytics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 85, "end_line": 105, "span_ids": ["_runtime_info", "_scm_in_use"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _scm_in_use():\n try:\n scm = SCM(root_dir=Repo.find_root())\n return type(scm).__name__\n except SCMError:\n return NoSCM.__name__\n except NotDvcRepoError:\n pass\n\n\ndef _runtime_info():\n \"\"\"\n Gather information from the environment where DVC runs to fill a report.\n \"\"\"\n return {\n \"dvc_version\": __version__,\n \"is_binary\": is_binary(),\n \"scm_class\": _scm_in_use(),\n \"system_info\": _system_info(),\n \"user_id\": _find_or_create_user_id(),\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/analytics.py__system_info__system_info.raise_NotImplementedError": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/analytics.py__system_info__system_info.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "dvc/analytics.py", "file_name": "analytics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 108, "end_line": 134, "span_ids": ["_system_info"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _system_info():\n system = platform.system()\n\n if system == \"Windows\":\n version = sys.getwindowsversion()\n\n return {\n \"os\": \"windows\",\n \"windows_version_build\": version.build,\n \"windows_version_major\": version.major,\n \"windows_version_minor\": version.minor,\n \"windows_version_service_pack\": version.service_pack,\n }\n\n if system == \"Darwin\":\n return {\"os\": \"mac\", \"mac_version\": platform.mac_ver()[0]}\n\n if system == \"Linux\":\n return {\n \"os\": \"linux\",\n \"linux_distro\": distro.id(),\n \"linux_distro_like\": distro.like(),\n \"linux_distro_version\": distro.version(),\n }\n\n # We don't collect data for any other system.\n raise NotImplementedError", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/analytics.py__find_or_create_user_id_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/analytics.py__find_or_create_user_id_", "embedding": null, "metadata": {"file_path": "dvc/analytics.py", "file_name": "analytics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 140, "end_line": 174, "span_ids": ["_find_or_create_user_id"], "tokens": 258}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _find_or_create_user_id():\n \"\"\"\n The user's ID is stored on a file under the global config directory.\n\n The file should contain a JSON with a \"user_id\" key:\n\n {\"user_id\": \"16fd2706-8baf-433b-82eb-8c7fada847da\"}\n\n IDs are generated randomly with UUID.\n \"\"\"\n config_dir = Config.get_dir(\"global\")\n fname = os.path.join(config_dir, \"user_id\")\n lockfile = os.path.join(config_dir, \"user_id.lock\")\n\n # Since the `fname` and `lockfile` are under the global config,\n # we need to make sure such directory exist already.\n makedirs(config_dir, exist_ok=True)\n\n try:\n with Lock(lockfile):\n try:\n with open(fname) as fobj:\n user_id = json.load(fobj)[\"user_id\"]\n\n except (FileNotFoundError, ValueError, KeyError):\n user_id = str(uuid.uuid4())\n\n with open(fname, \"w\") as fobj:\n json.dump({\"user_id\": user_id}, fobj)\n\n return user_id\n\n except LockError:\n logger.debug(f\"Failed to acquire '{lockfile}'\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/api.py_open_open.return._OpenContextManager__open": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/api.py_open_open.return._OpenContextManager__open", "embedding": null, "metadata": {"file_path": "dvc/api.py", "file_name": "api.py", "file_type": "text/x-python", "category": "implementation", "start_line": 36, "end_line": 59, "span_ids": ["open"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def open( # noqa, pylint: disable=redefined-builtin\n path, repo=None, rev=None, remote=None, mode=\"r\", encoding=None\n):\n \"\"\"\n Open file in the supplied path tracked in a repo (both DVC projects and\n plain Git repos are supported). For Git repos, HEAD is used unless a rev\n argument is supplied. The default remote is tried unless a remote argument\n is supplied. It may only be used as a context manager:\n\n with dvc.api.open(\n 'path/to/file',\n repo='https://example.com/url/to/repo'\n ) as fd:\n # ... Handle file object fd\n \"\"\"\n args = (path,)\n kwargs = {\n \"repo\": repo,\n \"remote\": remote,\n \"rev\": rev,\n \"mode\": mode,\n \"encoding\": encoding,\n }\n return _OpenContextManager(_open, args, kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/api.py__OpenContextManager__open.with__make_repo_repo_rev.with__repo_open_by_relpat.yield_fd": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/api.py__OpenContextManager__open.with__make_repo_repo_rev.with__repo_open_by_relpat.yield_fd", "embedding": null, "metadata": {"file_path": "dvc/api.py", "file_name": "api.py", "file_type": "text/x-python", "category": "implementation", "start_line": 62, "end_line": 80, "span_ids": ["_OpenContextManager", "_open", "_OpenContextManager.__init__", "_OpenContextManager.__getattr__"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class _OpenContextManager(GCM):\n def __init__(\n self, func, args, kwds\n ): # pylint: disable=super-init-not-called\n self.gen = func(*args, **kwds)\n self.func, self.args, self.kwds = func, args, kwds\n\n def __getattr__(self, name):\n raise AttributeError(\n \"dvc.api.open() should be used in a with statement.\"\n )\n\n\ndef _open(path, repo=None, rev=None, remote=None, mode=\"r\", encoding=None):\n with _make_repo(repo, rev=rev) as _repo:\n with _repo.open_by_relpath(\n path, remote=remote, mode=mode, encoding=encoding\n ) as fd:\n yield fd", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/add.py_argparse_CmdAdd.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/add.py_argparse_CmdAdd.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/add.py", "file_name": "add.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 30, "span_ids": ["imports", "CmdAdd", "CmdAdd.run"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nfrom dvc.command import completion\nfrom dvc.command.base import CmdBase, append_doc_link\nfrom dvc.exceptions import DvcException, RecursiveAddingWhileUsingFilename\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdAdd(CmdBase):\n def run(self):\n try:\n if len(self.args.targets) > 1 and self.args.file:\n raise RecursiveAddingWhileUsingFilename()\n\n self.repo.add(\n self.args.targets,\n recursive=self.args.recursive,\n no_commit=self.args.no_commit,\n fname=self.args.file,\n external=self.args.external,\n glob=self.args.glob,\n desc=self.args.desc,\n )\n\n except DvcException:\n logger.exception(\"\")\n return 1\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/base.py_logging_append_doc_link.return._message_nDocumentation": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/base.py_logging_append_doc_link.return._message_nDocumentation", "embedding": null, "metadata": {"file_path": "dvc/command/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 28, "span_ids": ["imports", "fix_subparsers", "append_doc_link"], "tokens": 167}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nfrom abc import ABC, abstractmethod\n\nlogger = logging.getLogger(__name__)\n\n\ndef fix_subparsers(subparsers):\n \"\"\"Workaround for bug in Python 3. See more info at:\n https://bugs.python.org/issue16308\n https://github.com/iterative/dvc/issues/769\n\n Args:\n subparsers: subparsers to fix.\n \"\"\"\n subparsers.required = True\n subparsers.dest = \"cmd\"\n\n\ndef append_doc_link(help_message, path):\n from dvc.utils import format_link\n\n if not path:\n return help_message\n doc_base = \"https://man.dvc.org/\"\n return \"{message}\\nDocumentation: {link}\".format(\n message=help_message, link=format_link(doc_base + path)\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/checkout.py_CmdCheckout_CmdCheckout.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/checkout.py_CmdCheckout_CmdCheckout.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/checkout.py", "file_name": "checkout.py", "file_type": "text/x-python", "category": "implementation", "start_line": 39, "end_line": 65, "span_ids": ["CmdCheckout", "CmdCheckout.run"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdCheckout(CmdBase):\n def run(self):\n stats, exc = None, None\n try:\n stats = self.repo.checkout(\n targets=self.args.targets,\n with_deps=self.args.with_deps,\n force=self.args.force,\n relink=self.args.relink,\n recursive=self.args.recursive,\n )\n except CheckoutError as _exc:\n exc = _exc\n stats = exc.stats\n\n if self.args.summary:\n default_message = \"No changes.\"\n msg = get_summary(\n sorted(stats.items(), key=operator.itemgetter(0))\n )\n logger.info(msg or default_message)\n else:\n log_changes(stats)\n\n if exc:\n raise exc\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/checkout.py_add_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/checkout.py_add_parser_", "embedding": null, "metadata": {"file_path": "dvc/command/checkout.py", "file_name": "checkout.py", "file_type": "text/x-python", "category": "implementation", "start_line": 69, "end_line": 121, "span_ids": ["add_parser"], "tokens": 319}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n CHECKOUT_HELP = \"Checkout data files from cache.\"\n\n checkout_parser = subparsers.add_parser(\n \"checkout\",\n parents=[parent_parser],\n description=append_doc_link(CHECKOUT_HELP, \"checkout\"),\n help=CHECKOUT_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n checkout_parser.add_argument(\n \"--summary\",\n action=\"store_true\",\n default=False,\n help=\"Show summary of the changes.\",\n )\n checkout_parser.add_argument(\n \"-d\",\n \"--with-deps\",\n action=\"store_true\",\n default=False,\n help=\"Checkout all dependencies of the specified target.\",\n )\n checkout_parser.add_argument(\n \"-R\",\n \"--recursive\",\n action=\"store_true\",\n default=False,\n help=\"Checkout all subdirectories of the specified directory.\",\n )\n checkout_parser.add_argument(\n \"-f\",\n \"--force\",\n action=\"store_true\",\n default=False,\n help=\"Do not prompt when removing working directory files.\",\n )\n checkout_parser.add_argument(\n \"--relink\",\n action=\"store_true\",\n default=False,\n help=\"Recreate links or copies from cache to workspace.\",\n )\n checkout_parser.add_argument(\n \"targets\",\n nargs=\"*\",\n help=(\n \"Limit command scope to these tracked files/directories, \"\n \".dvc files, or stage names.\"\n ),\n ).complete = completion.DVC_FILE\n checkout_parser.set_defaults(func=CmdCheckout)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/commit.py_argparse_CmdCommit.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/commit.py_argparse_CmdCommit.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/commit.py", "file_name": "commit.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 31, "span_ids": ["imports", "CmdCommit", "CmdCommit.run"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nfrom dvc.command import completion\nfrom dvc.command.base import CmdBase, append_doc_link\nfrom dvc.exceptions import DvcException\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdCommit(CmdBase):\n def run(self):\n if not self.args.targets:\n self.args.targets = [None]\n\n for target in self.args.targets:\n try:\n self.repo.commit(\n target,\n with_deps=self.args.with_deps,\n recursive=self.args.recursive,\n force=self.args.force,\n )\n except DvcException:\n logger.exception(\n \"failed to commit{}\".format(\n (\" \" + target) if target else \"\"\n )\n )\n return 1\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/data_sync.py_argparse_CmdDataPull.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/data_sync.py_argparse_CmdDataPull.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/data_sync.py", "file_name": "data_sync.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 44, "span_ids": ["CmdDataPull.run", "imports", "CmdDataBase.log_summary", "CmdDataPull", "CmdDataBase", "CmdDataPull.log_summary"], "tokens": 277}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nfrom dvc.command import completion\nfrom dvc.command.base import CmdBase, append_doc_link\nfrom dvc.command.checkout import log_changes\nfrom dvc.exceptions import CheckoutError, DvcException\nfrom dvc.utils.humanize import get_summary\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdDataBase(CmdBase):\n def log_summary(self, stats):\n default_msg = \"Everything is up to date.\"\n logger.info(get_summary(stats.items()) or default_msg)\n\n\nclass CmdDataPull(CmdDataBase):\n def log_summary(self, stats):\n log_changes(stats)\n super().log_summary(stats)\n\n def run(self):\n try:\n stats = self.repo.pull(\n targets=self.args.targets,\n jobs=self.args.jobs,\n remote=self.args.remote,\n all_branches=self.args.all_branches,\n all_tags=self.args.all_tags,\n all_commits=self.args.all_commits,\n with_deps=self.args.with_deps,\n force=self.args.force,\n recursive=self.args.recursive,\n run_cache=self.args.run_cache,\n )\n self.log_summary(stats)\n except (CheckoutError, DvcException) as exc:\n self.log_summary(getattr(exc, \"stats\", {}))\n logger.exception(\"failed to pull data from the cloud\")\n return 1\n\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/data_sync.py_CmdDataPush_CmdDataPush.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/data_sync.py_CmdDataPush_CmdDataPush.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/data_sync.py", "file_name": "data_sync.py", "file_type": "text/x-python", "category": "implementation", "start_line": 47, "end_line": 66, "span_ids": ["CmdDataPush.run", "CmdDataPush"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdDataPush(CmdDataBase):\n def run(self):\n try:\n processed_files_count = self.repo.push(\n targets=self.args.targets,\n jobs=self.args.jobs,\n remote=self.args.remote,\n all_branches=self.args.all_branches,\n all_tags=self.args.all_tags,\n all_commits=self.args.all_commits,\n with_deps=self.args.with_deps,\n recursive=self.args.recursive,\n run_cache=self.args.run_cache,\n glob=self.args.glob,\n )\n self.log_summary({\"pushed\": processed_files_count})\n except DvcException:\n logger.exception(\"failed to push data to the cloud\")\n return 1\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/data_sync.py_CmdDataFetch_CmdDataFetch.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/data_sync.py_CmdDataFetch_CmdDataFetch.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/data_sync.py", "file_name": "data_sync.py", "file_type": "text/x-python", "category": "implementation", "start_line": 67, "end_line": 85, "span_ids": ["CmdDataFetch.run", "CmdDataFetch"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdDataFetch(CmdDataBase):\n def run(self):\n try:\n processed_files_count = self.repo.fetch(\n targets=self.args.targets,\n jobs=self.args.jobs,\n remote=self.args.remote,\n all_branches=self.args.all_branches,\n all_tags=self.args.all_tags,\n all_commits=self.args.all_commits,\n with_deps=self.args.with_deps,\n recursive=self.args.recursive,\n run_cache=self.args.run_cache,\n )\n self.log_summary({\"fetched\": processed_files_count})\n except DvcException:\n logger.exception(\"failed to fetch data from the cloud\")\n return 1\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/destroy.py_argparse_CmdDestroy.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/destroy.py_argparse_CmdDestroy.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/destroy.py", "file_name": "destroy.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 31, "span_ids": ["imports", "CmdDestroy.run", "CmdDestroy"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nimport dvc.prompt as prompt\nfrom dvc.command.base import CmdBase, append_doc_link\nfrom dvc.exceptions import DvcException\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdDestroy(CmdBase):\n def run(self):\n try:\n statement = (\n \"This will destroy all information about your pipelines,\"\n \" all data files, as well as cache in .dvc/cache.\"\n \"\\n\"\n \"Are you sure you want to continue?\"\n )\n\n if not self.args.force and not prompt.confirm(statement):\n raise DvcException(\n \"cannot destroy without a confirmation from the user.\"\n \" Use `-f` to force.\"\n )\n\n self.repo.destroy()\n except DvcException:\n logger.exception(\"failed to destroy DVC\")\n return 1\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/gc.py_argparse_CmdGC.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/gc.py_argparse_CmdGC.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/gc.py", "file_name": "gc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 62, "span_ids": ["imports", "CmdGC", "CmdGC.run"], "tokens": 396}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\nimport os\n\nimport dvc.prompt as prompt\nfrom dvc.command.base import CmdBase, append_doc_link\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdGC(CmdBase):\n def run(self):\n from dvc.repo.gc import _raise_error_if_all_disabled\n\n _raise_error_if_all_disabled(\n all_branches=self.args.all_branches,\n all_tags=self.args.all_tags,\n all_commits=self.args.all_commits,\n workspace=self.args.workspace,\n )\n\n msg = \"This will remove all cache except items used in \"\n\n msg += \"the workspace\"\n if self.args.all_commits:\n msg += \" and all git commits\"\n elif self.args.all_branches and self.args.all_tags:\n msg += \" and all git branches and tags\"\n elif self.args.all_branches:\n msg += \" and all git branches\"\n elif self.args.all_tags:\n msg += \" and all git tags\"\n elif self.args.all_experiments:\n msg += \" and all experiments\"\n\n if self.args.repos:\n msg += \" of the current and the following repos:\"\n\n for repo_path in self.args.repos:\n msg += \"\\n - %s\" % os.path.abspath(repo_path)\n else:\n msg += \" of the current repo.\"\n\n logger.warning(msg)\n\n msg = \"Are you sure you want to proceed?\"\n if not self.args.force and not prompt.confirm(msg):\n return 1\n\n self.repo.gc(\n all_branches=self.args.all_branches,\n all_tags=self.args.all_tags,\n all_commits=self.args.all_commits,\n all_experiments=self.args.all_experiments,\n cloud=self.args.cloud,\n remote=self.args.remote,\n force=self.args.force,\n jobs=self.args.jobs,\n repos=self.args.repos,\n workspace=self.args.workspace,\n )\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/get.py_argparse_CmdGet._get_file_from_repo.try_.except_DvcException_.return.1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/get.py_argparse_CmdGet._get_file_from_repo.try_.except_DvcException_.return.1", "embedding": null, "metadata": {"file_path": "dvc/command/get.py", "file_name": "get.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 50, "span_ids": ["CmdGet", "CmdGet._get_file_from_repo", "imports", "CmdGet._show_url", "CmdGet.run"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nfrom dvc.exceptions import DvcException\n\nfrom . import completion\nfrom .base import CmdBaseNoRepo, append_doc_link\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdGet(CmdBaseNoRepo):\n def _show_url(self):\n from dvc.api import get_url\n\n try:\n url = get_url(\n self.args.path, repo=self.args.url, rev=self.args.rev\n )\n logger.info(url)\n except DvcException:\n logger.exception(\"failed to show URL\")\n return 1\n\n return 0\n\n def run(self):\n if self.args.show_url:\n return self._show_url()\n\n return self._get_file_from_repo()\n\n def _get_file_from_repo(self):\n from dvc.repo import Repo\n\n try:\n Repo.get(\n self.args.url,\n path=self.args.path,\n out=self.args.out,\n rev=self.args.rev,\n )\n return 0\n except DvcException:\n logger.exception(\n \"failed to get '{}' from '{}'\".format(\n self.args.path, self.args.url\n )\n )\n return 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/get_url.py_argparse_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/get_url.py_argparse_", "embedding": null, "metadata": {"file_path": "dvc/command/get_url.py", "file_name": "get_url.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 40, "span_ids": ["imports", "CmdGetUrl.run", "CmdGetUrl", "add_parser"], "tokens": 253}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nfrom dvc.exceptions import DvcException\n\nfrom . import completion\nfrom .base import CmdBaseNoRepo, append_doc_link\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdGetUrl(CmdBaseNoRepo):\n def run(self):\n from dvc.repo import Repo\n\n try:\n Repo.get_url(self.args.url, out=self.args.out)\n return 0\n except DvcException:\n logger.exception(f\"failed to get '{self.args.url}'\")\n return 1\n\n\ndef add_parser(subparsers, parent_parser):\n GET_HELP = \"Download or copy files from URL.\"\n get_parser = subparsers.add_parser(\n \"get-url\",\n parents=[parent_parser],\n description=append_doc_link(GET_HELP, \"get-url\"),\n help=GET_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n get_parser.add_argument(\n \"url\", help=\"See `dvc import-url -h` for full list of supported URLs.\"\n )\n get_parser.add_argument(\n \"out\", nargs=\"?\", help=\"Destination path to put data to.\",\n ).complete = completion.DIR\n get_parser.set_defaults(func=CmdGetUrl)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/git_hook.py_logging_CmdPreCommit._run.return.main_status_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/git_hook.py_logging_CmdPreCommit._run.return.main_status_", "embedding": null, "metadata": {"file_path": "dvc/command/git_hook.py", "file_name": "git_hook.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 30, "span_ids": ["CmdHookBase._run", "CmdHookBase", "imports", "CmdPreCommit._run", "CmdPreCommit", "CmdHookBase.run"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\n\nfrom dvc.command.base import CmdBaseNoRepo, fix_subparsers\nfrom dvc.exceptions import NotDvcRepoError\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdHookBase(CmdBaseNoRepo):\n def run(self):\n from dvc.repo import Repo\n\n try:\n repo = Repo()\n repo.close()\n except NotDvcRepoError:\n return 0\n\n return self._run()\n\n def _run(self):\n raise NotImplementedError\n\n\nclass CmdPreCommit(CmdHookBase):\n def _run(self):\n from dvc.main import main\n\n return main([\"status\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/git_hook.py_add_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/git_hook.py_add_parser_", "embedding": null, "metadata": {"file_path": "dvc/command/git_hook.py", "file_name": "git_hook.py", "file_type": "text/x-python", "category": "implementation", "start_line": 84, "end_line": 160, "span_ids": ["add_parser"], "tokens": 526}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n GIT_HOOK_HELP = \"Run GIT hook.\"\n\n git_hook_parser = subparsers.add_parser(\n \"git-hook\",\n parents=[parent_parser],\n description=GIT_HOOK_HELP,\n add_help=False,\n )\n\n git_hook_subparsers = git_hook_parser.add_subparsers(\n dest=\"cmd\",\n help=\"Use `dvc daemon CMD --help` for command-specific help.\",\n )\n\n fix_subparsers(git_hook_subparsers)\n\n PRE_COMMIT_HELP = \"Run pre-commit GIT hook.\"\n pre_commit_parser = git_hook_subparsers.add_parser(\n \"pre-commit\",\n parents=[parent_parser],\n description=PRE_COMMIT_HELP,\n help=PRE_COMMIT_HELP,\n )\n pre_commit_parser.add_argument(\n \"args\", nargs=\"*\", help=\"Arguments passed by GIT or pre-commit tool.\",\n )\n pre_commit_parser.set_defaults(func=CmdPreCommit)\n\n POST_CHECKOUT_HELP = \"Run post-checkout GIT hook.\"\n post_checkout_parser = git_hook_subparsers.add_parser(\n \"post-checkout\",\n parents=[parent_parser],\n description=POST_CHECKOUT_HELP,\n help=POST_CHECKOUT_HELP,\n )\n post_checkout_parser.add_argument(\n \"args\", nargs=\"*\", help=\"Arguments passed by GIT or pre-commit tool.\",\n )\n post_checkout_parser.set_defaults(func=CmdPostCheckout)\n\n PRE_PUSH_HELP = \"Run pre-push GIT hook.\"\n pre_push_parser = git_hook_subparsers.add_parser(\n \"pre-push\",\n parents=[parent_parser],\n description=PRE_PUSH_HELP,\n help=PRE_PUSH_HELP,\n )\n pre_push_parser.add_argument(\n \"args\", nargs=\"*\", help=\"Arguments passed by GIT or pre-commit tool.\",\n )\n pre_push_parser.set_defaults(func=CmdPrePush)\n\n MERGE_DRIVER_HELP = \"Run GIT merge driver.\"\n merge_driver_parser = git_hook_subparsers.add_parser(\n \"merge-driver\",\n parents=[parent_parser],\n description=MERGE_DRIVER_HELP,\n help=MERGE_DRIVER_HELP,\n )\n merge_driver_parser.add_argument(\n \"--ancestor\",\n required=True,\n help=\"Ancestor's version of the conflicting file.\",\n )\n merge_driver_parser.add_argument(\n \"--our\",\n required=True,\n help=\"Current version of the conflicting file.\",\n )\n merge_driver_parser.add_argument(\n \"--their\",\n required=True,\n help=\"Other branch's version of the conflicting file.\",\n )\n merge_driver_parser.set_defaults(func=CmdMergeDriver)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/imp.py_argparse_CmdImport.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/imp.py_argparse_CmdImport.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/imp.py", "file_name": "imp.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 31, "span_ids": ["CmdImport.run", "imports", "CmdImport"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nfrom dvc.command import completion\nfrom dvc.command.base import CmdBase, append_doc_link\nfrom dvc.exceptions import DvcException\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdImport(CmdBase):\n def run(self):\n try:\n self.repo.imp(\n self.args.url,\n self.args.path,\n out=self.args.out,\n fname=self.args.file,\n rev=self.args.rev,\n no_exec=self.args.no_exec,\n desc=self.args.desc,\n jobs=self.args.jobs,\n )\n except DvcException:\n logger.exception(\n \"failed to import '{}' from '{}'.\".format(\n self.args.path, self.args.url\n )\n )\n return 1\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/imp_url.py_argparse_CmdImportUrl.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/imp_url.py_argparse_CmdImportUrl.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/imp_url.py", "file_name": "imp_url.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 29, "span_ids": ["imports", "CmdImportUrl", "CmdImportUrl.run"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nfrom dvc.command import completion\nfrom dvc.command.base import CmdBase, append_doc_link\nfrom dvc.exceptions import DvcException\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdImportUrl(CmdBase):\n def run(self):\n try:\n self.repo.imp_url(\n self.args.url,\n out=self.args.out,\n fname=self.args.file,\n no_exec=self.args.no_exec,\n desc=self.args.desc,\n )\n except DvcException:\n logger.exception(\n \"failed to import {}. You could also try downloading \"\n \"it manually, and adding it with `dvc add`.\".format(\n self.args.url\n )\n )\n return 1\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/init.py_argparse_CmdInit.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/init.py_argparse_CmdInit.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/init.py", "file_name": "init.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 53, "span_ids": ["imports", "CmdInit", "CmdInit.run", "_welcome_message"], "tokens": 354}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nimport colorama\n\nfrom dvc import analytics\nfrom dvc.command.base import CmdBaseNoRepo, append_doc_link\nfrom dvc.utils import boxify\nfrom dvc.utils import format_link as fmt_link\n\nlogger = logging.getLogger(__name__)\n\n\ndef _welcome_message():\n if analytics.is_enabled():\n logger.info(\n boxify(\n \"DVC has enabled anonymous aggregate usage analytics.\\n\"\n \"Read the analytics documentation (and how to opt-out) here:\\n\"\n + fmt_link(\"https://dvc.org/doc/user-guide/analytics\"),\n border_color=\"red\",\n )\n )\n\n msg = (\n \"{yellow}What's next?{nc}\\n\"\n \"{yellow}------------{nc}\\n\"\n f\"- Check out the documentation: {fmt_link('https://dvc.org/doc')}\\n\"\n f\"- Get help and share ideas: {fmt_link('https://dvc.org/chat')}\\n\"\n f\"- Star us on GitHub: {fmt_link('https://github.com/iterative/dvc')}\"\n ).format(yellow=colorama.Fore.YELLOW, nc=colorama.Fore.RESET)\n\n logger.info(msg)\n\n\nclass CmdInit(CmdBaseNoRepo):\n def run(self):\n from dvc.exceptions import InitError\n from dvc.repo import Repo\n\n try:\n self.repo = Repo.init(\n \".\",\n no_scm=self.args.no_scm,\n force=self.args.force,\n subdir=self.args.subdir,\n )\n self.config = self.repo.config\n _welcome_message()\n except InitError:\n logger.exception(\"failed to initiate DVC\")\n return 1\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/install.py_argparse_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/install.py_argparse_", "embedding": null, "metadata": {"file_path": "dvc/command/install.py", "file_name": "install.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 37, "span_ids": ["imports", "CmdInstall.run", "add_parser", "CmdInstall"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nfrom dvc.command.base import CmdBase, append_doc_link\nfrom dvc.exceptions import DvcException\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdInstall(CmdBase):\n def run(self):\n try:\n self.repo.install(self.args.use_pre_commit_tool)\n except DvcException:\n logger.exception(\"failed to install DVC Git hooks\")\n return 1\n return 0\n\n\ndef add_parser(subparsers, parent_parser):\n INSTALL_HELP = \"Install DVC git hooks into the repository.\"\n install_parser = subparsers.add_parser(\n \"install\",\n parents=[parent_parser],\n description=append_doc_link(INSTALL_HELP, \"install\"),\n help=INSTALL_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n install_parser.add_argument(\n \"--use-pre-commit-tool\",\n action=\"store_true\",\n default=False,\n help=\"Install DVC hooks using pre-commit \"\n \"(https://pre-commit.com) if it is installed.\",\n )\n install_parser.set_defaults(func=CmdInstall)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/ls/__init__.py_add_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/ls/__init__.py_add_parser_", "embedding": null, "metadata": {"file_path": "dvc/command/ls/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 46, "end_line": 80, "span_ids": ["add_parser"], "tokens": 245}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n LIST_HELP = (\n \"List repository contents, including files\"\n \" and directories tracked by DVC and by Git.\"\n )\n list_parser = subparsers.add_parser(\n \"list\",\n parents=[parent_parser],\n description=append_doc_link(LIST_HELP, \"list\"),\n help=LIST_HELP,\n formatter_class=argparse.RawTextHelpFormatter,\n )\n list_parser.add_argument(\"url\", help=\"Location of DVC repository to list\")\n list_parser.add_argument(\n \"-R\",\n \"--recursive\",\n action=\"store_true\",\n help=\"Recursively list files.\",\n )\n list_parser.add_argument(\n \"--dvc-only\", action=\"store_true\", help=\"Show only DVC outputs.\"\n )\n list_parser.add_argument(\n \"--rev\",\n nargs=\"?\",\n help=\"Git revision (e.g. SHA, branch, tag)\",\n metavar=\"\",\n )\n list_parser.add_argument(\n \"path\",\n nargs=\"?\",\n help=\"Path to directory within the repository to list outputs for\",\n ).complete = completion.DIR\n list_parser.set_defaults(func=CmdList)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/ls/ls_colors.py_os_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/ls/ls_colors.py_os_", "embedding": null, "metadata": {"file_path": "dvc/command/ls/ls_colors.py", "file_name": "ls_colors.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 49, "span_ids": ["LsColors._format", "LsColors._load", "imports", "LsColors.__init__", "LsColors.format", "LsColors"], "tokens": 344}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\n\nclass LsColors:\n default = \"rs=0:di=01;34:ex=01;32\"\n\n def __init__(self, lscolors=None):\n self._extensions = {}\n self._codes = {}\n self._load(lscolors or os.environ.get(\"LS_COLORS\") or LsColors.default)\n\n def _load(self, lscolors):\n for item in lscolors.split(\":\"):\n try:\n code, color = item.split(\"=\", 1)\n except ValueError:\n continue\n if code.startswith(\"*.\"):\n self._extensions[code[1:]] = color\n else:\n self._codes[code] = color\n\n def format(self, entry):\n text = entry[\"path\"]\n\n if entry.get(\"isout\", False) and \"out\" in self._codes:\n return self._format(text, code=\"out\")\n\n if entry.get(\"isdir\", False):\n return self._format(text, code=\"di\")\n\n if entry.get(\"isexec\", False):\n return self._format(text, code=\"ex\")\n\n _, ext = os.path.splitext(text)\n return self._format(text, ext=ext)\n\n def _format(self, text, code=None, ext=None):\n val = None\n if ext:\n val = self._extensions.get(ext, None)\n if code:\n val = self._codes.get(code, None)\n\n if not val:\n return text\n rs = self._codes.get(\"rs\", 0)\n return f\"\\033[{val}m{text}\\033[{rs}m\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/metrics.py_CmdMetricsDiff_CmdMetricsDiff.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/metrics.py_CmdMetricsDiff_CmdMetricsDiff.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/metrics.py", "file_name": "metrics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 112, "end_line": 141, "span_ids": ["CmdMetricsDiff.run", "CmdMetricsDiff"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdMetricsDiff(CmdMetricsBase):\n def run(self):\n try:\n diff = self.repo.metrics.diff(\n a_rev=self.args.a_rev,\n b_rev=self.args.b_rev,\n targets=self.args.targets,\n recursive=self.args.recursive,\n all=self.args.all,\n )\n\n if self.args.show_json:\n import json\n\n logger.info(json.dumps(diff))\n else:\n table = _show_diff(\n diff,\n self.args.show_md,\n self.args.no_path,\n precision=self.args.precision,\n )\n if table:\n logger.info(table)\n\n except DvcException:\n logger.exception(\"failed to show metrics diff\")\n return 1\n\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/move.py_argparse_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/move.py_argparse_", "embedding": null, "metadata": {"file_path": "dvc/command/move.py", "file_name": "move.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 46, "span_ids": ["imports", "CmdMove.run", "add_parser", "CmdMove"], "tokens": 296}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nfrom dvc.command import completion\nfrom dvc.command.base import CmdBase, append_doc_link\nfrom dvc.exceptions import DvcException\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdMove(CmdBase):\n def run(self):\n try:\n self.repo.move(self.args.src, self.args.dst)\n except DvcException:\n msg = \"failed to move '{}' -> '{}'\".format(\n self.args.src, self.args.dst\n )\n logger.exception(msg)\n return 1\n return 0\n\n\ndef add_parser(subparsers, parent_parser):\n MOVE_HELP = \"Rename or move a DVC controlled data file or a directory.\"\n MOVE_DESCRIPTION = (\n \"Rename or move a DVC controlled data file or a directory.\\n\"\n \"It renames and modifies the corresponding DVC-file to reflect the\"\n \" changes.\"\n )\n\n move_parser = subparsers.add_parser(\n \"move\",\n parents=[parent_parser],\n description=append_doc_link(MOVE_DESCRIPTION, \"move\"),\n help=MOVE_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n move_parser.add_argument(\n \"src\", help=\"Source path to a data file or directory.\",\n ).complete = completion.FILE\n move_parser.add_argument(\n \"dst\", help=\"Destination path.\",\n ).complete = completion.FILE\n move_parser.set_defaults(func=CmdMove)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_CmdRemoteAdd_CmdRemoteAdd.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_CmdRemoteAdd_CmdRemoteAdd.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/remote.py", "file_name": "remote.py", "file_type": "text/x-python", "category": "implementation", "start_line": 24, "end_line": 40, "span_ids": ["CmdRemoteAdd", "CmdRemoteAdd.run"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdRemoteAdd(CmdRemote):\n def run(self):\n if self.args.default:\n logger.info(f\"Setting '{self.args.name}' as a default remote.\")\n\n with self.config.edit(self.args.level) as conf:\n if self.args.name in conf[\"remote\"] and not self.args.force:\n raise ConfigError(\n \"remote '{}' already exists. Use `-f|--force` to \"\n \"overwrite it.\".format(self.args.name)\n )\n\n conf[\"remote\"][self.args.name] = {\"url\": self.args.url}\n if self.args.default:\n conf[\"core\"][\"remote\"] = self.args.name\n\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/root.py_argparse_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/root.py_argparse_", "embedding": null, "metadata": {"file_path": "dvc/command/root.py", "file_name": "root.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 28, "span_ids": ["imports", "CmdRoot.run", "CmdRoot", "add_parser"], "tokens": 160}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nfrom dvc.command.base import CmdBaseNoRepo, append_doc_link\nfrom dvc.utils import relpath\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdRoot(CmdBaseNoRepo):\n def run(self):\n from dvc.repo import Repo\n\n logger.info(relpath(Repo.find_root()))\n return 0\n\n\ndef add_parser(subparsers, parent_parser):\n ROOT_HELP = \"Return the relative path to the root of the DVC project.\"\n root_parser = subparsers.add_parser(\n \"root\",\n parents=[parent_parser],\n description=append_doc_link(ROOT_HELP, \"root\"),\n help=ROOT_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n root_parser.set_defaults(func=CmdRoot)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/run.py_argparse_CmdRun.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/run.py_argparse_CmdRun.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/run.py", "file_name": "run.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 66, "span_ids": ["imports", "CmdRun", "CmdRun.run"], "tokens": 448}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nfrom dvc.command import completion\nfrom dvc.command.base import CmdBase, append_doc_link\nfrom dvc.exceptions import DvcException\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdRun(CmdBase):\n def run(self):\n if not any(\n [\n self.args.deps,\n self.args.outs,\n self.args.outs_no_cache,\n self.args.metrics,\n self.args.metrics_no_cache,\n self.args.plots,\n self.args.plots_no_cache,\n self.args.outs_persist,\n self.args.outs_persist_no_cache,\n self.args.checkpoints,\n self.args.params,\n self.args.command,\n ]\n ): # pragma: no cover\n logger.error(\n \"too few arguments. Specify at least one: `-d`, `-o`, `-O`, \"\n \"`-m`, `-M`, `-p`, `--plots`, `--plots-no-cache`, \"\n \"`--outs-persist`, `--outs-persist-no-cache`, `command`.\"\n )\n return 1\n\n try:\n self.repo.run(\n cmd=self._parsed_cmd(),\n outs=self.args.outs,\n outs_no_cache=self.args.outs_no_cache,\n metrics=self.args.metrics,\n metrics_no_cache=self.args.metrics_no_cache,\n plots=self.args.plots,\n plots_no_cache=self.args.plots_no_cache,\n deps=self.args.deps,\n params=self.args.params,\n fname=self.args.file,\n wdir=self.args.wdir,\n no_exec=(self.args.no_exec or bool(self.args.checkpoints)),\n force=self.args.force,\n run_cache=not self.args.no_run_cache,\n no_commit=self.args.no_commit,\n outs_persist=self.args.outs_persist,\n outs_persist_no_cache=self.args.outs_persist_no_cache,\n checkpoints=self.args.checkpoints,\n always_changed=self.args.always_changed,\n name=self.args.name,\n single_stage=self.args.single_stage,\n external=self.args.external,\n desc=self.args.desc,\n )\n except DvcException:\n logger.exception(\"\")\n return 1\n\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/status.py_CmdDataStatus.run_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/status.py_CmdDataStatus.run_", "embedding": null, "metadata": {"file_path": "dvc/command/status.py", "file_name": "status.py", "file_type": "text/x-python", "category": "implementation", "start_line": 46, "end_line": 84, "span_ids": ["CmdDataStatus.run"], "tokens": 237}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdDataStatus(CmdDataBase):\n\n def run(self):\n indent = 1 if self.args.cloud else 0\n try:\n st = self.repo.status(\n targets=self.args.targets,\n jobs=self.args.jobs,\n cloud=self.args.cloud,\n remote=self.args.remote,\n all_branches=self.args.all_branches,\n all_tags=self.args.all_tags,\n all_commits=self.args.all_commits,\n with_deps=self.args.with_deps,\n recursive=self.args.recursive,\n )\n\n if self.args.quiet:\n return bool(st)\n\n if self.args.show_json:\n import json\n\n logger.info(json.dumps(st))\n elif st:\n self._show(st, indent)\n elif not self.repo.stages:\n logger.info(self.EMPTY_PROJECT_MSG)\n elif self.args.cloud or self.args.remote:\n remote = self.args.remote or self.repo.config[\"core\"].get(\n \"remote\"\n )\n logger.info(self.IN_SYNC_MSG.format(remote=remote))\n else:\n logger.info(self.UP_TO_DATE_MSG)\n\n except DvcException:\n logger.exception(\"\")\n return 1\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/unprotect.py_argparse_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/unprotect.py_argparse_", "embedding": null, "metadata": {"file_path": "dvc/command/unprotect.py", "file_name": "unprotect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 39, "span_ids": ["imports", "add_parser", "CmdUnprotect", "CmdUnprotect.run"], "tokens": 258}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nfrom dvc.command import completion\nfrom dvc.command.base import CmdBase, append_doc_link\nfrom dvc.exceptions import DvcException\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdUnprotect(CmdBase):\n def run(self):\n for target in self.args.targets:\n try:\n self.repo.unprotect(target)\n except DvcException:\n msg = f\"failed to unprotect '{target}'\"\n logger.exception(msg)\n return 1\n return 0\n\n\ndef add_parser(subparsers, parent_parser):\n UNPROTECT_HELP = (\n \"Unprotect tracked files or directories (when hardlinks or symlinks \"\n \"have been enabled with `dvc config cache.type`)\"\n )\n unprotect_parser = subparsers.add_parser(\n \"unprotect\",\n parents=[parent_parser],\n description=append_doc_link(UNPROTECT_HELP, \"unprotect\"),\n help=UNPROTECT_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n unprotect_parser.add_argument(\n \"targets\", nargs=\"+\", help=\"Data files/directories to unprotect.\",\n ).complete = completion.FILE\n unprotect_parser.set_defaults(func=CmdUnprotect)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/update.py_argparse_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/update.py_argparse_", "embedding": null, "metadata": {"file_path": "dvc/command/update.py", "file_name": "update.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 52, "span_ids": ["imports", "CmdUpdate", "add_parser", "CmdUpdate.run"], "tokens": 301}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nfrom dvc.command import completion\nfrom dvc.command.base import CmdBase, append_doc_link\nfrom dvc.exceptions import DvcException\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdUpdate(CmdBase):\n def run(self):\n ret = 0\n try:\n self.repo.update(\n targets=self.args.targets,\n rev=self.args.rev,\n recursive=self.args.recursive,\n )\n except DvcException:\n logger.exception(\"failed update data\")\n ret = 1\n return ret\n\n\ndef add_parser(subparsers, parent_parser):\n UPDATE_HELP = \"Update data artifacts imported from other DVC repositories.\"\n update_parser = subparsers.add_parser(\n \"update\",\n parents=[parent_parser],\n description=append_doc_link(UPDATE_HELP, \"update\"),\n help=UPDATE_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n update_parser.add_argument(\n \"targets\", nargs=\"+\", help=\"DVC-files to update.\",\n ).complete = completion.DVC_FILE\n update_parser.add_argument(\n \"--rev\",\n nargs=\"?\",\n help=\"Git revision (e.g. SHA, branch, tag)\",\n metavar=\"\",\n )\n update_parser.add_argument(\n \"-R\",\n \"--recursive\",\n action=\"store_true\",\n default=False,\n help=\"Update all stages in the specified directory.\",\n )\n update_parser.set_defaults(func=CmdUpdate)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py__DVC_config_objects__NoRemoteError.pass": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py__DVC_config_objects__NoRemoteError.pass", "embedding": null, "metadata": {"file_path": "dvc/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 38, "span_ids": ["ConfigError.__init__", "ConfigError", "NoRemoteError", "docstring"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"DVC config objects.\"\"\"\nimport logging\nimport os\nimport re\nfrom contextlib import contextmanager\nfrom functools import partial\nfrom urllib.parse import urlparse\n\nimport configobj\nfrom funcy import cached_property, compact, re_find, walk_values\nfrom voluptuous import (\n ALLOW_EXTRA,\n All,\n Any,\n Coerce,\n Invalid,\n Lower,\n Optional,\n Range,\n Schema,\n)\n\nfrom dvc.exceptions import DvcException, NotDvcRepoError\nfrom dvc.path_info import PathInfo\nfrom dvc.utils import relpath\n\nlogger = logging.getLogger(__name__)\n\n\nclass ConfigError(DvcException):\n \"\"\"DVC config exception.\"\"\"\n\n def __init__(self, msg):\n super().__init__(f\"config file error: {msg}\")\n\n\nclass NoRemoteError(ConfigError):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_supported_cache_type_supported_cache_type.return.types": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_supported_cache_type_supported_cache_type.return.types", "embedding": null, "metadata": {"file_path": "dvc/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 30, "end_line": 47, "span_ids": ["supported_cache_type"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def supported_cache_type(types):\n \"\"\"Checks if link type config option consists only of valid values.\n\n Args:\n types (list/string): type(s) of links that dvc should try out.\n \"\"\"\n if types is None:\n return None\n if isinstance(types, str):\n types = [typ.strip() for typ in types.split(\",\")]\n\n unsupported = set(types) - {\"reflink\", \"hardlink\", \"symlink\", \"copy\"}\n if unsupported:\n raise Invalid(\n \"Unsupported cache type(s): {}\".format(\", \".join(unsupported))\n )\n\n return types", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py__Checks_that_value_is_ei_Choices.return.Any_choices_msg_expect": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py__Checks_that_value_is_ei_Choices.return.Any_choices_msg_expect", "embedding": null, "metadata": {"file_path": "dvc/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 50, "end_line": 66, "span_ids": ["supported_cache_type", "impl:3", "Choices"], "tokens": 115}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Checks that value is either true or false and converts it to bool\nto_bool = Bool = All(\n Lower,\n Any(\"true\", \"false\"),\n lambda v: v == \"true\",\n msg=\"expected true or false\",\n)\n\n\ndef Choices(*choices):\n \"\"\"Checks that value belongs to the specified set of values\n\n Args:\n *choices: pass allowed values as arguments, or pass a list or\n tuple as a single argument\n \"\"\"\n return Any(*choices, msg=\"expected one of {}\".format(\", \".join(choices)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_ByUrl_ByUrl.return.validate": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_ByUrl_ByUrl.return.validate", "embedding": null, "metadata": {"file_path": "dvc/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 80, "end_line": 96, "span_ids": ["ByUrl"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def ByUrl(mapping):\n schemas = walk_values(Schema, mapping)\n\n def validate(data):\n if \"url\" not in data:\n raise Invalid(\"expected 'url'\")\n\n parsed = urlparse(data[\"url\"])\n # Windows absolute paths should really have scheme == \"\" (local)\n if os.name == \"nt\" and len(parsed.scheme) == 1 and parsed.netloc == \"\":\n return schemas[\"\"](data)\n if parsed.scheme not in schemas:\n raise Invalid(f\"Unsupported URL type {parsed.scheme}://\")\n\n return schemas[parsed.scheme](data)\n\n return validate", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py__Draws_DAG_in_ASCII__make_pager.return.pager": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py__Draws_DAG_in_ASCII__make_pager.return.pager", "embedding": null, "metadata": {"file_path": "dvc/dagascii.py", "file_name": "dagascii.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 29, "span_ids": ["make_pager", "docstring"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Draws DAG in ASCII.\"\"\"\n\nimport logging\nimport math\nimport os\nimport pydoc\nimport sys\n\nfrom grandalf.graphs import Edge, Graph, Vertex\nfrom grandalf.layouts import SugiyamaLayout\nfrom grandalf.routing import EdgeViewer, route_with_lines\n\nfrom dvc.env import DVC_PAGER\nfrom dvc.utils import format_link\n\nlogger = logging.getLogger(__name__)\n\n\nDEFAULT_PAGER = \"less\"\nDEFAULT_PAGER_FORMATTED = \"{} --chop-long-lines --clear-screen\".format(\n DEFAULT_PAGER\n)\n\n\ndef make_pager(cmd):\n def pager(text):\n return pydoc.tempfilepager(pydoc.plain(text), cmd)\n\n return pager", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py_find_pager_find_pager.return.pydoc_plainpager": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py_find_pager_find_pager.return.pydoc_plainpager", "embedding": null, "metadata": {"file_path": "dvc/dagascii.py", "file_name": "dagascii.py", "file_type": "text/x-python", "category": "implementation", "start_line": 32, "end_line": 49, "span_ids": ["find_pager"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def find_pager():\n if not sys.stdout.isatty():\n return pydoc.plainpager\n\n env_pager = os.getenv(DVC_PAGER)\n if env_pager:\n return make_pager(env_pager)\n\n if os.system(f\"({DEFAULT_PAGER}) 2>{os.devnull}\") == 0:\n return make_pager(DEFAULT_PAGER_FORMATTED)\n\n logger.warning(\n \"Unable to find `less` in the PATH. Check out \"\n \"{} for more info.\".format(\n format_link(\"https://man.dvc.org/pipeline/show\")\n )\n )\n return pydoc.plainpager", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py_VertexViewer_VertexViewer.w.return.self__w": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py_VertexViewer_VertexViewer.w.return.self__w", "embedding": null, "metadata": {"file_path": "dvc/dagascii.py", "file_name": "dagascii.py", "file_type": "text/x-python", "category": "implementation", "start_line": 52, "end_line": 75, "span_ids": ["VertexViewer.__init__", "VertexViewer.w", "VertexViewer.h", "VertexViewer"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class VertexViewer:\n \"\"\"Class to define vertex box boundaries that will be accounted for during\n graph building by grandalf.\n\n Args:\n name (str): name of the vertex.\n \"\"\"\n\n HEIGHT = 3 # top and bottom box edges + text\n\n def __init__(self, name):\n # pylint: disable=invalid-name\n self._h = self.HEIGHT # top and bottom box edges + text\n self._w = len(name) + 2 # right and left bottom edges + text\n\n @property\n def h(self): # pylint: disable=invalid-name\n \"\"\"Height of the box.\"\"\"\n return self._h\n\n @property\n def w(self): # pylint: disable=invalid-name\n \"\"\"Width of the box.\"\"\"\n return self._w", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/data_cloud.py__Manages_dvc_remotes_th_DataCloud.get_remote.raise_NoRemoteError_error": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/data_cloud.py__Manages_dvc_remotes_th_DataCloud.get_remote.raise_NoRemoteError_error", "embedding": null, "metadata": {"file_path": "dvc/data_cloud.py", "file_name": "data_cloud.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 45, "span_ids": ["DataCloud.get_remote", "DataCloud.__init__", "DataCloud", "docstring"], "tokens": 274}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Manages dvc remotes that user can use with push/pull/status commands.\"\"\"\n\nimport logging\n\nfrom dvc.config import NoRemoteError\nfrom dvc.remote import get_remote\n\nlogger = logging.getLogger(__name__)\n\n\nclass DataCloud:\n \"\"\"Class that manages dvc remotes.\n\n Args:\n repo (dvc.repo.Repo): repo instance that belongs to the repo that\n we are working on.\n\n Raises:\n config.ConfigError: thrown when config has invalid format.\n \"\"\"\n\n def __init__(self, repo):\n self.repo = repo\n\n def get_remote(self, name=None, command=\"\"):\n if not name:\n name = self.repo.config[\"core\"].get(\"remote\")\n\n if name:\n return self._init_remote(name)\n\n if bool(self.repo.config[\"remote\"]):\n error_msg = (\n \"no remote specified. Setup default remote with\\n\"\n \" dvc remote default \\n\"\n \"or use:\\n\"\n \" dvc {} -r \".format(command)\n )\n else:\n error_msg = (\n \"no remote specified. Create a default remote with\\n\"\n \" dvc remote add -d \"\n )\n\n raise NoRemoteError(error_msg)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py_OutputNotFoundError_StagePathAsOutputError.__init__.super___init___": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py_OutputNotFoundError_StagePathAsOutputError.__init__.super___init___", "embedding": null, "metadata": {"file_path": "dvc/exceptions.py", "file_name": "exceptions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 44, "end_line": 76, "span_ids": ["StagePathAsOutputError.__init__", "StagePathAsOutputError", "OutputNotFoundError", "OutputNotFoundError.__init__"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class OutputNotFoundError(DvcException):\n \"\"\"Thrown if a file/directory is not found as an output in any pipeline.\n\n Args:\n output (unicode): path to the file/directory.\n \"\"\"\n\n def __init__(self, output, repo=None):\n self.output = output\n self.repo = repo\n super().__init__(\n \"Unable to find DVC-file with output '{path}'\".format(\n path=relpath(self.output)\n )\n )\n\n\nclass StagePathAsOutputError(DvcException):\n \"\"\"Thrown if directory that stage is going to be saved in is specified as\n an output of another stage.\n\n Args:\n stage (Stage): a stage that is in some other stages output\n output (str): an output covering the stage above\n \"\"\"\n\n def __init__(self, stage, output):\n assert isinstance(output, str)\n super().__init__(\n \"{stage} is within an output '{output}' of another stage\".format(\n stage=stage, output=output\n )\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py_MoveNotDataSourceError_MoveNotDataSourceError.__init__.super___init___msg_form": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py_MoveNotDataSourceError_MoveNotDataSourceError.__init__.super___init___msg_form", "embedding": null, "metadata": {"file_path": "dvc/exceptions.py", "file_name": "exceptions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 107, "end_line": 122, "span_ids": ["MoveNotDataSourceError", "MoveNotDataSourceError.__init__"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MoveNotDataSourceError(DvcException):\n \"\"\"Thrown when trying to move a file/directory that is not an output\n in a data source stage.\n\n Args:\n path (str): path to the file/directory.\n \"\"\"\n\n def __init__(self, path):\n msg = (\n \"move is not permitted for stages that are not data sources. \"\n \"You need to either move '{path}' to a new location and edit \"\n \"it by hand, or remove '{path}' and create a new one at the \"\n \"desired location.\"\n )\n super().__init__(msg.format(path=path))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py__cached_clone__cached_clone.return.repo_path": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py__cached_clone__cached_clone.return.repo_path", "embedding": null, "metadata": {"file_path": "dvc/external_repo.py", "file_name": "external_repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 288, "end_line": 312, "span_ids": ["_cached_clone"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _cached_clone(url, rev, for_write=False):\n \"\"\"Clone an external git repo to a temporary directory.\n\n Returns the path to a local temporary directory with the specified\n revision checked out. If for_write is set prevents reusing this dir via\n cache.\n \"\"\"\n # even if we have already cloned this repo, we may need to\n # fetch/fast-forward to get specified rev\n clone_path, shallow = _clone_default_branch(url, rev, for_write=for_write)\n\n if not for_write and (url) in CLONES:\n return CLONES[url][0]\n\n # Copy to a new dir to keep the clone clean\n repo_path = tempfile.mkdtemp(\"dvc-erepo\")\n logger.debug(\"erepo: making a copy of %s clone\", url)\n copy_tree(clone_path, repo_path)\n\n # Check out the specified revision\n if for_write:\n _git_checkout(repo_path, rev)\n else:\n CLONES[url] = (repo_path, shallow)\n return repo_path", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/istextfile.py__Use_heuristics_to_gues_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/istextfile.py__Use_heuristics_to_gues_", "embedding": null, "metadata": {"file_path": "dvc/istextfile.py", "file_name": "istextfile.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 35, "span_ids": ["istextfile", "docstring"], "tokens": 298}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Use heuristics to guess if it is a text file or a binary file.\"\"\"\n\n# Based on https://eli.thegreenplace.net/2011/10/19/\n# perls-guess-if-file-is-text-or-binary-implemented-in-python\n\n\nTEXT_CHARS = bytes(range(32, 127)) + b\"\\n\\r\\t\\f\\b\"\n\n\ndef istextfile(fname, blocksize=512, tree=None):\n \"\"\" Uses heuristics to guess whether the given file is text or binary,\n by reading a single block of bytes from the file.\n If more than 30% of the chars in the block are non-text, or there\n are NUL ('\\x00') bytes in the block, assume this is a binary file.\n \"\"\"\n if tree:\n open_func = tree.open\n else:\n open_func = open\n with open_func(fname, \"rb\") as fobj:\n block = fobj.read(blocksize)\n\n if not block:\n # An empty file is considered a valid text file\n return True\n\n if b\"\\x00\" in block:\n # Files with null bytes are binary\n return False\n\n # Use translate's 'deletechars' argument to efficiently remove all\n # occurrences of TEXT_CHARS from the block\n nontext = block.translate(None, TEXT_CHARS)\n return float(len(nontext)) / len(block) <= 0.30", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/lock.py_Lock_Lock.__exit__.self_unlock_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/lock.py_Lock_Lock.__exit__.self_unlock_", "embedding": null, "metadata": {"file_path": "dvc/lock.py", "file_name": "lock.py", "file_type": "text/x-python", "category": "implementation", "start_line": 83, "end_line": 131, "span_ids": ["Lock.lock", "Lock.unlock", "Lock._do_lock", "Lock.is_locked", "Lock", "Lock.__enter__", "Lock.files", "Lock.__exit__", "Lock.__init__"], "tokens": 293}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Lock(LockBase):\n \"\"\"Class for DVC repo lock.\n\n Uses zc.lockfile as backend.\n \"\"\"\n\n def __init__(self, lockfile, friendly=False, **kwargs):\n super().__init__(lockfile)\n self._friendly = friendly\n self._lock = None\n\n @property\n def files(self):\n return [self._lockfile]\n\n def _do_lock(self):\n try:\n with Tqdm(\n bar_format=\"{desc}\",\n disable=not self._friendly,\n desc=(\n \"If DVC froze, see `hardlink_lock` in {}\".format(\n format_link(\"https://man.dvc.org/config#core\")\n )\n ),\n ):\n self._lock = zc.lockfile.LockFile(self._lockfile)\n except zc.lockfile.LockError:\n raise LockError(FAILED_TO_LOCK_MESSAGE)\n\n def lock(self):\n retries = 6\n delay = DEFAULT_TIMEOUT / retries\n lock_retry = retry(retries, LockError, timeout=delay)(self._do_lock)\n lock_retry()\n\n def unlock(self):\n self._lock.close()\n self._lock = None\n\n @property\n def is_locked(self):\n return bool(self._lock)\n\n def __enter__(self):\n self.lock()\n\n def __exit__(self, typ, value, tbck):\n self.unlock()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/lock.py_HardlinkLock_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/lock.py_HardlinkLock_", "embedding": null, "metadata": {"file_path": "dvc/lock.py", "file_name": "lock.py", "file_type": "text/x-python", "category": "implementation", "start_line": 137, "end_line": 202, "span_ids": ["HardlinkLock.__del__", "make_lock", "HardlinkLock._set_claimfile", "HardlinkLock.lock", "HardlinkLock", "HardlinkLock.__init__"], "tokens": 606}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HardlinkLock(flufl.lock.Lock, LockBase):\n \"\"\"Class for DVC repo lock.\n\n Args:\n lockfile (str): the lock filename\n in.\n tmp_dir (str): a directory to store claim files.\n \"\"\"\n\n def __init__(\n self, lockfile, tmp_dir=None, **kwargs\n ): # pylint: disable=super-init-not-called\n import socket\n\n self._tmp_dir = tmp_dir\n super().__init__(lockfile)\n\n # NOTE: this is basically Lock.__init__ copy-paste, except that\n # instead of using `socket.getfqdn()` we use `socket.gethostname()`\n # to speed this up. We've seen [1] `getfqdn()` take ~5sec to return\n # anything, which is way too slow. `gethostname()` is actually a\n # fallback for `getfqdn()` when it is not able to resolve a\n # canonical hostname through network. The claimfile that uses\n # `self._hostname` is still usable, as it uses `pid` and random\n # number to generate the resulting lock file name, which is unique\n # enough for our application.\n #\n # [1] https://github.com/iterative/dvc/issues/2582\n self._hostname = socket.gethostname()\n\n self._lifetime = timedelta(days=365) # Lock for good by default\n self._separator = flufl.lock.SEP\n self._set_claimfile()\n self._owned = True\n self._retry_errnos = []\n\n def lock(self): # pylint: disable=arguments-differ\n try:\n super().lock(timedelta(seconds=DEFAULT_TIMEOUT))\n except flufl.lock.TimeOutError:\n raise LockError(FAILED_TO_LOCK_MESSAGE)\n\n def _set_claimfile(self, pid=None):\n super()._set_claimfile(pid)\n\n if self._tmp_dir is not None:\n # Under Windows file path length is limited so we hash it\n filename = hashlib.md5(self._claimfile.encode()).hexdigest()\n self._claimfile = os.path.join(self._tmp_dir, filename + \".lock\")\n\n # Fix for __del__ bug in flufl.lock [1] which is causing errors on\n # Python shutdown [2].\n # [1] https://gitlab.com/warsaw/flufl.lock/issues/7\n # [2] https://github.com/iterative/dvc/issues/2573\n def __del__(self):\n try:\n if self._owned:\n self.finalize()\n except ImportError:\n pass\n\n\ndef make_lock(lockfile, tmp_dir=None, friendly=False, hardlink_lock=False):\n cls = HardlinkLock if hardlink_lock else Lock\n return cls(lockfile, tmp_dir=tmp_dir, friendly=friendly)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/logger.py_ColorFormatter.format_ColorFormatter.formatTime.return._green_date_nc_form": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/logger.py_ColorFormatter.format_ColorFormatter.formatTime.return._green_date_nc_form", "embedding": null, "metadata": {"file_path": "dvc/logger.py", "file_name": "logger.py", "file_type": "text/x-python", "category": "implementation", "start_line": 57, "end_line": 97, "span_ids": ["ColorFormatter.formatTime", "ColorFormatter.format"], "tokens": 286}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ColorFormatter(logging.Formatter):\n\n def format(self, record):\n record.message = record.getMessage()\n msg = self.formatMessage(record)\n\n if record.levelname == \"INFO\":\n return msg\n\n if record.exc_info:\n if getattr(record, \"tb_only\", False):\n cause = \"\"\n else:\n cause = \": \".join(_iter_causes(record.exc_info[1]))\n\n msg = \"{message}{separator}{cause}\".format(\n message=msg or \"\",\n separator=\" - \" if msg and cause else \"\",\n cause=cause,\n )\n\n if _is_verbose():\n msg += _stack_trace(record.exc_info)\n\n return \"{asctime}{color}{levelname}{nc}: {msg}\".format(\n asctime=self.formatTime(record, self.datefmt),\n color=self.color_code[record.levelname],\n nc=colorama.Fore.RESET,\n levelname=record.levelname,\n msg=msg,\n )\n\n def formatTime(self, record, datefmt=None):\n # only show if current level is set to DEBUG\n # also, skip INFO as it is used for UI\n if not _is_verbose() or record.levelno == logging.INFO:\n return \"\"\n\n return \"{green}{date}{nc} \".format(\n green=colorama.Fore.GREEN,\n date=super().formatTime(record, datefmt),\n nc=colorama.Fore.RESET,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/main.py_main_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/main.py_main_", "embedding": null, "metadata": {"file_path": "dvc/main.py", "file_name": "main.py", "file_type": "text/x-python", "category": "implementation", "start_line": 58, "end_line": 141, "span_ids": ["main"], "tokens": 524}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def main(argv=None): # noqa: C901\n \"\"\"Run dvc CLI command.\n\n Args:\n argv: optional list of arguments to parse. sys.argv is used by default.\n\n Returns:\n int: command's return code.\n \"\"\"\n args = None\n disable_other_loggers()\n\n outerLogLevel = logger.level\n try:\n args = parse_args(argv)\n\n level = None\n if args.quiet:\n level = logging.CRITICAL\n elif args.verbose == 1:\n level = logging.DEBUG\n elif args.verbose > 1:\n level = logging.TRACE\n\n if level is not None:\n logger.setLevel(level)\n\n logger.trace(args)\n\n with profile(enable=args.cprofile, dump=args.cprofile_dump):\n with debug(args.pdb):\n cmd = args.func(args)\n ret = cmd.run()\n except ConfigError:\n logger.exception(\"configuration error\")\n ret = 251\n except KeyboardInterrupt:\n logger.exception(\"interrupted by the user\")\n ret = 252\n except NotDvcRepoError:\n logger.exception(\"\")\n ret = 253\n except DvcParserError:\n ret = 254\n except DvcException:\n ret = 255\n logger.exception(\"\")\n except Exception as exc: # noqa, pylint: disable=broad-except\n # pylint: disable=no-member\n if isinstance(exc, OSError) and exc.errno == errno.EMFILE:\n logger.exception(\n \"too many open files, please visit \"\n \"{} to see how to handle this \"\n \"problem\".format(error_link(\"many-files\")),\n extra={\"tb_only\": True},\n )\n else:\n from dvc.info import get_dvc_info\n\n logger.exception(\"unexpected error\")\n\n dvc_info = get_dvc_info()\n logger.debug(\"Version info for developers:\\n%s\", dvc_info)\n\n logger.info(FOOTER)\n ret = 255\n\n try:\n if analytics.is_enabled():\n analytics.collect_and_send_report(args, ret)\n\n return ret\n finally:\n logger.setLevel(outerLogLevel)\n\n # Closing pools by-hand to prevent weird messages when closing SSH\n # connections. See https://github.com/iterative/dvc/issues/3248 for\n # more info.\n close_pools()\n\n # Remove cached repos in the end of the call, these are anonymous\n # so won't be reused by any other subsequent run anyway.\n clean_repos()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_URLInfo_URLInfo.from_parts.return.obj": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_URLInfo_URLInfo.from_parts.return.obj", "embedding": null, "metadata": {"file_path": "dvc/path_info.py", "file_name": "path_info.py", "file_type": "text/x-python", "category": "implementation", "start_line": 121, "end_line": 141, "span_ids": ["URLInfo.__init__", "URLInfo.from_parts", "URLInfo"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class URLInfo(_BasePath):\n DEFAULT_PORTS = {\"http\": 80, \"https\": 443, \"ssh\": 22, \"hdfs\": 0}\n\n def __init__(self, url):\n p = urlparse(url)\n assert not p.query and not p.params and not p.fragment\n assert p.password is None\n self._fill_parts(p.scheme, p.hostname, p.username, p.port, p.path)\n\n @classmethod\n def from_parts(\n cls, scheme=None, host=None, user=None, port=None, path=\"\", netloc=None\n ):\n assert bool(host) ^ bool(netloc)\n\n if netloc is not None:\n return cls(f\"{scheme}://{netloc}{path}\")\n\n obj = cls.__new__(cls)\n obj._fill_parts(scheme, host, user, port, path)\n return obj", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_URLInfo._base_parts_URLInfo.isin.return.self__base_parts_other": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_URLInfo._base_parts_URLInfo.isin.return.self__base_parts_other", "embedding": null, "metadata": {"file_path": "dvc/path_info.py", "file_name": "path_info.py", "file_type": "text/x-python", "category": "implementation", "start_line": 143, "end_line": 232, "span_ids": ["URLInfo.name", "URLInfo:4", "URLInfo.replace", "URLInfo.__eq__", "URLInfo.__hash__", "URLInfo._base_parts", "URLInfo.__repr__", "URLInfo.netloc", "URLInfo.bucket", "URLInfo.__div__", "URLInfo.parent", "URLInfo._path", "URLInfo.relative_to", "URLInfo.isin", "URLInfo.path", "URLInfo.url", "URLInfo.parts", "URLInfo.__str__", "URLInfo.parents"], "tokens": 589}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class URLInfo(_BasePath):\n\n @property\n def _base_parts(self):\n return (self.scheme, self.host, self.user, self.port)\n\n @property\n def parts(self):\n return self._base_parts + self._path.parts\n\n def replace(self, path=None):\n return self.from_parts(*self._base_parts, path=path)\n\n @cached_property\n def url(self):\n return f\"{self.scheme}://{self.netloc}{self._spath}\"\n\n def __str__(self):\n return self.url\n\n def __repr__(self):\n return \"{}: '{}'\".format(type(self).__name__, self)\n\n def __eq__(self, other):\n if isinstance(other, (str, bytes)):\n other = self.__class__(other)\n return (\n self.__class__ == other.__class__\n and self._base_parts == other._base_parts\n and self._path == other._path\n )\n\n def __hash__(self):\n return hash(self.parts)\n\n def __div__(self, other):\n return self.replace(path=posixpath.join(self._spath, other))\n\n __truediv__ = __div__\n\n @property\n def path(self):\n return self._spath\n\n @cached_property\n def _path(self):\n return _URLPathInfo(self._spath)\n\n @property\n def name(self):\n return self._path.name\n\n @cached_property\n def netloc(self):\n netloc = self.host\n if self.user:\n netloc = self.user + \"@\" + netloc\n if self.port and int(self.port) != self.DEFAULT_PORTS.get(self.scheme):\n netloc += \":\" + str(self.port)\n return netloc\n\n @property\n def bucket(self):\n return self.netloc\n\n @property\n def parent(self):\n return self.replace(path=self._path.parent)\n\n @property\n def parents(self):\n return _URLPathParents(self)\n\n def relative_to(self, other):\n if isinstance(other, (str, bytes)):\n other = self.__class__(other)\n if self.__class__ != other.__class__:\n msg = f\"'{self}' has incompatible class with '{other}'\"\n raise ValueError(msg)\n if self._base_parts != other._base_parts:\n msg = f\"'{self}' does not start with '{other}'\"\n raise ValueError(msg)\n return self._path.relative_to(other._path)\n\n def isin(self, other):\n if isinstance(other, (str, bytes)):\n other = self.__class__(other)\n elif self.__class__ != other.__class__:\n return False\n return self._base_parts == other._base_parts and self._path.isin(\n other._path\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_HTTPURLInfo._extra_parts_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_HTTPURLInfo._extra_parts_", "embedding": null, "metadata": {"file_path": "dvc/path_info.py", "file_name": "path_info.py", "file_type": "text/x-python", "category": "implementation", "start_line": 299, "end_line": 335, "span_ids": ["HTTPURLInfo.__eq__", "WebDAVURLInfo", "WebDAVURLInfo.url", "HTTPURLInfo._extra_parts", "HTTPURLInfo.url", "HTTPURLInfo.parts"], "tokens": 255}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTTPURLInfo(URLInfo):\n\n @property\n def _extra_parts(self):\n return (self.params, self.query, self.fragment)\n\n @property\n def parts(self):\n return self._base_parts + self._path.parts + self._extra_parts\n\n @cached_property\n def url(self):\n return \"{}://{}{}{}{}{}\".format(\n self.scheme,\n self.netloc,\n self._spath,\n (\";\" + self.params) if self.params else \"\",\n (\"?\" + self.query) if self.query else \"\",\n (\"#\" + self.fragment) if self.fragment else \"\",\n )\n\n def __eq__(self, other):\n if isinstance(other, (str, bytes)):\n other = self.__class__(other)\n return (\n self.__class__ == other.__class__\n and self._base_parts == other._base_parts\n and self._path == other._path\n and self._extra_parts == other._extra_parts\n )\n\n\nclass WebDAVURLInfo(URLInfo):\n @cached_property\n def url(self):\n return \"{}://{}{}\".format(\n self.scheme.replace(\"webdav\", \"http\"), self.netloc, self._spath\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/progress.py__Manages_progress_bars__Tqdm.update_to.self_update_current_sel": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/progress.py__Manages_progress_bars__Tqdm.update_to.self_update_current_sel", "embedding": null, "metadata": {"file_path": "dvc/progress.py", "file_name": "progress.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 118, "span_ids": ["Tqdm.update_msg", "Tqdm.update_to", "Tqdm.__init__", "Tqdm", "docstring"], "tokens": 837}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Manages progress bars for DVC repo.\"\"\"\n\nimport logging\nimport sys\nfrom threading import RLock\n\nfrom tqdm import tqdm\n\nfrom dvc.utils import env2bool\n\nlogger = logging.getLogger(__name__)\ntqdm.set_lock(RLock())\n\n\nclass Tqdm(tqdm):\n \"\"\"\n maximum-compatibility tqdm-based progressbars\n \"\"\"\n\n BAR_FMT_DEFAULT = (\n \"{percentage:3.0f}% {desc}|{bar}|\"\n \"{postfix[info]}{n_fmt}/{total_fmt}\"\n \" [{elapsed}<{remaining}, {rate_fmt:>11}]\"\n )\n # nested bars should have fixed bar widths to align nicely\n BAR_FMT_DEFAULT_NESTED = (\n \"{percentage:3.0f}%|{bar:10}|{desc:{ncols_desc}.{ncols_desc}}\"\n \"{postfix[info]}{n_fmt}/{total_fmt}\"\n \" [{elapsed}<{remaining}, {rate_fmt:>11}]\"\n )\n BAR_FMT_NOTOTAL = (\n \"{desc}{bar:b}|{postfix[info]}{n_fmt} [{elapsed}, {rate_fmt:>11}]\"\n )\n BYTES_DEFAULTS = {\n \"unit\": \"B\",\n \"unit_scale\": True,\n \"unit_divisor\": 1024,\n \"miniters\": 1,\n }\n\n def __init__(\n self,\n iterable=None,\n disable=None,\n level=logging.ERROR,\n desc=None,\n leave=False,\n bar_format=None,\n bytes=False, # pylint: disable=W0622\n file=None,\n total=None,\n postfix=None,\n **kwargs\n ):\n \"\"\"\n bytes : shortcut for\n `unit='B', unit_scale=True, unit_divisor=1024, miniters=1`\n desc : persists after `close()`\n level : effective logging level for determining `disable`;\n used only if `disable` is unspecified\n disable : If (default: None) or False,\n will be determined by logging level.\n May be overridden to `True` due to non-TTY status.\n Skip override by specifying env var `DVC_IGNORE_ISATTY`.\n kwargs : anything accepted by `tqdm.tqdm()`\n \"\"\"\n kwargs = kwargs.copy()\n if bytes:\n kwargs = {**self.BYTES_DEFAULTS, **kwargs}\n else:\n kwargs.setdefault(\"unit_scale\", total > 999 if total else True)\n if file is None:\n file = sys.stderr\n # auto-disable based on `logger.level`\n if not disable:\n disable = logger.getEffectiveLevel() > level\n # auto-disable based on TTY\n if (\n not disable\n and not env2bool(\"DVC_IGNORE_ISATTY\")\n and hasattr(file, \"isatty\")\n ):\n disable = not file.isatty()\n super().__init__(\n iterable=iterable,\n disable=disable,\n leave=leave,\n desc=desc,\n bar_format=\"!\",\n lock_args=(False,),\n total=total,\n **kwargs\n )\n self.postfix = postfix or {\"info\": \"\"}\n if bar_format is None:\n if self.__len__():\n self.bar_format = (\n self.BAR_FMT_DEFAULT_NESTED\n if self.pos\n else self.BAR_FMT_DEFAULT\n )\n else:\n self.bar_format = self.BAR_FMT_NOTOTAL\n else:\n self.bar_format = bar_format\n self.refresh()\n\n def update_msg(self, msg, n=1):\n \"\"\"\n Sets `msg` as a postfix and calls `update(n)`.\n \"\"\"\n self.postfix[\"info\"] = \" %s |\" % msg\n self.update(n)\n\n def update_to(self, current, total=None):\n if total:\n self.total = total # pylint: disable=W0613,W0201\n self.update(current - self.n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/slow_link_detection.py_slow_link_guard_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/slow_link_detection.py_slow_link_guard_", "embedding": null, "metadata": {"file_path": "dvc/remote/slow_link_detection.py", "file_name": "slow_link_detection.py", "file_type": "text/x-python", "category": "implementation", "start_line": 26, "end_line": 48, "span_ids": ["slow_link_guard"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def slow_link_guard(f):\n @wraps(f)\n def wrapper(remote, *args, **kwargs):\n if this.already_displayed:\n return f(remote, *args, **kwargs)\n\n cache_conf = remote.repo.config[\"cache\"]\n slow_link_warning = cache_conf.get(\"slow_link_warning\", True)\n if not slow_link_warning or cache_conf.get(\"type\"):\n return f(remote, *args, **kwargs)\n\n start = time.time()\n result = f(remote, *args, **kwargs)\n delta = time.time() - start\n\n if delta >= this.timeout_seconds:\n logger.warning(this.message)\n this.already_displayed = True\n\n return result\n\n return wrapper", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/add.py__find_all_targets__find_all_targets.return._target_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/add.py__find_all_targets__find_all_targets.return._target_", "embedding": null, "metadata": {"file_path": "dvc/repo/add.py", "file_name": "add.py", "file_type": "text/x-python", "category": "implementation", "start_line": 109, "end_line": 124, "span_ids": ["_find_all_targets"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _find_all_targets(repo, target, recursive):\n if os.path.isdir(target) and recursive:\n return [\n os.fspath(path)\n for path in Tqdm(\n repo.tree.walk_files(target),\n desc=\"Searching \" + target,\n bar_format=Tqdm.BAR_FMT_NOTOTAL,\n unit=\"file\",\n )\n if not repo.is_dvc_internal(os.fspath(path))\n if not is_dvc_file(os.fspath(path))\n if not repo.scm.belongs_to_scm(os.fspath(path))\n if not repo.scm.is_tracked(os.fspath(path))\n ]\n return [target]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/add.py__create_stages_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/add.py__create_stages_", "embedding": null, "metadata": {"file_path": "dvc/repo/add.py", "file_name": "add.py", "file_type": "text/x-python", "category": "implementation", "start_line": 152, "end_line": 195, "span_ids": ["_create_stages"], "tokens": 253}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _create_stages(\n repo, targets, fname, pbar=None, external=False, glob=False, desc=None,\n):\n from dvc.stage import Stage, create_stage, restore_meta\n\n expanded_targets = glob_targets(targets, glob=glob)\n\n stages = []\n for out in Tqdm(\n expanded_targets,\n desc=\"Creating DVC-files\",\n disable=len(expanded_targets) < LARGE_DIR_SIZE,\n unit=\"file\",\n ):\n path, wdir, out = resolve_paths(repo, out)\n stage = create_stage(\n Stage,\n repo,\n fname or path,\n wdir=wdir,\n outs=[out],\n external=external,\n )\n restore_meta(stage)\n if stage.can_be_skipped:\n stage = None\n else:\n Dvcfile(repo, stage.path).remove()\n if desc:\n stage.outs[0].desc = desc\n\n repo._reset() # pylint: disable=protected-access\n\n if not stage:\n if pbar is not None:\n pbar.total -= 1\n continue\n\n stages.append(stage)\n if pbar is not None:\n pbar.update_msg(out)\n\n return stages", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/brancher.py_from_funcy_import_group_b_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/brancher.py_from_funcy_import_group_b_", "embedding": null, "metadata": {"file_path": "dvc/repo/brancher.py", "file_name": "brancher.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 73, "span_ids": ["brancher", "imports"], "tokens": 499}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from funcy import group_by\n\nfrom dvc.repo.experiments.utils import exp_commits\nfrom dvc.tree.local import LocalTree\n\n\ndef brancher( # noqa: E302\n self,\n revs=None,\n all_branches=False,\n all_tags=False,\n all_commits=False,\n all_experiments=False,\n sha_only=False,\n):\n \"\"\"Generator that iterates over specified revisions.\n\n Args:\n revs (list): a list of revisions to iterate over.\n all_branches (bool): iterate over all available branches.\n all_commits (bool): iterate over all commits.\n all_tags (bool): iterate over all available tags.\n sha_only (bool): only return git SHA for a revision.\n\n Yields:\n str: the display name for the currently selected tree, it could be:\n - a git revision identifier\n - empty string it there is no branches to iterate over\n - \"workspace\" if there are uncommitted changes in the SCM repo\n \"\"\"\n if not any([revs, all_branches, all_tags, all_commits, all_experiments]):\n yield \"\"\n return\n\n saved_tree = self.tree\n revs = revs.copy() if revs else []\n\n scm = self.scm\n\n self.tree = LocalTree(self, {\"url\": self.root_dir}, use_dvcignore=True)\n yield \"workspace\"\n\n if revs and \"workspace\" in revs:\n revs.remove(\"workspace\")\n\n if all_commits:\n revs = scm.list_all_commits()\n else:\n if all_branches:\n revs.extend(scm.list_branches())\n\n if all_tags:\n revs.extend(scm.list_tags())\n\n if all_experiments:\n revs.extend(exp_commits(scm))\n\n try:\n if revs:\n for sha, names in group_by(scm.resolve_rev, revs).items():\n self.tree = scm.get_tree(\n sha, use_dvcignore=True, dvcignore_root=self.root_dir\n )\n # ignore revs that don't contain repo root\n # (i.e. revs from before a subdir=True repo was init'ed)\n if self.tree.exists(self.root_dir):\n if sha_only:\n yield sha\n else:\n yield \", \".join(names)\n finally:\n self.tree = saved_tree", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/checkout.py_logging_get_all_files_numbers.return.sum_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/checkout.py_logging_get_all_files_numbers.return.sum_", "embedding": null, "metadata": {"file_path": "dvc/repo/checkout.py", "file_name": "checkout.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 43, "span_ids": ["imports", "_get_unused_links", "_fspath_dir", "get_all_files_numbers"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nfrom typing import TYPE_CHECKING, Set\n\nfrom dvc.exceptions import (\n CheckoutError,\n CheckoutErrorSuggestGit,\n NoOutputOrStageError,\n)\nfrom dvc.progress import Tqdm\nfrom dvc.utils import relpath\n\nfrom . import locked\n\nif TYPE_CHECKING:\n from . import Repo\n from .stage import StageInfo\n\nlogger = logging.getLogger(__name__)\n\n\ndef _get_unused_links(repo):\n used = [\n out.fspath\n for stage in repo.stages\n for out in stage.outs\n if out.scheme == \"local\"\n ]\n return repo.state.get_unused_links(used)\n\n\ndef _fspath_dir(path):\n if not os.path.exists(str(path)):\n return str(path)\n\n path = relpath(path)\n return os.path.join(path, \"\") if os.path.isdir(path) else path\n\n\ndef get_all_files_numbers(pairs):\n return sum(\n stage.get_all_files_number(filter_info) for stage, filter_info in pairs\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/get.py_logging_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/get.py_logging_", "embedding": null, "metadata": {"file_path": "dvc/repo/get.py", "file_name": "get.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 55, "span_ids": ["imports", "get", "GetDVCFileError.__init__", "GetDVCFileError"], "tokens": 419}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\n\nimport shortuuid\n\nfrom dvc.exceptions import DvcException\nfrom dvc.utils import resolve_output\nfrom dvc.utils.fs import remove\n\nlogger = logging.getLogger(__name__)\n\n\nclass GetDVCFileError(DvcException):\n def __init__(self):\n super().__init__(\n \"the given path is a DVC-file, you must specify a data file \"\n \"or a directory\"\n )\n\n\ndef get(url, path, out=None, rev=None):\n from dvc.dvcfile import is_valid_filename\n from dvc.external_repo import external_repo\n\n out = resolve_output(path, out)\n\n if is_valid_filename(out):\n raise GetDVCFileError()\n\n # Creating a directory right beside the output to make sure that they\n # are on the same filesystem, so we could take the advantage of\n # reflink and/or hardlink. Not using tempfile.TemporaryDirectory\n # because it will create a symlink to tmpfs, which defeats the purpose\n # and won't work with reflink/hardlink.\n dpath = os.path.dirname(os.path.abspath(out))\n tmp_dir = os.path.join(dpath, \".\" + str(shortuuid.uuid()))\n\n # Try any links possible to avoid data duplication.\n #\n # Not using symlink, because we need to remove cache after we\n # are done, and to make that work we would have to copy data\n # over anyway before removing the cache, so we might just copy\n # it right away.\n #\n # Also, we can't use theoretical \"move\" link type here, because\n # the same cache file might be used a few times in a directory.\n cache_types = [\"reflink\", \"hardlink\", \"copy\"]\n try:\n with external_repo(\n url=url, rev=rev, cache_dir=tmp_dir, cache_types=cache_types\n ) as repo:\n repo.get_external(path, out)\n finally:\n remove(tmp_dir)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/pull.py_logging_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/pull.py_logging_", "embedding": null, "metadata": {"file_path": "dvc/repo/pull.py", "file_name": "pull.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 49, "span_ids": ["imports", "pull"], "tokens": 220}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\n\nfrom dvc.repo import locked\nfrom dvc.utils import glob_targets\n\nlogger = logging.getLogger(__name__)\n\n\n@locked\ndef pull(\n self,\n targets=None,\n jobs=None,\n remote=None,\n all_branches=False,\n with_deps=False,\n all_tags=False,\n force=False,\n recursive=False,\n all_commits=False,\n run_cache=False,\n glob=False,\n):\n if isinstance(targets, str):\n targets = [targets]\n\n expanded_targets = glob_targets(targets, glob=glob)\n\n processed_files_count = self.fetch(\n expanded_targets,\n jobs,\n remote=remote,\n all_branches=all_branches,\n all_tags=all_tags,\n all_commits=all_commits,\n with_deps=with_deps,\n recursive=recursive,\n run_cache=run_cache,\n )\n stats = self.checkout(\n targets=expanded_targets,\n with_deps=with_deps,\n force=force,\n recursive=recursive,\n )\n\n stats[\"fetched\"] = processed_files_count\n return stats", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/rwlock.py__edit_rwlock__infos_to_str.return._n_join_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/rwlock.py__edit_rwlock__infos_to_str.return._n_join_", "embedding": null, "metadata": {"file_path": "dvc/rwlock.py", "file_name": "rwlock.py", "file_type": "text/x-python", "category": "implementation", "start_line": 37, "end_line": 59, "span_ids": ["_edit_rwlock", "_infos_to_str"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@contextmanager\ndef _edit_rwlock(lock_dir):\n path = os.path.join(lock_dir, \"rwlock\")\n try:\n with open(path) as fobj:\n lock = SCHEMA(json.load(fobj))\n except FileNotFoundError:\n lock = SCHEMA({})\n except json.JSONDecodeError as exc:\n raise RWLockFileCorruptedError(path) from exc\n except Invalid as exc:\n raise RWLockFileFormatError(path) from exc\n lock[\"read\"] = defaultdict(list, lock[\"read\"])\n lock[\"write\"] = defaultdict(dict, lock[\"write\"])\n yield lock\n with open(path, \"w+\") as fobj:\n json.dump(lock, fobj)\n\n\ndef _infos_to_str(infos):\n return \"\\n\".join(\n \" (PID {}): {}\".format(info[\"pid\"], info[\"cmd\"]) for info in infos\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/rwlock.py__check_blockers__check_blockers.for_path_info_in_waiters_.raise_LockError_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/rwlock.py__check_blockers__check_blockers.for_path_info_in_waiters_.raise_LockError_", "embedding": null, "metadata": {"file_path": "dvc/rwlock.py", "file_name": "rwlock.py", "file_type": "text/x-python", "category": "implementation", "start_line": 66, "end_line": 87, "span_ids": ["_check_blockers"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _check_blockers(lock, info, *, mode, waiters):\n for path_info in waiters:\n blockers = [\n blocker\n for path, infos in lock[mode].items()\n if path_info.overlaps(path)\n for blocker in (infos if isinstance(infos, list) else [infos])\n if blocker != info\n ]\n\n if not blockers:\n continue\n\n raise LockError(\n \"'{path}' is busy, it is being blocked by:\\n\"\n \"{blockers}\\n\"\n \"\\n\"\n \"If there are no processes with such PIDs, you can manually remove\"\n \"'.dvc/tmp/rwlock' and try again.\".format(\n path=str(path_info), blockers=_infos_to_str(blockers)\n )\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/rwlock.py__acquire_read__release_read.for_url_in_changes_.if_not_lock_read_.del_lock_read_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/rwlock.py__acquire_read__release_read.for_url_in_changes_.if_not_lock_read_.del_lock_read_", "embedding": null, "metadata": {"file_path": "dvc/rwlock.py", "file_name": "rwlock.py", "file_type": "text/x-python", "category": "implementation", "start_line": 90, "end_line": 140, "span_ids": ["_acquire_read", "_acquire_write", "_release_read", "_release_write"], "tokens": 274}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _acquire_read(lock, info, path_infos):\n changes = []\n\n for path_info in path_infos:\n url = path_info.url\n\n readers = lock[\"read\"][url]\n if info in readers:\n continue\n\n changes.append(url)\n readers.append(info)\n\n return changes\n\n\ndef _acquire_write(lock, info, path_infos):\n changes = []\n\n for path_info in path_infos:\n url = path_info.url\n\n if lock[\"write\"][url] == info:\n continue\n\n changes.append(url)\n lock[\"write\"][url] = info\n\n return changes\n\n\ndef _release_write(lock, info, changes):\n for url in changes:\n assert \"write\" in lock\n assert url in lock[\"write\"]\n assert lock[\"write\"][url] == info\n del lock[\"write\"][url]\n if not lock[\"write\"]:\n del lock[\"write\"]\n\n\ndef _release_read(lock, info, changes):\n for url in changes:\n assert \"read\" in lock\n assert url in lock[\"read\"]\n assert info in lock[\"read\"][url]\n lock[\"read\"][url].remove(info)\n if not lock[\"read\"][url]:\n del lock[\"read\"][url]\n if not lock[\"read\"]:\n del lock[\"read\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/rwlock.py_rwlock_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/rwlock.py_rwlock_", "embedding": null, "metadata": {"file_path": "dvc/rwlock.py", "file_name": "rwlock.py", "file_type": "text/x-python", "category": "implementation", "start_line": 143, "end_line": 177, "span_ids": ["rwlock"], "tokens": 322}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@contextmanager\ndef rwlock(tmp_dir, cmd, read, write):\n \"\"\"Create non-thread-safe RWLock for PathInfos.\n\n Args:\n tmp_dir (str): existing directory where to create the rwlock file.\n cmd (str): command that will be working on these PathInfos.\n read ([PathInfo]): PathInfos that are going to be read.\n write ([PathInfo]): PathInfos that are going to be written.\n\n Raises:\n LockError: raised if PathInfo we want to read is being written to by\n another command or if PathInfo we want to write is being written\n to or read from by another command.\n RWLockFileCorruptedError: raised if rwlock file is not a valid JSON.\n RWLockFileFormatError: raised if rwlock file is a valid JSON, but\n has internal format that doesn't pass our schema validation.\n \"\"\"\n info = {\"pid\": os.getpid(), \"cmd\": cmd}\n\n with _edit_rwlock(tmp_dir) as lock:\n\n _check_blockers(lock, info, mode=\"write\", waiters=read + write)\n _check_blockers(lock, info, mode=\"read\", waiters=write)\n\n rchanges = _acquire_read(lock, info, read)\n wchanges = _acquire_write(lock, info, write)\n\n try:\n yield\n finally:\n with _edit_rwlock(tmp_dir) as lock:\n _release_write(lock, info, wchanges)\n _release_read(lock, info, rchanges)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State.get_unused_links_State.remove_links.for_chunk_unused_in_to_ch.self__execute_cmd_tuple_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State.get_unused_links_State.remove_links.for_chunk_unused_in_to_ch.self__execute_cmd_tuple_", "embedding": null, "metadata": {"file_path": "dvc/state.py", "file_name": "state.py", "file_type": "text/x-python", "category": "implementation", "start_line": 479, "end_line": 515, "span_ids": ["State.get_unused_links", "State.remove_links"], "tokens": 273}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class State(StateBase):\n\n def get_unused_links(self, used):\n \"\"\"Removes all saved links except the ones that are used.\n\n Args:\n used (list): list of used links that should not be removed.\n \"\"\"\n unused = []\n\n self._execute(f\"SELECT * FROM {self.LINK_STATE_TABLE}\")\n for row in self.cursor:\n relative_path, inode, mtime = row\n inode = self._from_sqlite(inode)\n path = os.path.join(self.root_dir, relative_path)\n\n if path in used or not self.tree.exists(path):\n continue\n\n actual_inode = get_inode(path)\n actual_mtime, _ = get_mtime_and_size(path, self.tree)\n\n if (inode, mtime) == (actual_inode, actual_mtime):\n logger.debug(\"Removing '%s' as unused link.\", path)\n unused.append(relative_path)\n\n return unused\n\n def remove_links(self, unused):\n for path in unused:\n remove(path)\n\n for chunk_unused in to_chunks(\n unused, chunk_size=SQLITE_MAX_VARIABLES_NUMBER\n ):\n cmd = \"DELETE FROM {} WHERE path IN ({})\".format(\n self.LINK_STATE_TABLE, \",\".join([\"?\"] * len(chunk_unused))\n )\n self._execute(cmd, tuple(chunk_unused))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py__connect_sqlite_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py__connect_sqlite_", "embedding": null, "metadata": {"file_path": "dvc/state.py", "file_name": "state.py", "file_type": "text/x-python", "category": "implementation", "start_line": 481, "end_line": 507, "span_ids": ["_connect_sqlite", "_build_sqlite_uri"], "tokens": 315}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _connect_sqlite(filename, options):\n # Connect by URI was added in Python 3.4 and sqlite 3.7.7,\n # we ignore options, which should be fine unless repo is on old NFS/CIFS\n if sqlite3.sqlite_version_info < (3, 7, 7):\n return sqlite3.connect(filename)\n\n uri = _build_sqlite_uri(filename, options)\n return sqlite3.connect(uri, uri=True)\n\n\ndef _build_sqlite_uri(filename, options):\n # In the doc mentioned below we only need to replace ? -> %3f and\n # # -> %23, but, if present, we also need to replace % -> %25 first\n # (happens when we are on a weird FS that shows urlencoded filenames\n # instead of proper ones) to not confuse sqlite.\n uri_path = filename.replace(\"%\", \"%25\")\n\n # Convert filename to uri according to https://www.sqlite.org/uri.html, 3.1\n uri_path = uri_path.replace(\"?\", \"%3f\").replace(\"#\", \"%23\")\n if os.name == \"nt\":\n uri_path = uri_path.replace(\"\\\\\", \"/\")\n uri_path = re.sub(r\"^([a-z]:)\", \"/\\\\1\", uri_path, flags=re.I)\n uri_path = re.sub(r\"/+\", \"/\", uri_path)\n\n # Empty netloc, params and fragment\n return urlunparse((\"file\", \"\", uri_path, \"\", urlencode(options), \"\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/system.py_errno_System.symlink.try_.except_OSError_as_exc_.raise_DvcException_faile": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/system.py_errno_System.symlink.try_.except_OSError_as_exc_.raise_DvcException_faile", "embedding": null, "metadata": {"file_path": "dvc/system.py", "file_name": "system.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 46, "span_ids": ["System", "imports", "System.is_unix", "System.hardlink", "System.symlink", "System.copy"], "tokens": 218}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import errno\nimport logging\nimport os\nimport platform\nimport shutil\nimport sys\n\nfrom dvc.exceptions import DvcException\n\nlogger = logging.getLogger(__name__)\n\nif (\n platform.system() == \"Windows\"\n and sys.version_info < (3, 8)\n and sys.getwindowsversion() >= (6, 2)\n):\n try:\n import speedcopy\n\n speedcopy.patch_copyfile()\n except ImportError:\n pass\n\n\nclass System:\n @staticmethod\n def is_unix():\n return os.name != \"nt\"\n\n @staticmethod\n def copy(src, dest):\n return shutil.copyfile(src, dest)\n\n @staticmethod\n def hardlink(source, link_name):\n try:\n os.link(source, link_name)\n except OSError as exc:\n raise DvcException(\"failed to link\") from exc\n\n @staticmethod\n def symlink(source, link_name):\n try:\n os.symlink(source, link_name)\n except OSError as exc:\n raise DvcException(\"failed to symlink\") from exc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/system.py_System._getdirinfo_System._getdirinfo.return.Info_GetFileInformationB": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/system.py_System._getdirinfo_System._getdirinfo.return.Info_GetFileInformationB", "embedding": null, "metadata": {"file_path": "dvc/system.py", "file_name": "system.py", "file_type": "text/x-python", "category": "implementation", "start_line": 119, "end_line": 158, "span_ids": ["System._getdirinfo"], "tokens": 289}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class System:\n\n @staticmethod\n def _getdirinfo(path):\n from collections import namedtuple\n\n from win32file import ( # pylint: disable=import-error\n FILE_FLAG_BACKUP_SEMANTICS,\n FILE_FLAG_OPEN_REPARSE_POINT,\n FILE_SHARE_READ,\n OPEN_EXISTING,\n CreateFileW,\n GetFileInformationByHandle,\n )\n\n # NOTE: use FILE_FLAG_OPEN_REPARSE_POINT to open symlink itself and not\n # the target See https://docs.microsoft.com/en-us/windows/desktop/api/\n # fileapi/nf-fileapi-createfilew#symbolic-link-behavior\n flags = FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT\n\n hfile = CreateFileW(\n path, 0, FILE_SHARE_READ, None, OPEN_EXISTING, flags, None\n )\n\n # See BY_HANDLE_FILE_INFORMATION structure from fileapi.h\n Info = namedtuple(\n \"BY_HANDLE_FILE_INFORMATION\",\n [\n \"dwFileAttributes\",\n \"ftCreationTime\",\n \"ftLastAccessTime\",\n \"ftLastWriteTime\",\n \"dwVolumeSerialNumber\",\n \"nFileSizeHigh\",\n \"nFileSizeLow\",\n \"nNumberOfLinks\",\n \"nFileIndexHigh\",\n \"nFileIndexLow\",\n ],\n )\n\n return Info(*GetFileInformationByHandle(hfile))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/system.py_System.is_symlink_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/system.py_System.is_symlink_", "embedding": null, "metadata": {"file_path": "dvc/system.py", "file_name": "system.py", "file_type": "text/x-python", "category": "implementation", "start_line": 187, "end_line": 214, "span_ids": ["System.is_hardlink", "System.is_symlink"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class System:\n\n @staticmethod\n def is_symlink(path):\n path = os.fspath(path)\n\n if System.is_unix():\n return os.path.islink(path)\n\n # https://docs.microsoft.com/en-us/windows/desktop/fileio/\n # file-attribute-constants\n from winnt import ( # pylint: disable=import-error\n FILE_ATTRIBUTE_REPARSE_POINT,\n )\n\n if os.path.lexists(path):\n info = System._getdirinfo(path)\n return info.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT\n return False\n\n @staticmethod\n def is_hardlink(path):\n path = os.fspath(path)\n\n if System.is_unix():\n return os.stat(path).st_nlink > 1\n\n info = System._getdirinfo(path)\n return info.nNumberOfLinks > 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/updater.py_Updater._get_update_instructions_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/updater.py_Updater._get_update_instructions_", "embedding": null, "metadata": {"file_path": "dvc/updater.py", "file_name": "updater.py", "file_type": "text/x-python", "category": "implementation", "start_line": 125, "end_line": 163, "span_ids": ["Updater.is_enabled", "Updater._get_update_instructions"], "tokens": 339}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Updater:\n\n def _get_update_instructions(self):\n instructions = {\n \"pip\": \"Run `{yellow}pip{reset} install dvc \"\n \"{blue}--upgrade{reset}`\",\n \"rpm\": \"Run `{yellow}yum{reset} update dvc`\",\n \"brew\": \"Run `{yellow}brew{reset} upgrade dvc`\",\n \"deb\": (\n \"Run `{yellow}apt-get{reset} install\"\n \" {blue}--only-upgrade{reset} dvc`\"\n ),\n \"binary\": (\n \"To upgrade follow these steps:\\n\"\n \"1. Uninstall dvc binary\\n\"\n \"2. Go to {blue}https://dvc.org{reset}\\n\"\n \"3. Download and install new binary\"\n ),\n \"conda\": \"Run `{yellow}conda{reset} update dvc`\",\n \"choco\": \"Run `{yellow}choco{reset} upgrade dvc`\",\n None: (\n \"Find the latest release at\\n\"\n \"{blue}https://github.com/iterative/dvc/releases/latest{reset}\"\n ),\n }\n\n package_manager = PKG\n if package_manager in (\"osxpkg\", \"exe\"):\n package_manager = \"binary\"\n\n return instructions[package_manager]\n\n def is_enabled(self):\n enabled = to_bool(\n Config(validate=False).get(\"core\", {}).get(\"check_update\", \"true\")\n )\n logger.debug(\n \"Check for update is {}abled.\".format(\"en\" if enabled else \"dis\")\n )\n return enabled", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py_file_md5_file_md5.return._None_None_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py_file_md5_file_md5.return._None_None_", "embedding": null, "metadata": {"file_path": "dvc/utils/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 45, "end_line": 84, "span_ids": ["file_md5"], "tokens": 286}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def file_md5(fname, tree=None):\n \"\"\" get the (md5 hexdigest, md5 digest) of a file \"\"\"\n from dvc.istextfile import istextfile\n from dvc.progress import Tqdm\n\n if tree:\n exists_func = tree.exists\n stat_func = tree.stat\n open_func = tree.open\n else:\n exists_func = os.path.exists\n stat_func = os.stat\n open_func = open\n\n if exists_func(fname):\n hash_md5 = hashlib.md5()\n binary = not istextfile(fname, tree=tree)\n size = stat_func(fname).st_size\n no_progress_bar = True\n if size >= LARGE_FILE_SIZE:\n no_progress_bar = False\n msg = (\n \"Computing md5 for a large file '{}'. This is only done once.\"\n )\n logger.info(msg.format(relpath(fname)))\n name = relpath(fname)\n\n with Tqdm(\n desc=name,\n disable=no_progress_bar,\n total=size,\n bytes=True,\n leave=False,\n ) as pbar:\n with open_func(fname, \"rb\") as fobj:\n _fobj_md5(fobj, hash_md5, binary, pbar.update)\n\n return (hash_md5.hexdigest(), hash_md5.digest())\n\n return (None, None)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py_fix_env_fix_env.return.env": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py_fix_env_fix_env.return.env", "embedding": null, "metadata": {"file_path": "dvc/utils/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 143, "end_line": 210, "span_ids": ["fix_env"], "tokens": 647}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def fix_env(env=None):\n \"\"\"Fix env variables modified by PyInstaller [1] and pyenv [2].\n [1] http://pyinstaller.readthedocs.io/en/stable/runtime-information.html\n [2] https://github.com/pyenv/pyenv/issues/985\n \"\"\"\n if env is None:\n env = os.environ.copy()\n else:\n env = env.copy()\n\n if is_binary():\n lp_key = \"LD_LIBRARY_PATH\"\n lp_orig = env.get(lp_key + \"_ORIG\", None)\n if lp_orig is not None:\n env[lp_key] = lp_orig\n else:\n env.pop(lp_key, None)\n\n # Unlike PyInstaller, pyenv doesn't leave backups of original env vars\n # when it modifies them. If we look into the shim, pyenv and pyenv-exec,\n # we can figure out that the PATH is modified like this:\n #\n # PATH=$PYENV_BIN_PATH:${bin_path}:${plugin_bin}:$PATH\n #\n # where\n #\n # PYENV_BIN_PATH - might not start with $PYENV_ROOT if we are running\n # `system` version of the command, see pyenv-exec source code.\n # bin_path - might not start with $PYENV_ROOT as it runs realpath on\n # it, but always has `libexec` part in it, see pyenv source code.\n # plugin_bin - might contain more than 1 entry, which start with\n # $PYENV_ROOT, see pyenv source code.\n #\n # Also, we know that whenever pyenv is running, it exports these env vars:\n #\n # PYENV_DIR\n # PYENV_HOOK_PATH\n # PYENV_VERSION\n # PYENV_ROOT\n #\n # So having this, we can make a rightful assumption about what parts of the\n # PATH we need to remove in order to get the original PATH.\n path = env.get(\"PATH\", \"\")\n parts = path.split(\":\")\n bin_path = parts[1] if len(parts) > 2 else \"\"\n pyenv_dir = env.get(\"PYENV_DIR\")\n pyenv_hook_path = env.get(\"PYENV_HOOK_PATH\")\n pyenv_version = env.get(\"PYENV_VERSION\")\n pyenv_root = env.get(\"PYENV_ROOT\")\n\n env_matches = all([pyenv_dir, pyenv_hook_path, pyenv_version, pyenv_root])\n\n bin_path_matches = os.path.basename(bin_path) == \"libexec\"\n\n # NOTE: we don't support pyenv-win\n if os.name != \"nt\" and env_matches and bin_path_matches:\n # removing PYENV_BIN_PATH and bin_path\n parts = parts[2:]\n\n if parts:\n # removing plugin_bin from the left\n plugin_bin = os.path.join(pyenv_root, \"plugins\")\n while parts[0].startswith(plugin_bin):\n del parts[0]\n\n env[\"PATH\"] = \":\".join(parts)\n\n return env", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/fs.py_get_mtime_and_size_get_mtime_and_size.return.str_mtime_str_size_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/fs.py_get_mtime_and_size_get_mtime_and_size.return.str_mtime_str_size_", "embedding": null, "metadata": {"file_path": "dvc/utils/fs.py", "file_name": "fs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 33, "end_line": 60, "span_ids": ["get_mtime_and_size"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_mtime_and_size(path, tree):\n\n if tree.isdir(path):\n size = 0\n files_mtimes = {}\n for file_path in tree.walk_files(path):\n try:\n stats = tree.stat(file_path)\n except OSError as exc:\n # NOTE: broken symlink case.\n if exc.errno != errno.ENOENT:\n raise\n continue\n size += stats.st_size\n files_mtimes[os.fspath(file_path)] = stats.st_mtime\n\n # We track file changes and moves, which cannot be detected with simply\n # max(mtime(f) for f in non_ignored_files)\n mtime = dict_md5(files_mtimes)\n else:\n base_stat = tree.stat(path)\n size = base_stat.st_size\n mtime = base_stat.st_mtime\n mtime = int(nanotime.timestamp(mtime))\n\n # State of files handled by dvc is stored in db as TEXT.\n # We cast results to string for later comparisons with stored values.\n return str(mtime), str(size)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/fs.py_BasePathNotInCheckedPathException_contains_symlink_up_to.return.contains_symlink_up_to_os": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/fs.py_BasePathNotInCheckedPathException_contains_symlink_up_to.return.contains_symlink_up_to_os", "embedding": null, "metadata": {"file_path": "dvc/utils/fs.py", "file_name": "fs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 63, "end_line": 84, "span_ids": ["BasePathNotInCheckedPathException.__init__", "BasePathNotInCheckedPathException", "contains_symlink_up_to"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BasePathNotInCheckedPathException(DvcException):\n def __init__(self, path, base_path):\n msg = \"Path: {} does not overlap with base path: {}\".format(\n path, base_path\n )\n super().__init__(msg)\n\n\ndef contains_symlink_up_to(path, base_path):\n base_path = os.fspath(base_path)\n path = os.fspath(path)\n\n if base_path not in path:\n raise BasePathNotInCheckedPathException(path, base_path)\n\n if path == base_path:\n return False\n if System.is_symlink(path):\n return True\n if os.path.dirname(path) == path:\n return False\n return contains_symlink_up_to(os.path.dirname(path), base_path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/fs.py_move_move.shutil_move_tmp_dst_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/fs.py_move_move.shutil_move_tmp_dst_", "embedding": null, "metadata": {"file_path": "dvc/utils/fs.py", "file_name": "fs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 87, "end_line": 113, "span_ids": ["move"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def move(src, dst, mode=None):\n \"\"\"Atomically move src to dst and chmod it with mode.\n\n Moving is performed in two stages to make the whole operation atomic in\n case src and dst are on different filesystems and actual physical copying\n of data is happening.\n \"\"\"\n\n dst = os.path.abspath(dst)\n tmp = f\"{dst}.{uuid()}\"\n\n try:\n if mode is not None:\n os.chmod(src, mode)\n except OSError as e:\n if e.errno not in [errno.EACCES, errno.EPERM]:\n raise\n else:\n raise FileOwnershipError(src)\n\n if os.path.islink(src):\n shutil.copy(src, tmp)\n _unlink(src, _chmod)\n else:\n shutil.move(src, tmp)\n\n shutil.move(tmp, dst)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/fs.py__chmod_path_isin.return.child_parent_and_child": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/fs.py__chmod_path_isin.return.child_parent_and_child", "embedding": null, "metadata": {"file_path": "dvc/utils/fs.py", "file_name": "fs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 111, "end_line": 153, "span_ids": ["_chmod", "path_isin", "_unlink", "remove"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _chmod(func, p, excinfo): # pylint: disable=unused-argument\n perm = os.lstat(p).st_mode\n perm |= stat.S_IWRITE\n\n try:\n os.chmod(p, perm)\n except OSError as exc:\n # broken symlink or file is not owned by us\n if exc.errno not in [errno.ENOENT, errno.EPERM]:\n raise\n\n func(p)\n\n\ndef _unlink(path, onerror):\n try:\n os.unlink(path)\n except OSError:\n onerror(os.unlink, path, sys.exc_info())\n\n\ndef remove(path):\n logger.debug(\"Removing '%s'\", path)\n\n try:\n if os.path.isdir(path):\n shutil.rmtree(path, onerror=_chmod)\n else:\n _unlink(path, _chmod)\n except OSError as exc:\n if exc.errno != errno.ENOENT:\n raise\n\n\ndef path_isin(child, parent):\n \"\"\"Check if given `child` path is inside `parent`.\"\"\"\n\n def normalize_path(path):\n return os.path.normpath(path)\n\n parent = os.path.join(normalize_path(parent), \"\")\n child = normalize_path(child)\n return child != parent and child.startswith(parent)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/fs.py_makedirs_makedirs.try_.finally_.os_umask_umask_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/fs.py_makedirs_makedirs.try_.finally_.os_umask_umask_", "embedding": null, "metadata": {"file_path": "dvc/utils/fs.py", "file_name": "fs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 156, "end_line": 168, "span_ids": ["makedirs"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def makedirs(path, exist_ok=False, mode=None):\n if mode is None:\n os.makedirs(path, exist_ok=exist_ok)\n return\n\n # utilize umask to set proper permissions since Python 3.7 the `mode`\n # `makedirs` argument no longer affects the file permission bits of\n # newly-created intermediate-level directories.\n umask = os.umask(0o777 - mode)\n try:\n os.makedirs(path, exist_ok=exist_ok)\n finally:\n os.umask(umask)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/fs.py_copyfile_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/fs.py_copyfile_", "embedding": null, "metadata": {"file_path": "dvc/utils/fs.py", "file_name": "fs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 171, "end_line": 210, "span_ids": ["walk_files", "copyfile", "copy_fobj_to_file"], "tokens": 265}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def copyfile(src, dest, no_progress_bar=False, name=None):\n \"\"\"Copy file with progress bar\"\"\"\n from dvc.progress import Tqdm\n\n name = name if name else os.path.basename(dest)\n total = os.stat(src).st_size\n\n if os.path.isdir(dest):\n dest = os.path.join(dest, os.path.basename(src))\n\n try:\n System.reflink(src, dest)\n except DvcException:\n with open(src, \"rb\") as fsrc, open(dest, \"wb+\") as fdest:\n with Tqdm.wrapattr(\n fdest,\n \"write\",\n desc=name,\n disable=no_progress_bar,\n total=total,\n bytes=True,\n ) as fdest_wrapped:\n while True:\n buf = fsrc.read(LOCAL_CHUNK_SIZE)\n if not buf:\n break\n fdest_wrapped.write(buf)\n\n\ndef copy_fobj_to_file(fsrc, dest):\n \"\"\"Copy contents of open file object to destination path.\"\"\"\n with open(dest, \"wb+\") as fdest:\n shutil.copyfileobj(fsrc, fdest)\n\n\ndef walk_files(directory):\n for root, _, files in os.walk(directory):\n for f in files:\n yield os.path.join(root, f)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/http.py_io_open_url.with_iter_url_url_as_re.if_mode_rb_.else_.yield_io_TextIOWrapper_by": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/http.py_io_open_url.with_iter_url_url_as_re.if_mode_rb_.else_.yield_io_TextIOWrapper_by", "embedding": null, "metadata": {"file_path": "dvc/utils/http.py", "file_name": "http.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 23, "span_ids": ["imports", "open_url"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import io\nfrom contextlib import contextmanager\n\nfrom dvc.utils.stream import IterStream\n\n\n@contextmanager\ndef open_url(url, mode=\"r\", encoding=None):\n \"\"\"Opens an url as a readable stream.\n\n Resumes on connection error.\n Url could be a string or a callable returning a string.\n \"\"\"\n assert mode in {\"r\", \"rt\", \"rb\"}\n\n with iter_url(url) as (response, it):\n bytes_stream = IterStream(it)\n\n if mode == \"rb\":\n yield bytes_stream\n else:\n encoding = encoding or response.encoding\n yield io.TextIOWrapper(bytes_stream, encoding=encoding)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/pkg.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/pkg.py__", "embedding": null, "metadata": {"file_path": "dvc/utils/pkg.py", "file_name": "pkg.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 6, "span_ids": ["impl"], "tokens": 37}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "try:\n # file is created during dvc build\n from .build import PKG # noqa, pylint:disable=unused-import\nexcept ImportError:\n PKG = None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/fastentrypoints.py__noqa_D300_D400_TEMPLATE.r_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/fastentrypoints.py__noqa_D300_D400_TEMPLATE.r_", "embedding": null, "metadata": {"file_path": "fastentrypoints.py", "file_name": "fastentrypoints.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 55, "span_ids": ["docstring"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# noqa: D300,D400\nimport re\n\nfrom setuptools.command import easy_install\n\nTEMPLATE = r\"\"\"\n# -*- coding: utf-8 -*-\n# EASY-INSTALL-ENTRY-SCRIPT: '{3}','{4}','{5}'\n__requires__ = '{3}'\nimport re\nimport sys\n\nfrom {0} import {1}\n\nif __name__ == '__main__':\n sys.argv[0] = re.sub(r'(-script\\.pyw?|\\.exe)?$', '', sys.argv[0])\n sys.exit({2}())\n\"\"\".lstrip()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/fastentrypoints.py_get_args_easy_install.ScriptWriter.get_args.get_args": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/fastentrypoints.py_get_args_easy_install.ScriptWriter.get_args.get_args", "embedding": null, "metadata": {"file_path": "fastentrypoints.py", "file_name": "fastentrypoints.py", "file_type": "text/x-python", "category": "implementation", "start_line": 58, "end_line": 89, "span_ids": ["impl:3", "get_args"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@classmethod\ndef get_args(cls, dist, header=None): # noqa: D205,D400\n \"\"\"\n Yield write_script() argument tuples for a distribution's\n console_scripts and gui_scripts entry points.\n \"\"\"\n if header is None:\n # pylint: disable=E1101\n header = cls.get_header()\n spec = str(dist.as_requirement())\n for type_ in \"console\", \"gui\":\n group = type_ + \"_scripts\"\n for name, ep in dist.get_entry_map(group).items():\n # ensure_safe_name\n if re.search(r\"[\\\\/]\", name):\n raise ValueError(\"Path separators not allowed in script names\")\n script_text = TEMPLATE.format(\n ep.module_name,\n ep.attrs[0],\n \".\".join(ep.attrs),\n spec,\n group,\n name,\n )\n # pylint: disable=E1101,protected-access\n args = cls._get_script_args(type_, name, header, script_text)\n for res in args:\n yield res\n\n\n# pylint: disable=E1101\neasy_install.ScriptWriter.get_args = get_args", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/fastentrypoints.py_main_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/fastentrypoints.py_main_", "embedding": null, "metadata": {"file_path": "fastentrypoints.py", "file_name": "fastentrypoints.py", "file_type": "text/x-python", "category": "implementation", "start_line": 92, "end_line": 123, "span_ids": ["main"], "tokens": 240}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def main():\n import os\n import shutil\n import sys\n\n dests = sys.argv[1:] or [\".\"]\n filename = re.sub(r\"\\.pyc$\", \".py\", __file__)\n\n for dst in dests:\n shutil.copy(filename, dst)\n manifest_path = os.path.join(dst, \"MANIFEST.in\")\n setup_path = os.path.join(dst, \"setup.py\")\n\n # Insert the include statement to MANIFEST.in if not present\n with open(manifest_path, \"a+\") as manifest:\n manifest.seek(0)\n manifest_content = manifest.read()\n if \"include fastentrypoints.py\" not in manifest_content:\n manifest.write(\n (\"\\n\" if manifest_content else \"\")\n + \"include fastentrypoints.py\"\n )\n\n # Insert the import statement to setup.py if not present\n with open(setup_path, \"a+\") as setup:\n setup.seek(0)\n setup_content = setup.read()\n if \"import fastentrypoints\" not in setup_content:\n setup.seek(0)\n setup.truncate()\n setup.write(\"import fastentrypoints\\n\" + setup_content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/hooks/hook-dvc.system.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/hooks/hook-dvc.system.py__", "embedding": null, "metadata": {"file_path": "scripts/hooks/hook-dvc.system.py", "file_name": "hook-dvc.system.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 5, "span_ids": ["imports"], "tokens": 19}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nif os.name == \"nt\":\n hiddenimports = [\"win32file\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/hooks/hook-win32file.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/hooks/hook-win32file.py__", "embedding": null, "metadata": {"file_path": "scripts/hooks/hook-win32file.py", "file_name": "hook-win32file.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 2, "span_ids": ["impl"], "tokens": 8}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "hiddenimports = [\"win32timezone\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/setup.py_importlib.util_build_py.run._build_py_run_self_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/setup.py_importlib.util_build_py.run._build_py_run_self_", "embedding": null, "metadata": {"file_path": "setup.py", "file_name": "setup.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 45, "span_ids": ["build_py", "imports", "build_py.run", "build_py.pin_version"], "tokens": 413}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import importlib.util\nimport os\n\nfrom setuptools import find_packages, setup\nfrom setuptools.command.build_py import build_py as _build_py\n\n# Prevents pkg_resources import in entry point script,\n# see https://github.com/ninjaaron/fast-entry_points.\n# This saves about 200 ms on startup time for non-wheel installs.\ntry:\n import fastentrypoints # noqa: F401, pylint: disable=unused-import\nexcept ImportError:\n pass # not able to import when installing through pre-commit\n\n\n# Read package meta-data from version.py\n# see https://packaging.python.org/guides/single-sourcing-package-version/\npkg_dir = os.path.dirname(os.path.abspath(__file__))\nversion_path = os.path.join(pkg_dir, \"dvc\", \"version.py\")\nspec = importlib.util.spec_from_file_location(\"dvc.version\", version_path)\ndvc_version = importlib.util.module_from_spec(spec)\nspec.loader.exec_module(dvc_version)\nversion = dvc_version.__version__ # noqa: F821\n\n\n# To achieve consistency between the build version and the one provided\n# by your package during runtime, you need to **pin** the build version.\n#\n# This custom class will replace the version.py module with a **static**\n# `__version__` that your package can read at runtime, assuring consistency.\n#\n# References:\n# - https://docs.python.org/3.7/distutils/extending.html\n# - https://github.com/python/mypy\nclass build_py(_build_py):\n def pin_version(self):\n path = os.path.join(self.build_lib, \"dvc\")\n self.mkpath(path)\n with open(os.path.join(path, \"version.py\"), \"w\") as fobj:\n fobj.write(\"# AUTOGENERATED at build time by setup.py\\n\")\n fobj.write('__version__ = \"{}\"\\n'.format(version))\n\n def run(self):\n self.execute(self.pin_version, ())\n _build_py.run(self)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/basic_env.py_TestGitFixture_TestGitFixture.tearDown.super_tearDown_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/basic_env.py_TestGitFixture_TestGitFixture.tearDown.super_tearDown_", "embedding": null, "metadata": {"file_path": "tests/basic_env.py", "file_name": "basic_env.py", "file_type": "text/x-python", "category": "implementation", "start_line": 116, "end_line": 141, "span_ids": ["TestGitFixture.setUp", "TestGitFixture", "TestGitFixture.tearDown"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestGitFixture(TestDirFixture):\n N_RETRIES = 5\n\n def setUp(self):\n super().setUp()\n # NOTE: handles EAGAIN error on BSD systems (osx in our case).\n # Otherwise when running tests you might get this exception:\n #\n # GitCommandNotFound: Cmd('git') not found due to:\n # OSError('[Errno 35] Resource temporarily unavailable')\n retries = self.N_RETRIES\n while True:\n try:\n self.git = Repo.init()\n break\n except GitCommandNotFound:\n retries -= 1\n if not retries:\n raise\n\n self.git.index.add([self.CODE])\n self.git.index.commit(\"add code\")\n\n def tearDown(self):\n self.git.close()\n super().tearDown()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_filecmp_from_tests_utils_import_g": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_filecmp_from_tests_utils_import_g", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 33, "span_ids": ["imports"], "tokens": 222}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import filecmp\nimport logging\nimport os\nimport shutil\nimport stat\nimport textwrap\nimport time\n\nimport colorama\nimport pytest\nfrom mock import call, patch\n\nimport dvc as dvc_module\nfrom dvc.cache import Cache\nfrom dvc.dvcfile import DVC_FILE_SUFFIX\nfrom dvc.exceptions import (\n DvcException,\n OutputDuplicationError,\n OverlappingOutputPathsError,\n RecursiveAddingWhileUsingFilename,\n)\nfrom dvc.hash_info import HashInfo\nfrom dvc.main import main\nfrom dvc.output.base import OutputAlreadyTrackedError, OutputIsStageFileError\nfrom dvc.repo import Repo as DvcRepo\nfrom dvc.stage import Stage\nfrom dvc.system import System\nfrom dvc.tree.local import LocalTree\nfrom dvc.utils import LARGE_DIR_SIZE, file_md5, relpath\nfrom dvc.utils.fs import path_isin\nfrom dvc.utils.serialize import YAMLFileCorruptedError, load_yaml\nfrom tests.basic_env import TestDvc\nfrom tests.utils import get_gitignore_content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_unicode_TestAddDirectoryRecursive.test.self_assertEqual_len_stag": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_unicode_TestAddDirectoryRecursive.test.self_assertEqual_len_stag", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 59, "end_line": 90, "span_ids": ["test_add_unicode", "test_add_unsupported_file", "TestAddDirectoryRecursive", "TestAddDirectoryRecursive.test", "test_add_directory"], "tokens": 219}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_add_unicode(tmp_dir, dvc):\n with open(\"\\xe1\", \"wb\") as fd:\n fd.write(b\"something\")\n\n (stage,) = dvc.add(\"\\xe1\")\n\n assert os.path.isfile(stage.path)\n\n\ndef test_add_unsupported_file(dvc):\n with pytest.raises(DvcException):\n dvc.add(\"unsupported://unsupported\")\n\n\ndef test_add_directory(tmp_dir, dvc):\n (stage,) = tmp_dir.dvc_gen({\"dir\": {\"file\": \"file\"}})\n\n assert stage is not None\n assert len(stage.deps) == 0\n assert len(stage.outs) == 1\n\n hash_info = stage.outs[0].hash_info\n\n dir_info = dvc.cache.local.load_dir_cache(hash_info)\n for path, _ in dir_info.trie.items():\n assert \"\\\\\" not in path\n\n\nclass TestAddDirectoryRecursive(TestDvc):\n def test(self):\n stages = self.dvc.add(self.DATA_DIR, recursive=True)\n self.assertEqual(len(stages), 2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestAddDirWithExistingCache_TestAddModifiedDir.test.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestAddDirWithExistingCache_TestAddModifiedDir.test.None_5", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 131, "end_line": 157, "span_ids": ["TestAddModifiedDir.test", "TestAddDirWithExistingCache", "TestAddModifiedDir", "TestAddDirWithExistingCache.test"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestAddDirWithExistingCache(TestDvc):\n def test(self):\n dname = \"a\"\n fname = os.path.join(dname, \"b\")\n os.mkdir(dname)\n shutil.copyfile(self.FOO, fname)\n\n stages = self.dvc.add(self.FOO)\n self.assertEqual(len(stages), 1)\n self.assertTrue(stages[0] is not None)\n stages = self.dvc.add(dname)\n self.assertEqual(len(stages), 1)\n self.assertTrue(stages[0] is not None)\n\n\nclass TestAddModifiedDir(TestDvc):\n def test(self):\n stages = self.dvc.add(self.DATA_DIR)\n self.assertEqual(len(stages), 1)\n self.assertTrue(stages[0] is not None)\n os.unlink(self.DATA)\n\n time.sleep(2)\n\n stages = self.dvc.add(self.DATA_DIR)\n self.assertEqual(len(stages), 1)\n self.assertTrue(stages[0] is not None)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_file_in_dir_test_add_file_in_dir.assert_stage_outs_0_def_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_file_in_dir_test_add_file_in_dir.assert_stage_outs_0_def_", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 160, "end_line": 173, "span_ids": ["test_add_file_in_dir"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_add_file_in_dir(tmp_dir, dvc):\n tmp_dir.gen({\"dir\": {\"subdir\": {\"subdata\": \"subdata content\"}}})\n subdir_path = os.path.join(\"dir\", \"subdir\", \"subdata\")\n\n (stage,) = dvc.add(subdir_path)\n\n assert stage is not None\n assert len(stage.deps) == 0\n assert len(stage.outs) == 1\n assert stage.relpath == subdir_path + \".dvc\"\n\n # Current dir should not be taken into account\n assert stage.wdir == os.path.dirname(stage.path)\n assert stage.outs[0].def_path == \"subdata\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_should_update_state_entry_for_file_after_add_test_should_update_state_entry_for_file_after_add.None_10": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_should_update_state_entry_for_file_after_add_test_should_update_state_entry_for_file_after_add.None_10", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 334, "end_line": 360, "span_ids": ["test_should_update_state_entry_for_file_after_add"], "tokens": 230}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_should_update_state_entry_for_file_after_add(mocker, dvc, tmp_dir):\n file_md5_counter = mocker.spy(dvc_module.tree.local, \"file_md5\")\n tmp_dir.gen(\"foo\", \"foo\")\n\n ret = main([\"config\", \"cache.type\", \"copy\"])\n assert ret == 0\n\n ret = main([\"add\", \"foo\"])\n assert ret == 0\n assert file_md5_counter.mock.call_count == 1\n\n ret = main([\"status\"])\n assert ret == 0\n assert file_md5_counter.mock.call_count == 1\n\n ret = main([\"run\", \"--single-stage\", \"-d\", \"foo\", \"echo foo\"])\n assert ret == 0\n assert file_md5_counter.mock.call_count == 1\n\n os.rename(\"foo\", \"foo.back\")\n ret = main([\"checkout\"])\n assert ret == 0\n assert file_md5_counter.mock.call_count == 1\n\n ret = main([\"status\"])\n assert ret == 0\n assert file_md5_counter.mock.call_count == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_should_update_state_entry_for_directory_after_add_test_should_update_state_entry_for_directory_after_add.None_10": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_should_update_state_entry_for_directory_after_add_test_should_update_state_entry_for_directory_after_add.None_10", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 363, "end_line": 395, "span_ids": ["test_should_update_state_entry_for_directory_after_add"], "tokens": 272}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_should_update_state_entry_for_directory_after_add(\n mocker, dvc, tmp_dir\n):\n file_md5_counter = mocker.spy(dvc_module.tree.local, \"file_md5\")\n\n tmp_dir.gen({\"data/data\": \"foo\", \"data/data_sub/sub_data\": \"foo\"})\n\n ret = main([\"config\", \"cache.type\", \"copy\"])\n assert ret == 0\n\n ret = main([\"add\", \"data\"])\n assert ret == 0\n assert file_md5_counter.mock.call_count == 3\n\n ret = main([\"status\"])\n assert ret == 0\n assert file_md5_counter.mock.call_count == 3\n\n ls = \"dir\" if os.name == \"nt\" else \"ls\"\n ret = main(\n [\"run\", \"--single-stage\", \"-d\", \"data\", \"{} {}\".format(ls, \"data\")]\n )\n assert ret == 0\n assert file_md5_counter.mock.call_count == 3\n\n os.rename(\"data\", \"data\" + \".back\")\n ret = main([\"checkout\"])\n assert ret == 0\n assert file_md5_counter.mock.call_count == 3\n\n ret = main([\"status\"])\n assert ret == 0\n assert file_md5_counter.mock.call_count == 3", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_failed_add_cleanup_test_should_not_track_git_internal_files.for_fname_in_created_stag.assert_git_not_in_fnam": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_failed_add_cleanup_test_should_not_track_git_internal_files.for_fname_in_created_stag.assert_git_not_in_fnam", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 478, "end_line": 502, "span_ids": ["test_should_not_track_git_internal_files", "test_failed_add_cleanup"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_failed_add_cleanup(tmp_dir, scm, dvc):\n tmp_dir.gen({\"foo\": \"foo\", \"bar\": \"bar\"})\n\n # Add and corrupt a stage file\n dvc.add(\"foo\")\n tmp_dir.gen(\"foo.dvc\", \"- broken\\nyaml\")\n\n with pytest.raises(YAMLFileCorruptedError):\n dvc.add(\"bar\")\n\n assert not os.path.exists(\"bar.dvc\")\n\n gitignore_content = get_gitignore_content()\n assert \"/bar\" not in gitignore_content\n\n\ndef test_should_not_track_git_internal_files(mocker, dvc, tmp_dir):\n stage_creator_spy = mocker.spy(dvc_module.repo.add, \"_create_stages\")\n\n ret = main([\"add\", \"-R\", dvc.root_dir])\n assert ret == 0\n\n created_stages_filenames = stage_creator_spy.mock.call_args[0][1]\n for fname in created_stages_filenames:\n assert \".git\" not in fname", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestAddUnprotected_TestAddUnprotected.test.None_7": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestAddUnprotected_TestAddUnprotected.test.None_7", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 487, "end_line": 505, "span_ids": ["TestAddUnprotected.test", "TestAddUnprotected"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestAddUnprotected(TestDvc):\n def test(self):\n ret = main([\"config\", \"cache.type\", \"hardlink\"])\n self.assertEqual(ret, 0)\n\n ret = main([\"add\", self.FOO])\n self.assertEqual(ret, 0)\n\n self.assertFalse(os.access(self.FOO, os.W_OK))\n self.assertTrue(System.is_hardlink(self.FOO))\n\n ret = main([\"unprotect\", self.FOO])\n self.assertEqual(ret, 0)\n\n ret = main([\"add\", self.FOO])\n self.assertEqual(ret, 0)\n\n self.assertFalse(os.access(self.FOO, os.W_OK))\n self.assertTrue(System.is_hardlink(self.FOO))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_temporary_windows_drive_temporary_windows_drive.if_tear_down_result_0_.raise_RuntimeError_Could": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_temporary_windows_drive_temporary_windows_drive.if_tear_down_result_0_.raise_RuntimeError_Could", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 595, "end_line": 630, "span_ids": ["temporary_windows_drive"], "tokens": 289}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture\ndef temporary_windows_drive(tmp_path_factory):\n import string\n from ctypes import windll\n\n import win32api # pylint: disable=import-error\n from win32con import DDD_REMOVE_DEFINITION # pylint: disable=import-error\n\n drives = [\n s[0].upper()\n for s in win32api.GetLogicalDriveStrings().split(\"\\000\")\n if len(s) > 0\n ]\n\n new_drive_name = [\n letter for letter in string.ascii_uppercase if letter not in drives\n ][0]\n new_drive = f\"{new_drive_name}:\"\n\n target_path = tmp_path_factory.mktemp(\"tmp_windows_drive\")\n\n set_up_result = windll.kernel32.DefineDosDeviceW(\n 0, new_drive, os.fspath(target_path)\n )\n if set_up_result == 0:\n raise RuntimeError(\"Failed to mount windows drive!\")\n\n # NOTE: new_drive has form of `A:` and joining it with some relative\n # path might result in non-existing path (A:path\\\\to)\n yield os.path.join(new_drive, os.sep)\n\n tear_down_result = windll.kernel32.DefineDosDeviceW(\n DDD_REMOVE_DEFINITION, new_drive, os.fspath(target_path)\n )\n if tear_down_result == 0:\n raise RuntimeError(\"Could not unmount windows drive!\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_windows_should_add_when_cache_on_different_drive_test_windows_should_add_when_cache_on_different_drive.filecmp_cmp_file_cache": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_windows_should_add_when_cache_on_different_drive_test_windows_should_add_when_cache_on_different_drive.filecmp_cmp_file_cache", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 545, "end_line": 557, "span_ids": ["test_windows_should_add_when_cache_on_different_drive"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(os.name != \"nt\", reason=\"Windows specific\")\ndef test_windows_should_add_when_cache_on_different_drive(\n tmp_dir, dvc, temporary_windows_drive\n):\n dvc.config[\"cache\"][\"dir\"] = temporary_windows_drive\n dvc.cache = Cache(dvc)\n\n (stage,) = tmp_dir.dvc_gen({\"file\": \"file\"})\n cache_path = stage.outs[0].cache_path\n\n assert path_isin(cache_path, temporary_windows_drive)\n assert os.path.isfile(cache_path)\n filecmp.cmp(\"file\", cache_path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_readding_dir_should_not_unprotect_all_test_should_not_checkout_when_adding_cached_copy.assert_copy_spy_mock_call": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_readding_dir_should_not_unprotect_all_test_should_not_checkout_when_adding_cached_copy.assert_copy_spy_mock_call", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 648, "end_line": 674, "span_ids": ["test_should_not_checkout_when_adding_cached_copy", "test_readding_dir_should_not_unprotect_all"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_readding_dir_should_not_unprotect_all(tmp_dir, dvc, mocker):\n tmp_dir.gen(\"dir/data\", \"data\")\n\n dvc.cache.local.cache_types = [\"symlink\"]\n\n dvc.add(\"dir\")\n tmp_dir.gen(\"dir/new_file\", \"new_file_content\")\n\n unprotect_spy = mocker.spy(LocalTree, \"unprotect\")\n dvc.add(\"dir\")\n\n assert not unprotect_spy.mock.called\n assert System.is_symlink(os.path.join(\"dir\", \"new_file\"))\n\n\ndef test_should_not_checkout_when_adding_cached_copy(tmp_dir, dvc, mocker):\n dvc.cache.local.cache_types = [\"copy\"]\n\n tmp_dir.dvc_gen({\"foo\": \"foo\", \"bar\": \"bar\"})\n\n shutil.copy(\"bar\", \"foo\")\n\n copy_spy = mocker.spy(dvc.cache.local.tree, \"copy\")\n\n dvc.add(\"foo\")\n\n assert copy_spy.mock.call_count == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_should_relink_on_repeated_add_test_should_relink_on_repeated_add.assert_link_test_func_fo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_should_relink_on_repeated_add_test_should_relink_on_repeated_add.assert_link_test_func_fo", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 607, "end_line": 632, "span_ids": ["test_should_relink_on_repeated_add"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"link,new_link,link_test_func\",\n [\n (\"hardlink\", \"copy\", lambda path: not System.is_hardlink(path)),\n (\"symlink\", \"copy\", lambda path: not System.is_symlink(path)),\n (\"copy\", \"hardlink\", System.is_hardlink),\n (\"copy\", \"symlink\", System.is_symlink),\n ],\n)\ndef test_should_relink_on_repeated_add(\n link, new_link, link_test_func, tmp_dir, dvc\n):\n from dvc.path_info import PathInfo\n\n dvc.config[\"cache\"][\"type\"] = link\n\n tmp_dir.dvc_gen({\"foo\": \"foo\", \"bar\": \"bar\"})\n\n os.remove(\"foo\")\n getattr(dvc.cache.local.tree, link)(PathInfo(\"bar\"), PathInfo(\"foo\"))\n\n dvc.cache.local.cache_types = [new_link]\n\n dvc.add(\"foo\")\n\n assert link_test_func(\"foo\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_should_protect_on_repeated_add_test_should_protect_on_repeated_add.if_link_copy_or_lin.else_.assert_not_os_access_foo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_should_protect_on_repeated_add_test_should_protect_on_repeated_add.if_link_copy_or_lin.else_.assert_not_os_access_foo", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 617, "end_line": 636, "span_ids": ["test_should_protect_on_repeated_add"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"link\", [\"hardlink\", \"symlink\", \"copy\"])\ndef test_should_protect_on_repeated_add(link, tmp_dir, dvc):\n dvc.cache.local.cache_types = [link]\n\n tmp_dir.dvc_gen({\"foo\": \"foo\"})\n\n dvc.unprotect(\"foo\")\n\n dvc.add(\"foo\")\n\n assert not os.access(\n os.path.join(\".dvc\", \"cache\", \"ac\", \"bd18db4cc2f85cedef654fccc4a4d8\"),\n os.W_OK,\n )\n\n # NOTE: Windows symlink perms don't propagate to the target\n if link == \"copy\" or (link == \"symlink\" and os.name == \"nt\"):\n assert os.access(\"foo\", os.W_OK)\n else:\n assert not os.access(\"foo\", os.W_OK)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_escape_gitignore_entries_test_escape_gitignore_entries.assert_ignored_fname_in_g": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_escape_gitignore_entries_test_escape_gitignore_entries.assert_ignored_fname_in_g", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 639, "end_line": 650, "span_ids": ["test_escape_gitignore_entries"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_escape_gitignore_entries(tmp_dir, scm, dvc):\n fname = \"file!with*weird#naming_[1].t?t\"\n ignored_fname = r\"/file\\!with\\*weird\\#naming_\\[1\\].t\\?t\"\n\n if os.name == \"nt\":\n # Some characters are not supported by Windows in the filename\n # https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file\n fname = \"file!with_weird#naming_[1].txt\"\n ignored_fname = r\"/file\\!with_weird\\#naming_\\[1\\].txt\"\n\n tmp_dir.dvc_gen(fname, \"...\")\n assert ignored_fname in get_gitignore_content()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_from_data_dir_test_add_from_data_dir.assert_str_e_value_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_from_data_dir_test_add_from_data_dir.assert_str_e_value_", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 653, "end_line": 664, "span_ids": ["test_add_from_data_dir"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_add_from_data_dir(tmp_dir, scm, dvc):\n tmp_dir.dvc_gen({\"dir\": {\"file1\": \"file1 content\"}})\n\n tmp_dir.gen({\"dir\": {\"file2\": \"file2 content\"}})\n\n with pytest.raises(OverlappingOutputPathsError) as e:\n dvc.add(os.path.join(\"dir\", \"file2\"))\n assert str(e.value) == (\n \"Cannot add '{out}', because it is overlapping with other DVC \"\n \"tracked output: 'dir'.\\n\"\n \"To include '{out}' in 'dir', run 'dvc commit dir.dvc'\"\n ).format(out=os.path.join(\"dir\", \"file2\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_not_raises_on_re_add_test_add_empty_files.assert_os_path_exists_sta": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_not_raises_on_re_add_test_add_empty_files.assert_os_path_exists_sta", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 668, "end_line": 683, "span_ids": ["test_add_empty_files", "test_not_raises_on_re_add"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_not_raises_on_re_add(tmp_dir, dvc):\n tmp_dir.dvc_gen(\"file\", \"file content\")\n\n tmp_dir.gen({\"file2\": \"file2 content\", \"file\": \"modified file\"})\n dvc.add([\"file2\", \"file\"])\n\n\n@pytest.mark.parametrize(\"link\", [\"hardlink\", \"symlink\", \"copy\"])\ndef test_add_empty_files(tmp_dir, dvc, link):\n file = \"foo\"\n dvc.cache.local.cache_types = [link]\n stages = tmp_dir.dvc_gen(file, \"\")\n\n assert (tmp_dir / file).exists()\n assert (tmp_dir / (file + DVC_FILE_SUFFIX)).exists()\n assert os.path.exists(stages[0].outs[0].cache_path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_os_test_get_url.assert_api_get_url_foo_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_os_test_get_url.assert_api_get_url_foo_", "embedding": null, "metadata": {"file_path": "tests/func/test_api.py", "file_name": "test_api.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 36, "span_ids": ["imports", "test_get_url"], "tokens": 249}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nimport pytest\nfrom flaky.flaky_decorator import flaky\nfrom funcy import first, get_in\n\nfrom dvc import api\nfrom dvc.exceptions import FileMissingError, OutputNotFoundError\nfrom dvc.path_info import URLInfo\nfrom dvc.utils.fs import remove\nfrom tests.unit.tree.test_repo import make_subrepo\n\ncloud_names = [\n \"s3\",\n \"gs\",\n \"azure\",\n \"gdrive\",\n \"oss\",\n \"ssh\",\n \"http\",\n \"hdfs\",\n \"webdav\",\n \"webhdfs\",\n]\nclouds = [pytest.lazy_fixture(cloud) for cloud in cloud_names]\nall_clouds = [pytest.lazy_fixture(\"local_cloud\")] + clouds\n\n# `lazy_fixture` is confusing pylint, pylint: disable=unused-argument\n\n\n@pytest.mark.parametrize(\"remote\", clouds, indirect=True)\ndef test_get_url(tmp_dir, dvc, remote):\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n\n expected_url = URLInfo(remote.url) / \"ac/bd18db4cc2f85cedef654fccc4a4d8\"\n assert api.get_url(\"foo\") == expected_url", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_get_url_external_test_get_url_external.assert_api_get_url_foo_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_get_url_external_test_get_url_external.assert_api_get_url_foo_", "embedding": null, "metadata": {"file_path": "tests/func/test_api.py", "file_name": "test_api.py", "file_type": "text/x-python", "category": "test", "start_line": 27, "end_line": 36, "span_ids": ["test_get_url_external"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"cloud\", clouds)\ndef test_get_url_external(tmp_dir, erepo_dir, cloud):\n erepo_dir.add_remote(config=cloud.config)\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\"foo\", \"foo\", commit=\"add foo\")\n\n # Using file url to force clone to tmp repo\n repo_url = f\"file://{erepo_dir}\"\n expected_url = URLInfo(cloud.url) / \"ac/bd18db4cc2f85cedef654fccc4a4d8\"\n assert api.get_url(\"foo\", repo=repo_url) == expected_url", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_get_url_requires_dvc_test_open.with_api_open_foo_as_f.assert_fd_read_foo_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_get_url_requires_dvc_test_open.with_api_open_foo_as_f.assert_fd_read_foo_", "embedding": null, "metadata": {"file_path": "tests/func/test_api.py", "file_name": "test_api.py", "file_type": "text/x-python", "category": "test", "start_line": 40, "end_line": 59, "span_ids": ["test_open", "test_get_url_requires_dvc"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_url_requires_dvc(tmp_dir, scm):\n tmp_dir.scm_gen({\"foo\": \"foo\"}, commit=\"initial\")\n\n with pytest.raises(OutputNotFoundError, match=\"output 'foo'\"):\n api.get_url(\"foo\", repo=os.fspath(tmp_dir))\n\n with pytest.raises(OutputNotFoundError, match=\"output 'foo'\"):\n api.get_url(\"foo\", repo=f\"file://{tmp_dir}\")\n\n\n@pytest.mark.parametrize(\"remote\", all_clouds, indirect=True)\ndef test_open(tmp_dir, dvc, remote):\n tmp_dir.dvc_gen(\"foo\", \"foo-text\")\n dvc.push()\n\n # Remove cache to force download\n remove(dvc.cache.local.cache_dir)\n\n with api.open(\"foo\") as fd:\n assert fd.read() == \"foo-text\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cache.py_TestCacheLinkType_TestCmdCacheDir.test_relative_path.self_assertEqual_len_file": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cache.py_TestCacheLinkType_TestCmdCacheDir.test_relative_path.self_assertEqual_len_file", "embedding": null, "metadata": {"file_path": "tests/func/test_cache.py", "file_name": "test_cache.py", "file_type": "text/x-python", "category": "test", "start_line": 144, "end_line": 184, "span_ids": ["TestCmdCacheDir", "TestCacheLinkType", "TestCacheLinkType.test", "TestCmdCacheDir.test_relative_path", "TestCmdCacheDir.test_abs_path", "TestCmdCacheDir.test"], "tokens": 354}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCacheLinkType(TestDvc):\n def test(self):\n ret = main([\"config\", \"cache.type\", \"reflink,copy\"])\n self.assertEqual(ret, 0)\n\n ret = main([\"add\", self.FOO])\n self.assertEqual(ret, 0)\n\n\nclass TestCmdCacheDir(TestDvc):\n def test(self):\n ret = main([\"cache\", \"dir\"])\n self.assertEqual(ret, 0)\n\n def test_abs_path(self):\n dname = os.path.join(os.path.dirname(self._root_dir), \"dir\")\n ret = main([\"cache\", \"dir\", dname])\n self.assertEqual(ret, 0)\n\n config = configobj.ConfigObj(self.dvc.config.files[\"repo\"])\n self.assertEqual(config[\"cache\"][\"dir\"], dname.replace(\"\\\\\", \"/\"))\n\n def test_relative_path(self):\n tmpdir = os.path.realpath(self.mkdtemp())\n dname = relpath(tmpdir)\n ret = main([\"cache\", \"dir\", dname])\n self.assertEqual(ret, 0)\n\n # NOTE: we are in the repo's root and config is in .dvc/, so\n # dir path written to config should be just one level above.\n rel = os.path.join(\"..\", dname)\n config = configobj.ConfigObj(self.dvc.config.files[\"repo\"])\n self.assertEqual(config[\"cache\"][\"dir\"], rel.replace(\"\\\\\", \"/\"))\n\n ret = main([\"add\", self.FOO])\n self.assertEqual(ret, 0)\n\n subdirs = os.listdir(tmpdir)\n self.assertEqual(len(subdirs), 1)\n files = os.listdir(os.path.join(tmpdir, subdirs[0]))\n self.assertEqual(len(files), 1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_collections_logger.logging_getLogger_dvc_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_collections_logger.logging_getLogger_dvc_", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 31, "span_ids": ["imports"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import collections\nimport filecmp\nimport logging\nimport os\nimport shutil\nimport stat\n\nimport pytest\nfrom mock import patch\n\nfrom dvc.dvcfile import DVC_FILE_SUFFIX, PIPELINE_FILE, Dvcfile\nfrom dvc.exceptions import (\n CheckoutError,\n CheckoutErrorSuggestGit,\n ConfirmRemoveError,\n DvcException,\n NoOutputOrStageError,\n)\nfrom dvc.main import main\nfrom dvc.repo import Repo as DvcRepo\nfrom dvc.stage import Stage\nfrom dvc.stage.exceptions import StageFileDoesNotExistError\nfrom dvc.system import System\nfrom dvc.tree.local import LocalTree\nfrom dvc.utils import relpath\nfrom dvc.utils.fs import walk_files\nfrom dvc.utils.serialize import dump_yaml, load_yaml\nfrom tests.basic_env import TestDvc, TestDvcGit\nfrom tests.func.test_repro import TestRepro\n\nlogger = logging.getLogger(\"dvc\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutTargetRecursiveShouldNotRemoveOtherUsedFiles_TestCheckoutRecursiveNotDirectory.test.assert_stats_added_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutTargetRecursiveShouldNotRemoveOtherUsedFiles_TestCheckoutRecursiveNotDirectory.test.assert_stats_added_", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 413, "end_line": 431, "span_ids": ["TestCheckoutTargetRecursiveShouldNotRemoveOtherUsedFiles", "TestCheckoutRecursiveNotDirectory", "TestCheckoutRecursiveNotDirectory.test", "TestCheckoutTargetRecursiveShouldNotRemoveOtherUsedFiles.test"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCheckoutTargetRecursiveShouldNotRemoveOtherUsedFiles(TestDvc):\n def test(self):\n ret = main([\"add\", self.DATA_DIR, self.FOO, self.BAR])\n self.assertEqual(0, ret)\n\n ret = main([\"checkout\", \"-R\", self.DATA_DIR])\n self.assertEqual(0, ret)\n\n self.assertTrue(os.path.exists(self.FOO))\n self.assertTrue(os.path.exists(self.BAR))\n\n\nclass TestCheckoutRecursiveNotDirectory(TestDvc):\n def test(self):\n ret = main([\"add\", self.FOO])\n self.assertEqual(0, ret)\n\n stats = self.dvc.checkout(targets=[self.FOO + \".dvc\"], recursive=True)\n assert stats == {\"added\": [], \"modified\": [], \"deleted\": []}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutMovedCacheDirWithSymlinks_TestCheckoutMovedCacheDirWithSymlinks.test.None_11": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutMovedCacheDirWithSymlinks_TestCheckoutMovedCacheDirWithSymlinks.test.None_11", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 434, "end_line": 475, "span_ids": ["TestCheckoutMovedCacheDirWithSymlinks.test", "TestCheckoutMovedCacheDirWithSymlinks"], "tokens": 304}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCheckoutMovedCacheDirWithSymlinks(TestDvc):\n def test(self):\n ret = main([\"config\", \"cache.type\", \"symlink\"])\n self.assertEqual(ret, 0)\n\n ret = main([\"add\", self.FOO])\n self.assertEqual(ret, 0)\n\n ret = main([\"add\", self.DATA_DIR])\n self.assertEqual(ret, 0)\n\n self.assertTrue(System.is_symlink(self.FOO))\n old_foo_link = os.path.realpath(self.FOO)\n\n self.assertTrue(System.is_symlink(self.DATA))\n old_data_link = os.path.realpath(self.DATA)\n\n old_cache_dir = self.dvc.cache.local.cache_dir\n new_cache_dir = old_cache_dir + \"_new\"\n os.rename(old_cache_dir, new_cache_dir)\n\n ret = main([\"cache\", \"dir\", new_cache_dir])\n self.assertEqual(ret, 0)\n\n ret = main([\"checkout\", \"-f\"])\n self.assertEqual(ret, 0)\n\n self.assertTrue(System.is_symlink(self.FOO))\n new_foo_link = os.path.realpath(self.FOO)\n\n self.assertTrue(System.is_symlink(self.DATA))\n new_data_link = os.path.realpath(self.DATA)\n\n self.assertEqual(\n relpath(old_foo_link, old_cache_dir),\n relpath(new_foo_link, new_cache_dir),\n )\n\n self.assertEqual(\n relpath(old_data_link, old_cache_dir),\n relpath(new_data_link, new_cache_dir),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkout_no_checksum_test_checkout_relink.assert_link_test_func_di": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkout_no_checksum_test_checkout_relink.assert_link_test_func_di", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 485, "end_line": 510, "span_ids": ["test_checkout_no_checksum", "test_checkout_relink"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_checkout_no_checksum(tmp_dir, dvc):\n tmp_dir.gen(\"file\", \"file content\")\n stage = dvc.run(\n outs=[\"file\"], no_exec=True, cmd=\"somecmd\", single_stage=True\n )\n\n with pytest.raises(CheckoutError):\n dvc.checkout([stage.path], force=True)\n\n assert not os.path.exists(\"file\")\n\n\n@pytest.mark.parametrize(\n \"link, link_test_func\",\n [(\"hardlink\", System.is_hardlink), (\"symlink\", System.is_symlink)],\n)\ndef test_checkout_relink(tmp_dir, dvc, link, link_test_func):\n dvc.cache.local.cache_types = [link]\n\n tmp_dir.dvc_gen({\"dir\": {\"data\": \"text\"}})\n dvc.unprotect(\"dir/data\")\n assert not link_test_func(\"dir/data\")\n\n stats = dvc.checkout([\"dir.dvc\"], relink=True)\n assert stats == empty_checkout\n assert link_test_func(\"dir/data\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkout_relink_protected_test_checkout_relink_protected.if_link_copy_or_lin.else_.assert_not_os_access_foo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkout_relink_protected_test_checkout_relink_protected.if_link_copy_or_lin.else_.assert_not_os_access_foo", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 504, "end_line": 519, "span_ids": ["test_checkout_relink_protected"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"link\", [\"hardlink\", \"symlink\", \"copy\"])\ndef test_checkout_relink_protected(tmp_dir, dvc, link):\n dvc.cache.local.cache_types = [link]\n\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n dvc.unprotect(\"foo\")\n assert os.access(\"foo\", os.W_OK)\n\n stats = dvc.checkout([\"foo.dvc\"], relink=True)\n assert stats == empty_checkout\n\n # NOTE: Windows symlink perms don't propagate to the target\n if link == \"copy\" or (link == \"symlink\" and os.name == \"nt\"):\n assert os.access(\"foo\", os.W_OK)\n else:\n assert not os.access(\"foo\", os.W_OK)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_partial_checkout_test_stats_on_empty_checkout.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_partial_checkout_test_stats_on_empty_checkout.None_1", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 522, "end_line": 543, "span_ids": ["test_partial_checkout", "impl:3", "test_stats_on_empty_checkout"], "tokens": 213}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"target\",\n [os.path.join(\"dir\", \"subdir\"), os.path.join(\"dir\", \"subdir\", \"file\")],\n)\ndef test_partial_checkout(tmp_dir, dvc, target):\n tmp_dir.dvc_gen({\"dir\": {\"subdir\": {\"file\": \"file\"}, \"other\": \"other\"}})\n shutil.rmtree(\"dir\")\n stats = dvc.checkout([target])\n assert stats[\"added\"] == [\"dir\" + os.sep]\n assert list(walk_files(\"dir\")) == [os.path.join(\"dir\", \"subdir\", \"file\")]\n\n\nempty_checkout = {\"added\": [], \"deleted\": [], \"modified\": []}\n\n\ndef test_stats_on_empty_checkout(tmp_dir, dvc, scm):\n assert dvc.checkout() == empty_checkout\n tmp_dir.dvc_gen(\n {\"dir\": {\"subdir\": {\"file\": \"file\"}, \"other\": \"other\"}},\n commit=\"initial\",\n )\n assert dvc.checkout() == empty_checkout", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_stats_on_checkout_test_stats_on_checkout.None_7": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_stats_on_checkout_test_stats_on_checkout.None_7", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 565, "end_line": 597, "span_ids": ["test_stats_on_checkout"], "tokens": 324}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stats_on_checkout(tmp_dir, dvc, scm):\n tmp_dir.dvc_gen(\n {\n \"dir\": {\"subdir\": {\"file\": \"file\"}, \"other\": \"other\"},\n \"foo\": \"foo\",\n \"bar\": \"bar\",\n },\n commit=\"initial\",\n )\n scm.checkout(\"HEAD~\")\n stats = dvc.checkout()\n assert set(stats[\"deleted\"]) == {\"dir\" + os.sep, \"foo\", \"bar\"}\n\n scm.checkout(\"-\")\n stats = dvc.checkout()\n assert set(stats[\"added\"]) == {\"bar\", \"dir\" + os.sep, \"foo\"}\n\n tmp_dir.gen({\"lorem\": \"lorem\", \"bar\": \"new bar\", \"dir2\": {\"file\": \"file\"}})\n (tmp_dir / \"foo\").unlink()\n scm.gitpython.repo.git.rm(\"foo.dvc\")\n tmp_dir.dvc_add([\"bar\", \"lorem\", \"dir2\"], commit=\"second\")\n\n scm.checkout(\"HEAD~\")\n stats = dvc.checkout()\n assert set(stats[\"modified\"]) == {\"bar\"}\n assert set(stats[\"added\"]) == {\"foo\"}\n assert set(stats[\"deleted\"]) == {\"lorem\", \"dir2\" + os.sep}\n\n scm.checkout(\"-\")\n stats = dvc.checkout()\n assert set(stats[\"modified\"]) == {\"bar\"}\n assert set(stats[\"added\"]) == {\"dir2\" + os.sep, \"lorem\"}\n assert set(stats[\"deleted\"]) == {\"foo\"}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkout_stats_on_failure_test_checkout_stats_on_failure.assert_exc_value_stats_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkout_stats_on_failure_test_checkout_stats_on_failure.assert_exc_value_stats_", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 584, "end_line": 606, "span_ids": ["test_checkout_stats_on_failure"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_checkout_stats_on_failure(tmp_dir, dvc, scm):\n tmp_dir.dvc_gen(\n {\"foo\": \"foo\", \"dir\": {\"subdir\": {\"file\": \"file\"}}, \"other\": \"other\"},\n commit=\"initial\",\n )\n stage = Dvcfile(dvc, \"foo.dvc\").stage\n tmp_dir.dvc_gen({\"foo\": \"foobar\", \"other\": \"other other\"}, commit=\"second\")\n\n # corrupt cache\n cache = stage.outs[0].cache_path\n os.chmod(cache, 0o644)\n with open(cache, \"a\") as fd:\n fd.write(\"destroy cache\")\n\n scm.checkout(\"HEAD~\")\n with pytest.raises(CheckoutError) as exc:\n dvc.checkout(force=True)\n\n assert exc.value.stats == {\n **empty_checkout,\n \"failed\": [\"foo\"],\n \"modified\": [\"other\"],\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_stats_on_added_file_from_tracked_dir_test_stats_on_added_file_from_tracked_dir.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_stats_on_added_file_from_tracked_dir_test_stats_on_added_file_from_tracked_dir.None_3", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 606, "end_line": 620, "span_ids": ["test_stats_on_added_file_from_tracked_dir"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stats_on_added_file_from_tracked_dir(tmp_dir, dvc, scm):\n tmp_dir.dvc_gen(\n {\"dir\": {\"subdir\": {\"file\": \"file\"}, \"other\": \"other\"}},\n commit=\"initial\",\n )\n\n tmp_dir.gen(\"dir/subdir/newfile\", \"newfile\")\n tmp_dir.dvc_add(\"dir\", commit=\"add newfile\")\n scm.checkout(\"HEAD~\")\n assert dvc.checkout() == {**empty_checkout, \"modified\": [\"dir\" + os.sep]}\n assert dvc.checkout() == empty_checkout\n\n scm.checkout(\"-\")\n assert dvc.checkout() == {**empty_checkout, \"modified\": [\"dir\" + os.sep]}\n assert dvc.checkout() == empty_checkout", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_stats_on_updated_file_from_tracked_dir_test_stats_on_updated_file_from_tracked_dir.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_stats_on_updated_file_from_tracked_dir_test_stats_on_updated_file_from_tracked_dir.None_3", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 623, "end_line": 637, "span_ids": ["test_stats_on_updated_file_from_tracked_dir"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stats_on_updated_file_from_tracked_dir(tmp_dir, dvc, scm):\n tmp_dir.dvc_gen(\n {\"dir\": {\"subdir\": {\"file\": \"file\"}, \"other\": \"other\"}},\n commit=\"initial\",\n )\n\n tmp_dir.gen(\"dir/subdir/file\", \"what file?\")\n tmp_dir.dvc_add(\"dir\", commit=\"update file\")\n scm.checkout(\"HEAD~\")\n assert dvc.checkout() == {**empty_checkout, \"modified\": [\"dir\" + os.sep]}\n assert dvc.checkout() == empty_checkout\n\n scm.checkout(\"-\")\n assert dvc.checkout() == {**empty_checkout, \"modified\": [\"dir\" + os.sep]}\n assert dvc.checkout() == empty_checkout", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_stats_on_removed_file_from_tracked_dir_test_stats_on_removed_file_from_tracked_dir.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_stats_on_removed_file_from_tracked_dir_test_stats_on_removed_file_from_tracked_dir.None_3", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 640, "end_line": 654, "span_ids": ["test_stats_on_removed_file_from_tracked_dir"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stats_on_removed_file_from_tracked_dir(tmp_dir, dvc, scm):\n tmp_dir.dvc_gen(\n {\"dir\": {\"subdir\": {\"file\": \"file\"}, \"other\": \"other\"}},\n commit=\"initial\",\n )\n\n (tmp_dir / \"dir\" / \"subdir\" / \"file\").unlink()\n tmp_dir.dvc_add(\"dir\", commit=\"removed file from subdir\")\n scm.checkout(\"HEAD~\")\n assert dvc.checkout() == {**empty_checkout, \"modified\": [\"dir\" + os.sep]}\n assert dvc.checkout() == empty_checkout\n\n scm.checkout(\"-\")\n assert dvc.checkout() == {**empty_checkout, \"modified\": [\"dir\" + os.sep]}\n assert dvc.checkout() == empty_checkout", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_stats_on_show_changes_does_not_show_summary_test_stats_on_show_changes_does_not_show_summary.with_caplog_at_level_logg.assert_added_not_in_cap": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_stats_on_show_changes_does_not_show_summary_test_stats_on_show_changes_does_not_show_summary.with_caplog_at_level_logg.assert_added_not_in_cap", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 657, "end_line": 673, "span_ids": ["test_stats_on_show_changes_does_not_show_summary"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stats_on_show_changes_does_not_show_summary(\n tmp_dir, dvc, scm, caplog\n):\n tmp_dir.dvc_gen(\n {\"dir\": {\"subdir\": {\"file\": \"file\"}}, \"other\": \"other\"},\n commit=\"initial\",\n )\n scm.checkout(\"HEAD~\")\n\n with caplog.at_level(logging.INFO, logger=\"dvc\"):\n caplog.clear()\n assert main([\"checkout\"]) == 0\n for out in [\"D\\tdir\" + os.sep, \"D\\tother\"]:\n assert out in caplog.text\n assert \"modified\" not in caplog.text\n assert \"deleted\" not in caplog.text\n assert \"added\" not in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_stats_does_not_show_changes_by_default_test_checkout_with_relink_existing.assert_stats_empty_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_stats_does_not_show_changes_by_default_test_checkout_with_relink_existing.assert_stats_empty_", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 685, "end_line": 709, "span_ids": ["test_stats_does_not_show_changes_by_default", "test_checkout_with_relink_existing"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stats_does_not_show_changes_by_default(tmp_dir, dvc, scm, caplog):\n tmp_dir.dvc_gen(\n {\"dir\": {\"subdir\": {\"file\": \"file\"}}, \"other\": \"other\"},\n commit=\"initial\",\n )\n scm.checkout(\"HEAD~\")\n\n with caplog.at_level(logging.INFO, logger=\"dvc\"):\n caplog.clear()\n assert main([\"checkout\", \"--summary\"]) == 0\n assert \"2 files deleted\" in caplog.text\n assert \"dir\" not in caplog.text\n assert \"other\" not in caplog.text\n\n\n@pytest.mark.parametrize(\"link\", [\"hardlink\", \"symlink\", \"copy\"])\ndef test_checkout_with_relink_existing(tmp_dir, dvc, link):\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n (tmp_dir / \"foo\").unlink()\n\n tmp_dir.dvc_gen(\"bar\", \"bar\")\n dvc.cache.local.cache_types = [link]\n\n stats = dvc.checkout(relink=True)\n assert stats == {**empty_checkout, \"added\": [\"foo\"]}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkout_with_deps_test_checkout_with_deps.assert_set_stats_added_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkout_with_deps_test_checkout_with_deps.assert_set_stats_added_", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 712, "end_line": 730, "span_ids": ["test_checkout_with_deps"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_checkout_with_deps(tmp_dir, dvc):\n tmp_dir.dvc_gen({\"foo\": \"foo\"})\n dvc.run(\n fname=\"copy_file.dvc\",\n cmd=\"echo foo > bar\",\n outs=[\"bar\"],\n deps=[\"foo\"],\n single_stage=True,\n )\n\n (tmp_dir / \"bar\").unlink()\n (tmp_dir / \"foo\").unlink()\n\n stats = dvc.checkout([\"copy_file.dvc\"], with_deps=False)\n assert stats == {**empty_checkout, \"added\": [\"bar\"]}\n\n (tmp_dir / \"bar\").unlink()\n stats = dvc.checkout([\"copy_file.dvc\"], with_deps=True)\n assert set(stats[\"added\"]) == {\"foo\", \"bar\"}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkout_recursive_test_checkout_recursive.assert_set_stats_added_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkout_recursive_test_checkout_recursive.assert_set_stats_added_", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 720, "end_line": 731, "span_ids": ["test_checkout_recursive"], "tokens": 112}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_checkout_recursive(tmp_dir, dvc):\n tmp_dir.gen({\"dir\": {\"foo\": \"foo\", \"bar\": \"bar\"}})\n dvc.add(\"dir\", recursive=True)\n\n (tmp_dir / \"dir\" / \"foo\").unlink()\n (tmp_dir / \"dir\" / \"bar\").unlink()\n\n stats = dvc.checkout([\"dir\"], recursive=True)\n assert set(stats[\"added\"]) == {\n os.path.join(\"dir\", \"foo\"),\n os.path.join(\"dir\", \"bar\"),\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_commit.py_test_commit_force_test_commit_force.assert_dvc_status_stage_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_commit.py_test_commit_force_test_commit_force.assert_dvc_status_stage_", "embedding": null, "metadata": {"file_path": "tests/func/test_commit.py", "file_name": "test_commit.py", "file_type": "text/x-python", "category": "test", "start_line": 23, "end_line": 39, "span_ids": ["test_commit_force"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_commit_force(tmp_dir, dvc):\n tmp_dir.gen({\"dir\": {\"file\": \"text1\", \"file2\": \"text2\"}})\n (stage,) = dvc.add(\"dir\", no_commit=True)\n\n assert stage.outs[0].changed_cache()\n\n tmp_dir.gen(\"dir/file\", \"file content modified\")\n\n assert stage.outs[0].changed_cache()\n\n with pytest.raises(StageCommitError):\n dvc.commit(stage.path)\n\n assert stage.outs[0].changed_cache()\n\n dvc.commit(stage.path, force=True)\n assert dvc.status([stage.path]) == {}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dependency.py_copy_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dependency.py_copy_", "embedding": null, "metadata": {"file_path": "tests/func/test_dependency.py", "file_name": "test_dependency.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 22, "span_ids": ["_get_dep", "imports", "test_scheme"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import copy\n\nimport pytest\n\nfrom dvc.dependency import DEP_MAP, _get\nfrom dvc.stage import Stage\nfrom tests.func.test_output import TESTS as OUT_TESTS\n\nTESTS = copy.copy(OUT_TESTS)\nTESTS.append((\"http://example.com/path/to/file\", \"http\"))\nTESTS.append((\"https://example.com/path/to/file\", \"https\"))\n\n\ndef _get_dep(dvc, path):\n return _get(Stage(dvc), path, None)\n\n\n@pytest.mark.parametrize(\"url,scheme\", TESTS)\ndef test_scheme(dvc, url, scheme):\n # pylint: disable=unidiomatic-typecheck\n assert type(_get_dep(dvc, url)) == DEP_MAP[scheme]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_hashlib_test_added.assert_dvc_diff_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_hashlib_test_added.assert_dvc_diff_", "embedding": null, "metadata": {"file_path": "tests/func/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 32, "span_ids": ["imports", "digest", "test_no_scm", "test_added"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import hashlib\nimport os\n\nimport pytest\nfrom funcy import first\n\nfrom dvc.exceptions import DvcException\nfrom dvc.utils.fs import remove\n\n\ndef digest(text):\n return hashlib.md5(bytes(text, \"utf-8\")).hexdigest()\n\n\ndef test_no_scm(tmp_dir, dvc):\n from dvc.scm.base import NoSCMError\n\n tmp_dir.dvc_gen(\"file\", \"text\")\n\n with pytest.raises(NoSCMError):\n dvc.diff()\n\n\ndef test_added(tmp_dir, scm, dvc):\n tmp_dir.dvc_gen(\"file\", \"text\")\n\n assert dvc.diff() == {\n \"added\": [{\"path\": \"file\", \"hash\": digest(\"text\")}],\n \"deleted\": [],\n \"modified\": [],\n \"not in cache\": [],\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_test_no_cache_entry_test_no_cache_entry.assert_dvc_diff_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_test_no_cache_entry_test_no_cache_entry.assert_dvc_diff_", "embedding": null, "metadata": {"file_path": "tests/func/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 35, "end_line": 60, "span_ids": ["test_no_cache_entry"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_no_cache_entry(tmp_dir, scm, dvc):\n tmp_dir.dvc_gen(\"file\", \"first\", commit=\"add a file\")\n\n tmp_dir.dvc_gen({\"dir\": {\"1\": \"1\", \"2\": \"2\"}})\n tmp_dir.dvc_gen(\"file\", \"second\")\n\n remove(tmp_dir / \".dvc\" / \"cache\")\n (tmp_dir / \".dvc\" / \"tmp\" / \"state\").unlink()\n\n dir_checksum = \"5fb6b29836c388e093ca0715c872fe2a.dir\"\n\n assert dvc.diff() == {\n \"added\": [\n {\"path\": os.path.join(\"dir\", \"\"), \"hash\": dir_checksum},\n {\"path\": os.path.join(\"dir\", \"1\"), \"hash\": digest(\"1\")},\n {\"path\": os.path.join(\"dir\", \"2\"), \"hash\": digest(\"2\")},\n ],\n \"deleted\": [],\n \"modified\": [\n {\n \"path\": \"file\",\n \"hash\": {\"old\": digest(\"first\"), \"new\": digest(\"second\")},\n }\n ],\n \"not in cache\": [],\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_test_deleted_test_modified.assert_dvc_diff_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_test_deleted_test_modified.assert_dvc_diff_", "embedding": null, "metadata": {"file_path": "tests/func/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 63, "end_line": 89, "span_ids": ["test_modified", "test_deleted"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_deleted(tmp_dir, scm, dvc):\n tmp_dir.dvc_gen(\"file\", \"text\", commit=\"add file\")\n (tmp_dir / \"file.dvc\").unlink()\n\n assert dvc.diff() == {\n \"added\": [],\n \"deleted\": [{\"path\": \"file\", \"hash\": digest(\"text\")}],\n \"modified\": [],\n \"not in cache\": [],\n }\n\n\ndef test_modified(tmp_dir, scm, dvc):\n tmp_dir.dvc_gen(\"file\", \"first\", commit=\"first version\")\n tmp_dir.dvc_gen(\"file\", \"second\")\n\n assert dvc.diff() == {\n \"added\": [],\n \"deleted\": [],\n \"modified\": [\n {\n \"path\": \"file\",\n \"hash\": {\"old\": digest(\"first\"), \"new\": digest(\"second\")},\n }\n ],\n \"not in cache\": [],\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_test_refs_test_refs.with_pytest_raises_DvcExc.dvc_diff_missing_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_test_refs_test_refs.with_pytest_raises_DvcExc.dvc_diff_missing_", "embedding": null, "metadata": {"file_path": "tests/func/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 92, "end_line": 116, "span_ids": ["test_refs"], "tokens": 231}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_refs(tmp_dir, scm, dvc):\n tmp_dir.dvc_gen(\"file\", \"first\", commit=\"first version\")\n tmp_dir.dvc_gen(\"file\", \"second\", commit=\"second version\")\n tmp_dir.dvc_gen(\"file\", \"third\", commit=\"third version\")\n\n HEAD_2 = digest(\"first\")\n HEAD_1 = digest(\"second\")\n HEAD = digest(\"third\")\n\n assert dvc.diff(\"HEAD~1\") == {\n \"added\": [],\n \"deleted\": [],\n \"modified\": [{\"path\": \"file\", \"hash\": {\"old\": HEAD_1, \"new\": HEAD}}],\n \"not in cache\": [],\n }\n\n assert dvc.diff(\"HEAD~2\", \"HEAD~1\") == {\n \"added\": [],\n \"deleted\": [],\n \"modified\": [{\"path\": \"file\", \"hash\": {\"old\": HEAD_2, \"new\": HEAD_1}}],\n \"not in cache\": [],\n }\n\n with pytest.raises(DvcException, match=r\"unknown Git revision 'missing'\"):\n dvc.diff(\"missing\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_test_directories_test_directories.assert_dvc_diff_modify": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_test_directories_test_directories.assert_dvc_diff_modify", "embedding": null, "metadata": {"file_path": "tests/func/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 119, "end_line": 180, "span_ids": ["test_directories"], "tokens": 573}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_directories(tmp_dir, scm, dvc):\n tmp_dir.dvc_gen({\"dir\": {\"1\": \"1\", \"2\": \"2\"}}, commit=\"add a directory\")\n tmp_dir.dvc_gen({\"dir\": {\"3\": \"3\"}}, commit=\"add a file\")\n tmp_dir.dvc_gen({\"dir\": {\"2\": \"two\"}}, commit=\"modify a file\")\n\n (tmp_dir / \"dir\" / \"2\").unlink()\n dvc.add(\"dir\")\n scm.add([\"dir.dvc\"])\n scm.commit(\"delete a file\")\n\n # The \":/\" format is a way to specify revisions by commit message:\n # https://git-scm.com/docs/revisions\n #\n assert dvc.diff(\":/init\", \":/directory\") == {\n \"added\": [\n {\n \"path\": os.path.join(\"dir\", \"\"),\n \"hash\": \"5fb6b29836c388e093ca0715c872fe2a.dir\",\n },\n {\"path\": os.path.join(\"dir\", \"1\"), \"hash\": digest(\"1\")},\n {\"path\": os.path.join(\"dir\", \"2\"), \"hash\": digest(\"2\")},\n ],\n \"deleted\": [],\n \"modified\": [],\n \"not in cache\": [],\n }\n\n assert dvc.diff(\":/directory\", \":/modify\") == {\n \"added\": [{\"path\": os.path.join(\"dir\", \"3\"), \"hash\": digest(\"3\")}],\n \"deleted\": [],\n \"modified\": [\n {\n \"path\": os.path.join(\"dir\", \"\"),\n \"hash\": {\n \"old\": \"5fb6b29836c388e093ca0715c872fe2a.dir\",\n \"new\": \"9b5faf37366b3370fd98e3e60ca439c1.dir\",\n },\n },\n {\n \"path\": os.path.join(\"dir\", \"2\"),\n \"hash\": {\"old\": digest(\"2\"), \"new\": digest(\"two\")},\n },\n ],\n \"not in cache\": [],\n }\n\n assert dvc.diff(\":/modify\", \":/delete\") == {\n \"added\": [],\n \"deleted\": [\n {\"path\": os.path.join(\"dir\", \"2\"), \"hash\": digest(\"two\")},\n ],\n \"modified\": [\n {\n \"path\": os.path.join(\"dir\", \"\"),\n \"hash\": {\n \"old\": \"9b5faf37366b3370fd98e3e60ca439c1.dir\",\n \"new\": \"83ae82fb367ac9926455870773ff09e6.dir\",\n },\n }\n ],\n \"not in cache\": [],\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_os_test_external_repo.with_patch_object_Git_c.assert_mock_call_count_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_os_test_external_repo.with_patch_object_Git_c.assert_mock_call_count_", "embedding": null, "metadata": {"file_path": "tests/func/test_external_repo.py", "file_name": "test_external_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 32, "span_ids": ["imports", "test_external_repo"], "tokens": 259}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nfrom mock import ANY, patch\n\nfrom dvc.external_repo import CLONES, external_repo\nfrom dvc.hash_info import HashInfo\nfrom dvc.path_info import PathInfo\nfrom dvc.scm.git import Git\nfrom dvc.tree.local import LocalTree\nfrom dvc.utils import relpath\nfrom dvc.utils.fs import makedirs, remove\nfrom tests.unit.tree.test_repo import make_subrepo\n\n\ndef test_external_repo(erepo_dir):\n with erepo_dir.chdir():\n with erepo_dir.branch(\"branch\", new=True):\n erepo_dir.dvc_gen(\"file\", \"branch\", commit=\"create file on branch\")\n erepo_dir.dvc_gen(\"file\", \"master\", commit=\"create file on master\")\n\n url = os.fspath(erepo_dir)\n\n with patch.object(Git, \"clone\", wraps=Git.clone) as mock:\n with external_repo(url) as repo:\n with repo.open_by_relpath(\"file\") as fd:\n assert fd.read() == \"master\"\n\n with external_repo(url, rev=\"branch\") as repo:\n with repo.open_by_relpath(\"file\") as fd:\n assert fd.read() == \"branch\"\n\n assert mock.call_count == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_test_source_change_test_cache_reused.with_external_repo_url_.assert_download_spy_mock_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_test_source_change_test_cache_reused.with_external_repo_url_.assert_download_spy_mock_", "embedding": null, "metadata": {"file_path": "tests/func/test_external_repo.py", "file_name": "test_external_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 35, "end_line": 66, "span_ids": ["test_cache_reused", "test_source_change"], "tokens": 249}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_source_change(erepo_dir):\n url = os.fspath(erepo_dir)\n with external_repo(url) as repo:\n old_rev = repo.scm.get_rev()\n\n erepo_dir.scm_gen(\"file\", \"text\", commit=\"a change\")\n\n with external_repo(url) as repo:\n new_rev = repo.scm.get_rev()\n\n assert old_rev != new_rev\n\n\ndef test_cache_reused(erepo_dir, mocker, local_cloud):\n erepo_dir.add_remote(config=local_cloud.config)\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\"file\", \"text\", commit=\"add file\")\n erepo_dir.dvc.push()\n\n download_spy = mocker.spy(LocalTree, \"download\")\n\n # Use URL to prevent any fishy optimizations\n url = f\"file://{erepo_dir}\"\n with external_repo(url) as repo:\n repo.fetch()\n assert download_spy.mock.call_count == 1\n\n # Should not download second time\n erepo_dir.scm.branch(\"branch\")\n with external_repo(url, \"branch\") as repo:\n repo.fetch()\n assert download_spy.mock.call_count == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_fs.py_os_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_fs.py_os_", "embedding": null, "metadata": {"file_path": "tests/func/test_fs.py", "file_name": "test_fs.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 37, "span_ids": ["imports", "test_copyfile", "test_makedirs_permissions"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport stat\n\nimport pytest\n\nfrom dvc.utils.fs import copyfile, makedirs\n\n\n@pytest.mark.skipif(os.name == \"nt\", reason=\"Not supported for Windows.\")\ndef test_makedirs_permissions(tmp_dir):\n dir_mode = 0o755\n intermediate_dir = \"\u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f-\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\"\n test_dir = os.path.join(intermediate_dir, \"data\")\n\n assert not os.path.exists(intermediate_dir)\n\n makedirs(test_dir, mode=dir_mode)\n\n assert stat.S_IMODE(os.stat(test_dir).st_mode) == dir_mode\n assert stat.S_IMODE(os.stat(intermediate_dir).st_mode) == dir_mode\n\n\ndef test_copyfile(tmp_dir):\n src = \"file1\"\n dest = \"file2\"\n dest_dir = \"testdir\"\n\n tmp_dir.gen(src, \"file1contents\")\n\n os.mkdir(dest_dir)\n\n copyfile(src, dest)\n assert (tmp_dir / dest).read_text() == \"file1contents\"\n\n copyfile(src, dest_dir)\n assert (tmp_dir / dest_dir / src).read_text() == \"file1contents\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_logging_TestGC._test_gc.for_c_in_self_good_cache_.self_assertTrue_os_path_e": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_logging_TestGC._test_gc.for_c_in_self_good_cache_.self_assertTrue_os_path_e", "embedding": null, "metadata": {"file_path": "tests/func/test_gc.py", "file_name": "test_gc.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 50, "span_ids": ["TestGC.test_cli", "imports", "TestGC", "TestGC.setUp", "TestGC.test_api", "TestGC._test_gc"], "tokens": 317}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nimport shutil\n\nimport configobj\nimport pytest\nfrom git import Repo\n\nfrom dvc.cache.local import LocalCache\nfrom dvc.exceptions import CollectCacheError\nfrom dvc.main import main\nfrom dvc.repo import Repo as DvcRepo\nfrom dvc.tree.local import LocalTree\nfrom dvc.utils.fs import remove\nfrom tests.basic_env import TestDir, TestDvcGit\n\n\nclass TestGC(TestDvcGit):\n def setUp(self):\n super().setUp()\n\n self.dvc.add(self.FOO)\n self.dvc.add(self.DATA_DIR)\n self.good_cache = [\n self.dvc.cache.local.tree.hash_to_path_info(md5)\n for md5 in self.dvc.cache.local.all()\n ]\n\n self.bad_cache = []\n for i in [\"123\", \"234\", \"345\"]:\n path = os.path.join(self.dvc.cache.local.cache_dir, i[0:2], i[2:])\n self.create(path, i)\n self.bad_cache.append(path)\n\n def test_api(self):\n self.dvc.gc(workspace=True)\n self._test_gc()\n\n def test_cli(self):\n ret = main([\"gc\", \"-wf\"])\n self.assertEqual(ret, 0)\n self._test_gc()\n\n def _test_gc(self):\n self.assertTrue(os.path.isdir(self.dvc.cache.local.cache_dir))\n for c in self.bad_cache:\n self.assertFalse(os.path.exists(c))\n\n for c in self.good_cache:\n self.assertTrue(os.path.exists(c))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_TestGCMultipleDvcRepos.test_TestGCMultipleDvcRepos.test.self__check_cache_2_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_TestGCMultipleDvcRepos.test_TestGCMultipleDvcRepos.test.self__check_cache_2_", "embedding": null, "metadata": {"file_path": "tests/func/test_gc.py", "file_name": "test_gc.py", "file_type": "text/x-python", "category": "test", "start_line": 136, "end_line": 180, "span_ids": ["TestGCMultipleDvcRepos.test"], "tokens": 325}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestGCMultipleDvcRepos(TestDvcGit):\n\n def test(self):\n\n # ADD FILE ONLY IN MAIN PROJECT\n fname = \"only_in_first\"\n with open(fname, \"w+\") as fobj:\n fobj.write(\"only in main repo\")\n\n stages = self.dvc.add(fname)\n self.assertEqual(len(stages), 1)\n\n # ADD FILE IN MAIN PROJECT THAT IS ALSO IN SECOND PROJECT\n fname = \"in_both\"\n with open(fname, \"w+\") as fobj:\n fobj.write(\"in both repos\")\n\n stages = self.dvc.add(fname)\n self.assertEqual(len(stages), 1)\n\n cwd = os.getcwd()\n os.chdir(self.additional_path)\n # ADD FILE ONLY IN SECOND PROJECT\n fname = \"only_in_second\"\n with open(fname, \"w+\") as fobj:\n fobj.write(\"only in additional repo\")\n\n stages = self.additional_dvc.add(fname)\n self.assertEqual(len(stages), 1)\n\n # ADD FILE IN SECOND PROJECT THAT IS ALSO IN MAIN PROJECT\n fname = \"in_both\"\n with open(fname, \"w+\") as fobj:\n fobj.write(\"in both repos\")\n\n stages = self.additional_dvc.add(fname)\n self.assertEqual(len(stages), 1)\n\n os.chdir(cwd)\n\n self._check_cache(3)\n\n self.dvc.gc(repos=[self.additional_path], workspace=True)\n self._check_cache(3)\n\n self.dvc.gc(workspace=True)\n self._check_cache(2)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_all_commits_test_all_commits.assert__count_files_dvc_c": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_all_commits_test_all_commits.assert__count_files_dvc_c", "embedding": null, "metadata": {"file_path": "tests/func/test_gc.py", "file_name": "test_gc.py", "file_type": "text/x-python", "category": "test", "start_line": 182, "end_line": 192, "span_ids": ["test_all_commits"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_all_commits(tmp_dir, scm, dvc):\n tmp_dir.dvc_gen(\"testfile\", \"uncommitted\")\n tmp_dir.dvc_gen(\"testfile\", \"committed\", commit=\"committed\")\n tmp_dir.dvc_gen(\"testfile\", \"modified\", commit=\"modified\")\n tmp_dir.dvc_gen(\"testfile\", \"workspace\")\n\n n = _count_files(dvc.cache.local.cache_dir)\n dvc.gc(all_commits=True)\n\n # Only one uncommitted file should go away\n assert _count_files(dvc.cache.local.cache_dir) == n - 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_cache_type_is_properly_overridden_test_cache_type_is_properly_overridden.assert_tmp_dir_file_i": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_cache_type_is_properly_overridden_test_cache_type_is_properly_overridden.assert_tmp_dir_file_i", "embedding": null, "metadata": {"file_path": "tests/func/test_get.py", "file_name": "test_get.py", "file_type": "text/x-python", "category": "test", "start_line": 64, "end_line": 78, "span_ids": ["test_cache_type_is_properly_overridden"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_cache_type_is_properly_overridden(tmp_dir, erepo_dir):\n with erepo_dir.chdir():\n with erepo_dir.dvc.config.edit() as conf:\n conf[\"cache\"][\"type\"] = \"symlink\"\n erepo_dir.dvc.cache = Cache(erepo_dir.dvc)\n erepo_dir.scm_add(\n [erepo_dir.dvc.config.files[\"repo\"]], \"set cache type to symlinks\"\n )\n erepo_dir.dvc_gen(\"file\", \"contents\", \"create file\")\n assert System.is_symlink(erepo_dir / \"file\")\n\n Repo.get(os.fspath(erepo_dir), \"file\", \"file_imported\")\n\n assert not System.is_symlink(\"file_imported\")\n assert (tmp_dir / \"file_imported\").read_text() == \"contents\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py__https_github_com_iter_test_get_full_dvc_path.assert_tmp_dir_ext_da": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py__https_github_com_iter_test_get_full_dvc_path.assert_tmp_dir_ext_da", "embedding": null, "metadata": {"file_path": "tests/func/test_get.py", "file_name": "test_get.py", "file_type": "text/x-python", "category": "test", "start_line": 101, "end_line": 114, "span_ids": ["test_get_full_dvc_path", "test_get_a_dvc_file"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# https://github.com/iterative/dvc/pull/2837#discussion_r352123053\ndef test_get_full_dvc_path(tmp_dir, erepo_dir, tmp_path_factory):\n path = tmp_path_factory.mktemp(\"ext\")\n external_data = path / \"ext_data\"\n external_data.write_text(\"ext_data\")\n\n with erepo_dir.chdir():\n erepo_dir.dvc.add(os.fspath(external_data), external=True)\n erepo_dir.scm_add(\"ext_data.dvc\", commit=\"add external data\")\n\n Repo.get(\n os.fspath(erepo_dir), os.fspath(external_data), \"ext_data_imported\"\n )\n assert (tmp_dir / \"ext_data_imported\").read_text() == \"ext_data\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_non_cached_output_test_non_cached_output.assert_tmp_dir_dst_re": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_non_cached_output_test_non_cached_output.assert_tmp_dir_dst_re", "embedding": null, "metadata": {"file_path": "tests/func/test_get.py", "file_name": "test_get.py", "file_type": "text/x-python", "category": "test", "start_line": 117, "end_line": 133, "span_ids": ["test_non_cached_output"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_non_cached_output(tmp_dir, erepo_dir):\n src = \"non_cached_file\"\n dst = src + \"_imported\"\n\n with erepo_dir.chdir():\n erepo_dir.dvc.run(\n outs_no_cache=[src],\n cmd=\"echo hello > non_cached_file\",\n single_stage=True,\n )\n erepo_dir.scm_add([src, src + \".dvc\"], commit=\"add non-cached output\")\n\n Repo.get(os.fspath(erepo_dir), src, dst)\n\n assert (tmp_dir / dst).is_file()\n # NOTE: using strip() to account for `echo` differences on win and *nix\n assert (tmp_dir / dst).read_text().strip() == \"hello\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_file_from_dir_test_get_file_from_dir.assert_tmp_dir_X_re": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_file_from_dir_test_get_file_from_dir.assert_tmp_dir_X_re", "embedding": null, "metadata": {"file_path": "tests/func/test_get.py", "file_name": "test_get.py", "file_type": "text/x-python", "category": "test", "start_line": 175, "end_line": 201, "span_ids": ["test_get_file_from_dir"], "tokens": 265}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_file_from_dir(tmp_dir, erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\n {\n \"dir\": {\n \"1\": \"1\",\n \"2\": \"2\",\n \"subdir\": {\"foo\": \"foo\", \"bar\": \"bar\"},\n }\n },\n commit=\"create dir\",\n )\n\n Repo.get(os.fspath(erepo_dir), os.path.join(\"dir\", \"1\"))\n assert (tmp_dir / \"1\").read_text() == \"1\"\n\n Repo.get(os.fspath(erepo_dir), os.path.join(\"dir\", \"2\"), out=\"file\")\n assert (tmp_dir / \"file\").read_text() == \"2\"\n\n Repo.get(os.fspath(erepo_dir), os.path.join(\"dir\", \"subdir\"))\n assert (tmp_dir / \"subdir\" / \"foo\").read_text() == \"foo\"\n assert (tmp_dir / \"subdir\" / \"bar\").read_text() == \"bar\"\n\n Repo.get(\n os.fspath(erepo_dir), os.path.join(\"dir\", \"subdir\", \"foo\"), out=\"X\"\n )\n assert (tmp_dir / \"X\").read_text() == \"foo\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get_url.py_pytest_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get_url.py_pytest_", "embedding": null, "metadata": {"file_path": "tests/func/test_get_url.py", "file_name": "test_get_url.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 39, "span_ids": ["test_get_url_to_dir", "test_get_url_nonexistent", "imports", "test_get_dir", "test_get_file"], "tokens": 295}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.dependency.base import DependencyDoesNotExistError\nfrom dvc.repo import Repo\n\n\ndef test_get_file(tmp_dir):\n tmp_dir.gen({\"foo\": \"foo contents\"})\n\n Repo.get_url(\"foo\", \"foo_imported\")\n\n assert (tmp_dir / \"foo_imported\").is_file()\n assert (tmp_dir / \"foo_imported\").read_text() == \"foo contents\"\n\n\ndef test_get_dir(tmp_dir):\n tmp_dir.gen({\"foo\": {\"foo\": \"foo contents\"}})\n\n Repo.get_url(\"foo\", \"foo_imported\")\n\n assert (tmp_dir / \"foo_imported\").is_dir()\n assert (tmp_dir / \"foo_imported\" / \"foo\").is_file()\n assert (tmp_dir / \"foo_imported\" / \"foo\").read_text() == \"foo contents\"\n\n\n@pytest.mark.parametrize(\"dname\", [\".\", \"dir\", \"dir/subdir\"])\ndef test_get_url_to_dir(tmp_dir, dname):\n tmp_dir.gen({\"foo\": \"foo contents\", \"dir\": {\"subdir\": {}}})\n\n Repo.get_url(\"foo\", dname)\n\n assert (tmp_dir / dname).is_dir()\n assert (tmp_dir / dname / \"foo\").read_text() == \"foo contents\"\n\n\ndef test_get_url_nonexistent(tmp_dir):\n with pytest.raises(DependencyDoesNotExistError):\n Repo.get_url(\"nonexistent\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_rename_ignored_file_test_rename_ignored_file.assert_new_mtime_mtime": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_rename_ignored_file_test_rename_ignored_file.assert_new_mtime_mtime", "embedding": null, "metadata": {"file_path": "tests/func/test_ignore.py", "file_name": "test_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 40, "end_line": 51, "span_ids": ["test_rename_ignored_file"], "tokens": 115}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rename_ignored_file(tmp_dir, dvc):\n tmp_dir.gen({\"dir\": {\"ignored\": \"...\", \"other\": \"text\"}})\n\n tmp_dir.gen(DvcIgnore.DVCIGNORE_FILE, \"ignored*\")\n dvc.tree._reset()\n\n mtime, size = get_mtime_and_size(\"dir\", dvc.tree)\n\n shutil.move(\"dir/ignored\", \"dir/ignored_new\")\n new_mtime, new_size = get_mtime_and_size(\"dir\", dvc.tree)\n\n assert new_mtime == mtime and new_size == size", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_ignore_on_branch_test_ignore_on_branch.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_ignore_on_branch_test_ignore_on_branch.None_1", "embedding": null, "metadata": {"file_path": "tests/func/test_ignore.py", "file_name": "test_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 125, "end_line": 143, "span_ids": ["test_ignore_on_branch"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ignore_on_branch(tmp_dir, scm, dvc):\n tmp_dir.scm_gen({\"foo\": \"foo\", \"bar\": \"bar\"}, commit=\"add files\")\n\n with tmp_dir.branch(\"branch\", new=True):\n tmp_dir.scm_gen(DvcIgnore.DVCIGNORE_FILE, \"foo\", commit=\"add ignore\")\n\n dvc.tree._reset()\n path = PathInfo(tmp_dir)\n assert set(dvc.tree.walk_files(path)) == {\n path / \"foo\",\n path / \"bar\",\n path / \".dvcignore\",\n }\n\n dvc.tree = scm.get_tree(\"branch\", use_dvcignore=True)\n assert set(dvc.tree.walk_files(path)) == {\n os.fspath(path / DvcIgnore.DVCIGNORE_FILE),\n os.fspath(path / \"bar\"),\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_git_file_test_import_git_file.assert_stage_deps_0_def_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_git_file_test_import_git_file.assert_stage_deps_0_def_", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 35, "end_line": 49, "span_ids": ["test_import_git_file"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"src_is_dvc\", [True, False])\ndef test_import_git_file(tmp_dir, scm, dvc, git_dir, src_is_dvc):\n if src_is_dvc:\n git_dir.init(dvc=True)\n\n git_dir.scm_gen(\"src\", \"hello\", commit=\"add a git file\")\n\n stage = tmp_dir.dvc.imp(os.fspath(git_dir), \"src\", \"dst\")\n\n assert (tmp_dir / \"dst\").read_text() == \"hello\"\n assert tmp_dir.scm.is_ignored(os.fspath(tmp_dir / \"dst\"))\n assert stage.deps[0].def_repo == {\n \"url\": os.fspath(git_dir),\n \"rev_lock\": git_dir.scm.get_rev(),\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_git_dir_test_import_git_dir.assert_stage_deps_0_def_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_git_dir_test_import_git_dir.assert_stage_deps_0_def_", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 70, "end_line": 84, "span_ids": ["test_import_git_dir"], "tokens": 167}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"src_is_dvc\", [True, False])\ndef test_import_git_dir(tmp_dir, scm, dvc, git_dir, src_is_dvc):\n if src_is_dvc:\n git_dir.init(dvc=True)\n\n git_dir.scm_gen({\"src\": {\"file.txt\": \"hello\"}}, commit=\"add a dir\")\n\n stage = dvc.imp(os.fspath(git_dir), \"src\", \"dst\")\n\n assert (tmp_dir / \"dst\").read_text() == {\"file.txt\": \"hello\"}\n assert tmp_dir.scm.is_ignored(os.fspath(tmp_dir / \"dst\"))\n assert stage.deps[0].def_repo == {\n \"url\": os.fspath(git_dir),\n \"rev_lock\": git_dir.scm.get_rev(),\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_dir_test_import_dir.assert_stage_deps_0_def_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_dir_test_import_dir.assert_stage_deps_0_def_", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 87, "end_line": 98, "span_ids": ["test_import_dir"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_import_dir(tmp_dir, scm, dvc, erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen({\"dir\": {\"foo\": \"foo content\"}}, commit=\"create dir\")\n\n stage = dvc.imp(os.fspath(erepo_dir), \"dir\", \"dir_imported\")\n\n assert (tmp_dir / \"dir_imported\").read_text() == {\"foo\": \"foo content\"}\n assert scm.is_ignored(\"dir_imported\")\n assert stage.deps[0].def_repo == {\n \"url\": os.fspath(erepo_dir),\n \"rev_lock\": erepo_dir.scm.get_rev(),\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_file_from_dir_test_import_file_from_dir.assert_tmp_dir_X_dvc_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_file_from_dir_test_import_file_from_dir.assert_tmp_dir_X_dvc_", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 101, "end_line": 136, "span_ids": ["test_import_file_from_dir"], "tokens": 364}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_import_file_from_dir(tmp_dir, scm, dvc, erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\n {\n \"dir\": {\n \"1\": \"1\",\n \"2\": \"2\",\n \"subdir\": {\"foo\": \"foo\", \"bar\": \"bar\"},\n }\n },\n commit=\"create dir\",\n )\n\n stage = dvc.imp(os.fspath(erepo_dir), os.path.join(\"dir\", \"1\"))\n\n assert (tmp_dir / \"1\").read_text() == \"1\"\n assert scm.is_ignored(\"1\")\n assert stage.deps[0].def_repo == {\n \"url\": os.fspath(erepo_dir),\n \"rev_lock\": erepo_dir.scm.get_rev(),\n }\n\n dvc.imp(os.fspath(erepo_dir), os.path.join(\"dir\", \"2\"), out=\"file\")\n assert (tmp_dir / \"file\").read_text() == \"2\"\n assert (tmp_dir / \"file.dvc\").exists()\n\n dvc.imp(os.fspath(erepo_dir), os.path.join(\"dir\", \"subdir\"))\n assert (tmp_dir / \"subdir\" / \"foo\").read_text() == \"foo\"\n assert (tmp_dir / \"subdir\" / \"bar\").read_text() == \"bar\"\n assert (tmp_dir / \"subdir.dvc\").exists()\n\n dvc.imp(\n os.fspath(erepo_dir), os.path.join(\"dir\", \"subdir\", \"foo\"), out=\"X\"\n )\n assert (tmp_dir / \"X\").read_text() == \"foo\"\n assert (tmp_dir / \"X.dvc\").exists()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_non_cached_test_import_non_cached.assert_stage_deps_0_def_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_non_cached_test_import_non_cached.assert_stage_deps_0_def_", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 161, "end_line": 182, "span_ids": ["test_import_non_cached"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_import_non_cached(erepo_dir, tmp_dir, dvc, scm):\n src = \"non_cached_output\"\n dst = src + \"_imported\"\n\n with erepo_dir.chdir():\n erepo_dir.dvc.run(\n cmd=f\"echo hello > {src}\", outs_no_cache=[src], single_stage=True,\n )\n\n erepo_dir.scm_add(\n [os.fspath(erepo_dir / src)], commit=\"add a non-cached out\"\n )\n\n stage = tmp_dir.dvc.imp(os.fspath(erepo_dir), src, dst)\n\n assert (tmp_dir / dst).is_file()\n assert filecmp.cmp(erepo_dir / src, tmp_dir / dst, shallow=False)\n assert tmp_dir.scm.is_ignored(dst)\n assert stage.deps[0].def_repo == {\n \"url\": os.fspath(erepo_dir),\n \"rev_lock\": erepo_dir.scm.get_rev(),\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_rev_test_import_rev.assert_stage_deps_0_def_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_rev_test_import_rev.assert_stage_deps_0_def_", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 185, "end_line": 199, "span_ids": ["test_import_rev"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_import_rev(tmp_dir, scm, dvc, erepo_dir):\n rev = None\n with erepo_dir.chdir(), erepo_dir.branch(\"branch\", new=True):\n erepo_dir.dvc_gen(\"foo\", \"foo content\", commit=\"create foo on branch\")\n rev = erepo_dir.scm.get_rev()\n\n stage = dvc.imp(os.fspath(erepo_dir), \"foo\", \"foo_imported\", rev=\"branch\")\n\n assert (tmp_dir / \"foo_imported\").read_text() == \"foo content\"\n assert scm.is_ignored(\"foo_imported\")\n assert stage.deps[0].def_repo == {\n \"url\": os.fspath(erepo_dir),\n \"rev\": \"branch\",\n \"rev_lock\": rev,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_pull_imported_stage_test_pull_imported_stage.assert_os_path_isfile_dst": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_pull_imported_stage_test_pull_imported_stage.assert_os_path_isfile_dst", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 179, "end_line": 192, "span_ids": ["test_pull_imported_stage"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pull_imported_stage(tmp_dir, dvc, erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\"foo\", \"foo content\", commit=\"create foo\")\n dvc.imp(os.fspath(erepo_dir), \"foo\", \"foo_imported\")\n\n dst_stage = Dvcfile(dvc, \"foo_imported.dvc\").stage\n dst_cache = dst_stage.outs[0].cache_path\n\n remove(\"foo_imported\")\n remove(dst_cache)\n dvc.pull([\"foo_imported.dvc\"])\n\n assert os.path.isfile(\"foo_imported\")\n assert os.path.isfile(dst_cache)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_download_error_pulling_imported_stage_test_download_error_pulling_imported_stage.with_patch_.dvc_pull_foo_imported_d": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_download_error_pulling_imported_stage_test_download_error_pulling_imported_stage.with_patch_.dvc_pull_foo_imported_d", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 251, "end_line": 265, "span_ids": ["test_download_error_pulling_imported_stage"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_download_error_pulling_imported_stage(tmp_dir, dvc, erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\"foo\", \"foo content\", commit=\"create foo\")\n dvc.imp(os.fspath(erepo_dir), \"foo\", \"foo_imported\")\n\n dst_stage = Dvcfile(dvc, \"foo_imported.dvc\").stage\n dst_cache = dst_stage.outs[0].cache_path\n\n remove(\"foo_imported\")\n remove(dst_cache)\n\n with patch(\n \"dvc.tree.local.LocalTree._download\", side_effect=Exception\n ), pytest.raises(DownloadError):\n dvc.pull([\"foo_imported.dvc\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_to_dir_test_import_to_dir.assert_tmp_dir_dst_re": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_to_dir_test_import_to_dir.assert_tmp_dir_dst_re", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 246, "end_line": 259, "span_ids": ["test_import_to_dir"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"dname\", [\".\", \"dir\", \"dir/subdir\"])\ndef test_import_to_dir(dname, tmp_dir, dvc, erepo_dir):\n makedirs(dname, exist_ok=True)\n\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\"foo\", \"foo content\", commit=\"create foo\")\n\n stage = dvc.imp(os.fspath(erepo_dir), \"foo\", dname)\n\n dst = os.path.join(dname, \"foo\")\n\n assert stage.outs[0].fspath == os.path.abspath(dst)\n assert os.path.isdir(dname)\n assert (tmp_dir / dst).read_text() == \"foo content\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_pull_non_workspace_test_pull_non_workspace.assert_os_path_exists_sta": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_pull_non_workspace_test_pull_non_workspace.assert_os_path_exists_sta", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 262, "end_line": 278, "span_ids": ["test_pull_non_workspace"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pull_non_workspace(tmp_dir, scm, dvc, erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\"foo\", \"master content\", commit=\"create foo\")\n\n with erepo_dir.branch(\"branch\", new=True):\n erepo_dir.dvc_gen(\"foo\", \"branch content\", commit=\"modify foo\")\n\n stage = dvc.imp(os.fspath(erepo_dir), \"foo\", \"foo_imported\", rev=\"branch\")\n tmp_dir.scm_add([stage.relpath], commit=\"imported branch\")\n scm.tag(\"ref-to-branch\")\n\n # Overwrite via import\n dvc.imp(os.fspath(erepo_dir), \"foo\", \"foo_imported\", rev=\"master\")\n\n remove(stage.outs[0].cache_path)\n dvc.fetch(all_tags=True)\n assert os.path.exists(stage.outs[0].cache_path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_non_existing_test_pull_no_rev_lock.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_non_existing_test_pull_no_rev_lock.None_2", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 281, "end_line": 306, "span_ids": ["test_import_non_existing", "test_pull_no_rev_lock"], "tokens": 263}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_import_non_existing(erepo_dir, tmp_dir, dvc):\n with pytest.raises(PathMissingError):\n tmp_dir.dvc.imp(os.fspath(erepo_dir), \"invalid_output\")\n\n # https://github.com/iterative/dvc/pull/2837#discussion_r352123053\n with pytest.raises(PathMissingError):\n tmp_dir.dvc.imp(os.fspath(erepo_dir), \"/root/\", \"root\")\n\n\ndef test_pull_no_rev_lock(erepo_dir, tmp_dir, dvc):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\"foo\", \"contents\", commit=\"create foo\")\n\n stage = dvc.imp(os.fspath(erepo_dir), \"foo\", \"foo_imported\")\n assert \"rev\" not in stage.deps[0].def_repo\n stage.deps[0].def_repo.pop(\"rev_lock\")\n\n Dvcfile(dvc, stage.path).dump(stage)\n\n remove(stage.outs[0].cache_path)\n (tmp_dir / \"foo_imported\").unlink()\n\n dvc.pull([stage.path])\n\n assert (tmp_dir / \"foo_imported\").is_file()\n assert (tmp_dir / \"foo_imported\").read_text() == \"contents\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_os_test_should_remove_outs_before_import.assert_remove_outs_call_c": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_os_test_should_remove_outs_before_import.assert_remove_outs_call_c", "embedding": null, "metadata": {"file_path": "tests/func/test_import_url.py", "file_name": "test_import_url.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 52, "span_ids": ["TestDefaultOutput.test", "TestCmdImport.test", "imports", "TestDefaultOutput", "TestCmdImport", "TestCmdImport.test_unsupported", "test_should_remove_outs_before_import"], "tokens": 365}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport textwrap\nfrom uuid import uuid4\n\nimport pytest\n\nfrom dvc.cache import Cache\nfrom dvc.dependency.base import DependencyDoesNotExistError\nfrom dvc.main import main\nfrom dvc.stage import Stage\nfrom dvc.utils.fs import makedirs\nfrom tests.basic_env import TestDvc\n\n\nclass TestCmdImport(TestDvc):\n def test(self):\n ret = main([\"import-url\", self.FOO, \"import\"])\n self.assertEqual(ret, 0)\n self.assertTrue(os.path.exists(\"import.dvc\"))\n\n ret = main([\"import-url\", \"non-existing-file\", \"import\"])\n self.assertNotEqual(ret, 0)\n\n def test_unsupported(self):\n ret = main([\"import-url\", \"unsupported://path\", \"import_unsupported\"])\n self.assertNotEqual(ret, 0)\n\n\nclass TestDefaultOutput(TestDvc):\n def test(self):\n tmpdir = self.mkdtemp()\n filename = str(uuid4())\n tmpfile = os.path.join(tmpdir, filename)\n\n with open(tmpfile, \"w\") as fd:\n fd.write(\"content\")\n\n ret = main([\"import-url\", tmpfile])\n self.assertEqual(ret, 0)\n self.assertTrue(os.path.exists(filename))\n with open(filename) as fd:\n self.assertEqual(fd.read(), \"content\")\n\n\ndef test_should_remove_outs_before_import(tmp_dir, dvc, mocker, erepo_dir):\n erepo_dir.gen({\"foo\": \"foo\"})\n\n remove_outs_call_counter = mocker.spy(Stage, \"remove_outs\")\n ret = main([\"import-url\", os.fspath(erepo_dir / \"foo\")])\n\n assert ret == 0\n assert remove_outs_call_counter.mock.call_count == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_test_import_url_to_dir_test_import_url_to_dir.assert_dst_read_text_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_test_import_url_to_dir_test_import_url_to_dir.assert_dst_read_text_", "embedding": null, "metadata": {"file_path": "tests/func/test_import_url.py", "file_name": "test_import_url.py", "file_type": "text/x-python", "category": "test", "start_line": 81, "end_line": 94, "span_ids": ["test_import_url_to_dir"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"dname\", [\".\", \"dir\", \"dir/subdir\"])\ndef test_import_url_to_dir(dname, tmp_dir, dvc):\n tmp_dir.gen({\"data_dir\": {\"file\": \"file content\"}})\n src = os.path.join(\"data_dir\", \"file\")\n\n makedirs(dname, exist_ok=True)\n\n stage = dvc.imp_url(src, dname)\n\n dst = tmp_dir / dname / \"file\"\n\n assert stage.outs[0].path_info == dst\n assert os.path.isdir(dname)\n assert dst.read_text() == \"file content\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_init.py_logging_test_allow_init_dvc_subdir.assert_repo_scm_root_dir_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_init.py_logging_test_allow_init_dvc_subdir.assert_repo_scm_root_dir_", "embedding": null, "metadata": {"file_path": "tests/func/test_init.py", "file_name": "test_init.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 86, "span_ids": ["TestInit", "TestInitNoSCMFail.test_api", "TestDoubleInit", "TestInit._test_init", "imports", "TestInitNoSCMFail", "TestInitNoSCMFail.test_cli", "TestInit.test_api", "test_init_no_scm_api", "TestDoubleInit.test", "test_init_quiet_should_not_display_welcome_screen", "test_allow_init_dvc_subdir", "test_init_no_scm_cli", "TestInit.test_cli"], "tokens": 540}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\n\nfrom dvc.config import Config\nfrom dvc.exceptions import InitError\nfrom dvc.main import main\nfrom dvc.repo import Repo as DvcRepo\nfrom tests.basic_env import TestDir, TestGit\n\n\nclass TestInit(TestGit):\n def _test_init(self):\n self.assertTrue(os.path.exists(DvcRepo.DVC_DIR))\n self.assertTrue(os.path.isdir(DvcRepo.DVC_DIR))\n\n def test_api(self):\n DvcRepo.init()\n\n self._test_init()\n\n def test_cli(self):\n ret = main([\"init\"])\n self.assertEqual(ret, 0)\n\n self._test_init()\n\n\nclass TestDoubleInit(TestInit):\n def test(self):\n ret = main([\"init\"])\n self.assertEqual(ret, 0)\n self._test_init()\n\n ret = main([\"init\"])\n self.assertNotEqual(ret, 0)\n self._test_init()\n\n ret = main([\"init\", \"--force\"])\n self.assertEqual(ret, 0)\n self._test_init()\n\n\nclass TestInitNoSCMFail(TestDir):\n def test_api(self):\n with self.assertRaises(InitError):\n DvcRepo.init()\n\n def test_cli(self):\n ret = main([\"init\"])\n self.assertNotEqual(ret, 0)\n\n\ndef test_init_no_scm_api(tmp_dir):\n repo = DvcRepo.init(no_scm=True)\n\n assert (tmp_dir / DvcRepo.DVC_DIR).is_dir()\n assert repo.config[\"core\"][\"no_scm\"]\n\n\ndef test_init_no_scm_cli(tmp_dir):\n ret = main([\"init\", \"--no-scm\"])\n assert ret == 0\n\n dvc_path = tmp_dir / DvcRepo.DVC_DIR\n assert dvc_path.is_dir()\n assert Config(os.fspath(dvc_path))[\"core\"][\"no_scm\"]\n\n\ndef test_init_quiet_should_not_display_welcome_screen(tmp_dir, scm, caplog):\n with caplog.at_level(logging.INFO, logger=\"dvc\"):\n ret = main([\"init\", \"--quiet\"])\n\n assert 0 == ret\n assert \"\" == caplog.text\n\n\ndef test_allow_init_dvc_subdir(tmp_dir, scm, monkeypatch):\n tmp_dir.gen({\"subdir\": {}})\n\n with monkeypatch.context() as m:\n m.chdir(\"subdir\")\n assert main([\"init\", \"--subdir\"]) == 0\n\n repo = DvcRepo(\"subdir\")\n assert repo.root_dir == os.fspath(tmp_dir / \"subdir\")\n assert repo.scm.root_dir == os.fspath(tmp_dir)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_install.py_os_TestInstall.test_post_checkout.assert_os_path_isfile_fi": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_install.py_os_TestInstall.test_post_checkout.assert_os_path_isfile_fi", "embedding": null, "metadata": {"file_path": "tests/func/test_install.py", "file_name": "test_install.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 55, "span_ids": ["imports", "TestInstall.test_post_checkout", "TestInstall", "TestInstall.test_pre_commit_hook", "TestInstall.test_fail_if_hook_exists", "TestInstall.test_create_hooks", "TestInstall._hook"], "tokens": 385}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport pathlib\nimport sys\n\nimport pytest\nfrom git import GitCommandError\n\nfrom dvc.exceptions import GitHookAlreadyExistsError\nfrom dvc.utils import file_md5\n\n\n@pytest.mark.skipif(\n sys.platform == \"win32\", reason=\"Git hooks aren't supported on Windows\"\n)\nclass TestInstall:\n def _hook(self, name):\n return pathlib.Path(\".git\") / \"hooks\" / name\n\n def test_create_hooks(self, scm, dvc):\n scm.install()\n\n hooks_with_commands = [\n (\"post-checkout\", \"exec dvc git-hook post-checkout\"),\n (\"pre-commit\", \"exec dvc git-hook pre-commit\"),\n (\"pre-push\", \"exec dvc git-hook pre-push\"),\n ]\n\n for fname, command in hooks_with_commands:\n hook_path = self._hook(fname)\n assert hook_path.is_file()\n assert command in hook_path.read_text()\n\n def test_fail_if_hook_exists(self, scm):\n self._hook(\"post-checkout\").write_text(\"hook content\")\n\n with pytest.raises(GitHookAlreadyExistsError):\n scm.install()\n\n def test_pre_commit_hook(self, tmp_dir, scm, dvc, caplog):\n tmp_dir.dvc_gen(\"file\", \"file content\", commit=\"create foo\")\n tmp_dir.gen(\"file\", \"file modified\")\n scm.install()\n\n # scm.commit bypasses hooks\n with pytest.raises(GitCommandError, match=r\"modified:\\s*file\"):\n scm.gitpython.repo.git.commit(m=\"file modified\")\n\n def test_post_checkout(self, tmp_dir, scm, dvc):\n tmp_dir.dvc_gen({\"file\": \"file content\"}, commit=\"add\")\n os.unlink(\"file\")\n scm.install()\n\n scm.checkout(\"new_branch\", create_new=True)\n\n assert os.path.isfile(\"file\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_os_match_files.assert_left_right": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_os_match_files.assert_left_right", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 30, "span_ids": ["imports", "match_files"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport shutil\nimport textwrap\nfrom operator import itemgetter\n\nimport pytest\n\nfrom dvc.exceptions import PathMissingError\nfrom dvc.repo import Repo\nfrom dvc.scm.base import CloneError\n\nFS_STRUCTURE = {\n \"README.md\": \"content\",\n \"model/script.py\": \"content\",\n \"model/train.py\": \"content\",\n \".gitignore\": \"content\",\n}\n\nDVC_STRUCTURE = {\n \"structure.xml\": \"content\",\n \"data/subcontent/data.xml\": \"content\",\n \"data/subcontent/statistics/data.csv\": \"content\",\n \"model/people.csv\": \"content\",\n}\n\n\ndef match_files(files, expected_files):\n left = {(f[\"path\"], f[\"isout\"]) for f in files}\n right = {(os.path.join(*args), isout) for (args, isout) in expected_files}\n assert left == right", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_create_dvc_pipeline_create_dvc_pipeline.shutil_rmtree_out_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_create_dvc_pipeline_create_dvc_pipeline.shutil_rmtree_out_", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 32, "end_line": 53, "span_ids": ["create_dvc_pipeline"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def create_dvc_pipeline(tmp_dir, dvc):\n script = textwrap.dedent(\n \"\"\"\\\n import os, sys\n f = sys.argv[1]\n os.makedirs(os.path.dirname(f))\n open(f, \"w+\").close()\n \"\"\"\n )\n tmp_dir.scm_gen({\"script.py\": script}, commit=\"init\")\n tmp_dir.dvc_gen({\"dep\": \"content\"}, commit=\"init dvc\")\n dvc.run(\n **{\n \"cmd\": \"python script.py {}\".format(os.path.join(\"out\", \"file\")),\n \"outs\": [os.path.join(\"out\", \"file\")],\n \"deps\": [\"dep\"],\n \"fname\": \"out.dvc\",\n \"single_stage\": True,\n }\n )\n tmp_dir.scm_add([\"out.dvc\"], commit=\"run\")\n shutil.rmtree(\"out\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_test_ls_repo.match_files_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_test_ls_repo.match_files_", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 57, "end_line": 73, "span_ids": ["test_ls_repo"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ls_repo(tmp_dir, dvc, scm):\n tmp_dir.scm_gen(FS_STRUCTURE, commit=\"init\")\n tmp_dir.dvc_gen(DVC_STRUCTURE, commit=\"dvc\")\n\n files = Repo.ls(os.fspath(tmp_dir))\n match_files(\n files,\n (\n ((\".dvcignore\",), False),\n ((\".gitignore\",), False),\n ((\"README.md\",), False),\n ((\"structure.xml.dvc\",), False),\n ((\"model\",), False),\n ((\"data\",), False),\n ((\"structure.xml\",), True),\n ),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_color_test_ls_repo_with_color.assert_caplog_records_1_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_color_test_ls_repo_with_color.assert_caplog_records_1_", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 76, "end_line": 103, "span_ids": ["test_ls_repo_with_color"], "tokens": 279}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ls_repo_with_color(tmp_dir, dvc, scm, mocker, monkeypatch, caplog):\n import logging\n\n from dvc.cli import parse_args\n\n tmp_dir.scm_gen(FS_STRUCTURE, commit=\"init\")\n tmp_dir.dvc_gen(DVC_STRUCTURE, commit=\"dvc\")\n\n monkeypatch.setenv(\"LS_COLORS\", \"rs=0:di=01;34:*.xml=01;31:*.dvc=01;33:\")\n cli_args = parse_args([\"list\", os.fspath(tmp_dir)])\n cmd = cli_args.func(cli_args)\n\n caplog.clear()\n mocker.patch(\"sys.stdout.isatty\", return_value=True)\n with caplog.at_level(logging.INFO, logger=\"dvc.command.ls\"):\n assert cmd.run() == 0\n\n assert caplog.records[-1].msg == \"\\n\".join(\n [\n \".dvcignore\",\n \".gitignore\",\n \"README.md\",\n \"\\x1b[01;34mdata\\x1b[0m\",\n \"\\x1b[01;34mmodel\\x1b[0m\",\n \"\\x1b[01;31mstructure.xml\\x1b[0m\",\n \"\\x1b[01;33mstructure.xml.dvc\\x1b[0m\",\n ]\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_recursive_test_ls_repo_recursive.match_files_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_recursive_test_ls_repo_recursive.match_files_", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 106, "end_line": 131, "span_ids": ["test_ls_repo_recursive"], "tokens": 263}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ls_repo_recursive(tmp_dir, dvc, scm):\n tmp_dir.scm_gen(FS_STRUCTURE, commit=\"init\")\n tmp_dir.dvc_gen(DVC_STRUCTURE, commit=\"dvc\")\n\n files = Repo.ls(os.fspath(tmp_dir), recursive=True)\n match_files(\n files,\n (\n ((\".dvcignore\",), False),\n ((\".gitignore\",), False),\n ((\"README.md\",), False),\n ((\"structure.xml.dvc\",), False),\n ((\"model\", \"script.py\"), False),\n ((\"model\", \"train.py\"), False),\n ((\"model\", \"people.csv.dvc\"), False),\n ((\"data\", \"subcontent\", \"data.xml.dvc\"), False),\n ((\"data\", \"subcontent\", \"statistics\", \"data.csv.dvc\"), False),\n ((\"data\", \"subcontent\", \"statistics\", \"data.csv\"), True),\n ((\"data\", \"subcontent\", \"statistics\", \".gitignore\"), False),\n ((\"data\", \"subcontent\", \"data.xml\"), True),\n ((\"data\", \"subcontent\", \".gitignore\"), False),\n ((\"model\", \"people.csv\"), True),\n ((\"model\", \".gitignore\"), False),\n ((\"structure.xml\",), True),\n ),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_path_subdir_test_ls_repo_with_path_subdir.match_files_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_path_subdir_test_ls_repo_with_path_subdir.match_files_", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 171, "end_line": 185, "span_ids": ["test_ls_repo_with_path_subdir"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ls_repo_with_path_subdir(tmp_dir, dvc, scm):\n tmp_dir.scm_gen(FS_STRUCTURE, commit=\"init\")\n tmp_dir.dvc_gen(DVC_STRUCTURE, commit=\"dvc\")\n\n path = os.path.join(\"data\", \"subcontent\")\n files = Repo.ls(os.fspath(tmp_dir), path)\n match_files(\n files,\n (\n ((\"data.xml\",), True),\n ((\"data.xml.dvc\",), False),\n ((\"statistics\",), False),\n ((\".gitignore\",), False),\n ),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_removed_dvc_dir_recursive_test_ls_repo_with_removed_dvc_dir_recursive.match_files_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_removed_dvc_dir_recursive_test_ls_repo_with_removed_dvc_dir_recursive.match_files_", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 272, "end_line": 287, "span_ids": ["test_ls_repo_with_removed_dvc_dir_recursive"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ls_repo_with_removed_dvc_dir_recursive(tmp_dir, dvc, scm):\n create_dvc_pipeline(tmp_dir, dvc)\n\n files = Repo.ls(os.fspath(tmp_dir), recursive=True)\n match_files(\n files,\n (\n ((\"script.py\",), False),\n ((\"dep.dvc\",), False),\n ((\"out.dvc\",), False),\n ((\"dep\",), True),\n ((\"out\", \"file\"), True),\n ((\".dvcignore\",), False),\n ((\".gitignore\",), False),\n ),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_removed_dvc_dir_with_path_dir_test_ls_repo_with_removed_dvc_dir_with_path_file.match_files_files_fi": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_removed_dvc_dir_with_path_dir_test_ls_repo_with_removed_dvc_dir_with_path_file.match_files_files_fi", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 283, "end_line": 296, "span_ids": ["test_ls_repo_with_removed_dvc_dir_with_path_file", "test_ls_repo_with_removed_dvc_dir_with_path_dir"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ls_repo_with_removed_dvc_dir_with_path_dir(tmp_dir, dvc, scm):\n create_dvc_pipeline(tmp_dir, dvc)\n\n path = \"out\"\n files = Repo.ls(os.fspath(tmp_dir), path)\n match_files(files, (((\"file\",), True),))\n\n\ndef test_ls_repo_with_removed_dvc_dir_with_path_file(tmp_dir, dvc, scm):\n create_dvc_pipeline(tmp_dir, dvc)\n\n path = os.path.join(\"out\", \"file\")\n files = Repo.ls(os.fspath(tmp_dir), path)\n match_files(files, (((\"file\",), True),))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_remote_repo_test_ls_remote_repo.match_files_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_remote_repo_test_ls_remote_repo.match_files_", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 306, "end_line": 324, "span_ids": ["test_ls_remote_repo"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ls_remote_repo(erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.scm_gen(FS_STRUCTURE, commit=\"init\")\n erepo_dir.dvc_gen(DVC_STRUCTURE, commit=\"dvc\")\n\n url = f\"file://{erepo_dir}\"\n files = Repo.ls(url)\n match_files(\n files,\n (\n ((\".dvcignore\",), False),\n ((\".gitignore\",), False),\n ((\"README.md\",), False),\n ((\"structure.xml.dvc\",), False),\n ((\"model\",), False),\n ((\"data\",), False),\n ((\"structure.xml\",), True),\n ),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_remote_repo_recursive_test_ls_remote_repo_recursive.match_files_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_remote_repo_recursive_test_ls_remote_repo_recursive.match_files_", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 327, "end_line": 354, "span_ids": ["test_ls_remote_repo_recursive"], "tokens": 277}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ls_remote_repo_recursive(erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.scm_gen(FS_STRUCTURE, commit=\"init\")\n erepo_dir.dvc_gen(DVC_STRUCTURE, commit=\"dvc\")\n\n url = f\"file://{erepo_dir}\"\n files = Repo.ls(url, recursive=True)\n match_files(\n files,\n (\n ((\".dvcignore\",), False),\n ((\".gitignore\",), False),\n ((\"README.md\",), False),\n ((\"structure.xml.dvc\",), False),\n ((\"model\", \"script.py\"), False),\n ((\"model\", \"train.py\"), False),\n ((\"model\", \"people.csv.dvc\"), False),\n ((\"data\", \"subcontent\", \"data.xml.dvc\"), False),\n ((\"data\", \"subcontent\", \"statistics\", \"data.csv.dvc\"), False),\n ((\"data\", \"subcontent\", \"statistics\", \"data.csv\"), True),\n ((\"data\", \"subcontent\", \"statistics\", \".gitignore\"), False),\n ((\"data\", \"subcontent\", \"data.xml\"), True),\n ((\"data\", \"subcontent\", \".gitignore\"), False),\n ((\"model\", \"people.csv\"), True),\n ((\"model\", \".gitignore\"), False),\n ((\"structure.xml\",), True),\n ),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_remote_git_only_repo_recursive_test_ls_remote_repo_with_path_dir.match_files_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_remote_git_only_repo_recursive_test_ls_remote_repo_with_path_dir.match_files_", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 348, "end_line": 382, "span_ids": ["test_ls_remote_git_only_repo_recursive", "test_ls_remote_repo_with_path_dir"], "tokens": 235}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ls_remote_git_only_repo_recursive(git_dir):\n with git_dir.chdir():\n git_dir.scm_gen(FS_STRUCTURE, commit=\"init\")\n\n url = f\"file://{git_dir}\"\n files = Repo.ls(url, recursive=True)\n match_files(\n files,\n (\n ((\".gitignore\",), False),\n ((\"README.md\",), False),\n ((\"model\", \"script.py\"), False),\n ((\"model\", \"train.py\"), False),\n ),\n )\n\n\ndef test_ls_remote_repo_with_path_dir(erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.scm_gen(FS_STRUCTURE, commit=\"init\")\n erepo_dir.dvc_gen(DVC_STRUCTURE, commit=\"dvc\")\n\n url = f\"file://{erepo_dir}\"\n path = \"model\"\n files = Repo.ls(url, path)\n match_files(\n files,\n (\n ((\"script.py\",), False),\n ((\"train.py\",), False),\n ((\"people.csv\",), True),\n ((\"people.csv.dvc\",), False),\n ((\".gitignore\",), False),\n ),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_remote_repo_with_rev_test_ls_remote_repo_with_rev.match_files_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_remote_repo_with_rev_test_ls_remote_repo_with_rev.match_files_", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 394, "end_line": 410, "span_ids": ["test_ls_remote_repo_with_rev"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ls_remote_repo_with_rev(erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.scm_gen(FS_STRUCTURE, commit=\"init\")\n erepo_dir.dvc_gen(DVC_STRUCTURE, commit=\"dvc\")\n\n rev = erepo_dir.scm.list_all_commits()[1]\n url = f\"file://{erepo_dir}\"\n files = Repo.ls(url, rev=rev)\n match_files(\n files,\n (\n ((\".dvcignore\",), False),\n ((\".gitignore\",), False),\n ((\"README.md\",), False),\n ((\"model\",), False),\n ),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_TestMoveFileInsideDirectory_TestMoveFileInsideDirectory.test.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_TestMoveFileInsideDirectory_TestMoveFileInsideDirectory.test.None_3", "embedding": null, "metadata": {"file_path": "tests/func/test_move.py", "file_name": "test_move.py", "file_type": "text/x-python", "category": "test", "start_line": 181, "end_line": 195, "span_ids": ["TestMoveFileInsideDirectory", "TestMoveFileInsideDirectory.test"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestMoveFileInsideDirectory(TestDvc):\n def test(self):\n ret = main([\"add\", self.DATA])\n self.assertEqual(ret, 0)\n\n with cd(self.DATA_DIR):\n ret = main([\"move\", os.path.basename(self.DATA), \"data.txt\"])\n self.assertEqual(ret, 0)\n\n self.assertFalse(os.path.exists(self.DATA))\n\n data_fullpath = os.path.join(self.DATA_DIR, \"data.txt\")\n dvc_fullpath = os.path.join(self.DATA_DIR, \"data.txt.dvc\")\n self.assertTrue(os.path.exists(data_fullpath))\n self.assertTrue(os.path.exists(dvc_fullpath))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_test_move_should_save_stage_info_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_move.py_test_move_should_save_stage_info_", "embedding": null, "metadata": {"file_path": "tests/func/test_move.py", "file_name": "test_move.py", "file_type": "text/x-python", "category": "test", "start_line": 198, "end_line": 216, "span_ids": ["test_should_move_to_dir_on_non_default_stage_file", "test_move_should_save_stage_info"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_move_should_save_stage_info(tmp_dir, dvc):\n tmp_dir.dvc_gen({\"old_name\": {\"file1\": \"file1\"}})\n\n dvc.move(\"old_name\", \"new_name\")\n\n assert dvc.status() == {}\n\n\ndef test_should_move_to_dir_on_non_default_stage_file(tmp_dir, dvc):\n stage_file_name = \"stage.dvc\"\n tmp_dir.gen({\"file\": \"file_content\"})\n\n dvc.add(\"file\", fname=stage_file_name)\n os.mkdir(\"directory\")\n\n dvc.move(\"file\", \"directory\")\n\n assert os.path.exists(os.path.join(\"directory\", \"file\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_errno_TestRemote.test.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_errno_TestRemote.test.None_5", "embedding": null, "metadata": {"file_path": "tests/func/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 40, "span_ids": ["imports", "TestRemote.test", "TestRemote"], "tokens": 279}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import errno\nimport os\nimport stat\n\nimport configobj\nimport pytest\nfrom mock import patch\n\nfrom dvc.config import Config\nfrom dvc.dir_info import DirInfo\nfrom dvc.exceptions import DownloadError, RemoteCacheRequiredError, UploadError\nfrom dvc.main import main\nfrom dvc.path_info import PathInfo\nfrom dvc.tree.base import BaseTree\nfrom dvc.tree.local import LocalTree\nfrom dvc.utils.fs import remove\nfrom tests.basic_env import TestDvc\nfrom tests.remotes import Local\n\n\nclass TestRemote(TestDvc):\n def test(self):\n remotes = [\"a\", \"b\", \"c\"]\n\n self.assertEqual(main([\"remote\", \"list\"]), 0)\n self.assertNotEqual(main([\"remote\", \"remove\", remotes[0]]), 0)\n\n for r in remotes:\n self.assertEqual(\n main([\"remote\", \"add\", \"--default\", r, \"s3://bucket/name\"]), 0\n )\n\n self.assertEqual(main([\"remote\", \"list\"]), 0)\n\n self.assertEqual(\n main([\"remote\", \"modify\", remotes[0], \"checksum_jobs\", \"1\"]), 0\n )\n self.assertEqual(main([\"remote\", \"remove\", remotes[0]]), 0)\n\n self.assertEqual(main([\"remote\", \"list\"]), 0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remove_default_test_remove_default.assert_local_config_get_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remove_default_test_remove_default.assert_local_config_get_", "embedding": null, "metadata": {"file_path": "tests/func/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 69, "end_line": 87, "span_ids": ["test_remove_default"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_remove_default(tmp_dir, dvc):\n remote = \"mys3\"\n assert (\n main([\"remote\", \"add\", \"--default\", remote, \"s3://bucket/name\"]) == 0\n )\n assert main([\"remote\", \"modify\", remote, \"profile\", \"default\"]) == 0\n assert main([\"config\", \"--local\", \"core.remote\", remote]) == 0\n\n config = configobj.ConfigObj(dvc.config.files[\"repo\"])\n local_config = configobj.ConfigObj(dvc.config.files[\"local\"])\n assert config[\"core\"][\"remote\"] == remote\n assert local_config[\"core\"][\"remote\"] == remote\n\n assert main([\"remote\", \"remove\", remote]) == 0\n\n config = configobj.ConfigObj(dvc.config.files[\"repo\"])\n local_config = configobj.ConfigObj(dvc.config.files[\"local\"])\n assert config.get(\"core\", {}).get(\"remote\") is None\n assert local_config.get(\"core\", {}).get(\"remote\") is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_show_default_TestRemoteShouldHandleUppercaseRemoteName.test.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_show_default_TestRemoteShouldHandleUppercaseRemoteName.test.None_2", "embedding": null, "metadata": {"file_path": "tests/func/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 125, "end_line": 145, "span_ids": ["TestRemoteShouldHandleUppercaseRemoteName.test", "TestRemoteShouldHandleUppercaseRemoteName", "test_show_default"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_show_default(dvc, capsys):\n assert main([\"remote\", \"add\", \"foo\", \"s3://bucket/name\"]) == 0\n assert main([\"remote\", \"default\", \"foo\"]) == 0\n assert main([\"remote\", \"default\"]) == 0\n out, _ = capsys.readouterr()\n assert out == \"foo\\n\"\n\n\nclass TestRemoteShouldHandleUppercaseRemoteName(TestDvc):\n upper_case_remote_name = \"UPPERCASEREMOTE\"\n\n def test(self):\n remote_url = Local.get_storagepath()\n ret = main([\"remote\", \"add\", self.upper_case_remote_name, remote_url])\n self.assertEqual(ret, 0)\n\n ret = main([\"add\", self.FOO])\n self.assertEqual(ret, 0)\n\n ret = main([\"push\", \"-r\", self.upper_case_remote_name])\n self.assertEqual(ret, 0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_partial_push_n_pull_test_partial_push_n_pull.None_1.assert_download_error_inf": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_partial_push_n_pull_test_partial_push_n_pull.None_1.assert_download_error_inf", "embedding": null, "metadata": {"file_path": "tests/func/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 175, "end_line": 213, "span_ids": ["test_partial_push_n_pull"], "tokens": 369}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_partial_push_n_pull(tmp_dir, dvc, tmp_path_factory, local_remote):\n foo = tmp_dir.dvc_gen({\"foo\": \"foo content\"})[0].outs[0]\n bar = tmp_dir.dvc_gen({\"bar\": \"bar content\"})[0].outs[0]\n baz = tmp_dir.dvc_gen({\"baz\": {\"foo\": \"baz content\"}})[0].outs[0]\n\n # Faulty upload version, failing on foo\n original = LocalTree._upload\n\n def unreliable_upload(self, from_file, to_info, name=None, **kwargs):\n if \"foo\" in name:\n raise Exception(\"stop foo\")\n return original(self, from_file, to_info, name, **kwargs)\n\n with patch.object(LocalTree, \"_upload\", unreliable_upload):\n with pytest.raises(UploadError) as upload_error_info:\n dvc.push()\n assert upload_error_info.value.amount == 3\n\n remote = dvc.cloud.get_remote(\"upstream\")\n assert not remote.tree.exists(\n remote.tree.hash_to_path_info(foo.hash_info.value)\n )\n assert remote.tree.exists(\n remote.tree.hash_to_path_info(bar.hash_info.value)\n )\n assert not remote.tree.exists(\n remote.tree.hash_to_path_info(baz.hash_info.value)\n )\n\n # Push everything and delete local cache\n dvc.push()\n remove(dvc.cache.local.cache_dir)\n\n with patch.object(LocalTree, \"_download\", side_effect=Exception):\n with pytest.raises(DownloadError) as download_error_info:\n dvc.pull()\n # error count should be len(.dir + standalone file checksums)\n # since files inside dir are ignored if dir cache entry is missing\n assert download_error_info.value.amount == 3", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproWorkingDirectoryAsOutput.test_nested_TestReproWorkingDirectoryAsOutput.test_nested.with_patch_object_self_dv.with_self_assertRaises_St.self_dvc_reproduce_error_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproWorkingDirectoryAsOutput.test_nested_TestReproWorkingDirectoryAsOutput.test_nested.with_patch_object_self_dv.with_self_assertRaises_St.self_dvc_reproduce_error_", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 157, "end_line": 202, "span_ids": ["TestReproWorkingDirectoryAsOutput.test_nested"], "tokens": 391}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproWorkingDirectoryAsOutput(TestDvc):\n\n def test_nested(self):\n # .\n # |-- a\n # | |__ nested\n # | |__ dir\n # | |__ error.dvc (stage.cwd == 'a/nested/dir')\n # |__ b\n # |__ nested.dvc (stage.out == 'a/nested')\n dir1 = \"b\"\n dir2 = \"a\"\n\n os.mkdir(dir1)\n os.mkdir(dir2)\n\n nested_dir = os.path.join(dir2, \"nested\")\n out_dir = relpath(nested_dir, dir1)\n\n nested_stage = self.dvc.run(\n fname=os.path.join(dir1, \"b.dvc\"),\n wdir=dir1,\n outs=[out_dir], # ../a/nested\n cmd=f\"mkdir {out_dir}\",\n single_stage=True,\n )\n\n os.mkdir(os.path.join(nested_dir, \"dir\"))\n\n error_stage_path = os.path.join(nested_dir, \"dir\", \"error.dvc\")\n\n output = os.path.join(\"..\", \"..\", \"something\")\n stage_dump = {\n \"cmd\": f\"echo something > {output}\",\n \"outs\": [{\"path\": output}],\n }\n dump_yaml(error_stage_path, stage_dump)\n\n # NOTE: os.walk() walks in a sorted order and we need dir2 subdirs to\n # be processed before dir1 to load error.dvc first.\n self.dvc.stages = [\n nested_stage,\n Dvcfile(self.dvc, error_stage_path).stage,\n ]\n\n with patch.object(self.dvc, \"_reset\"): # to prevent `stages` resetting\n with self.assertRaises(StagePathAsOutputError):\n self.dvc.reproduce(error_stage_path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_repro_dir_repro_dir.yield_stages": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_repro_dir_repro_dir.yield_stages", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 1438, "end_line": 1513, "span_ids": ["repro_dir"], "tokens": 621}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture\ndef repro_dir(tmp_dir, dvc, run_copy):\n # Creates repo with following structure:\n # data_dir/dir_file origin_data\n # | | |\n # | | origin_copy.dvc\n # unrelated2.dvc | | |\n # | | unrelated1.dvc\n # dir/subdir/dir_file_copy.dvc |\n # | |\n # | dir/origin_copy_2.dvc\n # | |\n # \\ /\n # \\ /\n # dir/Dvcfile\n tmp_dir.gen(\n {\n \"origin_data\": \"origin data content\",\n \"data_dir\": {\"dir_file\": \"dir file content\"},\n \"dir\": {\"subdir\": {}},\n }\n )\n\n stages = {}\n\n origin_copy = tmp_dir / \"origin_copy\"\n stage = run_copy(\"origin_data\", os.fspath(origin_copy), single_stage=True)\n assert stage is not None\n assert origin_copy.read_text() == \"origin data content\"\n stages[\"origin_copy\"] = stage\n\n origin_copy_2 = tmp_dir / \"dir\" / \"origin_copy_2\"\n stage = run_copy(\n os.fspath(origin_copy),\n os.fspath(origin_copy_2),\n fname=os.fspath(origin_copy_2) + \".dvc\",\n single_stage=True,\n )\n assert stage is not None\n assert origin_copy_2.read_text() == \"origin data content\"\n stages[\"origin_copy_2\"] = stage\n\n dir_file_path = tmp_dir / \"data_dir\" / \"dir_file\"\n dir_file_copy = tmp_dir / \"dir\" / \"subdir\" / \"dir_file_copy\"\n stage = run_copy(\n os.fspath(dir_file_path),\n os.fspath(dir_file_copy),\n fname=os.fspath(dir_file_copy) + \".dvc\",\n single_stage=True,\n )\n assert stage is not None\n assert dir_file_copy.read_text() == \"dir file content\"\n stages[\"dir_file_copy\"] = stage\n\n last_stage = tmp_dir / \"dir\" / DVC_FILE\n deps = [os.fspath(origin_copy_2), os.fspath(dir_file_copy)]\n stage = dvc.run(\n cmd=\"echo {}\".format(\" \".join(deps)),\n fname=os.fspath(last_stage),\n deps=deps,\n single_stage=True,\n )\n assert stage is not None\n stages[\"last_stage\"] = stage\n\n # Unrelated are to verify that reproducing `dir` will not trigger them too\n assert (\n run_copy(os.fspath(origin_copy), \"unrelated1\", single_stage=True)\n is not None\n )\n assert (\n run_copy(os.fspath(dir_file_path), \"unrelated2\", single_stage=True)\n is not None\n )\n\n yield stages", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py__rewrite_file_test_recursive_repro_default.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py__rewrite_file_test_recursive_repro_default.None_2", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 1435, "end_line": 1463, "span_ids": ["_read_out", "test_recursive_repro_default", "_rewrite_file"], "tokens": 229}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _rewrite_file(path_elements, new_content):\n if isinstance(path_elements, str):\n path_elements = [path_elements]\n file = Path(os.sep.join(path_elements))\n file.unlink()\n file.write_text(new_content)\n\n\ndef _read_out(stage):\n return Path(stage.outs[0].fspath).read_text()\n\n\ndef test_recursive_repro_default(dvc, repro_dir):\n \"\"\"\n Test recursive repro on dir after a dep outside this dir has changed.\n \"\"\"\n _rewrite_file(\"origin_data\", \"new origin data content\")\n\n stages = dvc.reproduce(\"dir\", recursive=True)\n\n # Check that the dependency (\"origin_copy\") and the dependent stages\n # inside the folder have been reproduced (\"origin_copy_2\", \"last_stage\")\n assert stages == [\n repro_dir[\"origin_copy\"],\n repro_dir[\"origin_copy_2\"],\n repro_dir[\"last_stage\"],\n ]\n assert _read_out(repro_dir[\"origin_copy\"]) == \"new origin data content\"\n assert _read_out(repro_dir[\"origin_copy_2\"]) == \"new origin data content\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_test_recursive_repro_single_test_recursive_repro_single.assert__read_out_repro_di": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_test_recursive_repro_single_test_recursive_repro_single.assert__read_out_repro_di", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 1466, "end_line": 1481, "span_ids": ["test_recursive_repro_single"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_recursive_repro_single(dvc, repro_dir):\n \"\"\"\n Test recursive single-item repro on dir\n after a dep outside this dir has changed.\n \"\"\"\n _rewrite_file(\"origin_data\", \"new origin content\")\n _rewrite_file([\"data_dir\", \"dir_file\"], \"new dir file content\")\n\n stages = dvc.reproduce(\"dir\", recursive=True, single_item=True)\n # Check that just stages inside given dir\n # with changed direct deps have been reproduced.\n # This means that \"origin_copy_2\" stage should not be reproduced\n # since it depends on \"origin_copy\".\n # Also check that \"dir_file_copy\" stage was reproduced before \"last_stage\"\n assert stages == [repro_dir[\"dir_file_copy\"], repro_dir[\"last_stage\"]]\n assert _read_out(repro_dir[\"dir_file_copy\"]) == \"new dir file content\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_test_recursive_repro_single_force_test_recursive_repro_single_force.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_test_recursive_repro_single_force_test_recursive_repro_single_force.None_3", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 1484, "end_line": 1504, "span_ids": ["test_recursive_repro_single_force"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_recursive_repro_single_force(dvc, repro_dir):\n \"\"\"\n Test recursive single-item force repro on dir\n without any dependencies changing.\n \"\"\"\n stages = dvc.reproduce(\"dir\", recursive=True, single_item=True, force=True)\n # Check that all stages inside given dir have been reproduced\n # Also check that \"dir_file_copy\" stage was reproduced before \"last_stage\"\n # and that \"origin_copy\" stage was reproduced before \"last_stage\" stage\n assert len(stages) == 3\n assert set(stages) == {\n repro_dir[\"origin_copy_2\"],\n repro_dir[\"dir_file_copy\"],\n repro_dir[\"last_stage\"],\n }\n assert stages.index(repro_dir[\"origin_copy_2\"]) < stages.index(\n repro_dir[\"last_stage\"]\n )\n assert stages.index(repro_dir[\"dir_file_copy\"]) < stages.index(\n repro_dir[\"last_stage\"]\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_test_recursive_repro_empty_dir_test_recursive_repro_on_stage_file.assert_stages_repro_d": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_test_recursive_repro_empty_dir_test_recursive_repro_on_stage_file.assert_stages_repro_d", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 1507, "end_line": 1534, "span_ids": ["test_recursive_repro_recursive_missing_file", "test_recursive_repro_on_stage_file", "test_recursive_repro_empty_dir"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_recursive_repro_empty_dir(tmp_dir, dvc):\n \"\"\"\n Test recursive repro on an empty directory\n \"\"\"\n (tmp_dir / \"emptydir\").mkdir()\n\n stages = dvc.reproduce(\"emptydir\", recursive=True, force=True)\n assert stages == []\n\n\ndef test_recursive_repro_recursive_missing_file(dvc):\n \"\"\"\n Test recursive repro on a missing file\n \"\"\"\n with pytest.raises(StageFileDoesNotExistError):\n dvc.reproduce(\"notExistingStage.dvc\", recursive=True)\n with pytest.raises(StageFileDoesNotExistError):\n dvc.reproduce(\"notExistingDir/\", recursive=True)\n\n\ndef test_recursive_repro_on_stage_file(dvc, repro_dir):\n \"\"\"\n Test recursive repro on a stage file instead of directory\n \"\"\"\n stages = dvc.reproduce(\n repro_dir[\"origin_copy_2\"].relpath, recursive=True, force=True\n )\n assert stages == [repro_dir[\"origin_copy\"], repro_dir[\"origin_copy_2\"]]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_get_gitignore_subdir_test_get_gitignore_subdir.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_get_gitignore_subdir_test_get_gitignore_subdir.None_5", "embedding": null, "metadata": {"file_path": "tests/func/test_scm.py", "file_name": "test_scm.py", "file_type": "text/x-python", "category": "test", "start_line": 124, "end_line": 135, "span_ids": ["test_get_gitignore_subdir"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_gitignore_subdir(tmp_dir, scm):\n tmp_dir.gen({\"dir1\": {\"file1\": \"cont\", \"dir2\": {}}})\n\n data_dir = os.fspath(tmp_dir / \"dir1\" / \"file1\")\n entry, gitignore = scm._get_gitignore(data_dir)\n assert entry == \"/file1\"\n assert gitignore == os.fspath(tmp_dir / \"dir1\" / \".gitignore\")\n\n data_dir = os.fspath(tmp_dir / \"dir1\" / \"dir2\")\n entry, gitignore = scm._get_gitignore(data_dir)\n assert entry == \"/dir2\"\n assert gitignore == os.fspath(tmp_dir / \"dir1\" / \".gitignore\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_TestDefaultWorkingDirectory_TestDefaultWorkingDirectory.test_ignored_in_checksum.with_self_dvc_lock_self_.self_assertFalse_stage_ch": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_TestDefaultWorkingDirectory_TestDefaultWorkingDirectory.test_ignored_in_checksum.with_self_dvc_lock_self_.self_assertFalse_stage_ch", "embedding": null, "metadata": {"file_path": "tests/func/test_stage.py", "file_name": "test_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 94, "end_line": 111, "span_ids": ["TestDefaultWorkingDirectory", "TestDefaultWorkingDirectory.test_ignored_in_checksum"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestDefaultWorkingDirectory(TestDvc):\n def test_ignored_in_checksum(self):\n stage = self.dvc.run(\n cmd=f\"echo test > {self.FOO}\",\n deps=[self.BAR],\n outs=[self.FOO],\n single_stage=True,\n )\n\n d = stage.dumpd()\n self.assertNotIn(Stage.PARAM_WDIR, d.keys())\n\n d = load_yaml(stage.relpath)\n self.assertNotIn(Stage.PARAM_WDIR, d.keys())\n\n with self.dvc.lock, self.dvc.state:\n stage = SingleStageFile(self.dvc, stage.relpath).stage\n self.assertFalse(stage.changed())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_md5_ignores_comments_test_meta_is_preserved.assert_new_data_meta_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_md5_ignores_comments_test_meta_is_preserved.assert_new_data_meta_", "embedding": null, "metadata": {"file_path": "tests/func/test_stage.py", "file_name": "test_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 156, "end_line": 180, "span_ids": ["test_meta_is_preserved", "test_md5_ignores_comments"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_md5_ignores_comments(tmp_dir, dvc):\n (stage,) = tmp_dir.dvc_gen(\"foo\", \"foo content\")\n\n with open(stage.path, \"a\") as f:\n f.write(\"# End comment\\n\")\n\n new_stage = SingleStageFile(dvc, stage.path).stage\n assert not new_stage.changed_stage()\n\n\ndef test_meta_is_preserved(tmp_dir, dvc):\n (stage,) = tmp_dir.dvc_gen(\"foo\", \"foo content\")\n\n # Add meta to DVC-file\n data = load_yaml(stage.path)\n data[\"meta\"] = {\"custom_key\": 42}\n dump_yaml(stage.path, data)\n\n # Loading and dumping to test that it works and meta is retained\n dvcfile = SingleStageFile(dvc, stage.path)\n new_stage = dvcfile.stage\n dvcfile.dump(new_stage)\n\n new_data = load_yaml(stage.path)\n assert new_data[\"meta\"] == data[\"meta\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_state.py_test_remove_links_test_remove_links.with_dvc_state_.assert_result_0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_state.py_test_remove_links_test_remove_links.with_dvc_state_.assert_result_0", "embedding": null, "metadata": {"file_path": "tests/func/test_state.py", "file_name": "test_state.py", "file_type": "text/x-python", "category": "test", "start_line": 73, "end_line": 86, "span_ids": ["test_remove_links"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_remove_links(tmp_dir, dvc):\n tmp_dir.dvc_gen({\"foo\": \"foo_content\", \"bar\": \"bar_content\"})\n\n with dvc.state:\n cmd_count_links = \"SELECT count(*) FROM {}\".format(\n State.LINK_STATE_TABLE\n )\n result = dvc.state._execute(cmd_count_links).fetchone()[0]\n assert result == 2\n\n dvc.state.remove_links([\"foo\", \"bar\"])\n\n result = dvc.state._execute(cmd_count_links).fetchone()[0]\n assert result == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_state.py_test_get_unused_links_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_state.py_test_get_unused_links_", "embedding": null, "metadata": {"file_path": "tests/func/test_state.py", "file_name": "test_state.py", "file_type": "text/x-python", "category": "test", "start_line": 89, "end_line": 103, "span_ids": ["test_get_unused_links"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_unused_links(tmp_dir, dvc):\n tmp_dir.dvc_gen({\"foo\": \"foo_content\", \"bar\": \"bar_content\"})\n\n with dvc.state:\n links = [os.path.join(dvc.root_dir, link) for link in [\"foo\", \"bar\"]]\n assert set(dvc.state.get_unused_links([])) == {\"foo\", \"bar\"}\n assert set(dvc.state.get_unused_links(links[:1])) == {\"bar\"}\n assert set(dvc.state.get_unused_links(links)) == set()\n assert set(\n dvc.state.get_unused_links(\n used=links[:1]\n + [os.path.join(dvc.root_dir, \"not-existing-file\")]\n )\n ) == {\"bar\"}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_status.py_test_status_non_dvc_repo_import_test_status_non_dvc_repo_import.assert_status_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_status.py_test_status_non_dvc_repo_import_test_status_non_dvc_repo_import.assert_status_", "embedding": null, "metadata": {"file_path": "tests/func/test_status.py", "file_name": "test_status.py", "file_type": "text/x-python", "category": "test", "start_line": 28, "end_line": 42, "span_ids": ["test_status_non_dvc_repo_import"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_status_non_dvc_repo_import(tmp_dir, dvc, git_dir):\n with git_dir.branch(\"branch\", new=True):\n git_dir.scm_gen(\"file\", \"first version\", commit=\"first version\")\n\n dvc.imp(os.fspath(git_dir), \"file\", \"file\", rev=\"branch\")\n\n assert dvc.status([\"file.dvc\"]) == {}\n\n with git_dir.branch(\"branch\", new=False):\n git_dir.scm_gen(\"file\", \"second version\", commit=\"update file\")\n\n (status,) = dvc.status([\"file.dvc\"])[\"file.dvc\"]\n assert status == {\n \"changed deps\": {f\"file ({git_dir})\": \"update available\"}\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_TestGitTree_AssertWalkEqualMixin.assertWalkEqual.self_assertEqual_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_TestGitTree_AssertWalkEqualMixin.assertWalkEqual.self_assertEqual_", "embedding": null, "metadata": {"file_path": "tests/func/test_tree.py", "file_name": "test_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 91, "end_line": 114, "span_ids": ["TestGitTree.setUp", "TestGitTree", "AssertWalkEqualMixin", "AssertWalkEqualMixin.assertWalkEqual", "TestGitSubmoduleTree", "TestGitSubmoduleTree.setUp"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestGitTree(TestGit, GitTreeTests):\n def setUp(self):\n super().setUp()\n self.scm = SCM(self._root_dir)\n\n\nclass TestGitSubmoduleTree(TestGitSubmodule, GitTreeTests):\n def setUp(self):\n super().setUp()\n self.scm = SCM(self._root_dir)\n self._pushd(self._root_dir)\n\n\nclass AssertWalkEqualMixin:\n def assertWalkEqual(self, actual, expected, msg=None):\n def convert_to_sets(walk_results):\n return [\n (root, set(dirs), set(nondirs))\n for root, dirs, nondirs in walk_results\n ]\n\n self.assertEqual(\n convert_to_sets(actual), convert_to_sets(expected), msg=msg\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_TestWalkInNoSCM_TestWalkInNoSCM.test_subdir.self_assertWalkEqual_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_TestWalkInNoSCM_TestWalkInNoSCM.test_subdir.self_assertWalkEqual_", "embedding": null, "metadata": {"file_path": "tests/func/test_tree.py", "file_name": "test_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 117, "end_line": 142, "span_ids": ["TestWalkInNoSCM.test_subdir", "TestWalkInNoSCM.test", "TestWalkInNoSCM"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestWalkInNoSCM(AssertWalkEqualMixin, TestDir):\n def test(self):\n tree = LocalTree(None, {\"url\": self._root_dir})\n self.assertWalkEqual(\n tree.walk(self._root_dir),\n [\n (\n self._root_dir,\n [\"data_dir\"],\n [\"code.py\", \"bar\", \"\u0442\u0435\u0441\u0442\", \"foo\"],\n ),\n (join(self._root_dir, \"data_dir\"), [\"data_sub_dir\"], [\"data\"]),\n (\n join(self._root_dir, \"data_dir\", \"data_sub_dir\"),\n [],\n [\"data_sub\"],\n ),\n ],\n )\n\n def test_subdir(self):\n tree = LocalTree(None, {\"url\": self._root_dir})\n self.assertWalkEqual(\n tree.walk(join(\"data_dir\", \"data_sub_dir\")),\n [(join(\"data_dir\", \"data_sub_dir\"), [], [\"data_sub\"])],\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_update.py_test_update_import_after_remote_updates_to_dvc_test_update_import_after_remote_updates_to_dvc.None_11": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_update.py_test_update_import_after_remote_updates_to_dvc_test_update_import_after_remote_updates_to_dvc.None_11", "embedding": null, "metadata": {"file_path": "tests/func/test_update.py", "file_name": "test_update.py", "file_type": "text/x-python", "category": "test", "start_line": 81, "end_line": 125, "span_ids": ["test_update_import_after_remote_updates_to_dvc"], "tokens": 390}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_update_import_after_remote_updates_to_dvc(tmp_dir, dvc, erepo_dir):\n old_rev = None\n with erepo_dir.branch(\"branch\", new=True), erepo_dir.chdir():\n erepo_dir.scm_gen(\"version\", \"branch\", commit=\"add version file\")\n old_rev = erepo_dir.scm.get_rev()\n\n stage = dvc.imp(os.fspath(erepo_dir), \"version\", \"version\", rev=\"branch\")\n\n imported = tmp_dir / \"version\"\n assert imported.is_file()\n assert imported.read_text() == \"branch\"\n assert stage.deps[0].def_repo == {\n \"url\": os.fspath(erepo_dir),\n \"rev\": \"branch\",\n \"rev_lock\": old_rev,\n }\n\n new_rev = None\n with erepo_dir.branch(\"branch\", new=False), erepo_dir.chdir():\n erepo_dir.scm.gitpython.repo.index.remove([\"version\"])\n erepo_dir.dvc_gen(\n \"version\", \"updated\", commit=\"upgrade to DVC tracking\"\n )\n new_rev = erepo_dir.scm.get_rev()\n\n assert old_rev != new_rev\n\n (status,) = dvc.status([stage.path])[\"version.dvc\"]\n (changed_dep,) = list(status[\"changed deps\"].items())\n assert changed_dep[0].startswith(\"version \")\n assert changed_dep[1] == \"update available\"\n\n dvc.update([stage.path])\n\n assert dvc.status([stage.path]) == {}\n\n assert imported.is_file()\n assert imported.read_text() == \"updated\"\n\n stage = Dvcfile(dvc, stage.path).stage\n assert stage.deps[0].def_repo == {\n \"url\": os.fspath(erepo_dir),\n \"rev\": \"branch\",\n \"rev_lock\": new_rev,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_update.py_test_update_before_and_after_dvc_init_test_update_before_and_after_dvc_init.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_update.py_test_update_before_and_after_dvc_init_test_update_before_and_after_dvc_init.None_3", "embedding": null, "metadata": {"file_path": "tests/func/test_update.py", "file_name": "test_update.py", "file_type": "text/x-python", "category": "test", "start_line": 128, "end_line": 157, "span_ids": ["test_update_before_and_after_dvc_init"], "tokens": 231}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_update_before_and_after_dvc_init(tmp_dir, dvc, git_dir):\n with git_dir.chdir():\n git_dir.scm_gen(\"file\", \"first version\", commit=\"first version\")\n old_rev = git_dir.scm.get_rev()\n\n stage = dvc.imp(os.fspath(git_dir), \"file\", \"file\")\n\n with git_dir.chdir():\n git_dir.init(dvc=True)\n git_dir.scm.gitpython.repo.index.remove([\"file\"])\n os.remove(\"file\")\n git_dir.dvc_gen(\"file\", \"second version\", commit=\"with dvc\")\n new_rev = git_dir.scm.get_rev()\n\n assert old_rev != new_rev\n\n assert dvc.status([stage.path]) == {\n \"file.dvc\": [\n {\n \"changed deps\": {\n \"file ({})\".format(os.fspath(git_dir)): \"update available\"\n }\n }\n ]\n }\n\n dvc.update([stage.path])\n\n assert (tmp_dir / \"file\").read_text() == \"second version\"\n assert dvc.status([stage.path]) == {}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_update.py_test_update_import_url_test_update_import_url.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_update.py_test_update_import_url_test_update_import_url.None_5", "embedding": null, "metadata": {"file_path": "tests/func/test_update.py", "file_name": "test_update.py", "file_type": "text/x-python", "category": "test", "start_line": 160, "end_line": 194, "span_ids": ["test_update_import_url"], "tokens": 226}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"workspace\",\n [\n pytest.lazy_fixture(\"local_cloud\"),\n pytest.lazy_fixture(\"s3\"),\n pytest.lazy_fixture(\"gs\"),\n pytest.lazy_fixture(\"hdfs\"),\n pytest.lazy_fixture(\"webhdfs\"),\n pytest.param(\n pytest.lazy_fixture(\"ssh\"),\n marks=pytest.mark.skipif(\n os.name == \"nt\", reason=\"disabled on windows\"\n ),\n ),\n ],\n indirect=True,\n)\ndef test_update_import_url(tmp_dir, dvc, workspace):\n workspace.gen(\"file\", \"file content\")\n\n dst = tmp_dir / \"imported_file\"\n stage = dvc.imp_url(\"remote://workspace/file\", os.fspath(dst))\n\n assert dst.is_file()\n assert dst.read_text() == \"file content\"\n\n # update data\n workspace.gen(\"file\", \"updated file content\")\n\n assert dvc.status([stage.path]) == {}\n dvc.update([stage.path])\n assert dvc.status([stage.path]) == {}\n\n assert dst.is_file()\n assert dst.read_text() == \"updated file content\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/ls/test_ls.py_from_dvc_cli_import_parse_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/ls/test_ls.py_from_dvc_cli_import_parse_", "embedding": null, "metadata": {"file_path": "tests/unit/command/ls/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 55, "span_ids": ["test_list_git_ssh_rev", "test_list_recursive", "imports", "test_list_outputs_only", "_test_cli", "test_list_targets", "test_list"], "tokens": 365}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.cli import parse_args\nfrom dvc.command.ls import CmdList\n\n\ndef _test_cli(mocker, *args):\n cli_args = parse_args([\"list\", *args])\n assert cli_args.func == CmdList\n\n cmd = cli_args.func(cli_args)\n m = mocker.patch(\"dvc.repo.Repo.ls\")\n\n assert cmd.run() == 0\n return m\n\n\ndef test_list(mocker):\n url = \"local_dir\"\n m = _test_cli(mocker, url)\n m.assert_called_once_with(\n url, None, recursive=False, rev=None, dvc_only=False\n )\n\n\ndef test_list_recursive(mocker):\n url = \"local_dir\"\n m = _test_cli(mocker, url, \"-R\")\n m.assert_called_once_with(\n url, None, recursive=True, rev=None, dvc_only=False\n )\n\n\ndef test_list_git_ssh_rev(mocker):\n url = \"git@github.com:repo\"\n m = _test_cli(mocker, url, \"--rev\", \"123\")\n m.assert_called_once_with(\n url, None, recursive=False, rev=\"123\", dvc_only=False\n )\n\n\ndef test_list_targets(mocker):\n url = \"local_dir\"\n target = \"subdir\"\n m = _test_cli(mocker, url, target)\n m.assert_called_once_with(\n url, target, recursive=False, rev=None, dvc_only=False\n )\n\n\ndef test_list_outputs_only(mocker):\n url = \"local_dir\"\n m = _test_cli(mocker, url, None, \"--dvc-only\")\n m.assert_called_once_with(\n url, None, recursive=False, rev=None, dvc_only=True\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/ls/test_ls_colors.py_from_dvc_command_ls_ls_co_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/ls/test_ls_colors.py_from_dvc_command_ls_ls_co_", "embedding": null, "metadata": {"file_path": "tests/unit/command/ls/test_ls_colors.py", "file_name": "test_ls_colors.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 59, "span_ids": ["test_ls_colors_dir", "test_ls_colors_out_file", "test_ls_colors_exec", "imports", "test_ls_colors_file", "colorize", "test_ls_colors_out_exec", "test_ls_colors_out_dir", "test_ls_colors_ext", "test_ls_colors_out_ext"], "tokens": 472}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.command.ls.ls_colors import LsColors\n\n\ndef colorize(ls_colors):\n def _colorize(f, spec=\"\"):\n fs_path = {\n \"path\": f,\n \"isexec\": \"e\" in spec,\n \"isdir\": \"d\" in spec,\n \"isout\": \"o\" in spec,\n }\n return ls_colors.format(fs_path)\n\n return _colorize\n\n\ndef test_ls_colors_out_file():\n ls_colors = LsColors(LsColors.default)\n assert colorize(ls_colors)(\"file\", \"o\") == \"file\"\n\n\ndef test_ls_colors_out_dir():\n ls_colors = LsColors(LsColors.default)\n assert colorize(ls_colors)(\"dir\", \"do\") == \"\\x1b[01;34mdir\\x1b[0m\"\n\n\ndef test_ls_colors_out_exec():\n ls_colors = LsColors(LsColors.default)\n assert (\n colorize(ls_colors)(\"script.sh\", \"eo\") == \"\\x1b[01;32mscript.sh\\x1b[0m\"\n )\n\n\ndef test_ls_colors_out_ext():\n ls_colors = LsColors(LsColors.default + \":*.xml=01;33\")\n assert colorize(ls_colors)(\"file.xml\", \"o\") == \"\\x1b[01;33mfile.xml\\x1b[0m\"\n\n\ndef test_ls_colors_file():\n ls_colors = LsColors(LsColors.default)\n assert colorize(ls_colors)(\"file\") == \"file\"\n\n\ndef test_ls_colors_dir():\n ls_colors = LsColors(LsColors.default)\n assert colorize(ls_colors)(\"dir\", \"d\") == \"\\x1b[01;34mdir\\x1b[0m\"\n\n\ndef test_ls_colors_exec():\n ls_colors = LsColors(LsColors.default)\n assert (\n colorize(ls_colors)(\"script.sh\", \"e\") == \"\\x1b[01;32mscript.sh\\x1b[0m\"\n )\n\n\ndef test_ls_colors_ext():\n ls_colors = LsColors(LsColors.default + \":*.xml=01;33\")\n assert colorize(ls_colors)(\"file.xml\") == \"\\x1b[01;33mfile.xml\\x1b[0m\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_checkout.py_logging_test_checkout.m_assert_called_once_with": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_checkout.py_logging_test_checkout.m_assert_called_once_with", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 23, "span_ids": ["imports", "test_checkout"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\n\nfrom dvc.cli import parse_args\nfrom dvc.command.checkout import CmdCheckout, log_changes\n\n\ndef test_checkout(tmp_dir, dvc, mocker):\n cli_args = parse_args(\n [\"checkout\", \"foo.dvc\", \"bar.dvc\", \"--relink\", \"--with-deps\"]\n )\n assert cli_args.func == CmdCheckout\n\n cmd = cli_args.func(cli_args)\n m = mocker.patch(\"dvc.repo.Repo.checkout\")\n\n assert cmd.run() == 0\n m.assert_called_once_with(\n targets=[\"foo.dvc\", \"bar.dvc\"],\n force=False,\n recursive=False,\n relink=True,\n with_deps=True,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_checkout.py_test_log_changes_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_checkout.py_test_log_changes_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 53, "end_line": 77, "span_ids": ["test_log_changes"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_log_changes(caplog):\n stats = {\n \"added\": [\"file1\", \"dir1/\"],\n \"deleted\": [\"dir2/\"],\n \"modified\": [\"file2\"],\n }\n\n from itertools import zip_longest\n\n def _assert_output(stats, expected_outs):\n with caplog.at_level(logging.INFO, logger=\"dvc\"):\n caplog.clear()\n log_changes(stats)\n actual_output = caplog.text.splitlines()\n for out, line in zip_longest(expected_outs, actual_output):\n assert out in line\n\n _assert_output(stats, [\"M\\tfile2\", \"A\\tfile1\", \"A\\tdir1/\", \"D\\tdir2/\"])\n\n del stats[\"deleted\"][0]\n _assert_output(stats, [\"M\\tfile2\", \"A\\tfile1\", \"A\\tdir1/\"])\n\n del stats[\"modified\"]\n _assert_output(stats, [\"A\\tfile1\", \"A\\tdir1/\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_show_hash_test_show_hash.assert_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_show_hash_test_show_hash.assert_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 44, "end_line": 73, "span_ids": ["test_show_hash"], "tokens": 344}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_show_hash(mocker, caplog):\n args = parse_args([\"diff\", \"--show-hash\"])\n cmd = args.func(args)\n diff = {\n \"added\": [],\n \"deleted\": [\n {\"path\": os.path.join(\"data\", \"\"), \"hash\": \"XXXXXXXX.dir\"},\n {\"path\": os.path.join(\"data\", \"foo\"), \"hash\": \"11111111\"},\n {\"path\": os.path.join(\"data\", \"bar\"), \"hash\": \"00000000\"},\n ],\n \"modified\": [\n {\"path\": \"file2\", \"hash\": {\"old\": \"AAAAAAAA\", \"new\": \"BBBBBBBB\"}},\n {\"path\": \"file1\", \"hash\": {\"old\": \"CCCCCCCC\", \"new\": \"DDDDDDDD\"}},\n ],\n \"not in cache\": [],\n }\n mocker.patch(\"dvc.repo.Repo.diff\", return_value=diff)\n assert 0 == cmd.run()\n assert (\n \"Deleted:\\n\"\n \" XXXXXXXX \" + os.path.join(\"data\", \"\") + \"\\n\"\n \" 00000000 \" + os.path.join(\"data\", \"bar\") + \"\\n\"\n \" 11111111 \" + os.path.join(\"data\", \"foo\") + \"\\n\"\n \"\\n\"\n \"Modified:\\n\"\n \" CCCCCCCC..DDDDDDDD file1\\n\"\n \" AAAAAAAA..BBBBBBBB file2\\n\"\n \"\\n\"\n \"files summary: 0 added, 2 deleted, 2 modified, 0 not in cache\"\n ) in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_get.py_from_dvc_cli_import_parse_test_get.m_assert_called_once_with": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_get.py_from_dvc_cli_import_parse_test_get.m_assert_called_once_with", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_get.py", "file_name": "test_get.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 16, "span_ids": ["imports", "test_get"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.cli import parse_args\nfrom dvc.command.get import CmdGet\n\n\ndef test_get(mocker):\n cli_args = parse_args(\n [\"get\", \"repo_url\", \"src\", \"--out\", \"out\", \"--rev\", \"version\"]\n )\n assert cli_args.func == CmdGet\n\n cmd = cli_args.func(cli_args)\n m = mocker.patch(\"dvc.repo.Repo.get\")\n\n assert cmd.run() == 0\n\n m.assert_called_once_with(\"repo_url\", path=\"src\", out=\"out\", rev=\"version\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_get.py_test_get_url_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_get.py_test_get_url_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_get.py", "file_name": "test_get.py", "file_type": "text/x-python", "category": "test", "start_line": 19, "end_line": 32, "span_ids": ["test_get_url"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_url(mocker, caplog):\n cli_args = parse_args(\n [\"get\", \"repo_url\", \"src\", \"--rev\", \"version\", \"--show-url\"]\n )\n assert cli_args.func == CmdGet\n\n cmd = cli_args.func(cli_args)\n m = mocker.patch(\"dvc.api.get_url\", return_value=\"resource_url\")\n\n assert cmd.run() == 0\n assert \"resource_url\" in caplog.text\n\n m.assert_called_once_with(\"src\", repo=\"repo_url\", rev=\"version\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_imp_url.py_logging_test_import_url.m_assert_called_once_with": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_imp_url.py_logging_test_import_url.m_assert_called_once_with", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_imp_url.py", "file_name": "test_imp_url.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 21, "span_ids": ["imports", "test_import_url"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\n\nfrom dvc.cli import parse_args\nfrom dvc.command.imp_url import CmdImportUrl\nfrom dvc.exceptions import DvcException\n\n\ndef test_import_url(mocker):\n cli_args = parse_args(\n [\"import-url\", \"src\", \"out\", \"--file\", \"file\", \"--desc\", \"description\"]\n )\n assert cli_args.func == CmdImportUrl\n\n cmd = cli_args.func(cli_args)\n m = mocker.patch.object(cmd.repo, \"imp_url\", autospec=True)\n\n assert cmd.run() == 0\n\n m.assert_called_once_with(\n \"src\", out=\"out\", fname=\"file\", no_exec=False, desc=\"description\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_repro.py_from_dvc_cli_import_parse_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_repro.py_from_dvc_cli_import_parse_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 36, "span_ids": ["test_downstream", "imports", "test_default_arguments"], "tokens": 230}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.cli import parse_args\nfrom dvc.command.repro import CmdRepro\n\ndefault_arguments = {\n \"all_pipelines\": False,\n \"downstream\": False,\n \"dry\": False,\n \"force\": False,\n \"run_cache\": True,\n \"interactive\": False,\n \"no_commit\": False,\n \"pipeline\": False,\n \"single_item\": False,\n \"recursive\": False,\n \"force_downstream\": False,\n \"pull\": False,\n \"glob\": False,\n \"targets\": [],\n}\n\n\ndef test_default_arguments(dvc, mocker):\n cmd = CmdRepro(parse_args([\"repro\"]))\n mocker.patch.object(cmd.repo, \"reproduce\")\n cmd.run()\n cmd.repo.reproduce.assert_called_with(**default_arguments)\n\n\ndef test_downstream(dvc, mocker):\n cmd = CmdRepro(parse_args([\"repro\", \"--downstream\"]))\n mocker.patch.object(cmd.repo, \"reproduce\")\n cmd.run()\n arguments = default_arguments.copy()\n arguments.update({\"downstream\": True})\n cmd.repo.reproduce.assert_called_with(**arguments)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_local.py_os_test_str_on_external_absolute_path.assert_str_output_abs": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_local.py_os_test_str_on_external_absolute_path.assert_str_output_abs", "embedding": null, "metadata": {"file_path": "tests/unit/output/test_local.py", "file_name": "test_local.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 69, "span_ids": ["TestLocalOutput.test_save_missing", "imports", "TestLocalOutput._get_output", "test_str_workdir_inside_repo", "TestLocalOutput", "TestLocalOutput._get_cls", "test_str_workdir_outside_repo", "test_str_on_local_absolute_path", "test_str_on_external_absolute_path"], "tokens": 468}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nfrom mock import patch\n\nfrom dvc.cache.local import LocalCache\nfrom dvc.dir_info import DirInfo\nfrom dvc.hash_info import HashInfo\nfrom dvc.output import LocalOutput\nfrom dvc.stage import Stage\nfrom dvc.utils import relpath\nfrom tests.basic_env import TestDvc\n\n\nclass TestLocalOutput(TestDvc):\n def _get_cls(self):\n return LocalOutput\n\n def _get_output(self):\n stage = Stage(self.dvc)\n return self._get_cls()(stage, \"path\", cache=False)\n\n def test_save_missing(self):\n o = self._get_output()\n with patch.object(o.tree, \"exists\", return_value=False):\n with self.assertRaises(o.DoesNotExistError):\n o.save()\n\n\ndef test_str_workdir_outside_repo(tmp_dir, erepo_dir):\n stage = Stage(erepo_dir.dvc)\n output = LocalOutput(stage, \"path\", cache=False)\n\n assert relpath(\"path\", erepo_dir.dvc.root_dir) == str(output)\n\n\ndef test_str_workdir_inside_repo(dvc):\n stage = Stage(dvc)\n output = LocalOutput(stage, \"path\", cache=False)\n\n assert \"path\" == str(output)\n\n stage = Stage(dvc, wdir=\"some_folder\")\n output = LocalOutput(stage, \"path\", cache=False)\n\n assert os.path.join(\"some_folder\", \"path\") == str(output)\n\n\ndef test_str_on_local_absolute_path(dvc):\n stage = Stage(dvc)\n\n rel_path = os.path.join(\"path\", \"to\", \"file\")\n abs_path = os.path.abspath(rel_path)\n output = LocalOutput(stage, abs_path, cache=False)\n\n assert output.def_path == rel_path\n assert output.path_info.fspath == abs_path\n assert str(output) == rel_path\n\n\ndef test_str_on_external_absolute_path(dvc):\n stage = Stage(dvc)\n\n rel_path = os.path.join(\"..\", \"path\", \"to\", \"file\")\n abs_path = os.path.abspath(rel_path)\n output = LocalOutput(stage, abs_path, cache=False)\n\n assert output.def_path == abs_path\n assert output.path_info.fspath == abs_path\n assert str(output) == abs_path", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_output.py_logging_test_checksum_schema.assert_Schema_CHECKSUM_SC": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_output.py_logging_test_checksum_schema.assert_Schema_CHECKSUM_SC", "embedding": null, "metadata": {"file_path": "tests/unit/output/test_output.py", "file_name": "test_output.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 40, "span_ids": ["test_checksum_schema", "imports"], "tokens": 368}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\n\nimport pytest\nfrom funcy import first\nfrom voluptuous import MultipleInvalid, Schema\n\nfrom dvc.cache import NamedCache\nfrom dvc.ignore import _no_match\nfrom dvc.output import CHECKSUM_SCHEMA, BaseOutput\n\n\n@pytest.mark.parametrize(\n \"value,expected\",\n [\n (\"\", None),\n (None, None),\n (11111, \"11111\"),\n (\"11111\", \"11111\"),\n (\"aAaBa\", \"aaaba\"),\n (\n \"3cc286c534a71504476da009ed174423\",\n \"3cc286c534a71504476da009ed174423\",\n ), # md5\n (\n \"d41d8cd98f00b204e9800998ecf8427e-38\",\n \"d41d8cd98f00b204e9800998ecf8427e-38\",\n ), # etag\n (\n \"000002000000000000000000c16859d1d071c6b1ffc9c8557d4909f1\",\n \"000002000000000000000000c16859d1d071c6b1ffc9c8557d4909f1\",\n ), # hdfs checksum\n # Not much we can do about hex and oct values without writing our own\n # parser. So listing these test cases just to acknowledge this.\n # See https://github.com/iterative/dvc/issues/3331.\n (0x3451, \"13393\"),\n (0o1244, \"676\"),\n ],\n)\ndef test_checksum_schema(value, expected):\n assert Schema(CHECKSUM_SCHEMA)(value) == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_output.py_test_checksum_schema_fail_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_output.py_test_checksum_schema_fail_", "embedding": null, "metadata": {"file_path": "tests/unit/output/test_output.py", "file_name": "test_output.py", "file_type": "text/x-python", "category": "test", "start_line": 43, "end_line": 93, "span_ids": ["test_get_used_cache", "test_checksum_schema_fail"], "tokens": 398}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"value\", [\"1\", \"11\", {}, {\"a\": \"b\"}, [], [1, 2]])\ndef test_checksum_schema_fail(value):\n with pytest.raises(MultipleInvalid):\n assert Schema(CHECKSUM_SCHEMA)(value)\n\n\n@pytest.mark.parametrize(\n \"exists, expected_message\",\n [\n (\n False,\n (\n \"Output 'path'(stage: 'stage.dvc') is missing version info. \"\n \"Cache for it will not be collected. \"\n \"Use `dvc repro` to get your pipeline up to date.\"\n ),\n ),\n (\n True,\n (\n \"Output 'path'(stage: 'stage.dvc') is missing version info. \"\n \"Cache for it will not be collected. \"\n \"Use `dvc repro` to get your pipeline up to date.\\n\"\n \"You can also use `dvc commit stage.dvc` to associate \"\n \"existing 'path' with stage: 'stage.dvc'.\"\n ),\n ),\n ],\n)\ndef test_get_used_cache(exists, expected_message, mocker, caplog):\n stage = mocker.MagicMock()\n mocker.patch.object(stage, \"__str__\", return_value=\"stage: 'stage.dvc'\")\n mocker.patch.object(stage, \"addressing\", \"stage.dvc\")\n mocker.patch.object(\n stage.repo.tree.dvcignore,\n \"check_ignore\",\n return_value=_no_match(\"path\"),\n )\n\n output = BaseOutput(stage, \"path\")\n\n mocker.patch.object(output, \"use_cache\", True)\n mocker.patch.object(stage, \"is_repo_import\", False)\n mocker.patch.object(\n BaseOutput, \"exists\", new_callable=mocker.PropertyMock\n ).return_value = exists\n\n with caplog.at_level(logging.WARNING, logger=\"dvc\"):\n assert isinstance(output.get_used_cache(), NamedCache)\n assert first(caplog.messages) == expected_message", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_connection.py_filecmp_test_remove_dir.assert_not_dpath_exists_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_connection.py_filecmp_test_remove_dir.assert_not_dpath_exists_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/ssh/test_connection.py", "file_name": "test_connection.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 53, "span_ids": ["test_isfile", "test_isdir", "imports", "test_makedirs", "test_remove_dir", "test_exists"], "tokens": 361}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import filecmp\nimport os\nimport platform\nimport posixpath\nimport tempfile\n\nimport pytest\n\nfrom dvc.info import get_fs_type\nfrom dvc.system import System\nfrom dvc.tree.ssh.connection import SSHConnection\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\nSRC_PATH_WITH_SPECIAL_CHARACTERS = \"Escape me [' , ']\"\nESCAPED_SRC_PATH_WITH_SPECIAL_CHARACTERS = \"'Escape me ['\\\"'\\\"' , '\\\"'\\\"']'\"\n\nDEST_PATH_WITH_SPECIAL_CHARACTERS = \"Escape me too [' , ']\"\nESCAPED_DEST_PATH_WITH_SPECIAL_CHARACTERS = (\n \"'Escape me too ['\\\"'\\\"' , '\\\"'\\\"']'\"\n)\n\n\ndef test_isdir(ssh_connection):\n assert ssh_connection.isdir(here)\n assert not ssh_connection.isdir(__file__)\n\n\ndef test_exists(ssh_connection):\n assert not ssh_connection.exists(\"/path/to/non/existent/file\")\n assert ssh_connection.exists(__file__)\n\n\ndef test_isfile(ssh_connection):\n assert ssh_connection.isfile(__file__)\n assert not ssh_connection.isfile(here)\n\n\ndef test_makedirs(tmp_path, ssh_connection):\n tmp = tmp_path.absolute().as_posix()\n path = posixpath.join(tmp, \"dir\", \"subdir\")\n ssh_connection.makedirs(path)\n assert os.path.isdir(path)\n\n\ndef test_remove_dir(tmp_path, ssh_connection):\n dpath = tmp_path / \"dir\"\n dpath.mkdir()\n (dpath / \"file\").write_text(\"file\")\n (dpath / \"subdir\").mkdir()\n (dpath / \"subdir\" / \"subfile\").write_text(\"subfile\")\n ssh_connection.remove(dpath.absolute().as_posix())\n assert not dpath.exists()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_connection.py_test_walk_test_walk.assert_paths_expected": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_connection.py_test_walk_test_walk.assert_paths_expected", "embedding": null, "metadata": {"file_path": "tests/unit/remote/ssh/test_connection.py", "file_name": "test_connection.py", "file_type": "text/x-python", "category": "test", "start_line": 47, "end_line": 84, "span_ids": ["test_walk"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_walk(tmp_path, ssh_connection):\n root_path = tmp_path\n dir_path = root_path / \"dir\"\n subdir_path = dir_path / \"subdir\"\n\n dir_path.mkdir()\n subdir_path.mkdir()\n\n root_data_path = root_path / \"root_data\"\n dir_data_path = dir_path / \"dir_data\"\n subdir_data_path = subdir_path / \"subdir_data\"\n\n with root_data_path.open(\"w+\") as fobj:\n fobj.write(\"\")\n\n with dir_data_path.open(\"w+\") as fobj:\n fobj.write(\"\")\n\n with subdir_data_path.open(\"w+\") as fobj:\n fobj.write(\"\")\n\n entries = [\n dir_path,\n subdir_path,\n root_data_path,\n dir_data_path,\n subdir_data_path,\n ]\n expected = {entry.absolute().as_posix() for entry in entries}\n\n paths = set()\n for root, dirs, files in ssh_connection.walk(\n root_path.absolute().as_posix()\n ):\n for entry in dirs + files:\n paths.add(posixpath.join(root, entry))\n\n assert paths == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_connection.py_test_reflink_test_reflink.assert_not_System_is_hard": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_connection.py_test_reflink_test_reflink.assert_not_System_is_hard", "embedding": null, "metadata": {"file_path": "tests/unit/remote/ssh/test_connection.py", "file_name": "test_connection.py", "file_type": "text/x-python", "category": "test", "start_line": 87, "end_line": 96, "span_ids": ["test_reflink"], "tokens": 109}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(\n get_fs_type(tempfile.gettempdir())[0] not in [\"xfs\", \"apfs\", \"btrfs\"],\n reason=\"Reflinks only work in specified file systems\",\n)\ndef test_reflink(tmp_dir, ssh_connection):\n tmp_dir.gen(\"foo\", \"foo content\")\n ssh_connection.reflink(\"foo\", \"link\")\n assert filecmp.cmp(\"foo\", \"link\")\n assert not System.is_symlink(\"link\")\n assert not System.is_hardlink(\"link\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_hardlink_optimization_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_hardlink_optimization_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/ssh/test_ssh.py", "file_name": "test_ssh.py", "file_type": "text/x-python", "category": "test", "start_line": 211, "end_line": 227, "span_ids": ["test_hardlink_optimization"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_hardlink_optimization(dvc, tmp_dir, ssh):\n tree = SSHTree(dvc, ssh.config)\n\n from_info = tree.path_info / \"empty\"\n to_info = tree.path_info / \"link\"\n\n with tree.open(from_info, \"wb\"):\n pass\n\n if os.name == \"nt\":\n link_path = \"c:\" + to_info.path.replace(\"/\", \"\\\\\")\n else:\n link_path = to_info.path\n\n tree.hardlink(from_info, to_info)\n assert not System.is_hardlink(link_path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_gdrive.py_TestRemoteGDrive_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_gdrive.py_TestRemoteGDrive_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_gdrive.py", "file_name": "test_gdrive.py", "file_type": "text/x-python", "category": "test", "start_line": 12, "end_line": 38, "span_ids": ["TestRemoteGDrive", "TestRemoteGDrive.test_init", "TestRemoteGDrive.test_drive"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRemoteGDrive:\n CONFIG = {\n \"url\": \"gdrive://root/data\",\n \"gdrive_client_id\": \"client\",\n \"gdrive_client_secret\": \"secret\",\n }\n\n def test_init(self, dvc):\n tree = GDriveTree(dvc, self.CONFIG)\n assert str(tree.path_info) == self.CONFIG[\"url\"]\n\n def test_drive(self, dvc):\n tree = GDriveTree(dvc, self.CONFIG)\n os.environ[\n GDriveTree.GDRIVE_CREDENTIALS_DATA\n ] = USER_CREDS_TOKEN_REFRESH_ERROR\n with pytest.raises(GDriveAuthError):\n assert tree._drive\n\n os.environ[GDriveTree.GDRIVE_CREDENTIALS_DATA] = \"\"\n tree = GDriveTree(dvc, self.CONFIG)\n os.environ[\n GDriveTree.GDRIVE_CREDENTIALS_DATA\n ] = USER_CREDS_MISSED_KEY_ERROR\n with pytest.raises(GDriveAuthError):\n assert tree._drive", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_slow_link_detection.py_mock_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_slow_link_detection.py_mock_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_slow_link_detection.py", "file_name": "test_slow_link_detection.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 48, "span_ids": ["timeout_immediately", "test_dont_warn_when_cache_type_is_set", "test_dont_warn_when_warning_is_disabled", "imports", "test_show_warning_once", "make_remote"], "tokens": 313}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import mock\nimport pytest\n\nimport dvc.remote.slow_link_detection\nfrom dvc.remote.slow_link_detection import slow_link_guard\n\n\n@pytest.fixture(autouse=True)\ndef timeout_immediately(monkeypatch):\n monkeypatch.setattr(dvc.remote.slow_link_detection, \"timeout_seconds\", 0.0)\n\n\n@pytest.fixture\ndef make_remote():\n def _make_remote(cache_type=None, should_warn=True):\n remote = mock.Mock()\n remote.repo.config = {\n \"cache\": {\"type\": cache_type, \"slow_link_warning\": should_warn}\n }\n return remote\n\n return _make_remote\n\n\ndef test_show_warning_once(caplog, make_remote):\n remote = make_remote()\n slow_link_guard(lambda x: None)(remote)\n slow_link_guard(lambda x: None)(remote)\n\n slow_link_detection = dvc.remote.slow_link_detection\n message = slow_link_detection.message # noqa, pylint: disable=no-member\n assert len(caplog.records) == 1\n assert caplog.records[0].message == message\n\n\ndef test_dont_warn_when_cache_type_is_set(caplog, make_remote):\n remote = make_remote(cache_type=\"copy\")\n slow_link_guard(lambda x: None)(remote)\n\n assert len(caplog.records) == 0\n\n\ndef test_dont_warn_when_warning_is_disabled(caplog, make_remote):\n remote = make_remote(should_warn=False)\n slow_link_guard(lambda x: None)(remote)\n\n assert len(caplog.records) == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_analytics.py_test_runtime_info_test_send.assert_not_report_file_ex": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_analytics.py_test_runtime_info_test_send.assert_not_report_file_ex", "embedding": null, "metadata": {"file_path": "tests/unit/test_analytics.py", "file_name": "test_analytics.py", "file_type": "text/x-python", "category": "test", "start_line": 45, "end_line": 74, "span_ids": ["test_runtime_info", "test_send"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_runtime_info(tmp_global_dir):\n schema = Schema(\n {\n \"dvc_version\": str,\n \"is_binary\": bool,\n \"scm_class\": Any(\"Git\", None),\n \"user_id\": str,\n \"system_info\": dict,\n },\n required=True,\n )\n\n assert schema(analytics._runtime_info())\n\n\n@mock.patch(\"requests.post\")\ndef test_send(mock_post, tmp_path):\n import requests\n\n url = \"https://analytics.dvc.org\"\n report = {\"name\": \"dummy report\"}\n report_file = tmp_path / \"report\"\n\n report_file.write_text(json.dumps(report))\n mock_post.side_effect = requests.exceptions.RequestException\n\n analytics.send(str(report_file))\n assert mock_post.called\n assert mock_post.call_args.args[0] == url\n assert not report_file.exists()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_analytics.py_test_is_enabled_test_is_enabled.assert_result_analytic": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_analytics.py_test_is_enabled_test_is_enabled.assert_result_analytic", "embedding": null, "metadata": {"file_path": "tests/unit/test_analytics.py", "file_name": "test_analytics.py", "file_type": "text/x-python", "category": "test", "start_line": 77, "end_line": 97, "span_ids": ["test_is_enabled"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"config, result\",\n [\n ({}, True),\n ({\"analytics\": \"false\"}, False),\n ({\"analytics\": \"true\"}, True),\n ({\"unknown\": \"broken\"}, True),\n ({\"analytics\": \"false\", \"unknown\": \"broken\"}, False),\n ],\n)\ndef test_is_enabled(dvc, config, result, monkeypatch, tmp_global_dir):\n import configobj\n\n conf = configobj.ConfigObj({\"core\": config})\n conf.filename = dvc.config.files[\"repo\"]\n conf.write()\n\n # reset DVC_TEST env var, which affects `is_enabled()`\n monkeypatch.delenv(\"DVC_TEST\")\n\n assert result == analytics.is_enabled()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_analytics.py_test_system_info_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_analytics.py_test_system_info_", "embedding": null, "metadata": {"file_path": "tests/unit/test_analytics.py", "file_name": "test_analytics.py", "file_type": "text/x-python", "category": "test", "start_line": 100, "end_line": 135, "span_ids": ["test_system_info", "test_find_or_create_user_id"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_system_info():\n schema = Schema({\"os\": Any(\"windows\", \"mac\", \"linux\")}, required=True)\n\n system = platform.system()\n\n if system == \"Windows\":\n schema = schema.extend(\n {\n \"windows_version_build\": int,\n \"windows_version_major\": int,\n \"windows_version_minor\": int,\n \"windows_version_service_pack\": str,\n }\n )\n\n if system == \"Darwin\":\n schema = schema.extend({\"mac_version\": str})\n\n if system == \"Linux\":\n schema = schema.extend(\n {\n \"linux_distro\": str,\n \"linux_distro_like\": str,\n \"linux_distro_version\": str,\n }\n )\n\n assert schema(analytics._system_info())\n\n\ndef test_find_or_create_user_id(tmp_global_dir):\n created = analytics._find_or_create_user_id()\n found = analytics._find_or_create_user_id()\n\n assert created == found", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_daemon.py_inspect_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_daemon.py_inspect_", "embedding": null, "metadata": {"file_path": "tests/unit/test_daemon.py", "file_name": "test_daemon.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 41, "span_ids": ["imports", "TestDaemon.test", "test_no_recursive_spawn", "TestDaemon"], "tokens": 280}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import inspect\nimport os\nfrom unittest import TestCase\n\nimport mock\n\nimport dvc.daemon as daemon\n\n\nclass TestDaemon(TestCase):\n @mock.patch(\"dvc.daemon._spawn_posix\")\n @mock.patch(\"dvc.daemon._spawn_windows\")\n def test(self, mock_windows, mock_posix):\n daemon.daemon([\"updater\"])\n\n if os.name == \"nt\":\n mock_posix.assert_not_called()\n mock_windows.assert_called()\n args = mock_windows.call_args[0]\n else:\n mock_windows.assert_not_called()\n mock_posix.assert_called()\n args = mock_posix.call_args[0]\n\n env = args[1]\n self.assertTrue(\"PYTHONPATH\" in env.keys())\n\n file_path = os.path.abspath(inspect.stack()[0][1])\n file_dir = os.path.dirname(file_path)\n test_dir = os.path.dirname(file_dir)\n dvc_dir = os.path.dirname(test_dir)\n self.assertEqual(env[\"PYTHONPATH\"], dvc_dir)\n self.assertEqual(env[daemon.DVC_DAEMON], \"1\")\n\n\ndef test_no_recursive_spawn():\n with mock.patch.dict(os.environ, {daemon.DVC_DAEMON: \"1\"}):\n with mock.patch(\"dvc.daemon._spawn\") as mock_spawn:\n daemon.daemon([\"updater\"])\n mock_spawn.assert_not_called()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dagascii.py_from_dvc_import_dagascii_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dagascii.py_from_dvc_import_dagascii_", "embedding": null, "metadata": {"file_path": "tests/unit/test_dagascii.py", "file_name": "test_dagascii.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 42, "span_ids": ["test_find_pager_returns_plain_pager_when_is_not_atty", "test_find_pager_uses_custom_pager_when_env_var_is_defined", "imports", "test_find_pager_returns_plain_pager_when_default_missing", "test_find_pager_uses_default_pager_when_found"], "tokens": 303}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc import dagascii\nfrom dvc.env import DVC_PAGER\n\n\ndef test_find_pager_uses_default_pager_when_found(mocker):\n mocker.patch(\"sys.stdout.isatty\", return_value=True)\n mocker.patch(\"os.system\", return_value=0)\n m_make_pager = mocker.patch.object(dagascii, \"make_pager\")\n\n dagascii.find_pager()\n\n m_make_pager.assert_called_once_with(dagascii.DEFAULT_PAGER_FORMATTED)\n\n\ndef test_find_pager_returns_plain_pager_when_default_missing(mocker):\n mocker.patch(\"sys.stdout.isatty\", return_value=True)\n mocker.patch(\"os.system\", return_value=1)\n\n pager = dagascii.find_pager()\n\n assert pager.__name__ == \"plainpager\"\n\n\ndef test_find_pager_uses_custom_pager_when_env_var_is_defined(\n mocker, monkeypatch\n):\n mocker.patch(\"sys.stdout.isatty\", return_value=True)\n m_make_pager = mocker.patch.object(dagascii, \"make_pager\")\n monkeypatch.setenv(DVC_PAGER, dagascii.DEFAULT_PAGER)\n\n dagascii.find_pager()\n\n m_make_pager.assert_called_once_with(dagascii.DEFAULT_PAGER)\n\n\ndef test_find_pager_returns_plain_pager_when_is_not_atty(mocker):\n mocker.patch(\"sys.stdout.isatty\", return_value=False)\n\n pager = dagascii.find_pager()\n\n assert pager.__name__ == \"plainpager\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_imports.py_subprocess_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_imports.py_subprocess_", "embedding": null, "metadata": {"file_path": "tests/unit/test_imports.py", "file_name": "test_imports.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 22, "span_ids": ["test_no_remote_imports", "imports"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import subprocess\n\n\ndef test_no_remote_imports():\n remote_modules = {\n \"boto3\",\n \"botocore\",\n \"google.cloud.storage\",\n \"azure.storage.blob\",\n \"oss2\",\n \"pydrive2\",\n \"paramiko\",\n \"pyarrow\",\n }\n\n code = \"import dvc.main, sys; print(' '.join(sys.modules))\"\n res = subprocess.run(\n [\"python\", \"-c\", code], stdout=subprocess.PIPE, check=True\n )\n modules = res.stdout.decode().split()\n assert not set(modules) & remote_modules", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_logging_dt.yield_2020_02_02_00_00_0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_logging_dt.yield_2020_02_02_00_00_0", "embedding": null, "metadata": {"file_path": "tests/unit/test_logger.py", "file_name": "test_logger.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 28, "span_ids": ["imports", "dt"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport time\nimport traceback\nfrom datetime import datetime\n\nimport colorama\nimport pytest\n\nimport dvc.logger\nfrom dvc.exceptions import DvcException\n\nlogger = logging.getLogger(\"dvc\")\nformatter = dvc.logger.ColorFormatter()\ncolors = {\n \"blue\": colorama.Fore.BLUE,\n \"green\": colorama.Fore.GREEN,\n \"red\": colorama.Fore.RED,\n \"yellow\": colorama.Fore.YELLOW,\n \"nc\": colorama.Fore.RESET,\n}\n\n\n@pytest.fixture()\ndef dt(mocker):\n mocker.patch(\n \"time.time\", return_value=time.mktime(datetime(2020, 2, 2).timetuple())\n )\n yield \"2020-02-02 00:00:00,000\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_TestColorFormatter_TestColorFormatter.test_exception_with_description_and_message.with_caplog_at_level_logg.assert_expected_format": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_TestColorFormatter_TestColorFormatter.test_exception_with_description_and_message.with_caplog_at_level_logg.assert_expected_format", "embedding": null, "metadata": {"file_path": "tests/unit/test_logger.py", "file_name": "test_logger.py", "file_type": "text/x-python", "category": "test", "start_line": 31, "end_line": 96, "span_ids": ["TestColorFormatter.test_exception_with_description_and_message", "TestColorFormatter.test_exception", "TestColorFormatter.test_exception_with_description_and_without_message", "TestColorFormatter.test_info", "TestColorFormatter.test_error", "TestColorFormatter.test_warning", "TestColorFormatter", "TestColorFormatter.test_debug"], "tokens": 464}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorFormatter:\n # pylint: disable=broad-except\n def test_debug(self, caplog, dt):\n with caplog.at_level(logging.DEBUG, logger=\"dvc\"):\n logger.debug(\"message\")\n\n expected = \"{green}{datetime}{nc} {blue}DEBUG{nc}: message\".format(\n **colors, datetime=dt\n )\n\n assert expected == formatter.format(caplog.records[0])\n\n def test_info(self, caplog):\n with caplog.at_level(logging.INFO, logger=\"dvc\"):\n logger.info(\"message\")\n\n assert \"message\" == formatter.format(caplog.records[0])\n\n def test_warning(self, caplog):\n with caplog.at_level(logging.INFO, logger=\"dvc\"):\n logger.warning(\"message\")\n\n expected = \"{yellow}WARNING{nc}: message\".format(**colors)\n\n assert expected == formatter.format(caplog.records[0])\n\n def test_error(self, caplog):\n with caplog.at_level(logging.INFO, logger=\"dvc\"):\n logger.error(\"message\")\n\n expected = \"{red}ERROR{nc}: message\".format(**colors)\n\n assert expected == formatter.format(caplog.records[0])\n\n def test_exception(self, caplog):\n with caplog.at_level(logging.INFO, logger=\"dvc\"):\n try:\n raise ValueError\n except Exception:\n logger.exception(\"message\")\n\n expected = \"{red}ERROR{nc}: message\".format(**colors)\n\n assert expected == formatter.format(caplog.records[0])\n\n def test_exception_with_description_and_without_message(self, caplog):\n with caplog.at_level(logging.INFO, logger=\"dvc\"):\n try:\n raise Exception(\"description\")\n except Exception:\n logger.exception(\"\")\n\n expected = \"{red}ERROR{nc}: description\".format(**colors)\n\n assert expected == formatter.format(caplog.records[0])\n\n def test_exception_with_description_and_message(self, caplog):\n with caplog.at_level(logging.INFO, logger=\"dvc\"):\n try:\n raise Exception(\"description\")\n except Exception:\n logger.exception(\"message\")\n\n expected = \"{red}ERROR{nc}: message - description\".format(**colors)\n\n assert expected == formatter.format(caplog.records[0])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_TestColorFormatter.test_exc_info_on_other_record_types_TestColorFormatter.test_exc_info_on_other_record_types.with_caplog_at_level_logg.assert_expected_format": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_TestColorFormatter.test_exc_info_on_other_record_types_TestColorFormatter.test_exc_info_on_other_record_types.with_caplog_at_level_logg.assert_expected_format", "embedding": null, "metadata": {"file_path": "tests/unit/test_logger.py", "file_name": "test_logger.py", "file_type": "text/x-python", "category": "test", "start_line": 122, "end_line": 143, "span_ids": ["TestColorFormatter.test_exc_info_on_other_record_types"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorFormatter:\n\n def test_exc_info_on_other_record_types(self, caplog, dt):\n with caplog.at_level(logging.DEBUG, logger=\"dvc\"):\n try:\n raise Exception(\"description\")\n except Exception:\n stack_trace = traceback.format_exc()\n logger.debug(\"\", exc_info=True)\n\n expected = (\n \"{green}{datetime}{nc} \"\n \"{blue}DEBUG{nc}: description\\n\"\n \"{red}{line}{nc}\\n\"\n \"{stack_trace}\"\n \"{red}{line}{nc}\".format(\n line=\"-\" * 60,\n stack_trace=stack_trace,\n datetime=dt,\n **colors,\n )\n )\n\n assert expected == formatter.format(caplog.records[0])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_TestColorFormatter.test_tb_only_TestColorFormatter.test_tb_only.with_caplog_at_level_logg.assert_expected_format": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_TestColorFormatter.test_tb_only_TestColorFormatter.test_tb_only.with_caplog_at_level_logg.assert_expected_format", "embedding": null, "metadata": {"file_path": "tests/unit/test_logger.py", "file_name": "test_logger.py", "file_type": "text/x-python", "category": "test", "start_line": 145, "end_line": 166, "span_ids": ["TestColorFormatter.test_tb_only"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorFormatter:\n\n def test_tb_only(self, caplog, dt):\n with caplog.at_level(logging.DEBUG, logger=\"dvc\"):\n try:\n raise Exception(\"description\")\n except Exception:\n stack_trace = traceback.format_exc()\n logger.exception(\"something\", extra={\"tb_only\": True})\n\n expected = (\n \"{green}{datetime}{nc} \"\n \"{red}ERROR{nc}: something\\n\"\n \"{red}{line}{nc}\\n\"\n \"{stack_trace}\"\n \"{red}{line}{nc}\".format(\n line=\"-\" * 60,\n stack_trace=stack_trace,\n **colors,\n datetime=dt,\n )\n )\n\n assert expected == formatter.format(caplog.records[0])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_TestColorFormatter.test_nested_exceptions_TestColorFormatter.test_nested_exceptions.with_caplog_at_level_logg.assert_dvc_exceptions_Dv": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_TestColorFormatter.test_nested_exceptions_TestColorFormatter.test_nested_exceptions.with_caplog_at_level_logg.assert_dvc_exceptions_Dv", "embedding": null, "metadata": {"file_path": "tests/unit/test_logger.py", "file_name": "test_logger.py", "file_type": "text/x-python", "category": "test", "start_line": 168, "end_line": 193, "span_ids": ["TestColorFormatter.test_nested_exceptions"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorFormatter:\n\n def test_nested_exceptions(self, caplog, dt):\n with caplog.at_level(logging.DEBUG, logger=\"dvc\"):\n try:\n raise Exception(\"first\")\n except Exception as exc:\n try:\n raise DvcException(\"second\") from exc\n except DvcException:\n stack_trace = traceback.format_exc()\n logger.exception(\"message\")\n\n expected = (\n \"{green}{datetime}{nc} \"\n \"{red}ERROR{nc}: message - second: first\\n\"\n \"{red}{line}{nc}\\n\"\n \"{stack_trace}\"\n \"{red}{line}{nc}\".format(\n line=\"-\" * 60,\n stack_trace=stack_trace,\n **colors,\n datetime=dt,\n )\n )\n assert expected == formatter.format(caplog.records[0])\n assert \"Exception: first\" in stack_trace\n assert \"dvc.exceptions.DvcException: second\" in stack_trace", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_TestColorFormatter.test_progress_awareness_TestColorFormatter.test_progress_awareness.with_Tqdm_total_100_desc.None_1.assert_captured_out_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_TestColorFormatter.test_progress_awareness_TestColorFormatter.test_progress_awareness.with_Tqdm_total_100_desc.None_1.assert_captured_out_", "embedding": null, "metadata": {"file_path": "tests/unit/test_logger.py", "file_name": "test_logger.py", "file_type": "text/x-python", "category": "test", "start_line": 195, "end_line": 223, "span_ids": ["TestColorFormatter.test_progress_awareness"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestColorFormatter:\n\n def test_progress_awareness(self, mocker, capsys, caplog):\n from dvc.progress import Tqdm\n\n mocker.patch(\"sys.stdout.isatty\", return_value=True)\n with Tqdm(total=100, desc=\"progress\") as pbar:\n pbar.update()\n\n # logging an invisible message should not break\n # the progress bar output\n with caplog.at_level(logging.INFO, logger=\"dvc\"):\n debug_record = logging.LogRecord(\n name=\"dvc\",\n level=logging.DEBUG,\n pathname=__name__,\n lineno=1,\n msg=\"debug\",\n args=(),\n exc_info=None,\n )\n\n formatter.format(debug_record)\n captured = capsys.readouterr()\n assert captured.out == \"\"\n\n # when the message is actually visible\n with caplog.at_level(logging.INFO, logger=\"dvc\"):\n logger.info(\"some info\")\n captured = capsys.readouterr()\n assert captured.out == \"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_test_handlers_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_logger.py_test_handlers_", "embedding": null, "metadata": {"file_path": "tests/unit/test_logger.py", "file_name": "test_logger.py", "file_type": "text/x-python", "category": "test", "start_line": 224, "end_line": 250, "span_ids": ["test_logging_debug_with_datetime", "test_handlers", "test_info_with_debug_loglevel_shows_no_datetime"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_handlers():\n out, deb, vrb, err = logger.handlers\n\n assert out.level == logging.INFO\n assert deb.level == logging.DEBUG\n assert vrb.level == logging.TRACE\n assert err.level == logging.WARNING\n\n\ndef test_logging_debug_with_datetime(caplog, dt):\n with caplog.at_level(logging.DEBUG, logger=\"dvc\"):\n logger.warning(\"WARNING\")\n logger.debug(\"DEBUG\")\n logger.trace(\"TRACE\")\n logger.error(\"ERROR\")\n\n for record in caplog.records:\n assert dt in formatter.format(record)\n assert record.levelname == record.message\n\n\ndef test_info_with_debug_loglevel_shows_no_datetime(caplog, dt):\n with caplog.at_level(logging.DEBUG, logger=\"dvc\"):\n logger.info(\"message\")\n\n assert \"message\" == formatter.format(caplog.records[0])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_path_info.py_copy_test_https_url_info_str.assert_u_fragment_fra": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_path_info.py_copy_test_https_url_info_str.assert_u_fragment_fra", "embedding": null, "metadata": {"file_path": "tests/unit/test_path_info.py", "file_name": "test_path_info.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 59, "span_ids": ["test_url_info_parent", "imports", "test_url_info_str", "test_url_info_eq", "test_https_url_info_str", "test_url_info_parents", "test_url_info_deepcopy"], "tokens": 471}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import copy\nimport os\nimport pathlib\n\nimport pytest\n\nfrom dvc.path_info import CloudURLInfo, HTTPURLInfo, PathInfo, URLInfo\n\nTEST_DEPTH = len(pathlib.Path(__file__).parents) + 1\n\n\n@pytest.mark.parametrize(\"cls\", [URLInfo, CloudURLInfo])\ndef test_url_info_str(cls):\n u = cls(\"ssh://user@test.com:/test1/\")\n assert u.url == \"ssh://user@test.com/test1/\"\n assert str(u) == u.url\n\n\n@pytest.mark.parametrize(\"cls\", [URLInfo, CloudURLInfo])\ndef test_url_info_eq(cls):\n u1 = cls(\"ssh://user@test.com:/test1/\")\n u2 = cls(\"ssh://user@test.com/test1\")\n assert u1 == u2\n\n\n@pytest.mark.parametrize(\"cls\", [URLInfo, CloudURLInfo])\ndef test_url_info_parent(cls):\n u1 = cls(\"ssh://user@test.com:/test1/test2\")\n p = u1.parent\n u3 = cls(\"ssh://user@test.com/test1\")\n assert u3 == p\n assert str(p) == \"ssh://user@test.com/test1\"\n\n\n@pytest.mark.parametrize(\"cls\", [URLInfo, CloudURLInfo])\ndef test_url_info_parents(cls):\n u1 = cls(\"ssh://user@test.com:/test1/test2/test3\")\n assert list(u1.parents) == [\n cls(\"ssh://user@test.com/test1/test2\"),\n cls(\"ssh://user@test.com/test1\"),\n cls(\"ssh://user@test.com/\"),\n ]\n\n\n@pytest.mark.parametrize(\"cls\", [URLInfo, CloudURLInfo, HTTPURLInfo])\ndef test_url_info_deepcopy(cls):\n u1 = cls(\"ssh://user@test.com:/test1/test2/test3\")\n u2 = copy.deepcopy(u1)\n assert u1 == u2\n\n\ndef test_https_url_info_str():\n url = \"https://user@test.com/test1;p=par?q=quer#frag\"\n u = HTTPURLInfo(url)\n assert u.url == url\n assert str(u) == u.url\n assert u.params == \"p=par\"\n assert u.query == \"q=quer\"\n assert u.fragment == \"frag\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_rwlock.py_os_test_rwlock.None_2.with_pytest_raises_LockEr.with_rwlock_path_cmd2_.pass": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_rwlock.py_os_test_rwlock.None_2.with_pytest_raises_LockEr.with_rwlock_path_cmd2_.pass", "embedding": null, "metadata": {"file_path": "tests/unit/test_rwlock.py", "file_name": "test_rwlock.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 32, "span_ids": ["imports", "test_rwlock"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nimport pytest\n\nfrom dvc.lock import LockError\nfrom dvc.path_info import PathInfo\nfrom dvc.rwlock import (\n RWLockFileCorruptedError,\n RWLockFileFormatError,\n _edit_rwlock,\n rwlock,\n)\n\n\ndef test_rwlock(tmp_path):\n path = os.fspath(tmp_path)\n foo = PathInfo(\"foo\")\n\n with rwlock(path, \"cmd1\", [foo], []):\n with pytest.raises(LockError):\n with rwlock(path, \"cmd2\", [], [foo]):\n pass\n\n with rwlock(path, \"cmd1\", [], [foo]):\n with pytest.raises(LockError):\n with rwlock(path, \"cmd2\", [foo], []):\n pass\n\n with rwlock(path, \"cmd1\", [], [foo]):\n with pytest.raises(LockError):\n with rwlock(path, \"cmd2\", [], [foo]):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_rwlock.py_test_rwlock_reentrant_test_rwlock_reentrant.with_rwlock_path_cmd_.with__edit_rwlock_path_a.assert_lock_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_rwlock.py_test_rwlock_reentrant_test_rwlock_reentrant.with_rwlock_path_cmd_.with__edit_rwlock_path_a.assert_lock_", "embedding": null, "metadata": {"file_path": "tests/unit/test_rwlock.py", "file_name": "test_rwlock.py", "file_type": "text/x-python", "category": "test", "start_line": 35, "end_line": 55, "span_ids": ["test_rwlock_reentrant"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rwlock_reentrant(tmp_path):\n path = os.fspath(tmp_path)\n foo = PathInfo(\"foo\")\n\n with rwlock(path, \"cmd1\", [], [foo]):\n with rwlock(path, \"cmd1\", [], [foo]):\n pass\n with _edit_rwlock(path) as lock:\n assert lock == {\n \"read\": {},\n \"write\": {\"foo\": {\"cmd\": \"cmd1\", \"pid\": os.getpid()}},\n }\n\n with rwlock(path, \"cmd\", [foo], []):\n with rwlock(path, \"cmd\", [foo], []):\n pass\n with _edit_rwlock(path) as lock:\n assert lock == {\n \"read\": {\"foo\": [{\"cmd\": \"cmd\", \"pid\": os.getpid()}]},\n \"write\": {},\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_rwlock.py_test_rwlock_subdirs_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_rwlock.py_test_rwlock_subdirs_", "embedding": null, "metadata": {"file_path": "tests/unit/test_rwlock.py", "file_name": "test_rwlock.py", "file_type": "text/x-python", "category": "test", "start_line": 58, "end_line": 96, "span_ids": ["test_rwlock_subdirs", "test_broken_rwlock"], "tokens": 320}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rwlock_subdirs(tmp_path):\n path = os.fspath(tmp_path)\n foo = PathInfo(\"foo\")\n subfoo = PathInfo(\"foo/subfoo\")\n\n with rwlock(path, \"cmd1\", [foo], []):\n with pytest.raises(LockError, match=r\"subfoo(.|\\n)*cmd1\"):\n with rwlock(path, \"cmd2\", [], [subfoo]):\n pass\n\n with rwlock(path, \"cmd1\", [], [subfoo]):\n with pytest.raises(LockError, match=r\"'foo'(.|\\n)*cmd1\"):\n with rwlock(path, \"cmd2\", [foo], []):\n pass\n\n with rwlock(path, \"cmd1\", [], [subfoo]):\n with pytest.raises(LockError):\n with rwlock(path, \"cmd2\", [], [foo]):\n pass\n\n with rwlock(path, \"cmd1\", [subfoo], []):\n with rwlock(path, \"cmd2\", [foo], []):\n pass\n\n\ndef test_broken_rwlock(tmp_path):\n dir_path = os.fspath(tmp_path)\n path = tmp_path / \"rwlock\"\n\n path.write_text('{\"broken\": \"format\"}', encoding=\"utf-8\")\n with pytest.raises(RWLockFileFormatError):\n with _edit_rwlock(dir_path):\n pass\n\n path.write_text(\"{broken json\", encoding=\"utf-8\")\n with pytest.raises(RWLockFileCorruptedError):\n with _edit_rwlock(dir_path):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_state.py_pytest_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_state.py_pytest_", "embedding": null, "metadata": {"file_path": "tests/unit/test_state.py", "file_name": "test_state.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 24, "span_ids": ["imports", "test_build_uri"], "tokens": 272}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.state import _build_sqlite_uri\n\n\n@pytest.mark.parametrize(\n \"path, osname, result\",\n [\n (\"/abs/path\", \"posix\", \"file:///abs/path\"),\n (\"C:\\\\abs\\\\path\", \"nt\", \"file:///C:/abs/path\"),\n (\"/abs/p?ath\", \"posix\", \"file:///abs/p%3fath\"),\n (\"C:\\\\abs\\\\p?ath\", \"nt\", \"file:///C:/abs/p%3fath\"),\n (\"/abs/p#ath\", \"posix\", \"file:///abs/p%23ath\"),\n (\"C:\\\\abs\\\\p#ath\", \"nt\", \"file:///C:/abs/p%23ath\"),\n (\"/abs/path space\", \"posix\", \"file:///abs/path space\"),\n (\"C:\\\\abs\\\\path space\", \"nt\", \"file:///C:/abs/path space\"),\n (\"/abs/path%20encoded\", \"posix\", \"file:///abs/path%2520encoded\"),\n (\"C:\\\\abs\\\\path%20encoded\", \"nt\", \"file:///C:/abs/path%2520encoded\"),\n ],\n)\ndef test_build_uri(path, osname, result, mocker):\n mocker.patch(\"os.name\", osname)\n assert _build_sqlite_uri(path, {}) == result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_updater.py_json_test_fetch.assert_info_version_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_updater.py_json_test_fetch.assert_info_version_", "embedding": null, "metadata": {"file_path": "tests/unit/test_updater.py", "file_name": "test_updater.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 44, "span_ids": ["imports", "updater", "mock_tty", "test_fetch", "mock_env"], "tokens": 231}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import json\nimport logging\nimport os\nimport time\n\nimport mock\nimport pytest\n\nfrom dvc import __version__\nfrom dvc.updater import Updater\n\n\n@pytest.fixture(autouse=True)\ndef mock_env(monkeypatch):\n monkeypatch.delenv(\"CI\", None)\n monkeypatch.setenv(\"DVC_TEST\", \"False\")\n\n\n@pytest.fixture\ndef updater(tmp_path):\n return Updater(tmp_path)\n\n\n@pytest.fixture\ndef mock_tty(mocker):\n return mocker.patch(\"sys.stdout.isatty\", return_value=True)\n\n\n@mock.patch(\"requests.get\")\ndef test_fetch(mock_get, updater):\n mock_get.return_value.status_code = 200\n mock_get.return_value.json.return_value = {\"version\": __version__}\n\n assert not os.path.exists(updater.updater_file)\n\n updater.fetch(detach=False)\n\n mock_get.assert_called_once_with(Updater.URL, timeout=Updater.TIMEOUT_GET)\n assert os.path.isfile(updater.updater_file)\n\n with open(updater.updater_file) as fobj:\n info = json.load(fobj)\n\n assert info[\"version\"] == __version__", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_version.py_subprocess_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_version.py_subprocess_", "embedding": null, "metadata": {"file_path": "tests/unit/test_version.py", "file_name": "test_version.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 22, "span_ids": ["imports", "test_is_release"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import subprocess\n\nimport mock\n\nimport dvc.version\n\n\ndef test_is_release():\n with mock.patch.object(dvc.version.subprocess, \"check_output\") as m:\n m.side_effect = subprocess.CalledProcessError(1, \"cmd\")\n ret = dvc.version._is_release(None, dvc.version._BASE_VERSION)\n assert ret is False\n\n m.side_effect = None\n m.return_value = dvc.version._BASE_VERSION.encode(\"ascii\")\n ret = dvc.version._is_release(None, dvc.version._BASE_VERSION)\n assert ret\n\n m.return_value = b\"630d1741c2d5dd89a3176bd15b63121b905d35c9\"\n ret = dvc.version._is_release(None, dvc.version._BASE_VERSION)\n assert ret is False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_filecmp_from_tests_basic_env_impo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_filecmp_from_tests_basic_env_impo", "embedding": null, "metadata": {"file_path": "tests/unit/utils/test_fs.py", "file_name": "test_fs.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 26, "span_ids": ["imports"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import filecmp\nimport os\nfrom unittest import TestCase\n\nimport pytest\nfrom mock import patch\n\nimport dvc\nfrom dvc.path_info import PathInfo\nfrom dvc.system import System\nfrom dvc.tree.local import LocalTree\nfrom dvc.utils import relpath\nfrom dvc.utils.fs import (\n BasePathNotInCheckedPathException,\n contains_symlink_up_to,\n copy_fobj_to_file,\n copyfile,\n get_inode,\n get_mtime_and_size,\n makedirs,\n move,\n path_isin,\n remove,\n walk_files,\n)\nfrom tests.basic_env import TestDir", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_TestMtimeAndSize_TestMtimeAndSize.test.self_assertEqual_dir_size": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_TestMtimeAndSize_TestMtimeAndSize.test.self_assertEqual_dir_size", "embedding": null, "metadata": {"file_path": "tests/unit/utils/test_fs.py", "file_name": "test_fs.py", "file_type": "text/x-python", "category": "test", "start_line": 29, "end_line": 45, "span_ids": ["TestMtimeAndSize.test", "TestMtimeAndSize"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestMtimeAndSize(TestDir):\n def test(self):\n tree = LocalTree(None, {\"url\": self.root_dir}, use_dvcignore=True)\n file_time, file_size = get_mtime_and_size(self.DATA, tree)\n dir_time, dir_size = get_mtime_and_size(self.DATA_DIR, tree)\n\n actual_file_size = os.path.getsize(self.DATA)\n actual_dir_size = os.path.getsize(self.DATA) + os.path.getsize(\n self.DATA_SUB\n )\n\n self.assertIs(type(file_time), str)\n self.assertIs(type(file_size), str)\n self.assertEqual(file_size, str(actual_file_size))\n self.assertIs(type(dir_time), str)\n self.assertIs(type(dir_size), str)\n self.assertEqual(dir_size, str(actual_dir_size))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_TestContainsLink.test_should_return_false_when_base_path_is_symlink_TestContainsLink.test_path_object_and_str_are_valid_arg_types.self_assertFalse_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_TestContainsLink.test_should_return_false_when_base_path_is_symlink_TestContainsLink.test_path_object_and_str_are_valid_arg_types.self_assertFalse_", "embedding": null, "metadata": {"file_path": "tests/unit/utils/test_fs.py", "file_name": "test_fs.py", "file_type": "text/x-python", "category": "test", "start_line": 72, "end_line": 93, "span_ids": ["TestContainsLink.test_should_return_false_when_base_path_is_symlink", "TestContainsLink.test_path_object_and_str_are_valid_arg_types"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestContainsLink(TestCase):\n\n @patch.object(System, \"is_symlink\", return_value=True)\n def test_should_return_false_when_base_path_is_symlink(self, _):\n base_path = \"foo\"\n target_path = os.path.join(base_path, \"bar\")\n\n def base_path_is_symlink(path):\n if path == base_path:\n return True\n return False\n\n with patch.object(\n System, \"is_symlink\", side_effect=base_path_is_symlink\n ):\n self.assertFalse(contains_symlink_up_to(target_path, base_path))\n\n def test_path_object_and_str_are_valid_arg_types(self):\n base_path = \"foo\"\n target_path = os.path.join(base_path, \"bar\")\n self.assertFalse(contains_symlink_up_to(target_path, base_path))\n self.assertFalse(\n contains_symlink_up_to(PathInfo(target_path), PathInfo(base_path))\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_test_should_call_recursive_on_no_condition_matched_test_should_call_recursive_on_no_condition_matched.assert_contains_symlink_s": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_test_should_call_recursive_on_no_condition_matched_test_should_call_recursive_on_no_condition_matched.assert_contains_symlink_s", "embedding": null, "metadata": {"file_path": "tests/unit/utils/test_fs.py", "file_name": "test_fs.py", "file_type": "text/x-python", "category": "test", "start_line": 96, "end_line": 105, "span_ids": ["test_should_call_recursive_on_no_condition_matched"], "tokens": 105}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_should_call_recursive_on_no_condition_matched(mocker):\n mocker.patch.object(System, \"is_symlink\", return_value=False)\n\n contains_symlink_spy = mocker.spy(dvc.utils.fs, \"contains_symlink_up_to\")\n\n # call from full path to match contains_symlink_spy patch path\n assert not dvc.utils.fs.contains_symlink_up_to(\n os.path.join(\"foo\", \"path\"), \"foo\"\n )\n assert contains_symlink_spy.mock.call_count == 2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_test_relpath_windows_different_drives_test_get_inode.assert_get_inode_foo_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_test_relpath_windows_different_drives_test_get_inode.assert_get_inode_foo_", "embedding": null, "metadata": {"file_path": "tests/unit/utils/test_fs.py", "file_name": "test_fs.py", "file_type": "text/x-python", "category": "test", "start_line": 108, "end_line": 123, "span_ids": ["test_relpath_windows_different_drives", "test_get_inode"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(os.name != \"nt\", reason=\"Windows specific\")\ndef test_relpath_windows_different_drives():\n path1 = os.path.join(\"A:\", os.sep, \"some\", \"path\")\n path2 = os.path.join(\"B:\", os.sep, \"other\", \"path\")\n assert relpath(path1, path2) == path1\n\n info1, info2 = PathInfo(path1), PathInfo(path2)\n rel_info = relpath(info1, info2)\n assert isinstance(rel_info, str)\n assert rel_info == path1\n\n\ndef test_get_inode(tmp_dir):\n tmp_dir.gen(\"foo\", \"foo content\")\n\n assert get_inode(\"foo\") == get_inode(PathInfo(\"foo\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_test_path_object_and_str_are_valid_types_get_mtime_and_size_test_path_object_and_str_are_valid_types_get_mtime_and_size.None_7": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_test_path_object_and_str_are_valid_types_get_mtime_and_size_test_path_object_and_str_are_valid_types_get_mtime_and_size.None_7", "embedding": null, "metadata": {"file_path": "tests/unit/utils/test_fs.py", "file_name": "test_fs.py", "file_type": "text/x-python", "category": "test", "start_line": 128, "end_line": 142, "span_ids": ["test_path_object_and_str_are_valid_types_get_mtime_and_size"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_path_object_and_str_are_valid_types_get_mtime_and_size(tmp_dir):\n tmp_dir.gen(\n {\"dir\": {\"dir_file\": \"dir file content\"}, \"file\": \"file_content\"}\n )\n tree = LocalTree(None, {\"url\": os.fspath(tmp_dir)}, use_dvcignore=True)\n\n time, size = get_mtime_and_size(\"dir\", tree)\n object_time, object_size = get_mtime_and_size(PathInfo(\"dir\"), tree)\n assert time == object_time\n assert size == object_size\n\n time, size = get_mtime_and_size(\"file\", tree)\n object_time, object_size = get_mtime_and_size(PathInfo(\"file\"), tree)\n assert time == object_time\n assert size == object_size", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_test_move_test_move.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_test_move_test_move.None_5", "embedding": null, "metadata": {"file_path": "tests/unit/utils/test_fs.py", "file_name": "test_fs.py", "file_type": "text/x-python", "category": "test", "start_line": 146, "end_line": 163, "span_ids": ["test_move"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_move(tmp_dir):\n tmp_dir.gen({\"foo\": \"foo content\", \"bar\": \"bar content\"})\n src = \"foo\"\n src_info = PathInfo(\"bar\")\n dest = os.path.join(\"some\", \"directory\")\n dest_info = PathInfo(os.path.join(\"some\", \"path-like\", \"directory\"))\n\n os.makedirs(dest)\n assert len(os.listdir(dest)) == 0\n move(src, dest)\n assert not os.path.isfile(src)\n assert len(os.listdir(dest)) == 1\n\n os.makedirs(dest_info)\n assert len(os.listdir(dest_info)) == 0\n move(src_info, dest_info)\n assert not os.path.isfile(src_info)\n assert len(os.listdir(dest_info)) == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_test_remove_test_makedirs.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_test_remove_test_makedirs.None_1", "embedding": null, "metadata": {"file_path": "tests/unit/utils/test_fs.py", "file_name": "test_fs.py", "file_type": "text/x-python", "category": "test", "start_line": 166, "end_line": 228, "span_ids": ["test_path_isin_accepts_pathinfo", "test_path_isin_positive", "test_path_isin_on_common_substring_path", "test_makedirs", "test_path_isin_on_same_path", "test_path_isin_with_absolute_path", "test_remove"], "tokens": 456}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_remove(tmp_dir):\n tmp_dir.gen({\"foo\": \"foo content\", \"bar\": \"bar content\"})\n path = \"foo\"\n path_info = PathInfo(\"bar\")\n\n remove(path)\n assert not os.path.isfile(path)\n\n remove(path_info)\n assert not os.path.isfile(path_info)\n\n\ndef test_path_isin_positive():\n child = os.path.join(\"path\", \"to\", \"folder\")\n\n assert path_isin(child, os.path.join(\"path\", \"to\", \"\"))\n assert path_isin(child, os.path.join(\"path\", \"to\"))\n assert path_isin(child, os.path.join(\"path\", \"\"))\n assert path_isin(child, os.path.join(\"path\"))\n\n\ndef test_path_isin_on_same_path():\n path = os.path.join(\"path\", \"to\", \"folder\")\n path_with_sep = os.path.join(path, \"\")\n\n assert not path_isin(path, path)\n assert not path_isin(path, path_with_sep)\n assert not path_isin(path_with_sep, path)\n assert not path_isin(path_with_sep, path_with_sep)\n\n\ndef test_path_isin_on_common_substring_path():\n path1 = os.path.join(\"path\", \"to\", \"folder1\")\n path2 = os.path.join(\"path\", \"to\", \"folder\")\n\n assert not path_isin(path1, path2)\n\n\ndef test_path_isin_accepts_pathinfo():\n child = os.path.join(\"path\", \"to\", \"folder\")\n parent = PathInfo(child) / \"..\"\n\n assert path_isin(child, parent)\n # pylint: disable=arguments-out-of-order\n assert not path_isin(parent, child)\n\n\ndef test_path_isin_with_absolute_path():\n parent = os.path.abspath(\"path\")\n child = os.path.join(parent, \"to\", \"folder\")\n\n assert path_isin(child, parent)\n\n\ndef test_makedirs(tmp_dir):\n path = os.path.join(tmp_dir, \"directory\")\n path_info = PathInfo(os.path.join(tmp_dir, \"another\", \"directory\"))\n\n makedirs(path)\n assert os.path.isdir(path)\n\n makedirs(path_info)\n assert os.path.isdir(path_info)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_test_copyfile_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_fs.py_test_copyfile_", "embedding": null, "metadata": {"file_path": "tests/unit/utils/test_fs.py", "file_name": "test_fs.py", "file_type": "text/x-python", "category": "test", "start_line": 230, "end_line": 276, "span_ids": ["test_copyfile", "test_copy_fobj_to_file", "test_walk_files"], "tokens": 301}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"path\", [\"file\", \"dir\"])\ndef test_copyfile(path, tmp_dir):\n tmp_dir.gen(\n {\n \"foo\": \"foo content\",\n \"bar\": \"bar content\",\n \"file\": \"file content\",\n \"dir\": {},\n }\n )\n src = \"foo\"\n dest = path\n src_info = PathInfo(\"bar\")\n dest_info = PathInfo(path)\n\n copyfile(src, dest)\n if os.path.isdir(dest):\n assert filecmp.cmp(\n src, os.path.join(dest, os.path.basename(src)), shallow=False\n )\n else:\n assert filecmp.cmp(src, dest, shallow=False)\n\n copyfile(src_info, dest_info)\n if os.path.isdir(dest_info):\n assert filecmp.cmp(\n src_info,\n os.path.join(dest_info, os.path.basename(src_info)),\n shallow=False,\n )\n else:\n assert filecmp.cmp(src_info, dest_info, shallow=False)\n\n\ndef test_copy_fobj_to_file(tmp_dir):\n tmp_dir.gen({\"foo\": \"foo content\"})\n src = tmp_dir / \"foo\"\n dest = \"path\"\n\n with open(src, \"rb\") as fobj:\n copy_fobj_to_file(fobj, dest)\n assert filecmp.cmp(src, dest)\n\n\ndef test_walk_files(tmp_dir):\n assert list(walk_files(\".\")) == list(walk_files(tmp_dir))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_utils.py_test_to_chunks_should_raise_test_to_chunks_num_chunks.assert_result_expected": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_utils.py_test_to_chunks_should_raise_test_to_chunks_num_chunks.assert_result_expected", "embedding": null, "metadata": {"file_path": "tests/unit/utils/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 24, "end_line": 38, "span_ids": ["test_to_chunks_num_chunks", "test_to_chunks_should_raise"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"num_chunks, chunk_size\", [(1, 2), (None, None)])\ndef test_to_chunks_should_raise(num_chunks, chunk_size):\n list_to_chunk = [1, 2, 3]\n with pytest.raises(ValueError):\n to_chunks(list_to_chunk, num_chunks, chunk_size)\n\n\n@pytest.mark.parametrize(\n \"num_chunks, expected_chunks\",\n [(4, [[1], [2], [3], [4]]), (3, [[1, 2], [3, 4]]), (2, [[1, 2], [3, 4]])],\n)\ndef test_to_chunks_num_chunks(num_chunks, expected_chunks):\n list_to_chunk = [1, 2, 3, 4]\n result = to_chunks(list_to_chunk, num_chunks=num_chunks)\n assert result == expected_chunks", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_utils.py_test_fix_env_pyenv_test_fix_env_pyenv.assert_fix_env_env_PATH": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_utils.py_test_fix_env_pyenv_test_fix_env_pyenv.assert_fix_env_env_PATH", "embedding": null, "metadata": {"file_path": "tests/unit/utils/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 41, "end_line": 78, "span_ids": ["test_fix_env_pyenv"], "tokens": 293}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(os.name == \"nt\", reason=\"pyenv-win is not supported\")\n@pytest.mark.parametrize(\n \"path, orig\",\n [\n (\n (\n \"/pyenv/bin:/pyenv/libexec:/pyenv/plugins/plugin:\"\n \"/orig/path1:/orig/path2\"\n ),\n \"/orig/path1:/orig/path2\",\n ),\n (\n \"/pyenv/bin:/pyenv/libexec:/orig/path1:/orig/path2\",\n \"/orig/path1:/orig/path2\",\n ),\n (\n (\n \"/pyenv/bin:/some/libexec:/pyenv/plugins/plugin:\"\n \"/orig/path1:/orig/path2\"\n ),\n \"/orig/path1:/orig/path2\",\n ),\n (\"/orig/path1:/orig/path2\", \"/orig/path1:/orig/path2\"),\n (\n \"/orig/path1:/orig/path2:/pyenv/bin:/pyenv/libexec\",\n \"/orig/path1:/orig/path2:/pyenv/bin:/pyenv/libexec\",\n ),\n ],\n)\ndef test_fix_env_pyenv(path, orig):\n env = {\n \"PATH\": path,\n \"PYENV_ROOT\": \"/pyenv\",\n \"PYENV_VERSION\": \"3.7.2\",\n \"PYENV_DIR\": \"/some/dir\",\n \"PYENV_HOOK_PATH\": \"/some/hook/path\",\n }\n assert fix_env(env)[\"PATH\"] == orig", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_utils.py_test_file_md5_test_relpath.assert_relpath_path_r": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_utils.py_test_file_md5_test_relpath.assert_relpath_path_r", "embedding": null, "metadata": {"file_path": "tests/unit/utils/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 81, "end_line": 106, "span_ids": ["test_file_md5", "test_relpath", "test_tmp_fname"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_file_md5(tmp_dir):\n tmp_dir.gen(\"foo\", \"foo content\")\n\n assert file_md5(\"foo\") == file_md5(PathInfo(\"foo\"))\n\n\ndef test_tmp_fname():\n file_path = os.path.join(\"path\", \"to\", \"file\")\n file_path_info = PathInfo(file_path)\n\n def pattern(path):\n return r\"^\" + re.escape(path) + r\"\\.[a-z0-9]{22}\\.tmp$\"\n\n assert re.search(pattern(file_path), tmp_fname(file_path), re.IGNORECASE)\n assert re.search(\n pattern(file_path_info.fspath),\n tmp_fname(file_path_info),\n re.IGNORECASE,\n )\n\n\ndef test_relpath():\n path = \"path\"\n path_info = PathInfo(path)\n\n assert relpath(path) == relpath(path_info)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_pull_git_imports_test_pull_git_imports.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_pull_git_imports_test_pull_git_imports.None_5", "embedding": null, "metadata": {"file_path": "tests/func/test_data_cloud.py", "file_name": "test_data_cloud.py", "file_type": "text/x-python", "category": "test", "start_line": 262, "end_line": 287, "span_ids": ["test_pull_git_imports"], "tokens": 266}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@flaky(max_runs=3, min_passes=1)\n@pytest.mark.parametrize(\n \"erepo\", [pytest.lazy_fixture(\"git_dir\"), pytest.lazy_fixture(\"erepo_dir\")]\n)\ndef test_pull_git_imports(tmp_dir, dvc, scm, erepo):\n with erepo.chdir():\n erepo.scm_gen({\"dir\": {\"bar\": \"bar\"}}, commit=\"second\")\n erepo.scm_gen(\"foo\", \"foo\", commit=\"first\")\n\n dvc.imp(os.fspath(erepo), \"foo\")\n dvc.imp(os.fspath(erepo), \"dir\", out=\"new_dir\", rev=\"HEAD~\")\n\n assert dvc.pull()[\"fetched\"] == 0\n\n for item in [\"foo\", \"new_dir\", dvc.cache.local.cache_dir]:\n remove(item)\n os.makedirs(dvc.cache.local.cache_dir, exist_ok=True)\n clean_repos()\n\n assert dvc.pull(force=True)[\"fetched\"] == 2\n\n assert (tmp_dir / \"foo\").exists()\n assert (tmp_dir / \"foo\").read_text() == \"foo\"\n\n assert (tmp_dir / \"new_dir\").exists()\n assert (tmp_dir / \"new_dir\" / \"bar\").read_text() == \"bar\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_URLInfo._fill_parts_URLInfo._fill_parts.if_isinstance_path__URLP.else_.self._spath.path": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_URLInfo._fill_parts_URLInfo._fill_parts.if_isinstance_path__URLP.else_.self._spath.path", "embedding": null, "metadata": {"file_path": "dvc/path_info.py", "file_name": "path_info.py", "file_type": "text/x-python", "category": "implementation", "start_line": 133, "end_line": 146, "span_ids": ["URLInfo._fill_parts"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class URLInfo(_BasePath):\n\n def _fill_parts(self, scheme, host, user, port, path):\n assert scheme != \"remote\"\n assert isinstance(path, (str, bytes, _URLPathInfo))\n\n self.scheme, self.host, self.user = scheme, host, user\n self.port = int(port) if port else self.DEFAULT_PORTS.get(self.scheme)\n\n if isinstance(path, _URLPathInfo):\n self._spath = str(path)\n self._path = path\n else:\n if path and path[0] != \"/\":\n path = \"/\" + path\n self._spath = path", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/progress.py_Tqdm.wrap_fn_Tqdm.close.super_close_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/progress.py_Tqdm.wrap_fn_Tqdm.close.super_close_", "embedding": null, "metadata": {"file_path": "dvc/progress.py", "file_name": "progress.py", "file_type": "text/x-python", "category": "implementation", "start_line": 117, "end_line": 138, "span_ids": ["Tqdm.wrap_fn", "Tqdm.close"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Tqdm(tqdm):\n\n def wrap_fn(self, fn, callback=None):\n \"\"\"\n Returns a wrapped `fn` which calls `callback()` on each call.\n `callback` is `self.update` by default.\n \"\"\"\n if callback is None:\n callback = self.update\n\n def wrapped(*args, **kwargs):\n res = fn(*args, **kwargs)\n callback()\n return res\n\n return wrapped\n\n def close(self):\n self.postfix[\"info\"] = \"\"\n # remove ETA (either unknown or zero); remove completed bar\n self.bar_format = self.bar_format.replace(\"<{remaining}\", \"\").replace(\n \"|{bar:10}|\", \" \"\n )\n super().close()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/progress.py_Tqdm.format_dict_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/progress.py_Tqdm.format_dict_", "embedding": null, "metadata": {"file_path": "dvc/progress.py", "file_name": "progress.py", "file_type": "text/x-python", "category": "implementation", "start_line": 140, "end_line": 157, "span_ids": ["Tqdm.format_dict"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Tqdm(tqdm):\n\n @property\n def format_dict(self):\n \"\"\"inject `ncols_desc` to fill the display width (`ncols`)\"\"\"\n d = super().format_dict\n ncols = d[\"ncols\"] or 80\n # assumes `bar_format` has max one of (\"ncols_desc\" & \"ncols_info\")\n ncols_left = (\n ncols - len(self.format_meter(ncols_desc=1, ncols_info=1, **d)) + 1\n )\n ncols_left = max(ncols_left, 0)\n if ncols_left:\n d[\"ncols_desc\"] = d[\"ncols_info\"] = ncols_left\n else:\n # work-around for zero-width description\n d[\"ncols_desc\"] = d[\"ncols_info\"] = 1\n d[\"prefix\"] = \"\"\n return d", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_local.py_test_protect_ignore_errors_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_local.py_test_protect_ignore_errors_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_local.py", "file_name": "test_local.py", "file_type": "text/x-python", "category": "test", "start_line": 68, "end_line": 93, "span_ids": ["test_protect_ignore_erofs", "test_protect_ignore_errors"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"err\", [errno.EPERM, errno.EACCES])\ndef test_protect_ignore_errors(tmp_dir, mocker, err):\n tmp_dir.gen(\"foo\", \"foo\")\n foo = PathInfo(\"foo\")\n tree = LocalTree(None, {})\n\n tree.protect(foo)\n\n mock_chmod = mocker.patch(\n \"os.chmod\", side_effect=OSError(err, \"something\")\n )\n tree.protect(foo)\n assert mock_chmod.called\n\n\ndef test_protect_ignore_erofs(tmp_dir, mocker):\n tmp_dir.gen(\"foo\", \"foo\")\n foo = PathInfo(\"foo\")\n tree = LocalTree(None, {})\n\n mock_chmod = mocker.patch(\n \"os.chmod\", side_effect=OSError(errno.EROFS, \"read-only fs\")\n )\n tree.protect(foo)\n assert mock_chmod.called", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote.py_test_makedirs_not_create_for_top_level_path_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote.py_test_makedirs_not_create_for_top_level_path_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 34, "end_line": 44, "span_ids": ["test_makedirs_not_create_for_top_level_path"], "tokens": 108}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"tree_cls\", [GSTree, S3Tree])\ndef test_makedirs_not_create_for_top_level_path(tree_cls, dvc, mocker):\n url = f\"{tree_cls.scheme}://bucket/\"\n tree = tree_cls(dvc, {\"url\": url})\n mocked_client = mocker.PropertyMock()\n # we use remote clients with same name as scheme to interact with remote\n mocker.patch.object(tree_cls, tree.scheme, mocked_client)\n\n tree.makedirs(tree.path_info)\n assert not mocked_client.called", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/__init__.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/__init__.py__", "embedding": null, "metadata": {"file_path": "dvc/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 10, "span_ids": ["docstring"], "tokens": 42}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nDVC\n----\nMake your data science projects reproducible and shareable.\n\"\"\"\nimport dvc.logger\nfrom dvc.version import __version__ # noqa: F401\n\ndvc.logger.setup()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/analytics.py_is_enabled_send.os_remove_path_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/analytics.py_is_enabled_send.os_remove_path_", "embedding": null, "metadata": {"file_path": "dvc/analytics.py", "file_name": "analytics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 52, "end_line": 85, "span_ids": ["send", "is_enabled"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def is_enabled():\n if env2bool(\"DVC_TEST\"):\n return False\n\n enabled = to_bool(\n Config(validate=False).get(\"core\", {}).get(\"analytics\", \"true\")\n )\n logger.debug(\"Analytics is {}abled.\".format(\"en\" if enabled else \"dis\"))\n\n return enabled\n\n\ndef send(path):\n \"\"\"\n Side effect: Removes the report after sending it.\n\n The report is generated and stored in a temporary file, see:\n `collect_and_send_report`. Sending happens on another process,\n thus, the need of removing such file afterwards.\n \"\"\"\n url = \"https://analytics.dvc.org\"\n headers = {\"content-type\": \"application/json\"}\n\n with open(path) as fobj:\n report = json.load(fobj)\n\n report.update(_runtime_info())\n\n try:\n requests.post(url, json=report, headers=headers, timeout=5)\n except requests.exceptions.RequestException:\n logger.debug(\"failed to send analytics report\", exc_info=True)\n\n os.remove(path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/params.py_add_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/params.py_add_parser_", "embedding": null, "metadata": {"file_path": "dvc/command/params.py", "file_name": "params.py", "file_type": "text/x-python", "category": "implementation", "start_line": 61, "end_line": 129, "span_ids": ["add_parser"], "tokens": 460}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n PARAMS_HELP = \"Commands to display params.\"\n\n params_parser = subparsers.add_parser(\n \"params\",\n parents=[parent_parser],\n description=append_doc_link(PARAMS_HELP, \"params\"),\n help=PARAMS_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n\n params_subparsers = params_parser.add_subparsers(\n dest=\"cmd\",\n help=\"Use `dvc params CMD --help` to display command-specific help.\",\n )\n\n fix_subparsers(params_subparsers)\n\n PARAMS_DIFF_HELP = (\n \"Show changes in params between commits in the DVC repository, or \"\n \"between a commit and the workspace.\"\n )\n params_diff_parser = params_subparsers.add_parser(\n \"diff\",\n parents=[parent_parser],\n description=append_doc_link(PARAMS_DIFF_HELP, \"params/diff\"),\n help=PARAMS_DIFF_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n params_diff_parser.add_argument(\n \"a_rev\", nargs=\"?\", help=\"Old Git commit to compare (defaults to HEAD)\"\n )\n params_diff_parser.add_argument(\n \"b_rev\",\n nargs=\"?\",\n help=(\"New Git commit to compare (defaults to the current workspace)\"),\n )\n params_diff_parser.add_argument(\n \"--targets\",\n nargs=\"*\",\n help=\"Limit command scope to these params files.\",\n metavar=\"\",\n ).complete = completion.FILE\n params_diff_parser.add_argument(\n \"--all\",\n action=\"store_true\",\n default=False,\n help=\"Show unchanged params as well.\",\n )\n params_diff_parser.add_argument(\n \"--show-json\",\n action=\"store_true\",\n default=False,\n help=\"Show output in JSON format.\",\n )\n params_diff_parser.add_argument(\n \"--show-md\",\n action=\"store_true\",\n default=False,\n help=\"Show tabulated output in the Markdown format (GFM).\",\n )\n params_diff_parser.add_argument(\n \"--no-path\",\n action=\"store_true\",\n default=False,\n help=\"Don't show params path.\",\n )\n params_diff_parser.set_defaults(func=CmdParamsDiff)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/params/__init__.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/params/__init__.py__", "embedding": null, "metadata": {"file_path": "dvc/repo/params/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 14, "span_ids": ["Params.diff", "Params.__init__", "Params.show", "Params"], "tokens": 78}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Params:\n def __init__(self, repo):\n self.repo = repo\n\n def show(self, *args, **kwargs):\n from .show import show\n\n return show(self.repo, *args, **kwargs)\n\n def diff(self, *args, **kwargs):\n from .diff import diff\n\n return diff(self.repo, *args, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/params/show.py_show_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/params/show.py_show_", "embedding": null, "metadata": {"file_path": "dvc/repo/params/show.py", "file_name": "show.py", "file_type": "text/x-python", "category": "implementation", "start_line": 78, "end_line": 109, "span_ids": ["show"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@locked\ndef show(repo, revs=None, targets=None):\n res = {}\n\n for branch in repo.brancher(revs=revs):\n configs = _collect_configs(repo, branch, targets)\n params = _read_params(repo, configs, branch)\n vars_params = _collect_vars(repo, params)\n\n # NOTE: only those that are not added as a ParamDependency are included\n # so we don't need to recursively merge them yet.\n params.update(vars_params)\n\n if params:\n res[branch] = params\n\n if not res:\n raise NoParamsError(\"no parameter configs files in this repository\")\n\n # Hide workspace params if they are the same as in the active branch\n try:\n active_branch = repo.scm.active_branch()\n except (TypeError, SCMError):\n # TypeError - detached head\n # SCMError - no repo case\n pass\n else:\n if res.get(\"workspace\") == res.get(active_branch):\n res.pop(\"workspace\", None)\n\n return res", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_diff.py_test_diff_new_test_diff_deleted_config.assert_dvc_params_diff_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_diff.py_test_diff_new_test_diff_deleted_config.assert_dvc_params_diff_", "embedding": null, "metadata": {"file_path": "tests/func/params/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 41, "end_line": 73, "span_ids": ["test_diff_new", "test_diff_deleted_config", "test_diff_deleted"], "tokens": 278}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_diff_new(tmp_dir, scm, dvc):\n tmp_dir.gen(\"params.yaml\", \"foo: bar\")\n dvc.run(cmd=\"echo params.yaml\", params=[\"foo\"], single_stage=True)\n\n assert dvc.params.diff() == {\n \"params.yaml\": {\"foo\": {\"old\": None, \"new\": \"bar\"}}\n }\n\n\ndef test_diff_deleted(tmp_dir, scm, dvc):\n tmp_dir.gen(\"params.yaml\", \"foo: bar\")\n dvc.run(cmd=\"echo params.yaml\", params=[\"foo\"], single_stage=True)\n scm.add([\"params.yaml\", \"Dvcfile\"])\n scm.commit(\"bar\")\n\n (tmp_dir / \"params.yaml\").unlink()\n\n assert dvc.params.diff() == {\n \"params.yaml\": {\"foo\": {\"old\": \"bar\", \"new\": None}}\n }\n\n\ndef test_diff_deleted_config(tmp_dir, scm, dvc):\n tmp_dir.gen(\"params.yaml\", \"foo: bar\")\n dvc.run(cmd=\"echo params.yaml\", params=[\"foo\"], single_stage=True)\n scm.add([\"params.yaml\", \"Dvcfile\"])\n scm.commit(\"bar\")\n\n (tmp_dir / \"params.yaml\").unlink()\n\n assert dvc.params.diff() == {\n \"params.yaml\": {\"foo\": {\"old\": \"bar\", \"new\": None}}\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_diff.py_test_diff_list_test_diff_list.assert_dvc_params_diff_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_diff.py_test_diff_list_test_diff_list.assert_dvc_params_diff_", "embedding": null, "metadata": {"file_path": "tests/func/params/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 76, "end_line": 88, "span_ids": ["test_diff_list"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_diff_list(tmp_dir, scm, dvc):\n tmp_dir.gen(\"params.yaml\", \"foo:\\n- bar\\n- baz\")\n dvc.run(cmd=\"echo params.yaml\", params=[\"foo\"], single_stage=True)\n scm.add([\"params.yaml\", \"Dvcfile\"])\n scm.commit(\"foo\")\n\n tmp_dir.gen(\"params.yaml\", \"foo:\\n- bar\\n- baz\\n- qux\")\n\n assert dvc.params.diff() == {\n \"params.yaml\": {\n \"foo\": {\"old\": \"['bar', 'baz']\", \"new\": \"['bar', 'baz', 'qux']\"}\n }\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_data_sync.py_from_dvc_cli_import_parse_test_fetch.m_assert_called_once_with": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_data_sync.py_from_dvc_cli_import_parse_test_fetch.m_assert_called_once_with", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_data_sync.py", "file_name": "test_data_sync.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 40, "span_ids": ["imports", "test_fetch"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.cli import parse_args\nfrom dvc.command.data_sync import CmdDataFetch, CmdDataPull, CmdDataPush\n\n\ndef test_fetch(mocker):\n cli_args = parse_args(\n [\n \"fetch\",\n \"target1\",\n \"target2\",\n \"--jobs\",\n \"2\",\n \"--remote\",\n \"remote\",\n \"--all-branches\",\n \"--all-tags\",\n \"--all-commits\",\n \"--with-deps\",\n \"--recursive\",\n \"--run-cache\",\n ]\n )\n assert cli_args.func == CmdDataFetch\n\n cmd = cli_args.func(cli_args)\n m = mocker.patch.object(cmd.repo, \"fetch\", autospec=True, return_value=0)\n\n assert cmd.run() == 0\n\n m.assert_called_once_with(\n targets=[\"target1\", \"target2\"],\n jobs=2,\n remote=\"remote\",\n all_branches=True,\n all_tags=True,\n all_commits=True,\n with_deps=True,\n recursive=True,\n run_cache=True,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_data_sync.py_test_pull_test_pull.m_assert_called_once_with": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_data_sync.py_test_pull_test_pull.m_assert_called_once_with", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_data_sync.py", "file_name": "test_data_sync.py", "file_type": "text/x-python", "category": "test", "start_line": 43, "end_line": 80, "span_ids": ["test_pull"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pull(mocker):\n cli_args = parse_args(\n [\n \"pull\",\n \"target1\",\n \"target2\",\n \"--jobs\",\n \"2\",\n \"--remote\",\n \"remote\",\n \"--all-branches\",\n \"--all-tags\",\n \"--all-commits\",\n \"--with-deps\",\n \"--force\",\n \"--recursive\",\n \"--run-cache\",\n ]\n )\n assert cli_args.func == CmdDataPull\n\n cmd = cli_args.func(cli_args)\n m = mocker.patch.object(cmd.repo, \"pull\", autospec=True)\n\n assert cmd.run() == 0\n\n m.assert_called_once_with(\n targets=[\"target1\", \"target2\"],\n jobs=2,\n remote=\"remote\",\n all_branches=True,\n all_tags=True,\n all_commits=True,\n with_deps=True,\n force=True,\n recursive=True,\n run_cache=True,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_data_sync.py_test_push_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_data_sync.py_test_push_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_data_sync.py", "file_name": "test_data_sync.py", "file_type": "text/x-python", "category": "test", "start_line": 83, "end_line": 121, "span_ids": ["test_push"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_push(mocker):\n cli_args = parse_args(\n [\n \"push\",\n \"target1\",\n \"target2\",\n \"--jobs\",\n \"2\",\n \"--remote\",\n \"remote\",\n \"--all-branches\",\n \"--all-tags\",\n \"--all-commits\",\n \"--with-deps\",\n \"--recursive\",\n \"--run-cache\",\n \"--glob\",\n ]\n )\n assert cli_args.func == CmdDataPush\n\n cmd = cli_args.func(cli_args)\n m = mocker.patch.object(cmd.repo, \"push\", autospec=True, return_value=0)\n\n assert cmd.run() == 0\n\n m.assert_called_once_with(\n targets=[\"target1\", \"target2\"],\n jobs=2,\n remote=\"remote\",\n all_branches=True,\n all_tags=True,\n all_commits=True,\n with_deps=True,\n recursive=True,\n run_cache=True,\n glob=True,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_show_json_diff_test_metrics_diff_deleted_metric.assert__show_diff_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_show_json_diff_test_metrics_diff_deleted_metric.assert__show_diff_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_metrics.py", "file_name": "test_metrics.py", "file_type": "text/x-python", "category": "test", "start_line": 48, "end_line": 99, "span_ids": ["test_metrics_diff_new_metric", "test_metrics_diff_no_changes", "test_metrics_show_raw_diff", "test_metrics_show_json_diff", "test_metrics_diff_no_diff", "test_metrics_diff_deleted_metric"], "tokens": 392}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_metrics_show_json_diff():\n assert _show_diff(\n {\"metrics.json\": {\"a.b.c\": {\"old\": 1, \"new\": 2, \"diff\": 3}}}\n ) == textwrap.dedent(\n \"\"\"\\\n Path Metric Old New Change\n metrics.json a.b.c 1 2 3\"\"\"\n )\n\n\ndef test_metrics_show_raw_diff():\n assert _show_diff(\n {\"metrics\": {\"\": {\"old\": \"1\", \"new\": \"2\"}}}\n ) == textwrap.dedent(\n \"\"\"\\\n Path Metric Old New Change\n metrics 1 2 \u2014\"\"\"\n )\n\n\ndef test_metrics_diff_no_diff():\n assert _show_diff(\n {\"other.json\": {\"a.b.d\": {\"old\": \"old\", \"new\": \"new\"}}}\n ) == textwrap.dedent(\n \"\"\"\\\n Path Metric Old New Change\n other.json a.b.d old new \u2014\"\"\"\n )\n\n\ndef test_metrics_diff_no_changes():\n assert _show_diff({}) == \"\"\n\n\ndef test_metrics_diff_new_metric():\n assert _show_diff(\n {\"other.json\": {\"a.b.d\": {\"old\": None, \"new\": \"new\"}}}\n ) == textwrap.dedent(\n \"\"\"\\\n Path Metric Old New Change\n other.json a.b.d \u2014 new \u2014\"\"\"\n )\n\n\ndef test_metrics_diff_deleted_metric():\n assert _show_diff(\n {\"other.json\": {\"a.b.d\": {\"old\": \"old\", \"new\": None}}}\n ) == textwrap.dedent(\n \"\"\"\\\n Path Metric Old New Change\n other.json a.b.d old \u2014 \u2014\"\"\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_params.py_logging_test_params_diff.m_assert_called_once_with": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_params.py_logging_test_params_diff.m_assert_called_once_with", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_params.py", "file_name": "test_params.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 36, "span_ids": ["imports", "test_params_diff"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport textwrap\n\nfrom dvc.cli import parse_args\nfrom dvc.command.params import CmdParamsDiff, _show_diff\n\n\ndef test_params_diff(dvc, mocker):\n cli_args = parse_args(\n [\n \"params\",\n \"diff\",\n \"HEAD~10\",\n \"HEAD~1\",\n \"--targets\",\n \"target\",\n \"--all\",\n \"--show-json\",\n \"--show-md\",\n \"--no-path\",\n ]\n )\n assert cli_args.func == CmdParamsDiff\n\n cmd = cli_args.func(cli_args)\n m = mocker.patch(\"dvc.repo.params.diff.diff\", return_value={})\n\n assert cmd.run() == 0\n\n m.assert_called_once_with(\n cmd.repo,\n a_rev=\"HEAD~10\",\n b_rev=\"HEAD~1\",\n targets=[\"target\"],\n all=True,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_params.py_test_params_diff_changed_test_params_diff_prec.assert__show_diff_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_params.py_test_params_diff_changed_test_params_diff_prec.assert__show_diff_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_params.py", "file_name": "test_params.py", "file_type": "text/x-python", "category": "test", "start_line": 33, "end_line": 94, "span_ids": ["test_params_diff_deleted", "test_params_diff_prec", "test_params_diff_no_changes", "test_params_diff_changed", "test_params_diff_unchanged", "test_params_diff_list", "test_params_diff_new"], "tokens": 461}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_params_diff_changed():\n assert _show_diff(\n {\"params.yaml\": {\"a.b.c\": {\"old\": 1, \"new\": 2}}}\n ) == textwrap.dedent(\n \"\"\"\\\n Path Param Old New\n params.yaml a.b.c 1 2\"\"\"\n )\n\n\ndef test_params_diff_list():\n assert _show_diff(\n {\"params.yaml\": {\"a.b.c\": {\"old\": 1, \"new\": [2, 3]}}}\n ) == textwrap.dedent(\n \"\"\"\\\n Path Param Old New\n params.yaml a.b.c 1 [2, 3]\"\"\"\n )\n\n\ndef test_params_diff_unchanged():\n assert _show_diff(\n {\"params.yaml\": {\"a.b.d\": {\"old\": \"old\", \"new\": \"new\"}}}\n ) == textwrap.dedent(\n \"\"\"\\\n Path Param Old New\n params.yaml a.b.d old new\"\"\"\n )\n\n\ndef test_params_diff_no_changes():\n assert _show_diff({}) == \"\"\n\n\ndef test_params_diff_new():\n assert _show_diff(\n {\"params.yaml\": {\"a.b.d\": {\"old\": None, \"new\": \"new\"}}}\n ) == textwrap.dedent(\n \"\"\"\\\n Path Param Old New\n params.yaml a.b.d \u2014 new\"\"\"\n )\n\n\ndef test_params_diff_deleted():\n assert _show_diff(\n {\"params.yaml\": {\"a.b.d\": {\"old\": \"old\", \"new\": None}}}\n ) == textwrap.dedent(\n \"\"\"\\\n Path Param Old New\n params.yaml a.b.d old \u2014\"\"\"\n )\n\n\ndef test_params_diff_prec():\n assert _show_diff(\n {\"params.yaml\": {\"train.lr\": {\"old\": 0.0042, \"new\": 0.0043}}}\n ) == textwrap.dedent(\n \"\"\"\\\n Path Param Old New\n params.yaml train.lr 0.0042 0.0043\"\"\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_params.py_test_params_diff_show_json_test_params_diff_show_json.with_caplog_at_level_logg.assert_params_yaml_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_params.py_test_params_diff_show_json_test_params_diff_show_json.with_caplog_at_level_logg.assert_params_yaml_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_params.py", "file_name": "test_params.py", "file_type": "text/x-python", "category": "test", "start_line": 75, "end_line": 85, "span_ids": ["test_params_diff_show_json"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_params_diff_show_json(dvc, mocker, caplog):\n cli_args = parse_args(\n [\"params\", \"diff\", \"HEAD~10\", \"HEAD~1\", \"--show-json\"]\n )\n cmd = cli_args.func(cli_args)\n mocker.patch(\n \"dvc.repo.params.diff.diff\", return_value={\"params.yaml\": {\"a\": \"b\"}}\n )\n with caplog.at_level(logging.INFO, logger=\"dvc\"):\n assert cmd.run() == 0\n assert '{\"params.yaml\": {\"a\": \"b\"}}\\n' in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_getpass_test_url.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_getpass_test_url.None_1", "embedding": null, "metadata": {"file_path": "tests/unit/remote/ssh/test_ssh.py", "file_name": "test_ssh.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 30, "span_ids": ["imports", "test_url"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import getpass\nimport os\nimport sys\n\nimport pytest\nfrom mock import mock_open, patch\n\nfrom dvc.system import System\nfrom dvc.tree.ssh import SSHTree\n\n\ndef test_url(dvc):\n user = \"test\"\n host = \"123.45.67.89\"\n port = 1234\n path = \"/path/to/dir\"\n\n # URL ssh://[user@]host.xz[:port]/path\n url = f\"ssh://{user}@{host}:{port}{path}\"\n config = {\"url\": url}\n\n tree = SSHTree(dvc, config)\n assert tree.path_info == url\n\n # SCP-like URL ssh://[user@]host.xz:/absolute/path\n url = f\"ssh://{user}@{host}:{path}\"\n config = {\"url\": url}\n\n tree = SSHTree(dvc, config)\n assert tree.path_info == url", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_no_path_if_sys_version_info_major.else_.builtin_module_name.___builtin___": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_no_path_if_sys_version_info_major.else_.builtin_module_name.___builtin___", "embedding": null, "metadata": {"file_path": "tests/unit/remote/ssh/test_ssh.py", "file_name": "test_ssh.py", "file_type": "text/x-python", "category": "test", "start_line": 33, "end_line": 50, "span_ids": ["test_no_path", "impl"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_no_path(dvc):\n config = {\"url\": \"ssh://127.0.0.1\"}\n tree = SSHTree(dvc, config)\n assert tree.path_info.path == \"\"\n\n\nmock_ssh_config = \"\"\"\nHost example.com\n User ubuntu\n HostName 1.2.3.4\n Port 1234\n IdentityFile ~/.ssh/not_default.key\n\"\"\"\n\nif sys.version_info.major == 3:\n builtin_module_name = \"builtins\"\nelse:\n builtin_module_name = \"__builtin__\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_gs.py_mock_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_gs.py_mock_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_gs.py", "file_name": "test_gs.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 55, "span_ids": ["test_gs_no_credspath", "test_dynamic_chunk_size", "test_init", "imports", "test_gs"], "tokens": 327}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import mock\nimport pytest\nimport requests\n\nfrom dvc.tree.gs import GSTree, dynamic_chunk_size\n\nBUCKET = \"bucket\"\nPREFIX = \"prefix\"\nURL = f\"gs://{BUCKET}/{PREFIX}\"\nCREDENTIALPATH = \"/path/to/gcp_credentials.json\"\nPROJECT = \"PROJECT\"\nCONFIG = {\n \"projectname\": PROJECT,\n \"url\": URL,\n \"credentialpath\": CREDENTIALPATH,\n}\n\n\ndef test_init(dvc):\n tree = GSTree(dvc, CONFIG)\n assert tree.path_info == URL\n assert tree.projectname == PROJECT\n assert tree.credentialpath == CREDENTIALPATH\n\n\n@mock.patch(\"google.cloud.storage.Client.from_service_account_json\")\ndef test_gs(mock_client, dvc):\n tree = GSTree(dvc, CONFIG)\n assert tree.credentialpath\n assert tree.gs\n mock_client.assert_called_once_with(CREDENTIALPATH)\n\n\n@mock.patch(\"google.cloud.storage.Client\")\ndef test_gs_no_credspath(mock_client, dvc):\n config = CONFIG.copy()\n del config[\"credentialpath\"]\n tree = GSTree(dvc, config)\n assert tree.gs\n mock_client.assert_called_with(PROJECT)\n\n\ndef test_dynamic_chunk_size():\n chunk_sizes = []\n\n @dynamic_chunk_size\n def upload(chunk_size=None):\n chunk_sizes.append(chunk_size)\n raise requests.exceptions.ConnectionError()\n\n with pytest.raises(requests.exceptions.ConnectionError):\n upload()\n\n assert chunk_sizes == [10485760, 5242880, 2621440, 1310720, 524288, 262144]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/data_cloud.py_DataCloud.status_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/data_cloud.py_DataCloud.status_", "embedding": null, "metadata": {"file_path": "dvc/data_cloud.py", "file_name": "data_cloud.py", "file_type": "text/x-python", "category": "implementation", "start_line": 94, "end_line": 127, "span_ids": ["DataCloud.get_url_for", "DataCloud.status"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DataCloud:\n\n def status(\n self,\n cache,\n jobs=None,\n remote=None,\n show_checksums=False,\n log_missing=True,\n ):\n \"\"\"Check status of data items in a cloud-agnostic way.\n\n Args:\n cache (NamedCache): named checksums to check status for.\n jobs (int): number of jobs that can be running simultaneously.\n remote (dvc.remote.base.BaseRemote): optional remote to compare\n cache to. By default remote from core.remote config option\n is used.\n show_checksums (bool): show checksums instead of file names in\n information messages.\n log_missing (bool): log warning messages if file doesn't exist\n neither in cache, neither in cloud.\n \"\"\"\n remote = self.get_remote(remote, \"status\")\n return remote.status(\n self.repo.cache.local,\n cache,\n jobs=jobs,\n show_checksums=show_checksums,\n log_missing=log_missing,\n )\n\n def get_url_for(self, remote, checksum):\n remote = self.get_remote(remote)\n return str(remote.tree.hash_to_path_info(checksum))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/index.py_logging_RemoteIndexNoop.intersection.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/index.py_logging_RemoteIndexNoop.intersection.return._", "embedding": null, "metadata": {"file_path": "dvc/remote/index.py", "file_name": "index.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 54, "span_ids": ["RemoteIndexNoop.update", "RemoteIndexNoop", "RemoteIndexNoop.__init__", "imports", "RemoteIndexNoop.clear", "RemoteIndexNoop.dump", "RemoteIndexNoop.__iter__", "RemoteIndexNoop.load", "RemoteIndexNoop.hashes", "RemoteIndexNoop.intersection", "RemoteIndexNoop.__exit__", "RemoteIndexNoop.dir_hashes", "RemoteIndexNoop.__contains__", "RemoteIndexNoop.__enter__"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nimport sqlite3\nimport threading\n\nfrom funcy import lchunks\n\nfrom dvc.state import _connect_sqlite\nfrom dvc.utils.fs import makedirs\n\nlogger = logging.getLogger(__name__)\n\n\nclass RemoteIndexNoop:\n \"\"\"No-op class for remotes which are not indexed (i.e. local).\"\"\"\n\n def __init__(self, *args, **kwargs):\n pass\n\n def __enter__(self):\n pass\n\n def __exit__(self, typ, value, tbck):\n pass\n\n def __iter__(self):\n return iter([])\n\n def __contains__(self, hash_):\n return False\n\n @staticmethod\n def hashes():\n return []\n\n @staticmethod\n def dir_hashes():\n return []\n\n def load(self):\n pass\n\n def dump(self):\n pass\n\n def clear(self):\n pass\n\n def update(self, *args):\n pass\n\n @staticmethod\n def intersection(*args):\n return []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/index.py_RemoteIndex_RemoteIndex._executemany.return.self_cursor_executemany_c": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/index.py_RemoteIndex_RemoteIndex._executemany.return.self_cursor_executemany_c", "embedding": null, "metadata": {"file_path": "dvc/remote/index.py", "file_name": "index.py", "file_type": "text/x-python", "category": "implementation", "start_line": 57, "end_line": 121, "span_ids": ["RemoteIndex.is_dir_hash", "RemoteIndex._executemany", "RemoteIndex.dir_hashes", "RemoteIndex.__exit__", "RemoteIndex.__init__", "RemoteIndex.hashes", "RemoteIndex.__iter__", "RemoteIndex.__enter__", "RemoteIndex._execute", "RemoteIndex.__contains__", "RemoteIndex"], "tokens": 469}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RemoteIndex:\n \"\"\"Class for indexing remote hashes in a sqlite3 database.\n\n Args:\n repo: repo for this remote index.\n name: name for this index. Index db will be loaded from and saved to\n ``.dvc/tmp/index/{name}.idx``.\n dir_suffix: suffix used for naming directory hashes\n \"\"\"\n\n INDEX_SUFFIX = \".idx\"\n VERSION = 1\n INDEX_TABLE = \"remote_index\"\n INDEX_TABLE_LAYOUT = \"checksum TEXT PRIMARY KEY, dir INTEGER NOT NULL\"\n INDEX_DIR = \"index\"\n\n def __init__(self, repo, name, dir_suffix=\".dir\"):\n self.path = os.path.join(\n repo.tmp_dir, self.INDEX_DIR, f\"{name}{self.INDEX_SUFFIX}\"\n )\n\n self.dir_suffix = dir_suffix\n self.database = None\n self.cursor = None\n self.modified = False\n self.lock = threading.Lock()\n\n def __iter__(self):\n cmd = f\"SELECT checksum FROM {self.INDEX_TABLE}\"\n for (hash_,) in self._execute(cmd):\n yield hash_\n\n def __enter__(self):\n self.lock.acquire()\n self.load()\n\n def __exit__(self, typ, value, tbck):\n self.dump()\n self.lock.release()\n\n def __contains__(self, hash_):\n cmd = \"SELECT checksum FROM {} WHERE checksum = (?)\".format(\n self.INDEX_TABLE\n )\n self._execute(cmd, (hash_,))\n return self.cursor.fetchone() is not None\n\n def hashes(self):\n \"\"\"Iterate over hashes stored in the index.\"\"\"\n return iter(self)\n\n def dir_hashes(self):\n \"\"\"Iterate over .dir hashes stored in the index.\"\"\"\n cmd = f\"SELECT checksum FROM {self.INDEX_TABLE} WHERE dir = 1\"\n for (hash_,) in self._execute(cmd):\n yield hash_\n\n def is_dir_hash(self, hash_):\n return hash_.endswith(self.dir_suffix)\n\n def _execute(self, cmd, parameters=()):\n return self.cursor.execute(cmd, parameters)\n\n def _executemany(self, cmd, seq_of_parameters):\n return self.cursor.executemany(cmd, seq_of_parameters)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/index.py_RemoteIndex._prepare_db_RemoteIndex._prepare_db.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/index.py_RemoteIndex._prepare_db_RemoteIndex._prepare_db.None_1", "embedding": null, "metadata": {"file_path": "dvc/remote/index.py", "file_name": "index.py", "file_type": "text/x-python", "category": "implementation", "start_line": 121, "end_line": 145, "span_ids": ["RemoteIndex._prepare_db"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RemoteIndex:\n\n def _prepare_db(self, empty=False):\n if not empty:\n cmd = \"PRAGMA user_version;\"\n self._execute(cmd)\n ret = self.cursor.fetchall()\n assert len(ret) == 1\n assert len(ret[0]) == 1\n assert isinstance(ret[0][0], int)\n version = ret[0][0]\n\n if version != self.VERSION:\n logger.error(\n \"Index file version '{}' will be reformatted \"\n \"to the current version '{}'.\".format(\n version, self.VERSION,\n )\n )\n cmd = \"DROP TABLE IF EXISTS {};\"\n self._execute(cmd.format(self.INDEX_TABLE))\n\n cmd = \"CREATE TABLE IF NOT EXISTS {} ({})\"\n self._execute(cmd.format(self.INDEX_TABLE, self.INDEX_TABLE_LAYOUT))\n\n cmd = \"PRAGMA user_version = {};\"\n self._execute(cmd.format(self.VERSION))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/index.py_RemoteIndex.load_RemoteIndex.load.while_True_.try_.except_sqlite3_DatabaseEr.if_retries_0_.else_.raise": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/index.py_RemoteIndex.load_RemoteIndex.load.while_True_.try_.except_sqlite3_DatabaseEr.if_retries_0_.else_.raise", "embedding": null, "metadata": {"file_path": "dvc/remote/index.py", "file_name": "index.py", "file_type": "text/x-python", "category": "implementation", "start_line": 149, "end_line": 173, "span_ids": ["RemoteIndex.load"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RemoteIndex:\n\n def load(self):\n \"\"\"(Re)load this index database.\"\"\"\n retries = 1\n while True:\n assert self.database is None\n assert self.cursor is None\n\n empty = not os.path.isfile(self.path)\n makedirs(os.path.dirname(self.path), exist_ok=True)\n self.database = _connect_sqlite(self.path, {\"nolock\": 1})\n self.cursor = self.database.cursor()\n\n try:\n self._prepare_db(empty=empty)\n return\n except sqlite3.DatabaseError:\n self.cursor.close()\n self.database.close()\n self.database = None\n self.cursor = None\n if retries > 0:\n os.unlink(self.path)\n retries -= 1\n else:\n raise", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/index.py_RemoteIndex.dump_RemoteIndex.update.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/index.py_RemoteIndex.dump_RemoteIndex.update.None_1", "embedding": null, "metadata": {"file_path": "dvc/remote/index.py", "file_name": "index.py", "file_type": "text/x-python", "category": "implementation", "start_line": 170, "end_line": 197, "span_ids": ["RemoteIndex.update", "RemoteIndex.clear", "RemoteIndex.dump"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RemoteIndex:\n\n def dump(self):\n \"\"\"Save this index database.\"\"\"\n assert self.database is not None\n\n self.database.commit()\n self.cursor.close()\n self.database.close()\n self.database = None\n self.cursor = None\n\n def clear(self):\n \"\"\"Clear this index (to force re-indexing later).\n\n Changes to the index will not committed until dump() is called.\n \"\"\"\n cmd = f\"DELETE FROM {self.INDEX_TABLE}\"\n self._execute(cmd)\n\n def update(self, dir_hashes, file_hashes):\n \"\"\"Update this index, adding the specified hashes.\n\n Changes to the index will not committed until dump() is called.\n \"\"\"\n cmd = \"INSERT OR IGNORE INTO {} (checksum, dir) VALUES (?, ?)\".format(\n self.INDEX_TABLE\n )\n self._executemany(cmd, ((hash_, True) for hash_ in dir_hashes))\n self._executemany(cmd, ((hash_, False) for hash_ in file_hashes))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/index.py_RemoteIndex.intersection_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/index.py_RemoteIndex.intersection_", "embedding": null, "metadata": {"file_path": "dvc/remote/index.py", "file_name": "index.py", "file_type": "text/x-python", "category": "implementation", "start_line": 199, "end_line": 209, "span_ids": ["RemoteIndex.intersection"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RemoteIndex:\n\n def intersection(self, hashes):\n \"\"\"Iterate over values from `hashes` which exist in the index.\"\"\"\n # sqlite has a compile time limit of 999, see:\n # https://www.sqlite.org/c3ref/c_limit_attached.html#sqlitelimitvariablenumber\n for chunk in lchunks(999, hashes):\n cmd = \"SELECT checksum FROM {} WHERE checksum IN ({})\".format(\n self.INDEX_TABLE, \",\".join(\"?\" for hash_ in chunk)\n )\n for (hash_,) in self._execute(cmd, chunk):\n yield hash_", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/imp_url.py_os_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/imp_url.py_os_", "embedding": null, "metadata": {"file_path": "dvc/repo/imp_url.py", "file_name": "imp_url.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 72, "span_ids": ["imports", "imp_url"], "tokens": 377}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nfrom dvc.repo.scm_context import scm_context\nfrom dvc.utils import relpath, resolve_output, resolve_paths\nfrom dvc.utils.fs import path_isin\n\nfrom ..exceptions import OutputDuplicationError\nfrom . import locked\n\n\n@locked\n@scm_context\ndef imp_url(\n self,\n url,\n out=None,\n fname=None,\n erepo=None,\n frozen=True,\n no_exec=False,\n desc=None,\n jobs=None,\n):\n from dvc.dvcfile import Dvcfile\n from dvc.stage import Stage, create_stage, restore_meta\n\n out = resolve_output(url, out)\n path, wdir, out = resolve_paths(self, out)\n\n # NOTE: when user is importing something from within their own repository\n if (\n erepo is None\n and os.path.exists(url)\n and path_isin(os.path.abspath(url), self.root_dir)\n ):\n url = relpath(url, wdir)\n\n stage = create_stage(\n Stage,\n self,\n fname or path,\n wdir=wdir,\n deps=[url],\n outs=[out],\n erepo=erepo,\n )\n restore_meta(stage)\n if stage.can_be_skipped:\n return None\n\n if desc:\n stage.outs[0].desc = desc\n\n dvcfile = Dvcfile(self, stage.path)\n dvcfile.remove()\n\n try:\n self.check_modified_graph([stage])\n except OutputDuplicationError as exc:\n raise OutputDuplicationError(exc.output, set(exc.stages) - {stage})\n\n if no_exec:\n stage.ignore_outs()\n else:\n stage.run(jobs=jobs)\n\n stage.frozen = frozen\n\n dvcfile.dump(stage)\n\n return stage", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/ls.py__ls_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/ls.py__ls_", "embedding": null, "metadata": {"file_path": "dvc/repo/ls.py", "file_name": "ls.py", "file_type": "text/x-python", "category": "implementation", "start_line": 54, "end_line": 87, "span_ids": ["_ls"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _ls(tree, path_info, recursive=None, dvc_only=False):\n def onerror(exc):\n raise exc\n\n infos = []\n try:\n for root, dirs, files in tree.walk(\n path_info.fspath, onerror=onerror, dvcfiles=True\n ):\n entries = chain(files, dirs) if not recursive else files\n infos.extend(PathInfo(root) / entry for entry in entries)\n if not recursive:\n break\n except NotADirectoryError:\n infos.append(path_info)\n except FileNotFoundError:\n return {}\n\n ret = {}\n for info in infos:\n metadata = tree.metadata(info)\n if metadata.output_exists or not dvc_only:\n path = (\n path_info.name\n if path_info == info\n else str(info.relative_to(path_info))\n )\n ret[path] = {\n \"isout\": metadata.is_output,\n \"isdir\": metadata.isdir,\n \"isexec\": metadata.is_exec,\n }\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/params/diff.py_from_dvc_utils_diff_impor_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/params/diff.py_from_dvc_utils_diff_impor_", "embedding": null, "metadata": {"file_path": "dvc/repo/params/diff.py", "file_name": "diff.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 31, "span_ids": ["_get_params", "imports", "diff"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.utils.diff import diff as _diff\nfrom dvc.utils.diff import format_dict\n\nfrom .show import NoParamsError\n\n\ndef _get_params(repo, *args, revs=None, **kwargs):\n try:\n params = repo.params.show(*args, **kwargs, revs=revs)\n return params\n except NoParamsError:\n return {}\n\n\ndef diff(repo, *args, a_rev=None, b_rev=None, **kwargs):\n if repo.scm.no_commits:\n return {}\n\n with_unchanged = kwargs.pop(\"all\", False)\n\n a_rev = a_rev or \"HEAD\"\n b_rev = b_rev or \"workspace\"\n\n params = _get_params(repo, *args, **kwargs, revs=[a_rev, b_rev])\n old = params.get(a_rev, {})\n new = params.get(b_rev, {})\n\n return _diff(\n format_dict(old), format_dict(new), with_unchanged=with_unchanged\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/run.py_run_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/run.py_run_", "embedding": null, "metadata": {"file_path": "dvc/repo/run.py", "file_name": "run.py", "file_type": "text/x-python", "category": "implementation", "start_line": 77, "end_line": 141, "span_ids": ["run"], "tokens": 451}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@locked\n@scm_context\ndef run(self, fname=None, no_exec=False, single_stage=False, **kwargs):\n from dvc.dvcfile import PIPELINE_FILE, Dvcfile\n from dvc.stage import Stage, create_stage, restore_meta\n\n if not kwargs.get(\"cmd\"):\n raise InvalidArgumentError(\"command is not specified\")\n\n stage_cls = PipelineStage\n path = PIPELINE_FILE\n stage_name = kwargs.get(\"name\")\n\n if stage_name and single_stage:\n raise InvalidArgumentError(\n \"`-n|--name` is incompatible with `--single-stage`\"\n )\n\n if stage_name and fname:\n raise InvalidArgumentError(\n \"`--file` is currently incompatible with `-n|--name` \"\n \"and requires `--single-stage`\"\n )\n\n if not stage_name and not single_stage:\n raise InvalidArgumentError(\"`-n|--name` is required\")\n\n if single_stage:\n kwargs.pop(\"name\", None)\n stage_cls = Stage\n path = fname or _get_file_path(kwargs)\n else:\n if not is_valid_name(stage_name):\n raise InvalidStageName\n\n params = parse_params(kwargs.pop(\"params\", []))\n stage = create_stage(\n stage_cls, repo=self, path=path, params=params, **kwargs\n )\n restore_meta(stage)\n if kwargs.get(\"run_cache\", True) and stage.can_be_skipped:\n return None\n\n dvcfile = Dvcfile(self, stage.path)\n try:\n if kwargs.get(\"force\", True):\n with suppress(ValueError):\n self.stages.remove(stage)\n else:\n _check_stage_exists(dvcfile, stage)\n self.check_modified_graph([stage])\n except OutputDuplicationError as exc:\n raise OutputDuplicationError(exc.output, set(exc.stages) - {stage})\n\n if no_exec:\n stage.ignore_outs()\n else:\n stage.run(\n no_commit=kwargs.get(\"no_commit\", False),\n run_cache=kwargs.get(\"run_cache\", True),\n )\n\n dvcfile.dump(stage, update_lock=not no_exec)\n return stage", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/base.py__Manages_source_control_NoSCMError.__init__.super___init___msg_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/base.py__Manages_source_control_NoSCMError.__init__.super___init___msg_", "embedding": null, "metadata": {"file_path": "dvc/scm/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 34, "span_ids": ["NoSCMError", "RevError", "CloneError.__init__", "NoSCMError.__init__", "FileNotInRepoError", "docstring", "CloneError", "SCMError"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Manages source control systems (e.g. Git) in DVC.\"\"\"\n\nimport os\n\nfrom dvc.exceptions import DvcException\n\n\nclass SCMError(DvcException):\n \"\"\"Base class for source control management errors.\"\"\"\n\n\nclass FileNotInRepoError(SCMError):\n \"\"\"Thrown when trying to find .gitignore for a file that is not in a scm\n repository.\n \"\"\"\n\n\nclass CloneError(SCMError):\n def __init__(self, url, path):\n super().__init__(f\"Failed to clone repo '{url}' to '{path}'\")\n\n\nclass RevError(SCMError):\n pass\n\n\nclass NoSCMError(SCMError):\n def __init__(self):\n msg = (\n \"Only supported for Git repositories. If you're \"\n \"seeing this error in a Git repo, try updating the DVC \"\n \"configuration with `dvc config core.no_scm false`.\"\n )\n super().__init__(msg)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_PipelineStage_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_PipelineStage_", "embedding": null, "metadata": {"file_path": "dvc/stage/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 653, "end_line": 695, "span_ids": ["PipelineStage.changed_stage", "PipelineStage._changed_stage_entry", "PipelineStage.__eq__", "PipelineStage._status_stage", "PipelineStage.merge", "PipelineStage.is_cached", "PipelineStage.addressing", "PipelineStage.__init__", "PipelineStage", "PipelineStage.__hash__", "PipelineStage.reload"], "tokens": 271}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PipelineStage(Stage):\n def __init__(self, *args, name=None, **kwargs):\n super().__init__(*args, **kwargs)\n self.name = name\n self.cmd_changed = False\n self.tracked_vars = {}\n\n def __eq__(self, other):\n return super().__eq__(other) and self.name == other.name\n\n def __hash__(self):\n return hash((self.path_in_repo, self.name))\n\n @property\n def addressing(self):\n from dvc.dvcfile import PIPELINE_FILE\n\n if self.path and self.relpath == PIPELINE_FILE:\n return self.name\n return f\"{super().addressing}:{self.name}\"\n\n def reload(self):\n return self.dvcfile.stages[self.name]\n\n @property\n def is_cached(self):\n return self.name in self.dvcfile.stages and super().is_cached\n\n def _status_stage(self, ret):\n if self.cmd_changed:\n ret.append(\"changed command\")\n\n def changed_stage(self):\n if self.cmd_changed:\n logger.debug(self._changed_stage_entry())\n return self.cmd_changed\n\n def _changed_stage_entry(self):\n return f\"'cmd' of {self} has changed.\"\n\n def merge(self, ancestor, other):\n raise NotImplementedError", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/exceptions.py_from_dvc_exceptions_impor_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/exceptions.py_from_dvc_exceptions_impor_", "embedding": null, "metadata": {"file_path": "dvc/stage/exceptions.py", "file_name": "exceptions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 107, "span_ids": ["StagePathOutsideError", "StagePathNotFoundError", "StageNotFound", "MissingDataSource.__init__", "StageFileDoesNotExistError.__init__", "StageNameUnspecified", "StageFileAlreadyExistsError", "StagePathNotDirectoryError", "StageNameUnspecified.__init__", "InvalidStageName", "StageFileIsNotDvcFileError", "StageNotFound.__init__", "imports", "StageFileDoesNotExistError", "MissingDataSource", "StageCommitError", "InvalidStageName.__init__", "StageFileBadNameError", "StageFileFormatError", "StageCmdFailedError", "StageUpdateError.__init__", "StageCmdFailedError.__init__", "StageFileIsNotDvcFileError.__init__", "StageExternalOutputsError", "StageUpdateError", "DuplicateStageName"], "tokens": 569}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.exceptions import DvcException\n\n\nclass StageCmdFailedError(DvcException):\n def __init__(self, cmd, status=None):\n msg = f\"failed to run: {cmd}\"\n if status is not None:\n msg += f\", exited with {status}\"\n super().__init__(msg)\n\n\nclass StageFileFormatError(DvcException):\n pass\n\n\nclass StageFileDoesNotExistError(DvcException):\n def __init__(self, fname):\n self.file = fname\n super().__init__(f\"'{self.file}' does not exist.\")\n\n\nclass StageFileAlreadyExistsError(DvcException):\n pass\n\n\nclass StageFileIsNotDvcFileError(DvcException):\n def __init__(self, fname):\n from dvc.dvcfile import DVC_FILE_SUFFIX, is_dvc_file\n\n msg = f\"'{fname}' is not a DVC-file\"\n\n sname = fname + DVC_FILE_SUFFIX\n if is_dvc_file(sname):\n msg += f\" Do you mean '{sname}'?\"\n\n super().__init__(msg)\n\n\nclass StageFileBadNameError(DvcException):\n pass\n\n\nclass StagePathOutsideError(DvcException):\n pass\n\n\nclass StagePathNotFoundError(DvcException):\n pass\n\n\nclass StagePathNotDirectoryError(DvcException):\n pass\n\n\nclass StageCommitError(DvcException):\n pass\n\n\nclass StageExternalOutputsError(DvcException):\n pass\n\n\nclass StageUpdateError(DvcException):\n def __init__(self, path):\n super().__init__(\n \"update is not supported for '{}' that is not an \"\n \"import.\".format(path)\n )\n\n\nclass MissingDataSource(DvcException):\n def __init__(self, missing_files):\n assert len(missing_files) > 0\n\n source = \"source\"\n if len(missing_files) > 1:\n source += \"s\"\n\n msg = \"missing data '{}': {}\".format(source, \", \".join(missing_files))\n super().__init__(msg)\n\n\nclass StageNotFound(KeyError, DvcException):\n def __init__(self, file, name):\n self.file = file.relpath\n self.name = name\n super().__init__(\n f\"Stage '{self.name}' not found inside '{self.file}' file\"\n )\n\n\nclass StageNameUnspecified(DvcException):\n def __init__(self, file):\n super().__init__(\n \"Stage name not provided.\"\n \"Please specify the name as: `{}:stage_name`\".format(file.relpath)\n )\n\n\nclass DuplicateStageName(DvcException):\n pass\n\n\nclass InvalidStageName(DvcException):\n def __init__(self):\n super().__init__(\"Stage name cannot contain punctuation characters.\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py__visual_width_resolve_output.return.out": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py__visual_width_resolve_output.return.out", "embedding": null, "metadata": {"file_path": "dvc/utils/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 316, "end_line": 362, "span_ids": ["_visual_width", "resolve_output", "env2bool", "relpath", "_visual_center"], "tokens": 327}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _visual_width(line):\n \"\"\"Get the the number of columns required to display a string\"\"\"\n\n return len(re.sub(colorama.ansitowin32.AnsiToWin32.ANSI_CSI_RE, \"\", line))\n\n\ndef _visual_center(line, width):\n \"\"\"Center align string according to it's visual width\"\"\"\n\n spaces = max(width - _visual_width(line), 0)\n left_padding = int(spaces / 2)\n right_padding = spaces - left_padding\n\n return (left_padding * \" \") + line + (right_padding * \" \")\n\n\ndef relpath(path, start=os.curdir):\n path = os.fspath(path)\n start = os.path.abspath(os.fspath(start))\n\n # Windows path on different drive than curdir doesn't have relpath\n if os.name == \"nt\" and not os.path.commonprefix(\n [start, os.path.abspath(path)]\n ):\n return path\n return os.path.relpath(path, start)\n\n\ndef env2bool(var, undefined=False):\n \"\"\"\n undefined: return value if env var is unset\n \"\"\"\n var = os.getenv(var, None)\n if var is None:\n return undefined\n return bool(re.search(\"1|y|yes|true\", var, flags=re.I))\n\n\ndef resolve_output(inp, out):\n from urllib.parse import urlparse\n\n name = os.path.basename(os.path.normpath(urlparse(inp).path))\n if not out:\n return name\n if os.path.isdir(out):\n return os.path.join(out, name)\n return out", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/diff.py_json__diff_vals.return.res": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/diff.py_json__diff_vals.return.res", "embedding": null, "metadata": {"file_path": "dvc/utils/diff.py", "file_name": "diff.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 32, "span_ids": ["imports", "_diff_vals", "_parse"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import json\nfrom collections import defaultdict\n\nfrom .flatten import flatten\n\n\ndef _parse(raw):\n if raw is None or isinstance(raw, (dict, list, int, float)):\n return raw\n\n assert isinstance(raw, str)\n try:\n return json.loads(raw)\n except json.JSONDecodeError:\n return raw\n\n\ndef _diff_vals(old, new, with_unchanged):\n if (\n isinstance(new, list)\n and isinstance(old, list)\n and len(old) == len(new) == 1\n ):\n return _diff_vals(old[0], new[0], with_unchanged)\n\n if not with_unchanged and old == new:\n return {}\n\n res = {\"old\": old, \"new\": new}\n if isinstance(new, (int, float)) and isinstance(old, (int, float)):\n res[\"diff\"] = new - old\n return res", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/diff.py__flatten_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/diff.py__flatten_", "embedding": null, "metadata": {"file_path": "dvc/utils/diff.py", "file_name": "diff.py", "file_type": "text/x-python", "category": "implementation", "start_line": 35, "end_line": 121, "span_ids": ["_flatten", "format_dict", "diff", "_diff", "table", "_diff_dicts"], "tokens": 494}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _flatten(d):\n if not d:\n return defaultdict(lambda: None)\n\n if isinstance(d, dict):\n return defaultdict(lambda: None, flatten(d))\n\n return defaultdict(lambda: \"unable to parse\")\n\n\ndef _diff_dicts(old_dict, new_dict, with_unchanged):\n new = _flatten(new_dict)\n old = _flatten(old_dict)\n\n res = defaultdict(dict)\n\n xpaths = set(old.keys())\n xpaths.update(set(new.keys()))\n for xpath in xpaths:\n old_val = old[xpath]\n new_val = new[xpath]\n val_diff = _diff_vals(old_val, new_val, with_unchanged)\n if val_diff:\n res[xpath] = val_diff\n return dict(res)\n\n\ndef _diff(old_raw, new_raw, with_unchanged):\n old = _parse(old_raw)\n new = _parse(new_raw)\n\n if isinstance(new, dict) or isinstance(old, dict):\n return _diff_dicts(old, new, with_unchanged)\n\n val_diff = _diff_vals(old, new, with_unchanged)\n if val_diff:\n return {\"\": val_diff}\n\n return {}\n\n\ndef diff(old, new, with_unchanged=False):\n paths = set(old.keys())\n paths.update(set(new.keys()))\n\n res = defaultdict(dict)\n for path in paths:\n path_diff = _diff(old.get(path), new.get(path), with_unchanged)\n if path_diff:\n res[path] = path_diff\n return dict(res)\n\n\ndef table(header, rows, markdown=False):\n from tabulate import tabulate\n\n if not rows and not markdown:\n return \"\"\n\n ret = tabulate(\n rows,\n header,\n tablefmt=\"github\" if markdown else \"plain\",\n disable_numparse=True,\n # None will be shown as \"\" by default, overriding\n missingval=\"\u2014\",\n )\n\n if markdown:\n # NOTE: md table is incomplete without the trailing newline\n ret += \"\\n\"\n\n return ret\n\n\ndef format_dict(d):\n ret = {}\n for key, val in d.items():\n if isinstance(val, dict):\n new_val = format_dict(val)\n elif isinstance(val, list):\n new_val = str(val)\n else:\n new_val = val\n ret[key] = new_val\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_diff.py_test_diff_dict_test_diff_dict.assert_dvc_params_diff_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_diff.py_test_diff_dict_test_diff_dict.assert_dvc_params_diff_", "embedding": null, "metadata": {"file_path": "tests/func/params/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 91, "end_line": 101, "span_ids": ["test_diff_dict"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_diff_dict(tmp_dir, scm, dvc):\n tmp_dir.gen(\"params.yaml\", \"foo:\\n bar: baz\")\n dvc.run(cmd=\"echo params.yaml\", params=[\"foo\"], single_stage=True)\n scm.add([\"params.yaml\", \"Dvcfile\"])\n scm.commit(\"foo\")\n\n tmp_dir.gen(\"params.yaml\", \"foo:\\n bar: qux\")\n\n assert dvc.params.diff() == {\n \"params.yaml\": {\"foo.bar\": {\"old\": \"baz\", \"new\": \"qux\"}}\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/remote/test_index.py_test_indexed_dir_missing_test_clear_on_download_err.mocked_clear_assert_calle": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/remote/test_index.py_test_indexed_dir_missing_test_clear_on_download_err.mocked_clear_assert_calle", "embedding": null, "metadata": {"file_path": "tests/func/remote/test_index.py", "file_name": "test_index.py", "file_type": "text/x-python", "category": "test", "start_line": 59, "end_line": 87, "span_ids": ["test_indexed_dir_missing", "test_clear_on_gc", "test_clear_on_download_err"], "tokens": 262}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_indexed_dir_missing(tmp_dir, dvc, tmp_path_factory, remote):\n bar = tmp_dir.dvc_gen({\"bar\": {\"baz\": \"baz content\"}})[0].outs[0]\n with remote.index:\n remote.index.update([bar.hash_info.value], [])\n dvc.status(cloud=True)\n with remote.index:\n assert not list(remote.index.hashes())\n\n\ndef test_clear_on_gc(tmp_dir, dvc, tmp_path_factory, remote, mocker):\n (foo,) = tmp_dir.dvc_gen({\"foo\": \"foo content\"})\n dvc.push()\n dvc.remove(foo.relpath)\n\n mocked_clear = mocker.patch.object(remote.INDEX_CLS, \"clear\")\n dvc.gc(workspace=True, cloud=True)\n mocked_clear.assert_called_with()\n\n\ndef test_clear_on_download_err(tmp_dir, dvc, tmp_path_factory, remote, mocker):\n tmp_dir.dvc_gen({\"foo\": \"foo content\"})\n dvc.push()\n remove(dvc.cache.local.cache_dir)\n\n mocked_clear = mocker.patch.object(remote.INDEX_CLS, \"clear\")\n mocker.patch.object(LocalTree, \"_download\", side_effect=Exception)\n with pytest.raises(DownloadError):\n dvc.pull()\n mocked_clear.assert_called_once_with()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/remote/test_index.py_test_partial_upload_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/remote/test_index.py_test_partial_upload_", "embedding": null, "metadata": {"file_path": "tests/func/remote/test_index.py", "file_name": "test_index.py", "file_type": "text/x-python", "category": "test", "start_line": 90, "end_line": 106, "span_ids": ["test_partial_upload"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_partial_upload(tmp_dir, dvc, tmp_path_factory, remote, mocker):\n tmp_dir.dvc_gen({\"foo\": \"foo content\"})\n tmp_dir.dvc_gen({\"bar\": {\"baz\": \"baz content\"}})\n\n original = LocalTree._upload\n\n def unreliable_upload(self, from_file, to_info, name=None, **kwargs):\n if \"baz\" in name:\n raise Exception(\"stop baz\")\n return original(self, from_file, to_info, name, **kwargs)\n\n mocker.patch.object(LocalTree, \"_upload\", unreliable_upload)\n with pytest.raises(UploadError):\n dvc.push()\n with remote.index:\n assert not list(remote.index.hashes())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_has_stage_with_name_test_has_stage_with_name.assert_copy_not_in_dvcf": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_has_stage_with_name_test_has_stage_with_name.assert_copy_not_in_dvcf", "embedding": null, "metadata": {"file_path": "tests/func/test_dvcfile.py", "file_name": "test_dvcfile.py", "file_type": "text/x-python", "category": "test", "start_line": 63, "end_line": 74, "span_ids": ["test_has_stage_with_name"], "tokens": 107}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_has_stage_with_name(tmp_dir, dvc):\n tmp_dir.gen(\"foo\", \"foo\")\n dvc.run(\n cmd=\"cp foo foo2\",\n deps=[\"foo\"],\n name=\"copy-foo-foo2\",\n metrics=[\"foo2\"],\n always_changed=True,\n )\n dvcfile = Dvcfile(dvc, PIPELINE_FILE)\n assert \"copy-foo-foo2\" in dvcfile.stages\n assert \"copy\" not in dvcfile.stages", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproPipeline_TestReproPipelines.test_cli.self_assertEqual_ret_0_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproPipeline_TestReproPipelines.test_cli.self_assertEqual_ret_0_", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 500, "end_line": 554, "span_ids": ["TestReproPipelines", "TestReproPipelines.setUp", "TestReproPipelines.test", "TestReproPipeline", "TestReproPipelines.test_cli", "TestReproPipeline.test_cli", "TestReproPipeline.test"], "tokens": 426}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproPipeline(TestReproChangedDeepData):\n def test(self):\n stages = self.dvc.reproduce(\n self._get_stage_target(self.stage), force=True, pipeline=True\n )\n self.assertEqual(len(stages), 3)\n\n def test_cli(self):\n ret = main(\n [\"repro\", \"--pipeline\", \"-f\", self._get_stage_target(self.stage)]\n )\n self.assertEqual(ret, 0)\n\n\nclass TestReproPipelines(SingleStageRun, TestDvc):\n def setUp(self):\n super().setUp()\n\n stages = self.dvc.add(self.FOO)\n self.assertEqual(len(stages), 1)\n self.foo_stage = stages[0]\n self.assertTrue(self.foo_stage is not None)\n\n stages = self.dvc.add(self.BAR)\n self.assertEqual(len(stages), 1)\n self.bar_stage = stages[0]\n self.assertTrue(self.bar_stage is not None)\n\n self.file1 = \"file1\"\n self.file1_stage = self.dvc.run(\n fname=self.file1 + \".dvc\",\n outs=[self.file1],\n deps=[self.FOO, self.CODE],\n cmd=f\"python {self.CODE} {self.FOO} {self.file1}\",\n single_stage=True,\n )\n\n self.file2 = \"file2\"\n self.file2_stage = self._run(\n fname=self.file2 + \".dvc\",\n outs=[self.file2],\n deps=[self.BAR, self.CODE],\n cmd=f\"python {self.CODE} {self.BAR} {self.file2}\",\n name=\"copy-BAR-file2\",\n )\n\n def test(self):\n stages = self.dvc.reproduce(all_pipelines=True, force=True)\n self.assertEqual(len(stages), 4)\n self.assertTrue(self.file1_stage in stages)\n self.assertTrue(self.file2_stage in stages)\n\n def test_cli(self):\n ret = main([\"repro\", \"-f\", \"-P\"])\n self.assertEqual(ret, 0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproChangedDir_TestReproChangedDir.test.None_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproChangedDir_TestReproChangedDir.test.None_4", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 705, "end_line": 735, "span_ids": ["TestReproChangedDir", "TestReproChangedDir.test"], "tokens": 224}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproChangedDir(SingleStageRun, TestDvc):\n def test(self):\n file_name = \"file\"\n shutil.copyfile(self.FOO, file_name)\n\n dir_name = \"dir\"\n dir_code = \"dir.py\"\n code = (\n 'import os; import shutil; os.mkdir(\"{}\"); '\n 'shutil.copyfile(\"{}\", os.path.join(\"{}\", \"{}\"))'\n )\n\n with open(dir_code, \"w+\") as fd:\n fd.write(code.format(dir_name, file_name, dir_name, file_name))\n\n stage = self._run(\n outs=[dir_name],\n deps=[file_name, dir_code],\n cmd=f\"python {dir_code}\",\n name=\"copy-in-dir\",\n )\n target = self._get_stage_target(stage)\n\n stages = self.dvc.reproduce(target)\n self.assertEqual(len(stages), 0)\n\n os.unlink(file_name)\n shutil.copyfile(self.BAR, file_name)\n\n stages = self.dvc.reproduce(target)\n self.assertEqual(len(stages), 1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproAllPipelines_TestReproAllPipelines.test.with_patch_object_.self_assertEqual_mock_rep": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproAllPipelines_TestReproAllPipelines.test.with_patch_object_.self_assertEqual_mock_rep", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 1243, "end_line": 1283, "span_ids": ["TestReproAllPipelines", "TestReproAllPipelines.test"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproAllPipelines(SingleStageRun, TestDvc):\n def test(self):\n stages = [\n self._run(\n fname=\"start.dvc\",\n outs=[\"start.txt\"],\n cmd=\"echo start > start.txt\",\n name=\"start\",\n ),\n self._run(\n fname=\"middle.dvc\",\n deps=[\"start.txt\"],\n outs=[\"middle.txt\"],\n cmd=\"echo middle > middle.txt\",\n name=\"middle\",\n ),\n self._run(\n fname=\"final.dvc\",\n deps=[\"middle.txt\"],\n outs=[\"final.txt\"],\n cmd=\"echo final > final.txt\",\n name=\"final\",\n ),\n self._run(\n fname=\"disconnected.dvc\",\n outs=[\"disconnected.txt\"],\n cmd=\"echo other > disconnected.txt\",\n name=\"disconnected\",\n ),\n ]\n\n from dvc.state import StateNoop\n\n self.dvc.state = StateNoop()\n\n with patch.object(\n Stage, \"reproduce\", side_effect=stages\n ) as mock_reproduce:\n ret = main([\"repro\", \"--all-pipelines\"])\n self.assertEqual(ret, 0)\n self.assertEqual(mock_reproduce.call_count, 4)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproNoCommit_TestReproAlreadyCached.test.self_assertNotEqual_run_o": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproNoCommit_TestReproAlreadyCached.test.self_assertNotEqual_run_o", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 892, "end_line": 916, "span_ids": ["TestReproAlreadyCached", "TestReproAlreadyCached.test", "TestReproNoCommit.test", "TestReproNoCommit"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproNoCommit(TestRepro):\n def test(self):\n remove(self.dvc.cache.local.cache_dir)\n ret = main(\n [\"repro\", self._get_stage_target(self.stage), \"--no-commit\"]\n )\n self.assertEqual(ret, 0)\n self.assertEqual(os.listdir(self.dvc.cache.local.cache_dir), [\"runs\"])\n\n\nclass TestReproAlreadyCached(TestRepro):\n def test(self):\n stage = self._run(\n fname=\"datetime.dvc\",\n deps=[],\n outs=[\"datetime.txt\"],\n cmd='python -c \"import time; print(time.time())\" > datetime.txt',\n name=\"datetime\",\n )\n run_out = stage.outs[0]\n repro_out = self.dvc.reproduce(self._get_stage_target(stage))[0].outs[\n 0\n ]\n\n self.assertNotEqual(run_out.hash_info, repro_out.hash_info)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproAlreadyCached.test_force_with_dependencies_TestReproAlreadyCached.test_force_with_dependencies.self_assertNotEqual_run_o": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproAlreadyCached.test_force_with_dependencies_TestReproAlreadyCached.test_force_with_dependencies.self_assertNotEqual_run_o", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 918, "end_line": 932, "span_ids": ["TestReproAlreadyCached.test_force_with_dependencies"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproAlreadyCached(TestRepro):\n\n def test_force_with_dependencies(self):\n run_out = self.dvc.run(\n fname=\"datetime.dvc\",\n deps=[self.FOO],\n outs=[\"datetime.txt\"],\n cmd='python -c \"import time; print(time.time())\" > datetime.txt',\n single_stage=True,\n ).outs[0]\n\n ret = main([\"repro\", \"--force\", \"datetime.dvc\"])\n self.assertEqual(ret, 0)\n\n repro_out = Dvcfile(self.dvc, \"datetime.dvc\").stage.outs[0]\n\n self.assertNotEqual(run_out.hash_info, repro_out.hash_info)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_new_deps_is_added_in_dvcfile_test_repro_when_new_deps_is_added_in_dvcfile.assert_dvc_reproduce_targ": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_new_deps_is_added_in_dvcfile_test_repro_when_new_deps_is_added_in_dvcfile.assert_dvc_reproduce_targ", "embedding": null, "metadata": {"file_path": "tests/func/test_repro_multistage.py", "file_name": "test_repro_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 329, "end_line": 348, "span_ids": ["test_repro_when_new_deps_is_added_in_dvcfile"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_repro_when_new_deps_is_added_in_dvcfile(tmp_dir, dvc, run_copy):\n from dvc.dvcfile import Dvcfile\n\n tmp_dir.gen(\"copy.py\", COPY_SCRIPT)\n tmp_dir.gen({\"foo\": \"foo\", \"bar\": \"bar\"})\n stage = dvc.run(\n cmd=\"python copy.py {} {}\".format(\"foo\", \"foobar\"),\n outs=[\"foobar\"],\n deps=[\"foo\"],\n name=\"copy-file\",\n )\n target = PIPELINE_FILE + \":copy-file\"\n assert not dvc.reproduce(target)\n\n dvcfile = Dvcfile(dvc, stage.path)\n data, _ = dvcfile._load()\n data[\"stages\"][\"copy-file\"][\"deps\"] += [\"copy.py\"]\n dump_yaml(stage.path, data)\n\n assert dvc.reproduce(target)[0] == stage", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_new_outs_is_added_in_dvcfile_test_repro_when_new_outs_is_added_in_dvcfile.assert_dvc_reproduce_targ": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_new_outs_is_added_in_dvcfile_test_repro_when_new_outs_is_added_in_dvcfile.assert_dvc_reproduce_targ", "embedding": null, "metadata": {"file_path": "tests/func/test_repro_multistage.py", "file_name": "test_repro_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 351, "end_line": 370, "span_ids": ["test_repro_when_new_outs_is_added_in_dvcfile"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_repro_when_new_outs_is_added_in_dvcfile(tmp_dir, dvc):\n from dvc.dvcfile import Dvcfile\n\n tmp_dir.gen(\"copy.py\", COPY_SCRIPT)\n tmp_dir.gen({\"foo\": \"foo\", \"bar\": \"bar\"})\n stage = dvc.run(\n cmd=\"python copy.py {} {}\".format(\"foo\", \"foobar\"),\n outs=[], # scenario where user forgot to add\n deps=[\"foo\"],\n name=\"copy-file\",\n )\n target = \":copy-file\"\n assert not dvc.reproduce(target)\n\n dvcfile = Dvcfile(dvc, stage.path)\n data, _ = dvcfile._load()\n data[\"stages\"][\"copy-file\"][\"outs\"] = [\"foobar\"]\n dump_yaml(stage.path, data)\n\n assert dvc.reproduce(target)[0] == stage", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_new_deps_is_moved_test_repro_when_new_deps_is_moved.assert_dvc_reproduce_targ": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_new_deps_is_moved_test_repro_when_new_deps_is_moved.assert_dvc_reproduce_targ", "embedding": null, "metadata": {"file_path": "tests/func/test_repro_multistage.py", "file_name": "test_repro_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 373, "end_line": 397, "span_ids": ["test_repro_when_new_deps_is_moved"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_repro_when_new_deps_is_moved(tmp_dir, dvc):\n from dvc.dvcfile import Dvcfile\n\n tmp_dir.gen(\"copy.py\", COPY_SCRIPT)\n tmp_dir.gen({\"foo\": \"foo\", \"bar\": \"foo\"})\n stage = dvc.run(\n cmd=\"python copy.py {} {}\".format(\"foo\", \"foobar\"),\n outs=[\"foobar\"],\n deps=[\"foo\"],\n name=\"copy-file\",\n )\n target = \":copy-file\"\n assert not dvc.reproduce(target)\n\n tmp_dir.gen(\"copy.py\", COPY_SCRIPT_FORMAT.format(\"'bar'\", \"'foobar'\"))\n from shutil import move\n\n move(\"foo\", \"bar\")\n\n dvcfile = Dvcfile(dvc, stage.path)\n data, _ = dvcfile._load()\n data[\"stages\"][\"copy-file\"][\"deps\"] = [\"bar\"]\n dump_yaml(stage.path, data)\n\n assert dvc.reproduce(target)[0] == stage", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_new_out_overlaps_others_stage_outs_test_repro_when_new_out_overlaps_others_stage_outs.with_pytest_raises_Overla.dvc_reproduce_run_copy_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_new_out_overlaps_others_stage_outs_test_repro_when_new_out_overlaps_others_stage_outs.with_pytest_raises_Overla.dvc_reproduce_run_copy_", "embedding": null, "metadata": {"file_path": "tests/func/test_repro_multistage.py", "file_name": "test_repro_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 400, "end_line": 418, "span_ids": ["test_repro_when_new_out_overlaps_others_stage_outs"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_repro_when_new_out_overlaps_others_stage_outs(tmp_dir, dvc):\n from dvc.exceptions import OverlappingOutputPathsError\n\n tmp_dir.gen({\"dir\": {\"file1\": \"file1\"}, \"foo\": \"foo\"})\n dvc.add(\"dir\")\n dump_yaml(\n PIPELINE_FILE,\n {\n \"stages\": {\n \"run-copy\": {\n \"cmd\": \"python copy {} {}\".format(\"foo\", \"dir/foo\"),\n \"deps\": [\"foo\"],\n \"outs\": [\"dir/foo\"],\n }\n }\n },\n )\n with pytest.raises(OverlappingOutputPathsError):\n dvc.reproduce(\":run-copy\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_new_deps_added_does_not_exist_test_repro_when_new_deps_added_does_not_exist.with_pytest_raises_Reprod.dvc_reproduce_run_copy_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_new_deps_added_does_not_exist_test_repro_when_new_deps_added_does_not_exist.with_pytest_raises_Reprod.dvc_reproduce_run_copy_", "embedding": null, "metadata": {"file_path": "tests/func/test_repro_multistage.py", "file_name": "test_repro_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 397, "end_line": 413, "span_ids": ["test_repro_when_new_deps_added_does_not_exist"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_repro_when_new_deps_added_does_not_exist(tmp_dir, dvc):\n tmp_dir.gen(\"copy.py\", COPY_SCRIPT)\n tmp_dir.gen(\"foo\", \"foo\")\n dump_yaml(\n PIPELINE_FILE,\n {\n \"stages\": {\n \"run-copy\": {\n \"cmd\": \"python copy.py {} {}\".format(\"foo\", \"foobar\"),\n \"deps\": [\"foo\", \"bar\"],\n \"outs\": [\"foobar\"],\n }\n }\n },\n )\n with pytest.raises(ReproductionError):\n dvc.reproduce(\":run-copy\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_new_outs_added_does_not_exist_test_repro_when_new_outs_added_does_not_exist.with_pytest_raises_Reprod.dvc_reproduce_run_copy_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_new_outs_added_does_not_exist_test_repro_when_new_outs_added_does_not_exist.with_pytest_raises_Reprod.dvc_reproduce_run_copy_", "embedding": null, "metadata": {"file_path": "tests/func/test_repro_multistage.py", "file_name": "test_repro_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 416, "end_line": 432, "span_ids": ["test_repro_when_new_outs_added_does_not_exist"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_repro_when_new_outs_added_does_not_exist(tmp_dir, dvc):\n tmp_dir.gen(\"copy.py\", COPY_SCRIPT)\n tmp_dir.gen(\"foo\", \"foo\")\n dump_yaml(\n PIPELINE_FILE,\n {\n \"stages\": {\n \"run-copy\": {\n \"cmd\": \"python copy.py {} {}\".format(\"foo\", \"foobar\"),\n \"deps\": [\"foo\"],\n \"outs\": [\"foobar\", \"bar\"],\n }\n }\n },\n )\n with pytest.raises(ReproductionError):\n dvc.reproduce(\":run-copy\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_with_multistage_and_single_stage_test_run_with_multistage_and_single_stage.assert_stage2_name_co": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_with_multistage_and_single_stage_test_run_with_multistage_and_single_stage.assert_stage2_name_co", "embedding": null, "metadata": {"file_path": "tests/func/test_run_multistage.py", "file_name": "test_run_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 22, "end_line": 33, "span_ids": ["test_run_with_multistage_and_single_stage"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_run_with_multistage_and_single_stage(tmp_dir, dvc, run_copy):\n from dvc.stage import PipelineStage, Stage\n\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n stage1 = run_copy(\"foo\", \"foo1\", single_stage=True)\n stage2 = run_copy(\"foo1\", \"foo2\", name=\"copy-foo1-foo2\")\n stage3 = run_copy(\"foo2\", \"foo3\", single_stage=True)\n\n assert isinstance(stage2, PipelineStage)\n assert isinstance(stage1, Stage)\n assert isinstance(stage3, Stage)\n assert stage2.name == \"copy-foo1-foo2\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_multistage_with_wdir_test_multistage_with_wdir.assert_dir_data_sta": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_multistage_with_wdir_test_multistage_with_wdir.assert_dir_data_sta", "embedding": null, "metadata": {"file_path": "tests/func/test_run_multistage.py", "file_name": "test_run_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 93, "end_line": 106, "span_ids": ["test_multistage_with_wdir"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_multistage_with_wdir(tmp_dir, dvc):\n from dvc.dvcfile import Dvcfile\n\n tmp_dir.gen({\"dir\": {\"foo\": \"foo\", \"bar\": \"bar\"}})\n stage = dvc.run(\n cmd=\"cp foo foo1\",\n deps=[\"foo\"],\n name=\"copy-foo1-foo2\",\n outs=[\"foo1\"],\n wdir=\"dir\",\n )\n\n data, _ = Dvcfile(dvc, stage.path)._load()\n assert \"dir\" == data[\"stages\"][\"copy-foo1-foo2\"][\"wdir\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_multistage_always_changed_test_multistage_always_changed.assert_data_stages_co": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_multistage_always_changed_test_multistage_always_changed.assert_data_stages_co", "embedding": null, "metadata": {"file_path": "tests/func/test_run_multistage.py", "file_name": "test_run_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 109, "end_line": 122, "span_ids": ["test_multistage_always_changed"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_multistage_always_changed(tmp_dir, dvc):\n from dvc.dvcfile import Dvcfile\n\n tmp_dir.gen({\"foo\": \"foo\", \"bar\": \"bar\"})\n stage = dvc.run(\n cmd=\"cp foo foo1\",\n deps=[\"foo\"],\n name=\"copy-foo1-foo2\",\n outs=[\"foo1\"],\n always_changed=True,\n )\n\n data, _ = Dvcfile(dvc, stage.path)._load()\n assert data[\"stages\"][\"copy-foo1-foo2\"][\"always_changed\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_graph_test_graph.with_pytest_raises_Cyclic.dvc_run_deps_baz_out": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_graph_test_graph.with_pytest_raises_Cyclic.dvc_run_deps_baz_out", "embedding": null, "metadata": {"file_path": "tests/func/test_run_multistage.py", "file_name": "test_run_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 125, "end_line": 135, "span_ids": ["test_graph"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_graph(tmp_dir, dvc):\n from dvc.exceptions import CyclicGraphError\n\n tmp_dir.gen({\"foo\": \"foo\", \"bar\": \"bar\"})\n\n dvc.run(deps=[\"foo\"], outs=[\"bar\"], cmd=\"echo foo > bar\", name=\"1\")\n\n dvc.run(deps=[\"bar\"], outs=[\"baz\"], cmd=\"echo bar > baz\", name=\"2\")\n\n with pytest.raises(CyclicGraphError):\n dvc.run(deps=[\"baz\"], outs=[\"foo\"], cmd=\"echo baz > foo\", name=\"3\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_filecmp_from_tests_basic_env_impo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_filecmp_from_tests_basic_env_impo", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 36, "span_ids": ["imports"], "tokens": 220}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import filecmp\nimport logging\nimport os\nimport textwrap\nimport uuid\nfrom pathlib import Path\n\nimport mock\nimport pytest\n\nfrom dvc.dependency.base import DependencyIsStageFileError\nfrom dvc.dvcfile import DVC_FILE_SUFFIX\nfrom dvc.exceptions import (\n ArgumentDuplicationError,\n CircularDependencyError,\n CyclicGraphError,\n OutputDuplicationError,\n OverlappingOutputPathsError,\n StagePathAsOutputError,\n)\nfrom dvc.main import main\nfrom dvc.output import BaseOutput\nfrom dvc.output.base import OutputIsStageFileError\nfrom dvc.repo import Repo as DvcRepo\nfrom dvc.stage import Stage\nfrom dvc.stage.exceptions import (\n StageFileAlreadyExistsError,\n StageFileBadNameError,\n StagePathNotDirectoryError,\n StagePathNotFoundError,\n StagePathOutsideError,\n)\nfrom dvc.system import System\nfrom dvc.utils import file_md5\nfrom dvc.utils.serialize import load_yaml\nfrom tests.basic_env import TestDvc, TestDvcGit", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRun_TestRun.test.with_self_assertRaises_Ou.self_dvc_run_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRun_TestRun.test.with_self_assertRaises_Ou.self_dvc_run_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 39, "end_line": 74, "span_ids": ["TestRun.test", "TestRun"], "tokens": 287}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRun(TestDvc):\n def test(self):\n cmd = \"python {} {} {}\".format(self.CODE, self.FOO, \"out\")\n deps = [self.FOO, self.CODE]\n outs = [os.path.join(self.dvc.root_dir, \"out\")]\n outs_no_cache = []\n fname = \"out.dvc\"\n\n self.dvc.add(self.FOO)\n stage = self.dvc.run(\n cmd=cmd,\n deps=deps,\n outs=outs,\n outs_no_cache=outs_no_cache,\n fname=fname,\n single_stage=True,\n )\n\n self.assertTrue(filecmp.cmp(self.FOO, \"out\", shallow=False))\n self.assertTrue(os.path.isfile(stage.path))\n self.assertEqual(stage.cmd, cmd)\n self.assertEqual(len(stage.deps), len(deps))\n self.assertEqual(len(stage.outs), len(outs + outs_no_cache))\n self.assertEqual(stage.outs[0].fspath, outs[0])\n self.assertEqual(stage.outs[0].hash_info.value, file_md5(self.FOO)[0])\n self.assertTrue(stage.path, fname)\n\n with self.assertRaises(OutputDuplicationError):\n self.dvc.run(\n cmd=cmd,\n deps=deps,\n outs=outs,\n outs_no_cache=outs_no_cache,\n fname=\"duplicate\" + fname,\n single_stage=True,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunDuplicatedArguments_TestRunDuplicatedArguments.test_non_normalized_paths.with_self_assertRaises_Ar.self_dvc_run_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunDuplicatedArguments_TestRunDuplicatedArguments.test_non_normalized_paths.with_self_assertRaises_Ar.self_dvc_run_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 173, "end_line": 202, "span_ids": ["TestRunDuplicatedArguments.test", "TestRunDuplicatedArguments.test_non_normalized_paths", "TestRunDuplicatedArguments", "TestRunDuplicatedArguments.test_outs_no_cache"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRunDuplicatedArguments(TestDvc):\n def test(self):\n with self.assertRaises(ArgumentDuplicationError):\n self.dvc.run(\n cmd=\"command\",\n deps=[],\n outs=[self.FOO, self.FOO],\n fname=\"circular-dependency.dvc\",\n single_stage=True,\n )\n\n def test_outs_no_cache(self):\n with self.assertRaises(ArgumentDuplicationError):\n self.dvc.run(\n cmd=\"command\",\n outs=[self.FOO],\n outs_no_cache=[self.FOO],\n fname=\"circular-dependency.dvc\",\n single_stage=True,\n )\n\n def test_non_normalized_paths(self):\n with self.assertRaises(ArgumentDuplicationError):\n self.dvc.run(\n cmd=\"command\",\n deps=[],\n outs=[\"foo\", \"./foo\"],\n fname=\"circular-dependency.dvc\",\n single_stage=True,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunBadName_TestRunBadName.test_not_found.with_self_assertRaises_St.self_dvc_run_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunBadName_TestRunBadName.test_not_found.with_self_assertRaises_St.self_dvc_run_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 277, "end_line": 303, "span_ids": ["TestRunBadName.test", "TestRunBadName", "TestRunBadName.test_not_found", "TestRunBadName.test_same_prefix"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRunBadName(TestDvc):\n def test(self):\n with self.assertRaises(StagePathOutsideError):\n self.dvc.run(\n cmd=\"command\",\n fname=os.path.join(self.mkdtemp(), self.FOO + DVC_FILE_SUFFIX),\n single_stage=True,\n )\n\n def test_same_prefix(self):\n with self.assertRaises(StagePathOutsideError):\n path = f\"{self._root_dir}-{uuid.uuid4()}\"\n os.mkdir(path)\n self.dvc.run(\n cmd=\"command\",\n fname=os.path.join(path, self.FOO + DVC_FILE_SUFFIX),\n single_stage=True,\n )\n\n def test_not_found(self):\n with self.assertRaises(StagePathNotFoundError):\n path = os.path.join(self._root_dir, str(uuid.uuid4()))\n self.dvc.run(\n cmd=\"command\",\n fname=os.path.join(path, self.FOO + DVC_FILE_SUFFIX),\n single_stage=True,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunRemoveOuts_TestRunRemoveOuts.test.self_dvc_run_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunRemoveOuts_TestRunRemoveOuts.test.self_dvc_run_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 306, "end_line": 320, "span_ids": ["TestRunRemoveOuts", "TestRunRemoveOuts.test"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRunRemoveOuts(TestDvc):\n def test(self):\n with open(self.CODE, \"w+\") as fobj:\n fobj.write(\"import sys\\n\")\n fobj.write(\"import os\\n\")\n fobj.write(\"if os.path.exists(sys.argv[1]):\\n\")\n fobj.write(\" sys.exit(1)\\n\")\n fobj.write(\"open(sys.argv[1], 'w+').close()\\n\")\n\n self.dvc.run(\n deps=[self.CODE],\n outs=[self.FOO],\n cmd=f\"python {self.CODE} {self.FOO}\",\n single_stage=True,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunUnprotectOutsCopy_TestRunUnprotectOutsCopy.test.None_2.self_assertEqual_fd_read_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunUnprotectOutsCopy_TestRunUnprotectOutsCopy.test.None_2.self_assertEqual_fd_read_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 323, "end_line": 369, "span_ids": ["TestRunUnprotectOutsCopy.test", "TestRunUnprotectOutsCopy"], "tokens": 287}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRunUnprotectOutsCopy(TestDvc):\n def test(self):\n with open(self.CODE, \"w+\") as fobj:\n fobj.write(\"import sys\\n\")\n fobj.write(\"with open(sys.argv[1], 'a+') as fobj:\\n\")\n fobj.write(\" fobj.write('foo')\\n\")\n\n ret = main([\"config\", \"cache.type\", \"copy\"])\n self.assertEqual(ret, 0)\n\n ret = main(\n [\n \"run\",\n \"-d\",\n self.CODE,\n \"-o\",\n self.FOO,\n \"--single-stage\",\n \"python\",\n self.CODE,\n self.FOO,\n ]\n )\n self.assertEqual(ret, 0)\n self.assertTrue(os.access(self.FOO, os.W_OK))\n with open(self.FOO) as fd:\n self.assertEqual(fd.read(), \"foo\")\n\n ret = main(\n [\n \"run\",\n \"--force\",\n \"--no-run-cache\",\n \"--single-stage\",\n \"-d\",\n self.CODE,\n \"-o\",\n self.FOO,\n \"python\",\n self.CODE,\n self.FOO,\n ]\n )\n self.assertEqual(ret, 0)\n self.assertTrue(os.access(self.FOO, os.W_OK))\n with open(self.FOO) as fd:\n self.assertEqual(fd.read(), \"foo\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunUnprotectOutsSymlink_TestRunUnprotectOutsSymlink.test.None_4.self_assertEqual_fd_read_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunUnprotectOutsSymlink_TestRunUnprotectOutsSymlink.test.None_4.self_assertEqual_fd_read_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 372, "end_line": 434, "span_ids": ["TestRunUnprotectOutsSymlink", "TestRunUnprotectOutsSymlink.test"], "tokens": 404}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRunUnprotectOutsSymlink(TestDvc):\n def test(self):\n with open(self.CODE, \"w+\") as fobj:\n fobj.write(\"import sys\\n\")\n fobj.write(\"import os\\n\")\n fobj.write(\"with open(sys.argv[1], 'a+') as fobj:\\n\")\n fobj.write(\" fobj.write('foo')\\n\")\n\n ret = main([\"config\", \"cache.type\", \"symlink\"])\n self.assertEqual(ret, 0)\n\n self.assertEqual(ret, 0)\n ret = main(\n [\n \"run\",\n \"-d\",\n self.CODE,\n \"-o\",\n self.FOO,\n \"--single-stage\",\n \"python\",\n self.CODE,\n self.FOO,\n ]\n )\n self.assertEqual(ret, 0)\n\n if os.name == \"nt\":\n # NOTE: Windows symlink perms don't propagate to the target\n self.assertTrue(os.access(self.FOO, os.W_OK))\n else:\n self.assertFalse(os.access(self.FOO, os.W_OK))\n\n self.assertTrue(System.is_symlink(self.FOO))\n with open(self.FOO) as fd:\n self.assertEqual(fd.read(), \"foo\")\n\n ret = main(\n [\n \"run\",\n \"--force\",\n \"--no-run-cache\",\n \"--single-stage\",\n \"-d\",\n self.CODE,\n \"-o\",\n self.FOO,\n \"python\",\n self.CODE,\n self.FOO,\n ]\n )\n self.assertEqual(ret, 0)\n\n if os.name == \"nt\":\n # NOTE: Windows symlink perms don't propagate to the target\n self.assertTrue(os.access(self.FOO, os.W_OK))\n else:\n self.assertFalse(os.access(self.FOO, os.W_OK))\n\n self.assertTrue(System.is_symlink(self.FOO))\n with open(self.FOO) as fd:\n self.assertEqual(fd.read(), \"foo\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunUnprotectOutsHardlink_TestRunUnprotectOutsHardlink.test.None_2.self_assertEqual_fd_read_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunUnprotectOutsHardlink_TestRunUnprotectOutsHardlink.test.None_2.self_assertEqual_fd_read_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 437, "end_line": 487, "span_ids": ["TestRunUnprotectOutsHardlink", "TestRunUnprotectOutsHardlink.test"], "tokens": 328}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRunUnprotectOutsHardlink(TestDvc):\n def test(self):\n with open(self.CODE, \"w+\") as fobj:\n fobj.write(\"import sys\\n\")\n fobj.write(\"import os\\n\")\n fobj.write(\"with open(sys.argv[1], 'a+') as fobj:\\n\")\n fobj.write(\" fobj.write('foo')\\n\")\n\n ret = main([\"config\", \"cache.type\", \"hardlink\"])\n self.assertEqual(ret, 0)\n\n self.assertEqual(ret, 0)\n ret = main(\n [\n \"run\",\n \"-d\",\n self.CODE,\n \"-o\",\n self.FOO,\n \"--single-stage\",\n \"python\",\n self.CODE,\n self.FOO,\n ]\n )\n self.assertEqual(ret, 0)\n self.assertFalse(os.access(self.FOO, os.W_OK))\n self.assertTrue(System.is_hardlink(self.FOO))\n with open(self.FOO) as fd:\n self.assertEqual(fd.read(), \"foo\")\n\n ret = main(\n [\n \"run\",\n \"--force\",\n \"--no-run-cache\",\n \"--single-stage\",\n \"-d\",\n self.CODE,\n \"-o\",\n self.FOO,\n \"python\",\n self.CODE,\n self.FOO,\n ]\n )\n self.assertEqual(ret, 0)\n self.assertFalse(os.access(self.FOO, os.W_OK))\n self.assertTrue(System.is_hardlink(self.FOO))\n with open(self.FOO) as fd:\n self.assertEqual(fd.read(), \"foo\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestCmdRunOverwrite_TestCmdRunOverwrite.test.None_9": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestCmdRunOverwrite_TestCmdRunOverwrite.test.None_9", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 490, "end_line": 592, "span_ids": ["TestCmdRunOverwrite.test", "TestCmdRunOverwrite"], "tokens": 539}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCmdRunOverwrite(TestDvc):\n def test(self):\n # NOTE: using sleep() is a workaround for filesystems\n # with low mtime resolution. We have to use mtime since\n # comparing mtime's is the only way to check that the stage\n # file didn't change(size and inode in the first test down\n # below don't change).\n import time\n\n ret = main(\n [\n \"run\",\n \"-d\",\n self.FOO,\n \"-d\",\n self.CODE,\n \"-o\",\n \"out\",\n \"--file\",\n \"out.dvc\",\n \"--single-stage\",\n \"python\",\n self.CODE,\n self.FOO,\n \"out\",\n ]\n )\n self.assertEqual(ret, 0)\n\n stage_mtime = os.path.getmtime(\"out.dvc\")\n\n time.sleep(1)\n\n ret = main(\n [\n \"run\",\n \"-d\",\n self.FOO,\n \"-d\",\n self.CODE,\n \"-o\",\n \"out\",\n \"--file\",\n \"out.dvc\",\n \"--single-stage\",\n \"python\",\n self.CODE,\n self.FOO,\n \"out\",\n ]\n )\n self.assertEqual(ret, 0)\n\n # NOTE: check that dvcfile was NOT overwritten\n self.assertEqual(stage_mtime, os.path.getmtime(\"out.dvc\"))\n stage_mtime = os.path.getmtime(\"out.dvc\")\n\n time.sleep(1)\n\n ret = main(\n [\n \"run\",\n \"-d\",\n self.FOO,\n \"-d\",\n self.CODE,\n \"--force\",\n \"--no-run-cache\",\n \"--single-stage\",\n \"-o\",\n \"out\",\n \"--file\",\n \"out.dvc\",\n \"python\",\n self.CODE,\n self.FOO,\n \"out\",\n ]\n )\n self.assertEqual(ret, 0)\n\n # NOTE: check that dvcfile was overwritten\n self.assertNotEqual(stage_mtime, os.path.getmtime(\"out.dvc\"))\n stage_mtime = os.path.getmtime(\"out.dvc\")\n\n time.sleep(1)\n\n ret = main(\n [\n \"run\",\n \"--force\",\n \"--single-stage\",\n \"--file\",\n \"out.dvc\",\n \"-d\",\n self.BAR,\n f\"cat {self.BAR}\",\n ]\n )\n self.assertEqual(ret, 0)\n\n # NOTE: check that dvcfile was overwritten\n self.assertNotEqual(stage_mtime, os.path.getmtime(\"out.dvc\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestCmdRunCliMetrics_TestCmdRunCliMetrics.test_not_cached.with_open_metrics_txt_.self_assertEqual_fd_read_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestCmdRunCliMetrics_TestCmdRunCliMetrics.test_not_cached.with_open_metrics_txt_.self_assertEqual_fd_read_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 595, "end_line": 622, "span_ids": ["TestCmdRunCliMetrics", "TestCmdRunCliMetrics.test_cached", "TestCmdRunCliMetrics.test_not_cached"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCmdRunCliMetrics(TestDvc):\n def test_cached(self):\n ret = main(\n [\n \"run\",\n \"-m\",\n \"metrics.txt\",\n \"--single-stage\",\n \"echo test > metrics.txt\",\n ]\n )\n self.assertEqual(ret, 0)\n with open(\"metrics.txt\") as fd:\n self.assertEqual(fd.read().rstrip(), \"test\")\n\n def test_not_cached(self):\n ret = main(\n [\n \"run\",\n \"-M\",\n \"metrics.txt\",\n \"--single-stage\",\n \"echo test > metrics.txt\",\n ]\n )\n self.assertEqual(ret, 0)\n with open(\"metrics.txt\") as fd:\n self.assertEqual(fd.read().rstrip(), \"test\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestCmdRunWorkingDirectory_TestCmdRunWorkingDirectory.test_default_wdir_is_not_written.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestCmdRunWorkingDirectory_TestCmdRunWorkingDirectory.test_default_wdir_is_not_written.None_1", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 625, "end_line": 640, "span_ids": ["TestCmdRunWorkingDirectory.test_default_wdir_is_not_written", "TestCmdRunWorkingDirectory"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCmdRunWorkingDirectory(TestDvc):\n def test_default_wdir_is_not_written(self):\n stage = self.dvc.run(\n cmd=f\"echo test > {self.FOO}\",\n outs=[self.FOO],\n wdir=\".\",\n single_stage=True,\n )\n d = load_yaml(stage.relpath)\n self.assertNotIn(Stage.PARAM_WDIR, d.keys())\n\n stage = self.dvc.run(\n cmd=f\"echo test > {self.BAR}\", outs=[self.BAR], single_stage=True,\n )\n d = load_yaml(stage.relpath)\n self.assertNotIn(Stage.PARAM_WDIR, d.keys())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestCmdRunWorkingDirectory.test_fname_changes_path_and_wdir_TestCmdRunWorkingDirectory.test_fname_changes_path_and_wdir.self_assertEqual_d_Stage_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestCmdRunWorkingDirectory.test_fname_changes_path_and_wdir_TestCmdRunWorkingDirectory.test_fname_changes_path_and_wdir.self_assertEqual_d_Stage_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 642, "end_line": 660, "span_ids": ["TestCmdRunWorkingDirectory.test_fname_changes_path_and_wdir"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCmdRunWorkingDirectory(TestDvc):\n\n def test_fname_changes_path_and_wdir(self):\n dname = \"dir\"\n os.mkdir(os.path.join(self._root_dir, dname))\n foo = os.path.join(dname, self.FOO)\n fname = os.path.join(dname, \"stage\" + DVC_FILE_SUFFIX)\n stage = self.dvc.run(\n cmd=f\"echo test > {foo}\",\n outs=[foo],\n fname=fname,\n single_stage=True,\n )\n self.assertEqual(stage.wdir, os.path.realpath(self._root_dir))\n self.assertEqual(\n stage.path, os.path.join(os.path.realpath(self._root_dir), fname)\n )\n\n # Check that it is dumped properly (relative to fname)\n d = load_yaml(stage.relpath)\n self.assertEqual(d[Stage.PARAM_WDIR], \"..\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunCommit_TestRunCommit.test.self_assertEqual_len_os_l": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunCommit_TestRunCommit.test.self_assertEqual_len_os_l", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 715, "end_line": 738, "span_ids": ["TestRunCommit", "TestRunCommit.test"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRunCommit(TestDvc):\n def test(self):\n fname = \"test\"\n ret = main(\n [\n \"run\",\n \"-o\",\n fname,\n \"--no-commit\",\n \"--single-stage\",\n \"echo\",\n \"test\",\n \">\",\n fname,\n ]\n )\n self.assertEqual(ret, 0)\n self.assertTrue(os.path.isfile(fname))\n self.assertFalse(os.path.exists(self.dvc.cache.local.cache_dir))\n\n ret = main([\"commit\", fname + \".dvc\"])\n self.assertEqual(ret, 0)\n self.assertTrue(os.path.isfile(fname))\n self.assertEqual(len(os.listdir(self.dvc.cache.local.cache_dir)), 1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunPersist_TestRunPersist.should_remove_persistent_outs.self_assertFalse_os_path_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunPersist_TestRunPersist.should_remove_persistent_outs.self_assertFalse_os_path_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 749, "end_line": 796, "span_ids": ["TestRunPersist.should_append_upon_repro", "TestRunPersist.should_remove_persistent_outs", "TestRunPersist.run_command", "TestRunPersist.outs_command", "TestRunPersist", "TestRunPersist._test", "TestRunPersist.stage_should_contain_persist_flag"], "tokens": 310}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRunPersist(TestDvc):\n @property\n def outs_command(self):\n raise NotImplementedError\n\n def _test(self):\n file = \"file.txt\"\n file_content = \"content\"\n stage_file = file + DVC_FILE_SUFFIX\n\n self.run_command(file, file_content)\n self.stage_should_contain_persist_flag(stage_file)\n\n self.should_append_upon_repro(file, stage_file)\n\n self.should_remove_persistent_outs(file, stage_file)\n\n def run_command(self, file, file_content):\n ret = main(\n [\n \"run\",\n \"--single-stage\",\n self.outs_command,\n file,\n f\"echo {file_content} >> {file}\",\n ]\n )\n self.assertEqual(0, ret)\n\n def stage_should_contain_persist_flag(self, stage_file):\n stage_file_content = load_yaml(stage_file)\n self.assertEqual(\n True, stage_file_content[\"outs\"][0][BaseOutput.PARAM_PERSIST]\n )\n\n def should_append_upon_repro(self, file, stage_file):\n ret = main([\"repro\", stage_file])\n self.assertEqual(0, ret)\n\n with open(file) as fobj:\n lines = fobj.readlines()\n self.assertEqual(2, len(lines))\n\n def should_remove_persistent_outs(self, file, stage_file):\n ret = main([\"remove\", stage_file, \"--outs\"])\n self.assertEqual(0, ret)\n\n self.assertFalse(os.path.exists(file))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunPersistOuts_TestShouldRaiseOnOverlappingOutputPaths.test.None_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunPersistOuts_TestShouldRaiseOnOverlappingOutputPaths.test.None_4", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 799, "end_line": 843, "span_ids": ["TestRunPersistOutsNoCache.test", "TestRunPersistOuts.outs_command", "TestShouldRaiseOnOverlappingOutputPaths", "TestShouldRaiseOnOverlappingOutputPaths.test", "TestRunPersistOuts.test", "TestRunPersistOuts", "TestRunPersistOutsNoCache", "TestRunPersistOutsNoCache.outs_command"], "tokens": 302}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRunPersistOuts(TestRunPersist):\n @property\n def outs_command(self):\n return \"--outs-persist\"\n\n def test(self):\n self._test()\n\n\nclass TestRunPersistOutsNoCache(TestRunPersist):\n @property\n def outs_command(self):\n return \"--outs-persist-no-cache\"\n\n def test(self):\n self._test()\n\n\nclass TestShouldRaiseOnOverlappingOutputPaths(TestDvc):\n def test(self):\n ret = main([\"add\", self.DATA_DIR])\n self.assertEqual(0, ret)\n\n with self.assertRaises(OverlappingOutputPathsError) as err:\n self.dvc.run(\n outs=[self.DATA],\n cmd=f\"echo data >> {self.DATA}\",\n single_stage=True,\n )\n error_output = str(err.exception)\n\n data_dir_stage = self.DATA_DIR + DVC_FILE_SUFFIX\n data_stage = os.path.basename(self.DATA) + DVC_FILE_SUFFIX\n\n self.assertIn(\"The output paths:\\n\", error_output)\n self.assertIn(\n f\"\\n'{self.DATA_DIR}'('{data_dir_stage}')\\n\", error_output,\n )\n self.assertIn(f\"\\n'{self.DATA}'('{data_stage}')\\n\", error_output)\n self.assertIn(\n \"overlap and are thus in the same tracked directory.\\n\"\n \"To keep reproducibility, outputs should be in separate \"\n \"tracked directories or tracked individually.\",\n error_output,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRerunWithSameOutputs_TestRerunWithSameOutputs._run_twice_with_same_outputs.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRerunWithSameOutputs_TestRerunWithSameOutputs._run_twice_with_same_outputs.None_2", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 845, "end_line": 879, "span_ids": ["TestRerunWithSameOutputs", "TestRerunWithSameOutputs._read_content_only", "TestRerunWithSameOutputs._outs_command", "TestRerunWithSameOutputs._run_twice_with_same_outputs"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRerunWithSameOutputs(TestDvc):\n def _read_content_only(self, path):\n with open(path) as fobj:\n return [line.rstrip() for line in fobj]\n\n @property\n def _outs_command(self):\n raise NotImplementedError\n\n def _run_twice_with_same_outputs(self):\n ret = main(\n [\n \"run\",\n \"--single-stage\",\n \"--outs\",\n self.FOO,\n f\"echo {self.FOO_CONTENTS} > {self.FOO}\",\n ]\n )\n self.assertEqual(0, ret)\n\n output_file_content = self._read_content_only(self.FOO)\n self.assertEqual([self.FOO_CONTENTS], output_file_content)\n\n ret = main(\n [\n \"run\",\n self._outs_command,\n self.FOO,\n \"--force\",\n \"--single-stage\",\n f\"echo {self.BAR_CONTENTS} >> {self.FOO}\",\n ]\n )\n self.assertEqual(0, ret)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestNewRunShouldRemoveOutsOnNoPersist_TestNewRunShouldNotRemoveOutsOnPersist._outs_command.return._outs_persist_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestNewRunShouldRemoveOutsOnNoPersist_TestNewRunShouldNotRemoveOutsOnPersist._outs_command.return._outs_persist_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 770, "end_line": 793, "span_ids": ["TestNewRunShouldNotRemoveOutsOnPersist._outs_command", "TestNewRunShouldRemoveOutsOnNoPersist", "TestNewRunShouldNotRemoveOutsOnPersist.test", "TestNewRunShouldRemoveOutsOnNoPersist._outs_command", "TestNewRunShouldNotRemoveOutsOnPersist", "TestNewRunShouldRemoveOutsOnNoPersist.test"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestNewRunShouldRemoveOutsOnNoPersist(TestRerunWithSameOutputs):\n def test(self):\n self._run_twice_with_same_outputs()\n\n output_file_content = self._read_content_only(self.FOO)\n self.assertEqual([self.BAR_CONTENTS], output_file_content)\n\n @property\n def _outs_command(self):\n return \"--outs\"\n\n\nclass TestNewRunShouldNotRemoveOutsOnPersist(TestRerunWithSameOutputs):\n def test(self):\n self._run_twice_with_same_outputs()\n\n output_file_content = self._read_content_only(self.FOO)\n self.assertEqual(\n [self.FOO_CONTENTS, self.BAR_CONTENTS], output_file_content\n )\n\n @property\n def _outs_command(self):\n return \"--outs-persist\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestShouldNotCheckoutUponCorruptedLocalHardlinkCache_TestShouldNotCheckoutUponCorruptedLocalHardlinkCache.test.with_self_dvc_lock_self_.with_patch_checkout_as_mo.with_patch_run_as_mock_ru.mock_checkout_assert_not_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestShouldNotCheckoutUponCorruptedLocalHardlinkCache_TestShouldNotCheckoutUponCorruptedLocalHardlinkCache.test.with_self_dvc_lock_self_.with_patch_checkout_as_mo.with_patch_run_as_mock_ru.mock_checkout_assert_not_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 908, "end_line": 938, "span_ids": ["TestShouldNotCheckoutUponCorruptedLocalHardlinkCache", "TestShouldNotCheckoutUponCorruptedLocalHardlinkCache.setUp", "TestShouldNotCheckoutUponCorruptedLocalHardlinkCache.test"], "tokens": 257}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestShouldNotCheckoutUponCorruptedLocalHardlinkCache(TestDvc):\n def setUp(self):\n super().setUp()\n ret = main([\"config\", \"cache.type\", \"hardlink\"])\n self.assertEqual(ret, 0)\n self.dvc = DvcRepo(\".\")\n\n def test(self):\n cmd = f\"python {self.CODE} {self.FOO} {self.BAR}\"\n stage = self.dvc.run(\n deps=[self.FOO], outs=[self.BAR], cmd=cmd, single_stage=True\n )\n\n os.chmod(self.BAR, 0o644)\n with open(self.BAR, \"w\") as fd:\n fd.write(\"corrupting the output cache\")\n\n patch_checkout = mock.patch.object(\n stage.outs[0], \"checkout\", wraps=stage.outs[0].checkout\n )\n from dvc.stage.run import cmd_run\n\n patch_run = mock.patch(\"dvc.stage.run.cmd_run\", wraps=cmd_run)\n\n with self.dvc.lock, self.dvc.state:\n with patch_checkout as mock_checkout:\n with patch_run as mock_run:\n stage.run()\n\n mock_run.assert_called_once()\n mock_checkout.assert_not_called()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_os_test_empty_list.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_os_test_empty_list.None_1", "embedding": null, "metadata": {"file_path": "tests/func/test_stage.py", "file_name": "test_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 53, "span_ids": ["test_none", "imports", "test_cmd_none", "test_no_cmd", "test_empty_list", "test_cmd_str", "test_object", "test_cmd_obj"], "tokens": 305}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport tempfile\n\nimport pytest\n\nfrom dvc.dvcfile import SingleStageFile\nfrom dvc.main import main\nfrom dvc.output.local import LocalOutput\nfrom dvc.repo import Repo, lock_repo\nfrom dvc.stage import PipelineStage, Stage\nfrom dvc.stage.exceptions import StageFileFormatError\nfrom dvc.stage.run import run_stage\nfrom dvc.tree.local import LocalTree\nfrom dvc.utils.serialize import dump_yaml, load_yaml\nfrom tests.basic_env import TestDvc\n\n\ndef test_cmd_obj():\n with pytest.raises(StageFileFormatError):\n SingleStageFile.validate({Stage.PARAM_CMD: {}})\n\n\ndef test_cmd_none():\n SingleStageFile.validate({Stage.PARAM_CMD: None})\n\n\ndef test_no_cmd():\n SingleStageFile.validate({})\n\n\ndef test_cmd_str():\n SingleStageFile.validate({Stage.PARAM_CMD: \"cmd\"})\n\n\ndef test_object():\n with pytest.raises(StageFileFormatError):\n SingleStageFile.validate({Stage.PARAM_DEPS: {}})\n\n with pytest.raises(StageFileFormatError):\n SingleStageFile.validate({Stage.PARAM_OUTS: {}})\n\n\ndef test_none():\n SingleStageFile.validate({Stage.PARAM_DEPS: None})\n SingleStageFile.validate({Stage.PARAM_OUTS: None})\n\n\ndef test_empty_list():\n d = {Stage.PARAM_DEPS: []}\n SingleStageFile.validate(d)\n\n d = {Stage.PARAM_OUTS: []}\n SingleStageFile.validate(d)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_list_test_list.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_list_test_list.None_1", "embedding": null, "metadata": {"file_path": "tests/func/test_stage.py", "file_name": "test_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 56, "end_line": 68, "span_ids": ["test_list"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_list():\n lst = [\n {LocalOutput.PARAM_PATH: \"foo\", LocalTree.PARAM_CHECKSUM: \"123\"},\n {LocalOutput.PARAM_PATH: \"bar\", LocalTree.PARAM_CHECKSUM: None},\n {LocalOutput.PARAM_PATH: \"baz\"},\n ]\n d = {Stage.PARAM_DEPS: lst}\n SingleStageFile.validate(d)\n\n lst[0][LocalOutput.PARAM_CACHE] = True\n lst[1][LocalOutput.PARAM_CACHE] = False\n d = {Stage.PARAM_OUTS: lst}\n SingleStageFile.validate(d)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_index.py_os_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_index.py_os_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_index.py", "file_name": "test_index.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 58, "span_ids": ["test_init", "imports", "test_roundtrip", "test_intersection", "test_is_dir_hash", "test_update", "test_clear", "index"], "tokens": 339}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nimport pytest\nfrom funcy import first\n\nfrom dvc.remote.index import RemoteIndex\n\n\n@pytest.fixture(scope=\"function\")\ndef index(dvc):\n idx = RemoteIndex(dvc, \"foo\")\n idx.load()\n yield idx\n idx.dump()\n os.unlink(idx.path)\n\n\ndef test_init(dvc, index):\n assert str(index.path) == os.path.join(dvc.tmp_dir, \"index\", \"foo.idx\")\n\n\ndef test_is_dir_hash(dvc, index):\n assert index.is_dir_hash(\"foo.dir\")\n assert not index.is_dir_hash(\"foo\")\n\n\ndef test_roundtrip(dvc, index):\n expected_dir = {\"1234.dir\"}\n expected_file = {\"5678\"}\n index.update(expected_dir, expected_file)\n index.dump()\n index.load()\n assert set(index.dir_hashes()) == expected_dir\n assert set(index.hashes()) == expected_dir | expected_file\n\n\ndef test_clear(dvc, index):\n index.update(\n [\"1234.dir\"], [\"5678\"],\n )\n index.clear()\n assert first(index.hashes()) is None\n\n\ndef test_update(dvc, index):\n expected_dir = {\"1234.dir\"}\n expected_file = {\"5678\"}\n index.update(expected_dir, expected_file)\n assert set(index.dir_hashes()) == expected_dir\n assert set(index.hashes()) == expected_dir | expected_file\n\n\ndef test_intersection(dvc, index):\n hashes = (str(i) for i in range(2000))\n expected = {str(i) for i in range(1000)}\n index.update([], hashes)\n assert set(index.intersection(expected)) == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_lockfile.py_test_load_when_lockfile_is_corrupted_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_lockfile.py_test_load_when_lockfile_is_corrupted_", "embedding": null, "metadata": {"file_path": "tests/unit/test_lockfile.py", "file_name": "test_lockfile.py", "file_type": "text/x-python", "category": "test", "start_line": 60, "end_line": 82, "span_ids": ["test_load_when_lockfile_is_corrupted"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"corrupt_data\",\n [\n {\"s1\": {\"outs\": []}},\n {\"s1\": {}},\n {\n \"s1\": {\n \"cmd\": \"command\",\n \"outs\": [\n {\"md5\": \"checksum\", \"path\": \"path\", \"random\": \"value\"}\n ],\n }\n },\n {\"s1\": {\"cmd\": \"command\", \"deps\": [{\"md5\": \"checksum\"}]}},\n ],\n)\ndef test_load_when_lockfile_is_corrupted(tmp_dir, dvc, corrupt_data):\n dump_yaml(\"Dvcfile.lock\", corrupt_data)\n lockfile = Lockfile(dvc, \"Dvcfile.lock\")\n with pytest.raises(LockfileCorruptedError) as exc_info:\n lockfile.load()\n assert \"Dvcfile.lock\" in str(exc_info.value)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_TestRemote.test_relative_path_TestRemote.test_relative_path.self_assertEqual_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_TestRemote.test_relative_path_TestRemote.test_relative_path.self_assertEqual_", "embedding": null, "metadata": {"file_path": "tests/func/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 41, "end_line": 52, "span_ids": ["TestRemote.test_relative_path"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRemote(TestDvc):\n\n def test_relative_path(self):\n dname = os.path.join(\"..\", \"path\", \"to\", \"dir\")\n ret = main([\"remote\", \"add\", \"mylocal\", dname])\n self.assertEqual(ret, 0)\n\n # NOTE: we are in the repo's root and config is in .dvc/, so\n # dir path written to config should be just one level above.\n rel = os.path.join(\"..\", dname)\n config = configobj.ConfigObj(self.dvc.config.files[\"repo\"])\n self.assertEqual(\n config['remote \"mylocal\"'][\"url\"], rel.replace(\"\\\\\", \"/\")\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/checkout.py_argparse_log_changes.for_state_color_in_color.for_entry_in_entries_.logger_info_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/checkout.py_argparse_log_changes.for_state_color_in_color.for_entry_in_entries_.logger_info_", "embedding": null, "metadata": {"file_path": "dvc/command/checkout.py", "file_name": "checkout.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 37, "span_ids": ["log_changes", "imports"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\nimport operator\n\nimport colorama\n\nfrom dvc.command import completion\nfrom dvc.command.base import CmdBase, append_doc_link\nfrom dvc.exceptions import CheckoutError\nfrom dvc.utils.humanize import get_summary\n\nlogger = logging.getLogger(__name__)\n\n\ndef log_changes(stats):\n colors = [\n (\"modified\", colorama.Fore.YELLOW,),\n (\"added\", colorama.Fore.GREEN),\n (\"deleted\", colorama.Fore.RED,),\n ]\n\n for state, color in colors:\n entries = stats.get(state)\n\n if not entries:\n continue\n\n for entry in entries:\n logger.info(\n \"{color}{state}{nc}{spacing}{entry}\".format(\n color=color,\n state=state[0].upper(),\n nc=colorama.Fore.RESET,\n spacing=\"\\t\",\n entry=entry,\n )\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/data_sync.py_shared_parent_parser_shared_parent_parser.return.parent_parser": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/data_sync.py_shared_parent_parser_shared_parent_parser.return.parent_parser", "embedding": null, "metadata": {"file_path": "dvc/command/data_sync.py", "file_name": "data_sync.py", "file_type": "text/x-python", "category": "implementation", "start_line": 89, "end_line": 116, "span_ids": ["shared_parent_parser"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def shared_parent_parser():\n from dvc.cli import get_parent_parser\n\n # Parent parser used in pull/push/status\n parent_parser = argparse.ArgumentParser(\n add_help=False, parents=[get_parent_parser()]\n )\n parent_parser.add_argument(\n \"-j\",\n \"--jobs\",\n type=int,\n help=(\n \"Number of jobs to run simultaneously. \"\n \"The default value is 4 * cpu_count(). \"\n \"For SSH remotes, the default is 4. \"\n ),\n metavar=\"\",\n )\n parent_parser.add_argument(\n \"targets\",\n nargs=\"*\",\n help=(\n \"Limit command scope to these tracked files/directories, \"\n \".dvc files, or stage names.\"\n ),\n ).complete = completion.DVC_FILE\n\n return parent_parser", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_CmdRemoteDefault_CmdRemoteList.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_CmdRemoteDefault_CmdRemoteList.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/remote.py", "file_name": "remote.py", "file_type": "text/x-python", "category": "implementation", "start_line": 79, "end_line": 114, "span_ids": ["CmdRemoteList.run", "CmdRemoteList", "CmdRemoteDefault", "CmdRemoteDefault.run"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdRemoteDefault(CmdRemote):\n def run(self):\n\n if self.args.name is None and not self.args.unset:\n conf = self.config.read(self.args.level)\n try:\n print(conf[\"core\"][\"remote\"])\n except KeyError:\n logger.info(\"No default remote set\")\n return 1\n else:\n with self.config.edit(self.args.level) as conf:\n if self.args.unset:\n conf[\"core\"].pop(\"remote\", None)\n else:\n merged_conf = self.config.load_config_to_level(\n self.args.level\n )\n if (\n self.args.name in conf[\"remote\"]\n or self.args.name in merged_conf[\"remote\"]\n ):\n conf[\"core\"][\"remote\"] = self.args.name\n else:\n raise ConfigError(\n \"default remote must be present in remote list.\"\n )\n return 0\n\n\nclass CmdRemoteList(CmdRemote):\n def run(self):\n conf = self.config.read(self.args.level)\n for name, conf in conf[\"remote\"].items():\n logger.info(\"{}\\t{}\".format(name, conf[\"url\"]))\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/__init__.py_from_collections_import_d_SCHEMA_update_ParamsDepen": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/__init__.py_from_collections_import_d_SCHEMA_update_ParamsDepen", "embedding": null, "metadata": {"file_path": "dvc/dependency/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 61, "span_ids": ["imports"], "tokens": 519}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from collections import defaultdict\nfrom urllib.parse import urlparse\n\nimport dvc.output as output\nfrom dvc.dependency.azure import AzureDependency\nfrom dvc.dependency.gs import GSDependency\nfrom dvc.dependency.hdfs import HDFSDependency\nfrom dvc.dependency.http import HTTPDependency\nfrom dvc.dependency.https import HTTPSDependency\nfrom dvc.dependency.local import LocalDependency\nfrom dvc.dependency.param import ParamsDependency\nfrom dvc.dependency.s3 import S3Dependency\nfrom dvc.dependency.ssh import SSHDependency\nfrom dvc.dependency.webdav import WebDAVDependency\nfrom dvc.dependency.webdavs import WebDAVSDependency\nfrom dvc.dependency.webhdfs import WebHDFSDependency\nfrom dvc.output.base import BaseOutput\nfrom dvc.scheme import Schemes\n\nfrom ..tree import get_cloud_tree\nfrom .repo import RepoDependency\n\nDEPS = [\n AzureDependency,\n GSDependency,\n HDFSDependency,\n HTTPDependency,\n HTTPSDependency,\n S3Dependency,\n SSHDependency,\n WebDAVDependency,\n WebDAVSDependency,\n WebHDFSDependency,\n # NOTE: LocalDependency is the default choice\n]\n\nDEP_MAP = {\n Schemes.LOCAL: LocalDependency,\n Schemes.SSH: SSHDependency,\n Schemes.S3: S3Dependency,\n Schemes.AZURE: AzureDependency,\n Schemes.GS: GSDependency,\n Schemes.HDFS: HDFSDependency,\n Schemes.HTTP: HTTPDependency,\n Schemes.HTTPS: HTTPSDependency,\n Schemes.WEBDAV: WebDAVDependency,\n Schemes.WEBDAVS: WebDAVSDependency,\n Schemes.WEBHDFS: WebHDFSDependency,\n}\n\n\n# NOTE: schema for dependencies is basically the same as for outputs, but\n# without output-specific entries like 'cache' (whether or not output is\n# cached, see -o and -O flags for `dvc run`) and 'metric' (whether or not\n# output is a metrics file and how to parse it, see `-M` flag for `dvc run`).\nSCHEMA = output.SCHEMA.copy()\ndel SCHEMA[BaseOutput.PARAM_CACHE]\ndel SCHEMA[BaseOutput.PARAM_METRIC]\ndel SCHEMA[BaseOutput.PARAM_DESC]\nSCHEMA.update(RepoDependency.REPO_SCHEMA)\nSCHEMA.update(ParamsDependency.PARAM_SCHEMA)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_FileMixin_FileMixin.exists.return.self_repo_tree_exists_sel": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_FileMixin_FileMixin.exists.return.self_repo_tree_exists_sel", "embedding": null, "metadata": {"file_path": "dvc/dvcfile.py", "file_name": "dvcfile.py", "file_type": "text/x-python", "category": "implementation", "start_line": 64, "end_line": 93, "span_ids": ["FileMixin.__init__", "FileMixin", "FileMixin.__repr__", "FileMixin.exists", "FileMixin.__hash__", "FileMixin.relpath", "FileMixin.__eq__", "FileMixin.__str__"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FileMixin:\n SCHEMA = None\n\n def __init__(self, repo, path, verify=True, **kwargs):\n self.repo = repo\n self.path = path\n self.verify = verify\n\n def __repr__(self):\n return \"{}: {}\".format(\n self.__class__.__name__, relpath(self.path, self.repo.root_dir)\n )\n\n def __hash__(self):\n return hash(self.path)\n\n def __eq__(self, other):\n return self.repo == other.repo and os.path.abspath(\n self.path\n ) == os.path.abspath(other.path)\n\n def __str__(self):\n return f\"{self.__class__.__name__}: {self.relpath}\"\n\n @property\n def relpath(self):\n return relpath(self.path)\n\n def exists(self):\n return self.repo.tree.exists(self.path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_PipelineFile._dump_pipeline_file_PipelineFile._dump_pipeline_file.self_repo_scm_track_file_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_PipelineFile._dump_pipeline_file_PipelineFile._dump_pipeline_file.self_repo_scm_track_file_", "embedding": null, "metadata": {"file_path": "dvc/dvcfile.py", "file_name": "dvcfile.py", "file_type": "text/x-python", "category": "implementation", "start_line": 209, "end_line": 230, "span_ids": ["PipelineFile._dump_pipeline_file"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PipelineFile(FileMixin):\n\n def _dump_pipeline_file(self, stage):\n self._check_if_parametrized(stage)\n stage_data = serialize.to_pipeline_file(stage)\n\n with modify_yaml(self.path, tree=self.repo.tree) as data:\n if not data:\n logger.info(\"Creating '%s'\", self.relpath)\n\n data[\"stages\"] = data.get(\"stages\", {})\n existing_entry = stage.name in data[\"stages\"]\n action = \"Modifying\" if existing_entry else \"Adding\"\n logger.info(\n \"%s stage '%s' in '%s'\", action, stage.name, self.relpath\n )\n\n if existing_entry:\n orig_stage_data = data[\"stages\"][stage.name]\n apply_diff(stage_data[stage.name], orig_stage_data)\n else:\n data[\"stages\"].update(stage_data)\n\n self.repo.scm.track_file(self.relpath)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_Lockfile_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_Lockfile_", "embedding": null, "metadata": {"file_path": "dvc/dvcfile.py", "file_name": "dvcfile.py", "file_type": "text/x-python", "category": "implementation", "start_line": 272, "end_line": 338, "span_ids": ["Lockfile.merge", "Lockfile.load", "Dvcfile.__new__", "Lockfile", "Dvcfile", "Lockfile.remove_stage", "Lockfile.dump"], "tokens": 408}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Lockfile(FileMixin):\n from dvc.schema import COMPILED_LOCKFILE_SCHEMA as SCHEMA\n\n def load(self):\n if not self.exists():\n return {}\n\n data = load_yaml(self.path, tree=self.repo.tree)\n try:\n self.validate(data, fname=self.relpath)\n except StageFileFormatError:\n raise LockfileCorruptedError(\n f\"Lockfile '{self.relpath}' is corrupted.\"\n )\n return data\n\n def dump(self, stage, **kwargs):\n stage_data = serialize.to_lockfile(stage)\n\n with modify_yaml(self.path, tree=self.repo.tree) as data:\n if not data:\n logger.info(\"Generating lock file '%s'\", self.relpath)\n\n modified = data.get(stage.name, {}) != stage_data.get(\n stage.name, {}\n )\n if modified:\n logger.info(\"Updating lock file '%s'\", self.relpath)\n data.update(stage_data)\n\n if modified:\n self.repo.scm.track_file(self.relpath)\n\n def remove_stage(self, stage):\n if not self.exists():\n return\n\n with open(self.path) as f:\n d = parse_yaml_for_update(f.read(), self.path)\n self.validate(d, self.path)\n\n if stage.name not in d:\n return\n\n logger.debug(\"Removing '%s' from '%s'\", stage.name, self.path)\n del d[stage.name]\n\n if d:\n dump_yaml(self.path, d)\n else:\n self.remove()\n\n def merge(self, ancestor, other):\n raise NotImplementedError\n\n\nclass Dvcfile:\n def __new__(cls, repo, path, **kwargs):\n assert path\n assert repo\n\n _, ext = os.path.splitext(path)\n if ext in [\".yaml\", \".yml\"]:\n return PipelineFile(repo, path, **kwargs)\n # fallback to single stage file for better error messages\n return SingleStageFile(repo, path, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py__Exceptions_raised_by_t_OutputDuplicationError.__init__.self.output.output": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py__Exceptions_raised_by_t_OutputDuplicationError.__init__.self.output.output", "embedding": null, "metadata": {"file_path": "dvc/exceptions.py", "file_name": "exceptions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 43, "span_ids": ["DvcException.__init__", "OutputDuplicationError", "InvalidArgumentError", "DvcException", "OutputDuplicationError.__init__", "docstring"], "tokens": 280}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Exceptions raised by the dvc.\"\"\"\nfrom typing import List\n\nfrom funcy import first\n\nfrom dvc.utils import error_link, format_link, relpath\n\n\nclass DvcException(Exception):\n \"\"\"Base class for all dvc exceptions.\"\"\"\n\n def __init__(self, msg, *args):\n assert msg\n super().__init__(msg, *args)\n\n\nclass InvalidArgumentError(ValueError, DvcException):\n \"\"\"Thrown if arguments are invalid.\"\"\"\n\n\nclass OutputDuplicationError(DvcException):\n \"\"\"Thrown if a file/directory is specified as an output in more than one\n stage.\n\n Args:\n output (unicode): path to the file/directory.\n stages (list): list of paths to stages.\n \"\"\"\n\n def __init__(self, output, stages):\n assert isinstance(output, str)\n assert all(hasattr(stage, \"relpath\") for stage in stages)\n if len(stages) == 1:\n msg = \"output '{}' is already specified in {}.\".format(\n output, first(stages)\n )\n else:\n msg = \"output '{}' is already specified in stages:\\n{}\".format(\n output, \"\\n\".join(f\"\\t- {s.addressing}\" for s in stages),\n )\n super().__init__(msg)\n self.stages = stages\n self.output = output", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/__init__.py__get__get.return.LocalOutput_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/__init__.py__get__get.return.LocalOutput_", "embedding": null, "metadata": {"file_path": "dvc/output/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 75, "end_line": 132, "span_ids": ["_get"], "tokens": 259}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _get(\n stage,\n p,\n info=None,\n cache=True,\n metric=False,\n plot=False,\n persist=False,\n checkpoint=False,\n desc=None,\n isexec=False,\n):\n parsed = urlparse(p)\n\n if parsed.scheme == \"remote\":\n tree = get_cloud_tree(stage.repo, name=parsed.netloc)\n return OUTS_MAP[tree.scheme](\n stage,\n p,\n info,\n cache=cache,\n tree=tree,\n metric=metric,\n plot=plot,\n persist=persist,\n checkpoint=checkpoint,\n desc=desc,\n isexec=isexec,\n )\n\n for o in OUTS:\n if o.supported(p):\n return o(\n stage,\n p,\n info,\n cache=cache,\n tree=None,\n metric=metric,\n plot=plot,\n persist=persist,\n checkpoint=checkpoint,\n desc=desc,\n isexec=isexec,\n )\n return LocalOutput(\n stage,\n p,\n info,\n cache=cache,\n tree=None,\n metric=metric,\n plot=plot,\n persist=persist,\n checkpoint=checkpoint,\n desc=desc,\n isexec=isexec,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/metrics/diff.py_from_dvc_exceptions_impor_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/metrics/diff.py_from_dvc_exceptions_impor_", "embedding": null, "metadata": {"file_path": "dvc/repo/metrics/diff.py", "file_name": "diff.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 30, "span_ids": ["imports", "_get_metrics", "diff"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.exceptions import MetricsError\nfrom dvc.utils.diff import diff as _diff\nfrom dvc.utils.diff import format_dict\n\n\ndef _get_metrics(repo, *args, revs=None, **kwargs):\n try:\n metrics = repo.metrics.show(*args, **kwargs, revs=revs)\n return metrics\n except MetricsError:\n return {}\n\n\ndef diff(repo, *args, a_rev=None, b_rev=None, **kwargs):\n if repo.scm.no_commits:\n return {}\n\n with_unchanged = kwargs.pop(\"all\", False)\n\n a_rev = a_rev or \"HEAD\"\n b_rev = b_rev or \"workspace\"\n\n metrics = _get_metrics(repo, *args, **kwargs, revs=[a_rev, b_rev])\n old = metrics.get(a_rev, {})\n new = metrics.get(b_rev, {})\n\n return _diff(\n format_dict(old), format_dict(new), with_unchanged=with_unchanged\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/update.py_Dvcfile_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/update.py_Dvcfile_", "embedding": null, "metadata": {"file_path": "dvc/repo/update.py", "file_name": "update.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 24, "span_ids": ["imports", "update"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from ..dvcfile import Dvcfile\nfrom . import locked\n\n\n@locked\ndef update(self, targets=None, rev=None, recursive=False):\n if not targets:\n targets = [None]\n\n if isinstance(targets, str):\n targets = [targets]\n\n stages = set()\n for target in targets:\n stages.update(self.stage.collect(target, recursive=recursive))\n\n for stage in stages:\n stage.update(rev)\n dvcfile = Dvcfile(self, stage.path)\n dvcfile.dump(stage)\n stages.add(stage)\n\n return list(stages)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/rwlock.py_json_RWLockFileFormatError.__init__.super___init___": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/rwlock.py_json_RWLockFileFormatError.__init__.super___init___", "embedding": null, "metadata": {"file_path": "dvc/rwlock.py", "file_name": "rwlock.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 34, "span_ids": ["RWLockFileCorruptedError", "imports", "RWLockFileFormatError.__init__", "RWLockFileCorruptedError.__init__", "RWLockFileFormatError"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import json\nimport os\nfrom collections import defaultdict\nfrom contextlib import contextmanager\n\nfrom voluptuous import Invalid, Optional, Required, Schema\n\nfrom .exceptions import DvcException\nfrom .lock import LockError\nfrom .utils import relpath\n\nINFO_SCHEMA = {Required(\"pid\"): int, Required(\"cmd\"): str}\n\nSCHEMA = Schema(\n {\n Optional(\"write\", default={}): {str: INFO_SCHEMA},\n Optional(\"read\", default={}): {str: [INFO_SCHEMA]},\n }\n)\n\n\nclass RWLockFileCorruptedError(DvcException):\n def __init__(self, path):\n super().__init__(\n \"Unable to read RWLock-file '{}'. JSON structure is \"\n \"corrupted\".format(relpath(path))\n )\n\n\nclass RWLockFileFormatError(DvcException):\n def __init__(self, path):\n super().__init__(\n \"RWLock-file '{}' format error.\".format(relpath(path))\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/schema.py_from_voluptuous_import_An_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/schema.py_from_voluptuous_import_An_", "embedding": null, "metadata": {"file_path": "dvc/schema.py", "file_name": "schema.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 97, "span_ids": ["imports", "impl:19"], "tokens": 831}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from voluptuous import Any, Optional, Required, Schema\n\nfrom dvc import dependency, output\nfrom dvc.hash_info import HashInfo\nfrom dvc.output import CHECKSUMS_SCHEMA, BaseOutput\nfrom dvc.parsing import DO_KWD, FOREACH_KWD, VARS_KWD\nfrom dvc.stage.params import StageParams\n\nSTAGES = \"stages\"\nSINGLE_STAGE_SCHEMA = {\n StageParams.PARAM_MD5: output.CHECKSUM_SCHEMA,\n StageParams.PARAM_CMD: Any(str, list, None),\n StageParams.PARAM_WDIR: Any(str, None),\n StageParams.PARAM_DEPS: Any([dependency.SCHEMA], None),\n StageParams.PARAM_OUTS: Any([output.SCHEMA], None),\n StageParams.PARAM_LOCKED: bool, # backard compatibility\n StageParams.PARAM_FROZEN: bool,\n StageParams.PARAM_META: object,\n StageParams.PARAM_ALWAYS_CHANGED: bool,\n StageParams.PARAM_DESC: str,\n}\n\nDATA_SCHEMA = {\n **CHECKSUMS_SCHEMA,\n Required(\"path\"): str,\n HashInfo.PARAM_SIZE: int,\n HashInfo.PARAM_NFILES: int,\n BaseOutput.PARAM_ISEXEC: bool,\n}\nLOCK_FILE_STAGE_SCHEMA = {\n Required(StageParams.PARAM_CMD): Any(str, list),\n StageParams.PARAM_DEPS: [DATA_SCHEMA],\n StageParams.PARAM_PARAMS: {str: {str: object}},\n StageParams.PARAM_OUTS: [DATA_SCHEMA],\n}\nLOCKFILE_SCHEMA = {str: LOCK_FILE_STAGE_SCHEMA}\n\nOUT_PSTAGE_DETAILED_SCHEMA = {\n str: {\n BaseOutput.PARAM_CACHE: bool,\n BaseOutput.PARAM_PERSIST: bool,\n BaseOutput.PARAM_CHECKPOINT: bool,\n BaseOutput.PARAM_DESC: str,\n }\n}\n\nPLOT_PROPS = {\n BaseOutput.PARAM_PLOT_TEMPLATE: str,\n BaseOutput.PARAM_PLOT_X: str,\n BaseOutput.PARAM_PLOT_Y: str,\n BaseOutput.PARAM_PLOT_X_LABEL: str,\n BaseOutput.PARAM_PLOT_Y_LABEL: str,\n BaseOutput.PARAM_PLOT_TITLE: str,\n BaseOutput.PARAM_PLOT_HEADER: bool,\n}\nPLOT_PROPS_SCHEMA = {\n **OUT_PSTAGE_DETAILED_SCHEMA[str],\n **PLOT_PROPS,\n}\nPLOT_PSTAGE_SCHEMA = {str: Any(PLOT_PROPS_SCHEMA, [PLOT_PROPS_SCHEMA])}\n\nPARAM_PSTAGE_NON_DEFAULT_SCHEMA = {str: [str]}\n\nVARS_SCHEMA = [str, dict]\n\nSTAGE_DEFINITION = {\n StageParams.PARAM_CMD: Any(str, list),\n Optional(StageParams.PARAM_WDIR): str,\n Optional(StageParams.PARAM_DEPS): [str],\n Optional(StageParams.PARAM_PARAMS): [Any(str, dict)],\n Optional(VARS_KWD): VARS_SCHEMA,\n Optional(StageParams.PARAM_FROZEN): bool,\n Optional(StageParams.PARAM_META): object,\n Optional(StageParams.PARAM_DESC): str,\n Optional(StageParams.PARAM_ALWAYS_CHANGED): bool,\n Optional(StageParams.PARAM_OUTS): [Any(str, OUT_PSTAGE_DETAILED_SCHEMA)],\n Optional(StageParams.PARAM_METRICS): [\n Any(str, OUT_PSTAGE_DETAILED_SCHEMA)\n ],\n Optional(StageParams.PARAM_PLOTS): [Any(str, PLOT_PSTAGE_SCHEMA)],\n}\n\nFOREACH_IN = {\n Required(FOREACH_KWD): Any(dict, list, str),\n Required(DO_KWD): STAGE_DEFINITION,\n}\nSINGLE_PIPELINE_STAGE_SCHEMA = {str: Any(STAGE_DEFINITION, FOREACH_IN)}\nMULTI_STAGE_SCHEMA = {\n STAGES: SINGLE_PIPELINE_STAGE_SCHEMA,\n VARS_KWD: VARS_SCHEMA,\n}\n\nCOMPILED_SINGLE_STAGE_SCHEMA = Schema(SINGLE_STAGE_SCHEMA)\nCOMPILED_MULTI_STAGE_SCHEMA = Schema(MULTI_STAGE_SCHEMA)\nCOMPILED_LOCK_FILE_STAGE_SCHEMA = Schema(LOCK_FILE_STAGE_SCHEMA)\nCOMPILED_LOCKFILE_SCHEMA = Schema(LOCKFILE_SCHEMA)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/cache.py_logging__get_stage_hash.return._get_cache_hash_to_single": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/cache.py_logging__get_stage_hash.return._get_cache_hash_to_single", "embedding": null, "metadata": {"file_path": "dvc/stage/cache.py", "file_name": "cache.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 57, "span_ids": ["RunCacheNotFoundError.__init__", "_get_stage_hash", "_get_cache_hash", "imports", "_can_hash", "RunCacheNotFoundError"], "tokens": 363}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nimport tempfile\nfrom contextlib import contextmanager\n\nfrom funcy import cached_property, first\nfrom voluptuous import Invalid\n\nfrom dvc.exceptions import DvcException\nfrom dvc.path_info import PathInfo\nfrom dvc.remote.base import _log_exceptions\nfrom dvc.schema import COMPILED_LOCK_FILE_STAGE_SCHEMA\nfrom dvc.utils import dict_sha256, relpath\nfrom dvc.utils.serialize import YAMLFileCorruptedError, dump_yaml, load_yaml\n\nfrom .loader import StageLoader\nfrom .serialize import to_single_stage_lockfile\n\nlogger = logging.getLogger(__name__)\n\n\nclass RunCacheNotFoundError(DvcException):\n def __init__(self, stage):\n super().__init__(f\"No run-cache for {stage.addressing}\")\n\n\ndef _get_cache_hash(cache, key=False):\n from dvc.hash_info import HashInfo\n\n if key:\n cache[\"outs\"] = [out[\"path\"] for out in cache.get(\"outs\", [])]\n return dict_sha256(\n cache, exclude=[HashInfo.PARAM_SIZE, HashInfo.PARAM_NFILES]\n )\n\n\ndef _can_hash(stage):\n if stage.is_callback or stage.always_changed:\n return False\n\n if not all([stage.cmd, stage.deps, stage.outs]):\n return False\n\n for dep in stage.deps:\n if not (dep.scheme == \"local\" and dep.def_path and dep.get_hash()):\n return False\n\n for out in stage.outs:\n if out.scheme != \"local\" or not out.def_path or out.persist:\n return False\n\n return True\n\n\ndef _get_stage_hash(stage):\n assert _can_hash(stage)\n return _get_cache_hash(to_single_stage_lockfile(stage), key=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/cache.py_StageCache_StageCache._cache_type_copy.try_.finally_.self.repo.cache.local.cache_types.cache_types": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/cache.py_StageCache_StageCache._cache_type_copy.try_.finally_.self.repo.cache.local.cache_types.cache_types", "embedding": null, "metadata": {"file_path": "dvc/stage/cache.py", "file_name": "cache.py", "file_type": "text/x-python", "category": "implementation", "start_line": 48, "end_line": 116, "span_ids": ["StageCache.__init__", "StageCache._create_stage", "StageCache._cache_type_copy", "StageCache._load_cache", "StageCache._get_cache_dir", "StageCache.tree", "StageCache.cache_dir", "StageCache._load", "StageCache._get_cache_path", "StageCache"], "tokens": 425}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StageCache:\n def __init__(self, repo):\n self.repo = repo\n\n @cached_property\n def cache_dir(self):\n return os.path.join(self.repo.cache.local.cache_dir, \"runs\")\n\n @property\n def tree(self):\n return self.repo.cache.local.tree\n\n def _get_cache_dir(self, key):\n return os.path.join(self.cache_dir, key[:2], key)\n\n def _get_cache_path(self, key, value):\n return os.path.join(self._get_cache_dir(key), value)\n\n def _load_cache(self, key, value):\n path = self._get_cache_path(key, value)\n\n try:\n return COMPILED_LOCK_FILE_STAGE_SCHEMA(load_yaml(path))\n except FileNotFoundError:\n return None\n except (YAMLFileCorruptedError, Invalid):\n logger.warning(\"corrupted cache file '%s'.\", relpath(path))\n os.unlink(path)\n return None\n\n def _load(self, stage):\n key = _get_stage_hash(stage)\n if not key:\n return None\n\n cache_dir = self._get_cache_dir(key)\n if not os.path.exists(cache_dir):\n return None\n\n for value in os.listdir(cache_dir):\n cache = self._load_cache(key, value)\n if cache:\n return cache\n\n return None\n\n def _create_stage(self, cache, wdir=None):\n from . import PipelineStage, create_stage\n\n stage = create_stage(\n PipelineStage,\n repo=self.repo,\n path=\"dvc.yaml\",\n cmd=cache[\"cmd\"],\n wdir=wdir,\n outs=[out[\"path\"] for out in cache[\"outs\"]],\n external=True,\n )\n StageLoader.fill_from_lock(stage, cache)\n return stage\n\n @contextmanager\n def _cache_type_copy(self):\n cache_types = self.repo.cache.local.cache_types\n self.repo.cache.local.cache_types = [\"copy\"]\n try:\n yield\n finally:\n self.repo.cache.local.cache_types = cache_types", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/cache.py_StageCache._uncached_outs_StageCache._uncached_outs.with_self__cache_type_cop.for_out_in_cached_stage_o.if_out_def_path_in_outs_n.yield_out": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/cache.py_StageCache._uncached_outs_StageCache._uncached_outs.with_self__cache_type_cop.for_out_in_cached_stage_o.if_out_def_path_in_outs_n.yield_out", "embedding": null, "metadata": {"file_path": "dvc/stage/cache.py", "file_name": "cache.py", "file_type": "text/x-python", "category": "implementation", "start_line": 106, "end_line": 120, "span_ids": ["StageCache._uncached_outs"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StageCache:\n\n def _uncached_outs(self, stage, cache):\n # NOTE: using temporary stage to avoid accidentally modifying original\n # stage and to workaround `commit/checkout` not working for uncached\n # outputs.\n cached_stage = self._create_stage(cache, wdir=stage.wdir)\n\n outs_no_cache = [\n out.def_path for out in stage.outs if not out.use_cache\n ]\n\n # NOTE: using copy link to make it look like a git-tracked file\n with self._cache_type_copy():\n for out in cached_stage.outs:\n if out.def_path in outs_no_cache:\n yield out", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/cache.py_StageCache.push_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/cache.py_StageCache.push_", "embedding": null, "metadata": {"file_path": "dvc/stage/cache.py", "file_name": "cache.py", "file_type": "text/x-python", "category": "implementation", "start_line": 179, "end_line": 207, "span_ids": ["StageCache.pull", "StageCache.get_used_cache", "StageCache.push"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StageCache:\n\n def push(self, remote):\n remote = self.repo.cloud.get_remote(remote)\n return self._transfer(\n _log_exceptions(remote.tree.upload, \"upload\"),\n self.repo.cache.local.tree,\n remote.tree,\n )\n\n def pull(self, remote):\n remote = self.repo.cloud.get_remote(remote)\n return self._transfer(\n _log_exceptions(remote.tree.download, \"download\"),\n remote.tree,\n self.repo.cache.local.tree,\n )\n\n def get_used_cache(self, used_run_cache, *args, **kwargs):\n from dvc.cache import NamedCache\n\n cache = NamedCache()\n\n for key, value in used_run_cache:\n entry = self._load_cache(key, value)\n if not entry:\n continue\n stage = self._create_stage(entry)\n cache.update(stage.get_used_cache(*args, **kwargs))\n return cache", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/loader.py_SingleStageLoader_SingleStageLoader.__getitem__.return.self_load_stage_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/loader.py_SingleStageLoader_SingleStageLoader.__getitem__.return.self_load_stage_", "embedding": null, "metadata": {"file_path": "dvc/stage/loader.py", "file_name": "loader.py", "file_type": "text/x-python", "category": "implementation", "start_line": 105, "end_line": 122, "span_ids": ["SingleStageLoader.__getitem__", "SingleStageLoader", "SingleStageLoader.__init__"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SingleStageLoader(Mapping):\n def __init__(self, dvcfile, stage_data, stage_text=None):\n self.dvcfile = dvcfile\n self.stage_data = stage_data or {}\n self.stage_text = stage_text\n\n def __getitem__(self, item):\n if item:\n logger.warning(\n \"Ignoring name '%s' for single stage in '%s'.\",\n item,\n self.dvcfile,\n )\n # during `load`, we remove attributes from stage data, so as to\n # not duplicate, therefore, for MappingView, we need to deepcopy.\n return self.load_stage(\n self.dvcfile, deepcopy(self.stage_data), self.stage_text\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/loader.py_SingleStageLoader.load_stage_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/loader.py_SingleStageLoader.load_stage_", "embedding": null, "metadata": {"file_path": "dvc/stage/loader.py", "file_name": "loader.py", "file_type": "text/x-python", "category": "implementation", "start_line": 124, "end_line": 143, "span_ids": ["SingleStageLoader.__len__", "SingleStageLoader.load_stage", "SingleStageLoader.__iter__", "SingleStageLoader.__contains__"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SingleStageLoader(Mapping):\n\n @classmethod\n def load_stage(cls, dvcfile, d, stage_text):\n path, wdir = resolve_paths(dvcfile.path, d.get(Stage.PARAM_WDIR))\n stage = loads_from(Stage, dvcfile.repo, path, wdir, d)\n stage._stage_text = stage_text # noqa, pylint:disable=protected-access\n stage.deps = dependency.loadd_from(\n stage, d.get(Stage.PARAM_DEPS) or []\n )\n stage.outs = output.loadd_from(stage, d.get(Stage.PARAM_OUTS) or [])\n return stage\n\n def __iter__(self):\n return iter([None])\n\n def __contains__(self, item):\n return False\n\n def __len__(self):\n return 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py_bytes_hash_is_binary.return.getattr_sys_frozen_Fa": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py_bytes_hash_is_binary.return.getattr_sys_frozen_Fa", "embedding": null, "metadata": {"file_path": "dvc/utils/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 78, "end_line": 148, "span_ids": ["to_chunks", "is_binary", "dict_filter", "_split", "_to_chunks_by_chunks_number", "dict_sha256", "bytes_hash", "dict_md5", "dict_hash"], "tokens": 449}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def bytes_hash(byts, typ):\n hasher = getattr(hashlib, typ)()\n hasher.update(byts)\n return hasher.hexdigest()\n\n\ndef dict_filter(d, exclude=()):\n \"\"\"\n Exclude specified keys from a nested dict\n \"\"\"\n\n if isinstance(d, list):\n return [dict_filter(e, exclude) for e in d]\n\n if isinstance(d, dict):\n return {\n k: dict_filter(v, exclude)\n for k, v in d.items()\n if k not in exclude\n }\n\n return d\n\n\ndef dict_hash(d, typ, exclude=()):\n filtered = dict_filter(d, exclude)\n byts = json.dumps(filtered, sort_keys=True).encode(\"utf-8\")\n return bytes_hash(byts, typ)\n\n\ndef dict_md5(d, **kwargs):\n return dict_hash(d, \"md5\", **kwargs)\n\n\ndef dict_sha256(d, **kwargs):\n return dict_hash(d, \"sha256\", **kwargs)\n\n\ndef _split(list_to_split, chunk_size):\n return [\n list_to_split[i : i + chunk_size]\n for i in range(0, len(list_to_split), chunk_size)\n ]\n\n\ndef _to_chunks_by_chunks_number(list_to_split, num_chunks):\n chunk_size = int(math.ceil(float(len(list_to_split)) / num_chunks))\n\n if len(list_to_split) == 1:\n return [list_to_split]\n\n if chunk_size == 0:\n chunk_size = 1\n\n return _split(list_to_split, chunk_size)\n\n\ndef to_chunks(list_to_split, num_chunks=None, chunk_size=None):\n if (num_chunks and chunk_size) or (not num_chunks and not chunk_size):\n raise ValueError(\n \"Only one among `num_chunks` or `chunk_size` must be defined.\"\n )\n if chunk_size:\n return _split(list_to_split, chunk_size)\n return _to_chunks_by_chunks_number(list_to_split, num_chunks)\n\n\n# NOTE: Check if we are in a bundle\n# https://pythonhosted.org/PyInstaller/runtime-information.html\ndef is_binary():\n return getattr(sys, \"frozen\", False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/fs.py_errno_get_inode.return.inode": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/fs.py_errno_get_inode.return.inode", "embedding": null, "metadata": {"file_path": "dvc/utils/fs.py", "file_name": "fs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 30, "span_ids": ["imports", "get_inode", "fs_copy"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import errno\nimport logging\nimport os\nimport shutil\nimport stat\nimport sys\n\nimport nanotime\nfrom shortuuid import uuid\n\nfrom dvc.exceptions import DvcException, FileOwnershipError\nfrom dvc.system import System\nfrom dvc.utils import dict_md5\n\nlogger = logging.getLogger(__name__)\n\nLOCAL_CHUNK_SIZE = 2 ** 20 # 1 MB\n\n\ndef fs_copy(src, dst):\n if os.path.isdir(src):\n shutil.copytree(src, dst)\n else:\n shutil.copy2(src, dst)\n\n\ndef get_inode(path):\n inode = System.inode(path)\n logger.trace(\"Path '%s' inode '%d'\", path, inode)\n return inode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/humanize.py_from_funcy_import_is_seq_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/humanize.py_from_funcy_import_is_seq_", "embedding": null, "metadata": {"file_path": "dvc/utils/humanize.py", "file_name": "humanize.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 28, "span_ids": ["join", "imports", "get_summary"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from funcy import is_seq\n\n\ndef join(words):\n words = list(words)\n if not words:\n return \"\"\n\n return (\n \"{before} and {after}\".format(\n before=\", \".join(words[:-1]), after=words[-1],\n )\n if len(words) > 1\n else words[0]\n )\n\n\ndef get_summary(stats):\n status = (\n (state, len(data) if is_seq(data) else data)\n for state, data in stats\n if data\n )\n return join(\n \"{} file{} {}\".format(num, \"s\" if num > 1 else \"\", state)\n for state, num in status\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_diff.py_test_diff_with_unchanged_test_diff_with_unchanged.assert_dvc_params_diff_a_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_diff.py_test_diff_with_unchanged_test_diff_with_unchanged.assert_dvc_params_diff_a_", "embedding": null, "metadata": {"file_path": "tests/func/params/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 104, "end_line": 118, "span_ids": ["test_diff_with_unchanged"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_diff_with_unchanged(tmp_dir, scm, dvc):\n tmp_dir.gen(\"params.yaml\", \"foo: bar\\nxyz: val\")\n dvc.run(cmd=\"echo params.yaml\", params=[\"foo,xyz\"], single_stage=True)\n scm.add([\"params.yaml\", \"Dvcfile\"])\n scm.commit(\"bar\")\n\n tmp_dir.scm_gen(\"params.yaml\", \"foo: baz\\nxyz: val\", commit=\"baz\")\n tmp_dir.scm_gen(\"params.yaml\", \"foo: qux\\nxyz: val\", commit=\"qux\")\n\n assert dvc.params.diff(a_rev=\"HEAD~2\", all=True) == {\n \"params.yaml\": {\n \"foo\": {\"old\": \"bar\", \"new\": \"qux\"},\n \"xyz\": {\"old\": \"val\", \"new\": \"val\"},\n }\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_show.py_test_pipeline_tracked_params_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_show.py_test_pipeline_tracked_params_", "embedding": null, "metadata": {"file_path": "tests/func/params/test_show.py", "file_name": "test_show.py", "file_type": "text/x-python", "category": "test", "start_line": 83, "end_line": 107, "span_ids": ["test_pipeline_tracked_params", "test_show_no_repo"], "tokens": 254}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pipeline_tracked_params(tmp_dir, scm, dvc, run_copy):\n from dvc.dvcfile import PIPELINE_FILE\n\n tmp_dir.gen({\"foo\": \"foo\", \"params.yaml\": \"foo: bar\\nxyz: val\"})\n run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\", params=[\"foo,xyz\"])\n scm.add([\"params.yaml\", PIPELINE_FILE])\n scm.commit(\"add stage\")\n\n tmp_dir.scm_gen(\"params.yaml\", \"foo: baz\\nxyz: val\", commit=\"baz\")\n tmp_dir.scm_gen(\"params.yaml\", \"foo: qux\\nxyz: val\", commit=\"qux\")\n\n assert dvc.params.show(revs=[\"master\"]) == {\n \"master\": {\"params.yaml\": {\"foo\": \"qux\", \"xyz\": \"val\"}}\n }\n\n\ndef test_show_no_repo(tmp_dir):\n tmp_dir.gen({\"foo\": \"foo\", \"params_file.yaml\": \"foo: bar\\nxyz: val\"})\n\n dvc = Repo(uninitialized=True)\n\n assert dvc.params.show(targets=[\"params_file.yaml\"]) == {\n \"\": {\"params_file.yaml\": {\"foo\": \"bar\", \"xyz\": \"val\"}}\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_optimization_for_hardlink_on_empty_files_test_add_optimization_for_hardlink_on_empty_files.for_stage_in_stages_.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_optimization_for_hardlink_on_empty_files_test_add_optimization_for_hardlink_on_empty_files.for_stage_in_stages_.None_1", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 773, "end_line": 792, "span_ids": ["test_add_optimization_for_hardlink_on_empty_files"], "tokens": 213}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_add_optimization_for_hardlink_on_empty_files(tmp_dir, dvc, mocker):\n dvc.cache.local.cache_types = [\"hardlink\"]\n tmp_dir.gen({\"foo\": \"\", \"bar\": \"\", \"lorem\": \"lorem\", \"ipsum\": \"ipsum\"})\n m = mocker.spy(LocalTree, \"is_hardlink\")\n stages = dvc.add([\"foo\", \"bar\", \"lorem\", \"ipsum\"])\n\n assert m.call_count == 1\n assert m.call_args != call(tmp_dir / \"foo\")\n assert m.call_args != call(tmp_dir / \"bar\")\n\n for stage in stages[:2]:\n # hardlinks are not created for empty files\n assert not System.is_hardlink(stage.outs[0].path_info)\n\n for stage in stages[2:]:\n assert System.is_hardlink(stage.outs[0].path_info)\n\n for stage in stages:\n assert os.path.exists(stage.path)\n assert os.path.exists(stage.outs[0].cache_path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_pull_external_dvc_imports_recurse_list_dir.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_pull_external_dvc_imports_recurse_list_dir.return._", "embedding": null, "metadata": {"file_path": "tests/func/test_data_cloud.py", "file_name": "test_data_cloud.py", "file_type": "text/x-python", "category": "test", "start_line": 314, "end_line": 352, "span_ids": ["recurse_list_dir", "clean", "test_pull_external_dvc_imports"], "tokens": 315}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pull_external_dvc_imports(tmp_dir, dvc, scm, erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen({\"dir\": {\"bar\": \"bar\"}}, commit=\"second\")\n erepo_dir.dvc_gen(\"foo\", \"foo\", commit=\"first\")\n\n os.remove(\"foo\")\n shutil.rmtree(\"dir\")\n\n dvc.imp(os.fspath(erepo_dir), \"foo\")\n dvc.imp(os.fspath(erepo_dir), \"dir\", out=\"new_dir\", rev=\"HEAD~\")\n\n assert dvc.pull()[\"fetched\"] == 0\n\n clean([\"foo\", \"new_dir\"], dvc)\n\n assert dvc.pull(force=True)[\"fetched\"] == 2\n\n assert (tmp_dir / \"foo\").exists()\n assert (tmp_dir / \"foo\").read_text() == \"foo\"\n\n assert (tmp_dir / \"new_dir\").exists()\n assert (tmp_dir / \"new_dir\" / \"bar\").read_text() == \"bar\"\n\n\ndef clean(outs, dvc=None):\n if dvc:\n outs = outs + [dvc.cache.local.cache_dir]\n for path in outs:\n print(path)\n remove(path)\n if dvc:\n os.makedirs(dvc.cache.local.cache_dir, exist_ok=True)\n clean_repos()\n\n\ndef recurse_list_dir(d):\n return [\n os.path.join(d, f) for _, _, filenames in os.walk(d) for f in filenames\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_dvc_pull_pipeline_stages_test_dvc_pull_pipeline_stages.None_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_dvc_pull_pipeline_stages_test_dvc_pull_pipeline_stages.None_4", "embedding": null, "metadata": {"file_path": "tests/func/test_data_cloud.py", "file_name": "test_data_cloud.py", "file_type": "text/x-python", "category": "test", "start_line": 355, "end_line": 383, "span_ids": ["test_dvc_pull_pipeline_stages"], "tokens": 295}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_dvc_pull_pipeline_stages(tmp_dir, dvc, run_copy, local_remote):\n (stage0,) = tmp_dir.dvc_gen(\"foo\", \"foo\")\n stage1 = run_copy(\"foo\", \"bar\", single_stage=True)\n stage2 = run_copy(\"bar\", \"foobar\", name=\"copy-bar-foobar\")\n dvc.push()\n\n outs = [\"foo\", \"bar\", \"foobar\"]\n\n clean(outs, dvc)\n dvc.pull()\n assert all((tmp_dir / file).exists() for file in outs)\n\n for out, stage in zip(outs, [stage0, stage1, stage2]):\n for target in [stage.addressing, out]:\n clean(outs, dvc)\n stats = dvc.pull([target])\n assert stats[\"fetched\"] == 1\n assert stats[\"added\"] == [out]\n assert os.path.exists(out)\n assert not any(os.path.exists(out) for out in set(outs) - {out})\n\n clean(outs, dvc)\n stats = dvc.pull([stage2.addressing], with_deps=True)\n assert len(stats[\"added\"]) == 3\n assert set(stats[\"added\"]) == set(outs)\n\n clean(outs, dvc)\n stats = dvc.pull([os.curdir], recursive=True)\n assert set(stats[\"added\"]) == set(outs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_pipeline_file_target_ops_test_pipeline_file_target_ops.None_1.dvc_pull_dvc_yaml_Stage": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_pipeline_file_target_ops_test_pipeline_file_target_ops.None_1.dvc_pull_dvc_yaml_Stage", "embedding": null, "metadata": {"file_path": "tests/func/test_data_cloud.py", "file_name": "test_data_cloud.py", "file_type": "text/x-python", "category": "test", "start_line": 386, "end_line": 429, "span_ids": ["test_pipeline_file_target_ops"], "tokens": 397}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pipeline_file_target_ops(tmp_dir, dvc, run_copy, local_remote):\n path = local_remote.url\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n run_copy(\"foo\", \"bar\", single_stage=True)\n\n tmp_dir.dvc_gen(\"lorem\", \"lorem\")\n run_copy(\"lorem\", \"lorem2\", name=\"copy-lorem-lorem2\")\n\n tmp_dir.dvc_gen(\"ipsum\", \"ipsum\")\n run_copy(\"ipsum\", \"baz\", name=\"copy-ipsum-baz\")\n\n outs = [\"foo\", \"bar\", \"lorem\", \"ipsum\", \"baz\", \"lorem2\"]\n\n remove(dvc.stage_cache.cache_dir)\n\n dvc.push()\n\n outs = [\"foo\", \"bar\", \"lorem\", \"ipsum\", \"baz\", \"lorem2\"]\n\n # each one's a copy of other, hence 3\n assert len(recurse_list_dir(path)) == 3\n\n clean(outs, dvc)\n assert set(dvc.pull([\"dvc.yaml\"])[\"added\"]) == {\"lorem2\", \"baz\"}\n\n clean(outs, dvc)\n assert set(dvc.pull()[\"added\"]) == set(outs)\n\n # clean everything in remote and push\n from tests.dir_helpers import TmpDir\n\n clean(TmpDir(path).iterdir())\n dvc.push([\"dvc.yaml:copy-ipsum-baz\"])\n assert len(recurse_list_dir(path)) == 1\n\n clean(TmpDir(path).iterdir())\n dvc.push([\"dvc.yaml\"])\n assert len(recurse_list_dir(path)) == 2\n\n with pytest.raises(StageNotFound):\n dvc.push([\"dvc.yaml:StageThatDoesNotExist\"])\n\n with pytest.raises(StageNotFound):\n dvc.pull([\"dvc.yaml:StageThatDoesNotExist\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_push_stats_test_push_stats.assert_msg_in_caplog_text": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_push_stats_test_push_stats.assert_msg_in_caplog_text", "embedding": null, "metadata": {"file_path": "tests/func/test_data_cloud.py", "file_name": "test_data_cloud.py", "file_type": "text/x-python", "category": "test", "start_line": 432, "end_line": 446, "span_ids": ["test_push_stats"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"fs, msg\",\n [\n ({\"foo\": \"foo\", \"bar\": \"bar\"}, \"2 files pushed\"),\n ({\"foo\": \"foo\"}, \"1 file pushed\"),\n ({}, \"Everything is up to date\"),\n ],\n)\ndef test_push_stats(tmp_dir, dvc, fs, msg, caplog, local_remote):\n tmp_dir.dvc_gen(fs)\n\n caplog.clear()\n with caplog.at_level(level=logging.INFO, logger=\"dvc\"):\n main([\"push\"])\n assert msg in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_fetch_stats_test_fetch_stats.assert_msg_in_caplog_text": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_fetch_stats_test_fetch_stats.assert_msg_in_caplog_text", "embedding": null, "metadata": {"file_path": "tests/func/test_data_cloud.py", "file_name": "test_data_cloud.py", "file_type": "text/x-python", "category": "test", "start_line": 449, "end_line": 464, "span_ids": ["test_fetch_stats"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"fs, msg\",\n [\n ({\"foo\": \"foo\", \"bar\": \"bar\"}, \"2 files fetched\"),\n ({\"foo\": \"foo\"}, \"1 file fetched\"),\n ({}, \"Everything is up to date.\"),\n ],\n)\ndef test_fetch_stats(tmp_dir, dvc, fs, msg, caplog, local_remote):\n tmp_dir.dvc_gen(fs)\n dvc.push()\n clean(list(fs.keys()), dvc)\n caplog.clear()\n with caplog.at_level(level=logging.INFO, logger=\"dvc\"):\n main([\"fetch\"])\n assert msg in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_load_all_multistage_test_load_all_multistage.assert_set_Dvcfile_dvc_P": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_load_all_multistage_test_load_all_multistage.assert_set_Dvcfile_dvc_P", "embedding": null, "metadata": {"file_path": "tests/func/test_dvcfile.py", "file_name": "test_dvcfile.py", "file_type": "text/x-python", "category": "test", "start_line": 77, "end_line": 98, "span_ids": ["test_load_all_multistage"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_load_all_multistage(tmp_dir, dvc):\n tmp_dir.gen(\"foo\", \"foo\")\n stage1 = dvc.run(\n cmd=\"cp foo foo2\",\n deps=[\"foo\"],\n name=\"copy-foo-foo2\",\n metrics=[\"foo2\"],\n always_changed=True,\n )\n stages = Dvcfile(dvc, PIPELINE_FILE).stages.values()\n assert len(stages) == 1\n assert list(stages) == [stage1]\n\n tmp_dir.gen(\"bar\", \"bar\")\n stage2 = dvc.run(\n cmd=\"cp bar bar2\",\n deps=[\"bar\"],\n name=\"copy-bar-bar2\",\n metrics=[\"bar2\"],\n always_changed=True,\n )\n assert set(Dvcfile(dvc, PIPELINE_FILE).stages.values()) == {stage2, stage1}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_load_all_singlestage_test_try_get_single_stage_from_pipeline_file.with_pytest_raises_DvcExc.assert_Dvcfile_dvc_PIPEL": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_load_all_singlestage_test_try_get_single_stage_from_pipeline_file.with_pytest_raises_DvcExc.assert_Dvcfile_dvc_PIPEL", "embedding": null, "metadata": {"file_path": "tests/func/test_dvcfile.py", "file_name": "test_dvcfile.py", "file_type": "text/x-python", "category": "test", "start_line": 105, "end_line": 134, "span_ids": ["test_load_all_singlestage", "test_try_get_single_stage_from_pipeline_file"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_load_all_singlestage(tmp_dir, dvc):\n tmp_dir.gen(\"foo\", \"foo\")\n stage1 = dvc.run(\n cmd=\"cp foo foo2\",\n deps=[\"foo\"],\n metrics=[\"foo2\"],\n always_changed=True,\n single_stage=True,\n )\n dvcfile = Dvcfile(dvc, \"foo2.dvc\")\n assert isinstance(dvcfile, SingleStageFile)\n assert len(dvcfile.stages) == 1\n stages = dvcfile.stages.values()\n assert len(stages) == 1\n assert list(stages) == [stage1]\n\n\ndef test_try_get_single_stage_from_pipeline_file(tmp_dir, dvc):\n from dvc.dvcfile import DvcException\n\n tmp_dir.gen(\"foo\", \"foo\")\n dvc.run(\n cmd=\"cp foo foo2\",\n deps=[\"foo\"],\n name=\"copy-foo-foo2\",\n metrics=[\"foo2\"],\n always_changed=True,\n )\n with pytest.raises(DvcException):\n assert Dvcfile(dvc, PIPELINE_FILE).stage", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_gc_without_workspace_on_tags_branches_commits_test_gc_cloud_positive.for_flag_in_cw_ca_.assert_main_gc_vf_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_gc_without_workspace_on_tags_branches_commits_test_gc_cloud_positive.for_flag_in_cw_ca_.assert_main_gc_vf_", "embedding": null, "metadata": {"file_path": "tests/func/test_gc.py", "file_name": "test_gc.py", "file_type": "text/x-python", "category": "test", "start_line": 258, "end_line": 303, "span_ids": ["test_gc_without_workspace_on_tags_branches_commits", "test_gc_with_possible_args_positive", "test_gc_without_workspace", "test_gc_cloud_without_any_specifier", "test_gc_cloud_positive"], "tokens": 408}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_gc_without_workspace_on_tags_branches_commits(tmp_dir, dvc):\n dvc.gc(force=True, all_tags=True)\n dvc.gc(force=True, all_commits=True)\n dvc.gc(force=False, all_branches=True)\n\n # even if workspace is disabled, and others are enabled, assume as if\n # workspace is enabled.\n dvc.gc(force=False, all_branches=True, all_commits=False, workspace=False)\n\n\ndef test_gc_without_workspace(tmp_dir, dvc, caplog):\n with caplog.at_level(logging.WARNING, logger=\"dvc\"):\n assert main([\"gc\", \"-vf\"]) == 255\n\n assert (\n \"Either of `-w|--workspace`, `-a|--all-branches`, `-T|--all-tags` \"\n \"`--all-experiments` or `--all-commits` needs to be set.\"\n ) in caplog.text\n\n\ndef test_gc_cloud_without_any_specifier(tmp_dir, dvc, caplog):\n with caplog.at_level(logging.WARNING, logger=\"dvc\"):\n assert main([\"gc\", \"-cvf\"]) == 255\n\n assert (\n \"Either of `-w|--workspace`, `-a|--all-branches`, `-T|--all-tags` \"\n \"`--all-experiments` or `--all-commits` needs to be set.\"\n ) in caplog.text\n\n\ndef test_gc_with_possible_args_positive(tmp_dir, dvc):\n for flag in [\n \"-w\",\n \"-a\",\n \"-T\",\n \"--all-commits\",\n \"-aT\",\n \"-wa\",\n \"-waT\",\n ]:\n assert main([\"gc\", \"-vf\", flag]) == 0\n\n\ndef test_gc_cloud_positive(tmp_dir, dvc, tmp_path_factory, local_remote):\n for flag in [\"-cw\", \"-ca\", \"-cT\", \"-caT\", \"-cwT\"]:\n assert main([\"gc\", \"-vf\", flag]) == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_gc_cloud_remove_order_test_gc_cloud_remove_order.for_args_in_mocked_remove.assert_checksum_endswith_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_gc_cloud_remove_order_test_gc_cloud_remove_order.for_args_in_mocked_remove.assert_checksum_endswith_", "embedding": null, "metadata": {"file_path": "tests/func/test_gc.py", "file_name": "test_gc.py", "file_type": "text/x-python", "category": "test", "start_line": 305, "end_line": 330, "span_ids": ["test_gc_cloud_remove_order"], "tokens": 274}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_gc_cloud_remove_order(tmp_dir, scm, dvc, tmp_path_factory, mocker):\n storage = os.fspath(tmp_path_factory.mktemp(\"test_remote_base\"))\n dvc.config[\"remote\"][\"local_remote\"] = {\"url\": storage}\n dvc.config[\"core\"][\"remote\"] = \"local_remote\"\n\n (standalone, dir1, dir2) = tmp_dir.dvc_gen(\n {\n \"file1\": \"standalone\",\n \"dir1\": {\"file2\": \"file2\"},\n \"dir2\": {\"file3\": \"file3\", \"file4\": \"file4\"},\n }\n )\n dvc.push()\n dvc.remove(standalone.relpath)\n dvc.remove(dir1.relpath)\n dvc.remove(dir2.relpath)\n dvc.gc(workspace=True)\n\n mocked_remove = mocker.patch.object(LocalTree, \"remove\", autospec=True)\n dvc.gc(workspace=True, cloud=True)\n assert len(mocked_remove.mock_calls) == 8\n # dir (and unpacked dir) should be first 4 checksums removed from\n # the remote\n for args in mocked_remove.call_args_list[:4]:\n checksum = str(args[0][1])\n assert checksum.endswith(\".dir\") or checksum.endswith(\".dir.unpacked\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_url_positive_test_get_url_git_only_repo.with_caplog_at_level_logg.assert_failed_to_show_UR": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_url_positive_test_get_url_git_only_repo.with_caplog_at_level_logg.assert_failed_to_show_UR", "embedding": null, "metadata": {"file_path": "tests/func/test_get.py", "file_name": "test_get.py", "file_type": "text/x-python", "category": "test", "start_line": 204, "end_line": 237, "span_ids": ["test_get_url_not_existing", "test_get_url_positive", "test_get_url_git_only_repo"], "tokens": 271}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_url_positive(tmp_dir, erepo_dir, caplog, local_cloud):\n erepo_dir.add_remote(config=local_cloud.config)\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\"foo\", \"foo\")\n erepo_dir.dvc.push()\n\n caplog.clear()\n with caplog.at_level(logging.ERROR, logger=\"dvc\"):\n assert main([\"get\", os.fspath(erepo_dir), \"foo\", \"--show-url\"]) == 0\n assert caplog.text == \"\"\n\n\ndef test_get_url_not_existing(tmp_dir, erepo_dir, caplog):\n with caplog.at_level(logging.ERROR, logger=\"dvc\"):\n assert (\n main(\n [\n \"get\",\n os.fspath(erepo_dir),\n \"not-existing-file\",\n \"--show-url\",\n ]\n )\n == 1\n )\n assert \"failed to show URL\" in caplog.text\n\n\ndef test_get_url_git_only_repo(tmp_dir, scm, caplog):\n tmp_dir.scm_gen({\"foo\": \"foo\"}, commit=\"initial\")\n\n with caplog.at_level(logging.ERROR):\n assert main([\"get\", os.fspath(tmp_dir), \"foo\", \"--show-url\"]) == 1\n assert \"failed to show URL\" in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_lockfile.py_test_deps_outs_are_sorted_by_path_test_deps_outs_are_sorted_by_path.assert_list_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_lockfile.py_test_deps_outs_are_sorted_by_path_test_deps_outs_are_sorted_by_path.assert_list_", "embedding": null, "metadata": {"file_path": "tests/func/test_lockfile.py", "file_name": "test_lockfile.py", "file_type": "text/x-python", "category": "test", "start_line": 34, "end_line": 59, "span_ids": ["test_deps_outs_are_sorted_by_path"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_deps_outs_are_sorted_by_path(tmp_dir, dvc, run_head):\n tmp_dir.gen(FS_STRUCTURE)\n deps = [\"foo\", \"bar\", \"foobar\"]\n run_head(*deps, name=\"copy-first-line\")\n\n initial_content = read_lock_file()\n lock = initial_content[\"copy-first-line\"]\n\n # lock stage key order:\n assert list(lock.keys()) == [\"cmd\", \"deps\", \"outs\"]\n\n # `path` key appear first and then the `md5`\n assert all(\n list(dep.keys()) == [\"path\", \"md5\", \"size\"] for dep in lock[\"deps\"]\n )\n assert all(\n list(out.keys()) == [\"path\", \"md5\", \"size\"] for out in lock[\"outs\"]\n )\n\n # deps are always sorted by the file path naming\n assert list(map(itemgetter(\"path\"), lock[\"deps\"])) == sorted(deps)\n\n # outs are too\n assert list(\n map(itemgetter(\"path\"), initial_content[\"copy-first-line\"][\"outs\"])\n ) == [d + \"-1\" for d in sorted(deps)]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_lockfile.py_test_order_is_preserved_when_pipeline_order_changes_test_order_is_preserved_when_pipeline_order_changes.for_reverse_items_in_reve.None_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_lockfile.py_test_order_is_preserved_when_pipeline_order_changes_test_order_is_preserved_when_pipeline_order_changes.for_reverse_items_in_reve.None_4", "embedding": null, "metadata": {"file_path": "tests/func/test_lockfile.py", "file_name": "test_lockfile.py", "file_type": "text/x-python", "category": "test", "start_line": 88, "end_line": 112, "span_ids": ["test_order_is_preserved_when_pipeline_order_changes"], "tokens": 220}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_order_is_preserved_when_pipeline_order_changes(\n tmp_dir, dvc, run_head\n):\n tmp_dir.gen(FS_STRUCTURE)\n deps = [\"foo\", \"bar\", \"foobar\"]\n stage = run_head(*deps, name=\"copy-first-line\")\n\n initial_content = read_lock_file()\n # reverse order of stage.outs and dump to the pipeline file\n # then, again change stage.deps and dump to the pipeline file\n reversal = stage.outs.reverse, stage.deps.reverse\n for reverse_items in reversal:\n reverse_items()\n stage.dvcfile._dump_pipeline_file(stage)\n\n # we only changed the order, should not reproduce\n assert not dvc.reproduce(stage.addressing)\n\n new_lock_content = read_lock_file()\n assert_eq_lockfile(new_lock_content, initial_content)\n\n (tmp_dir / PIPELINE_LOCK).unlink()\n assert dvc.reproduce(stage.addressing) == [stage]\n new_lock_content = read_lock_file()\n assert_eq_lockfile(new_lock_content, initial_content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_lockfile.py_test_cmd_changes_other_orders_are_preserved_test_cmd_changes_other_orders_are_preserved.assert_eq_lockfile_new_lo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_lockfile.py_test_cmd_changes_other_orders_are_preserved_test_cmd_changes_other_orders_are_preserved.assert_eq_lockfile_new_lo", "embedding": null, "metadata": {"file_path": "tests/func/test_lockfile.py", "file_name": "test_lockfile.py", "file_type": "text/x-python", "category": "test", "start_line": 115, "end_line": 132, "span_ids": ["test_cmd_changes_other_orders_are_preserved"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_cmd_changes_other_orders_are_preserved(tmp_dir, dvc, run_head):\n tmp_dir.gen(FS_STRUCTURE)\n deps = [\"foo\", \"bar\", \"foobar\"]\n stage = run_head(*deps, name=\"copy-first-line\")\n\n initial_content = read_lock_file()\n # let's change cmd in pipeline file\n # it should only change \"cmd\", otherwise it should be\n # structurally same as cmd\n stage.cmd = \" \".join(stage.cmd.split())\n stage.dvcfile._dump_pipeline_file(stage)\n\n initial_content[\"copy-first-line\"][\"cmd\"] = stage.cmd\n\n assert dvc.reproduce(stage.addressing) == [stage]\n\n new_lock_content = read_lock_file()\n assert_eq_lockfile(new_lock_content, initial_content)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_lockfile.py_test_params_dump_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_lockfile.py_test_params_dump_", "embedding": null, "metadata": {"file_path": "tests/func/test_lockfile.py", "file_name": "test_lockfile.py", "file_type": "text/x-python", "category": "test", "start_line": 107, "end_line": 156, "span_ids": ["test_params_dump"], "tokens": 391}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_params_dump(tmp_dir, dvc, run_head):\n tmp_dir.gen(FS_STRUCTURE)\n\n stage = run_head(\n \"foo\",\n \"bar\",\n \"foobar\",\n name=\"copy-first-line\",\n params=[\n \"params2.yaml:answer,lists,name\",\n \"params.yaml:lists,floats,nested.nested1,nested.nested1.nested2\",\n ],\n )\n\n initial_content = read_lock_file()\n lock = initial_content[\"copy-first-line\"]\n\n # lock stage key order:\n assert list(lock.keys()) == [\"cmd\", \"deps\", \"params\", \"outs\"]\n assert list(lock[\"params\"].keys()) == [\"params.yaml\", \"params2.yaml\"]\n\n # # params keys are always sorted by the name\n assert list(lock[\"params\"][\"params.yaml\"].keys()) == [\n \"floats\",\n \"lists\",\n \"nested.nested1\",\n \"nested.nested1.nested2\",\n ]\n assert list(lock[\"params\"][\"params2.yaml\"]) == [\"answer\", \"lists\", \"name\"]\n\n assert not dvc.reproduce(stage.addressing)\n\n # let's change the order of params and dump them in pipeline file\n params, _ = split_params_deps(stage)\n for param in params:\n param.params.reverse()\n\n stage.dvcfile._dump_pipeline_file(stage)\n assert not dvc.reproduce(stage.addressing)\n\n (tmp_dir / PIPELINE_LOCK).unlink()\n assert dvc.reproduce(stage.addressing) == [stage]\n assert_eq_lockfile(initial_content, read_lock_file())\n\n # remove build-cache and check if the same structure is built\n for item in [dvc.stage_cache.cache_dir, PIPELINE_LOCK]:\n remove(item)\n assert dvc.reproduce(stage.addressing) == [stage]\n assert_eq_lockfile(initial_content, read_lock_file())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_remote_repo_with_rev_recursive_test_ls_remote_repo_with_rev_recursive.match_files_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_remote_repo_with_rev_recursive_test_ls_remote_repo_with_rev_recursive.match_files_", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 413, "end_line": 438, "span_ids": ["test_ls_remote_repo_with_rev_recursive"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ls_remote_repo_with_rev_recursive(erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(DVC_STRUCTURE, commit=\"dvc\")\n erepo_dir.scm_gen(FS_STRUCTURE, commit=\"init\")\n\n rev = erepo_dir.scm.list_all_commits()[1]\n url = f\"file://{erepo_dir}\"\n files = Repo.ls(url, rev=rev, recursive=True)\n match_files(\n files,\n (\n ((\"structure.xml.dvc\",), False),\n ((\"model\", \"people.csv.dvc\"), False),\n ((\"data\", \"subcontent\", \"data.xml.dvc\"), False),\n ((\"data\", \"subcontent\", \"statistics\", \"data.csv.dvc\"), False),\n ((\"data\", \"subcontent\", \"statistics\", \"data.csv\"), True),\n ((\"data\", \"subcontent\", \"statistics\", \".gitignore\"), False),\n ((\"data\", \"subcontent\", \"data.xml\"), True),\n ((\"data\", \"subcontent\", \".gitignore\"), False),\n ((\"model\", \"people.csv\"), True),\n ((\"model\", \".gitignore\"), False),\n ((\"structure.xml\",), True),\n ((\".dvcignore\",), False),\n ((\".gitignore\",), False),\n ),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_raise_on_too_many_open_files_test_modify_missing_remote.assert_main_remote_m": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_raise_on_too_many_open_files_test_modify_missing_remote.assert_main_remote_m", "embedding": null, "metadata": {"file_path": "tests/func/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 216, "end_line": 233, "span_ids": ["test_modify_missing_remote", "test_raise_on_too_many_open_files"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_raise_on_too_many_open_files(\n tmp_dir, dvc, tmp_path_factory, mocker, local_remote\n):\n tmp_dir.dvc_gen({\"file\": \"file content\"})\n\n mocker.patch.object(\n LocalTree,\n \"_upload\",\n side_effect=OSError(errno.EMFILE, \"Too many open files\"),\n )\n\n with pytest.raises(OSError) as e:\n dvc.push()\n assert e.errno == errno.EMFILE\n\n\ndef test_modify_missing_remote(tmp_dir, dvc):\n assert main([\"remote\", \"modify\", \"myremote\", \"user\", \"xxx\"]) == 251", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_test_downstream_test_downstream.assert_evaluation_4_relp": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_test_downstream_test_downstream.assert_evaluation_4_relp", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 1620, "end_line": 1698, "span_ids": ["test_downstream"], "tokens": 576}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_downstream(dvc):\n # The dependency graph should look like this:\n #\n # E\n # / \\\n # D F\n # / \\ \\\n # B C G\n # \\ /\n # A\n #\n assert main([\"run\", \"--single-stage\", \"-o\", \"A\", \"echo A>A\"]) == 0\n assert (\n main([\"run\", \"--single-stage\", \"-d\", \"A\", \"-o\", \"B\", \"echo B>B\"]) == 0\n )\n assert (\n main([\"run\", \"--single-stage\", \"-d\", \"A\", \"-o\", \"C\", \"echo C>C\"]) == 0\n )\n assert (\n main(\n [\n \"run\",\n \"--single-stage\",\n \"-d\",\n \"B\",\n \"-d\",\n \"C\",\n \"-o\",\n \"D\",\n \"echo D>D\",\n ]\n )\n == 0\n )\n assert main([\"run\", \"--single-stage\", \"-o\", \"G\", \"echo G>G\"]) == 0\n assert (\n main([\"run\", \"--single-stage\", \"-d\", \"G\", \"-o\", \"F\", \"echo F>F\"]) == 0\n )\n assert (\n main(\n [\n \"run\",\n \"--single-stage\",\n \"-d\",\n \"D\",\n \"-d\",\n \"F\",\n \"-o\",\n \"E\",\n \"echo E>E\",\n ]\n )\n == 0\n )\n\n # We want the evaluation to move from B to E\n #\n # E\n # /\n # D\n # /\n # B\n #\n evaluation = dvc.reproduce(\"B.dvc\", downstream=True, force=True)\n\n assert len(evaluation) == 3\n assert evaluation[0].relpath == \"B.dvc\"\n assert evaluation[1].relpath == \"D.dvc\"\n assert evaluation[2].relpath == \"E.dvc\"\n\n # B, C should be run (in any order) before D\n # See https://github.com/iterative/dvc/issues/3602\n evaluation = dvc.reproduce(\"A.dvc\", downstream=True, force=True)\n\n assert len(evaluation) == 5\n assert evaluation[0].relpath == \"A.dvc\"\n assert {evaluation[1].relpath, evaluation[2].relpath} == {\"B.dvc\", \"C.dvc\"}\n assert evaluation[3].relpath == \"D.dvc\"\n assert evaluation[4].relpath == \"E.dvc\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_os_TestReproChangedDirMultiStage.pass": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_os_TestReproChangedDirMultiStage.pass", "embedding": null, "metadata": {"file_path": "tests/func/test_repro_multistage.py", "file_name": "test_repro_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 152, "span_ids": ["TestReproChangedDirMultiStage", "TestReproCyclicGraphMultiStage", "TestReproFailMultiStage", "MultiStageRun", "MultiStageRun._get_stage_target", "TestReproFrozenUnchangedMultiStage", "MultiStageRun._run", "TestReproUnderDirMultiStage", "TestReproPipelineMultiStage", "TestReproAllPipelinesMultiStage", "TestReproPipelinesMultiStage", "TestNonExistingOutputMultiStage", "TestReproFrozenCallbackMultiStage", "TestReproNoDepsMultiStage", "TestReproDry", "TestReproForceMultiStage", "TestReproChangedDeepDataMultiStage", "imports", "TestReproChangedCodeMultiStage", "TestReproPhonyMultiStage", "TestReproChangedDataMultiStage", "TestCmdReproMultiStage", "TestReproAlreadyCachedMultiStage", "TestReproFrozenMultiStage", "TestReproUpToDateMultiStage", "TestReproNoCommit", "TestReproDepDirWithOutputsUnderItMultiStage"], "tokens": 809}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nfrom copy import deepcopy\nfrom textwrap import dedent\n\nimport pytest\nfrom funcy import lsplit\n\nfrom dvc.dvcfile import PIPELINE_FILE, PIPELINE_LOCK\nfrom dvc.exceptions import CyclicGraphError, ReproductionError\nfrom dvc.main import main\nfrom dvc.stage import PipelineStage\nfrom dvc.utils.serialize import dump_yaml, load_yaml\nfrom tests.func import test_repro\n\nCOPY_SCRIPT_FORMAT = dedent(\n \"\"\"\\\n import sys\n import shutil\n shutil.copyfile({}, {})\n\"\"\"\n)\nCOPY_SCRIPT = COPY_SCRIPT_FORMAT.format(\"sys.argv[1]\", \"sys.argv[2]\")\n\n\nclass MultiStageRun:\n def _run(self, **kwargs):\n assert kwargs.get(\"name\")\n kwargs.pop(\"fname\", None)\n # ignore fname for now\n return self.dvc.run(**kwargs) # noqa, pylint: disable=no-member\n\n @staticmethod\n def _get_stage_target(stage):\n return stage.addressing\n\n\nclass TestReproFailMultiStage(MultiStageRun, test_repro.TestReproFail):\n pass\n\n\nclass TestReproCyclicGraphMultiStage(\n MultiStageRun, test_repro.TestReproCyclicGraph\n):\n pass\n\n\nclass TestReproUnderDirMultiStage(\n MultiStageRun, test_repro.TestReproDepUnderDir\n):\n pass\n\n\nclass TestReproDepDirWithOutputsUnderItMultiStage(\n MultiStageRun, test_repro.TestReproDepDirWithOutputsUnderIt\n):\n pass\n\n\nclass TestReproNoDepsMultiStage(MultiStageRun, test_repro.TestReproNoDeps):\n pass\n\n\nclass TestReproForceMultiStage(MultiStageRun, test_repro.TestReproForce):\n pass\n\n\nclass TestReproChangedCodeMultiStage(\n MultiStageRun, test_repro.TestReproChangedCode\n):\n pass\n\n\nclass TestReproChangedDataMultiStage(\n MultiStageRun, test_repro.TestReproChangedData\n):\n pass\n\n\nclass TestReproDry(MultiStageRun, test_repro.TestReproDry):\n pass\n\n\nclass TestReproUpToDateMultiStage(MultiStageRun, test_repro.TestReproUpToDate):\n pass\n\n\nclass TestReproChangedDeepDataMultiStage(\n MultiStageRun, test_repro.TestReproChangedDeepData\n):\n pass\n\n\nclass TestReproPipelineMultiStage(MultiStageRun, test_repro.TestReproPipeline):\n pass\n\n\nclass TestReproPipelinesMultiStage(\n MultiStageRun, test_repro.TestReproPipelines\n):\n pass\n\n\nclass TestReproFrozenMultiStage(MultiStageRun, test_repro.TestReproFrozen):\n pass\n\n\nclass TestReproFrozenCallbackMultiStage(\n MultiStageRun, test_repro.TestReproFrozenCallback\n):\n pass\n\n\nclass TestReproFrozenUnchangedMultiStage(\n MultiStageRun, test_repro.TestReproFrozenUnchanged\n):\n pass\n\n\nclass TestReproPhonyMultiStage(MultiStageRun, test_repro.TestReproPhony):\n pass\n\n\nclass TestCmdReproMultiStage(MultiStageRun, test_repro.TestCmdRepro):\n pass\n\n\nclass TestReproAllPipelinesMultiStage(\n MultiStageRun, test_repro.TestReproAllPipelines\n):\n pass\n\n\nclass TestReproNoCommit(MultiStageRun, test_repro.TestReproNoCommit):\n pass\n\n\nclass TestNonExistingOutputMultiStage(\n MultiStageRun, test_repro.TestNonExistingOutput\n):\n pass\n\n\nclass TestReproAlreadyCachedMultiStage(\n MultiStageRun, test_repro.TestReproAlreadyCached\n):\n pass\n\n\nclass TestReproChangedDirMultiStage(\n MultiStageRun, test_repro.TestReproChangedDir\n):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_downstream_test_downstream.None_15": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_downstream_test_downstream.None_15", "embedding": null, "metadata": {"file_path": "tests/func/test_repro_multistage.py", "file_name": "test_repro_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 210, "end_line": 307, "span_ids": ["test_downstream"], "tokens": 755}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_downstream(tmp_dir, dvc):\n # The dependency graph should look like this:\n #\n # E\n # / \\\n # D F\n # / \\ \\\n # B C G\n # \\ /\n # A\n #\n assert main([\"run\", \"-n\", \"A-gen\", \"-o\", \"A\", \"echo A>A\"]) == 0\n assert main([\"run\", \"-n\", \"B-gen\", \"-d\", \"A\", \"-o\", \"B\", \"echo B>B\"]) == 0\n assert (\n main([\"run\", \"--single-stage\", \"-d\", \"A\", \"-o\", \"C\", \"echo C>C\"]) == 0\n )\n assert (\n main(\n [\"run\", \"-n\", \"D-gen\", \"-d\", \"B\", \"-d\", \"C\", \"-o\", \"D\", \"echo D>D\"]\n )\n == 0\n )\n assert main([\"run\", \"--single-stage\", \"-o\", \"G\", \"echo G>G\"]) == 0\n assert main([\"run\", \"-n\", \"F-gen\", \"-d\", \"G\", \"-o\", \"F\", \"echo F>F\"]) == 0\n assert (\n main(\n [\n \"run\",\n \"--single-stage\",\n \"-d\",\n \"D\",\n \"-d\",\n \"F\",\n \"-o\",\n \"E\",\n \"echo E>E\",\n ]\n )\n == 0\n )\n\n # We want the evaluation to move from B to E\n #\n # E\n # /\n # D\n # /\n # B\n #\n evaluation = dvc.reproduce(\n PIPELINE_FILE + \":B-gen\", downstream=True, force=True\n )\n\n assert len(evaluation) == 3\n assert (\n isinstance(evaluation[0], PipelineStage)\n and evaluation[0].relpath == PIPELINE_FILE\n and evaluation[0].name == \"B-gen\"\n )\n assert (\n isinstance(evaluation[1], PipelineStage)\n and evaluation[1].relpath == PIPELINE_FILE\n and evaluation[1].name == \"D-gen\"\n )\n assert (\n not isinstance(evaluation[2], PipelineStage)\n and evaluation[2].relpath == \"E.dvc\"\n )\n\n # B, C should be run (in any order) before D\n # See https://github.com/iterative/dvc/issues/3602\n evaluation = dvc.reproduce(\n PIPELINE_FILE + \":A-gen\", downstream=True, force=True\n )\n\n assert len(evaluation) == 5\n assert (\n isinstance(evaluation[0], PipelineStage)\n and evaluation[0].relpath == PIPELINE_FILE\n and evaluation[0].name == \"A-gen\"\n )\n names = set()\n for stage in evaluation[1:3]:\n if isinstance(stage, PipelineStage):\n assert stage.relpath == PIPELINE_FILE\n names.add(stage.name)\n else:\n names.add(stage.relpath)\n assert names == {\"B-gen\", \"C.dvc\"}\n assert (\n isinstance(evaluation[3], PipelineStage)\n and evaluation[3].relpath == PIPELINE_FILE\n and evaluation[3].name == \"D-gen\"\n )\n assert (\n not isinstance(evaluation[4], PipelineStage)\n and evaluation[4].relpath == \"E.dvc\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_lockfile_gets_deleted_test_repro_when_lockfile_gets_deleted.assert_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_lockfile_gets_deleted_test_repro_when_lockfile_gets_deleted.assert_", "embedding": null, "metadata": {"file_path": "tests/func/test_repro_multistage.py", "file_name": "test_repro_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 463, "end_line": 488, "span_ids": ["test_repro_when_lockfile_gets_deleted"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_repro_when_lockfile_gets_deleted(tmp_dir, dvc):\n tmp_dir.gen(\"copy.py\", COPY_SCRIPT)\n tmp_dir.gen(\"foo\", \"foo\")\n dump_yaml(\n PIPELINE_FILE,\n {\n \"stages\": {\n \"run-copy\": {\n \"cmd\": \"python copy.py {} {}\".format(\"foo\", \"foobar\"),\n \"deps\": [\"foo\"],\n \"outs\": [\"foobar\"],\n }\n }\n },\n )\n assert dvc.reproduce(\":run-copy\")\n assert os.path.exists(PIPELINE_LOCK)\n\n assert not dvc.reproduce(\":run-copy\")\n os.unlink(PIPELINE_LOCK)\n stages = dvc.reproduce(\":run-copy\")\n assert (\n stages\n and stages[0].relpath == PIPELINE_FILE\n and stages[0].name == \"run-copy\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_cyclic_graph_error_test_cyclic_graph_error.with_pytest_raises_Cyclic.dvc_reproduce_copy_baz_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_cyclic_graph_error_test_cyclic_graph_error.with_pytest_raises_Cyclic.dvc_reproduce_copy_baz_", "embedding": null, "metadata": {"file_path": "tests/func/test_repro_multistage.py", "file_name": "test_repro_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 454, "end_line": 468, "span_ids": ["test_cyclic_graph_error"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_cyclic_graph_error(tmp_dir, dvc, run_copy):\n tmp_dir.gen(\"foo\", \"foo\")\n run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n run_copy(\"bar\", \"baz\", name=\"copy-bar-baz\")\n run_copy(\"baz\", \"foobar\", name=\"copy-baz-foobar\")\n\n data = load_yaml(PIPELINE_FILE)\n data[\"stages\"][\"copy-baz-foo\"] = {\n \"cmd\": \"echo baz > foo\",\n \"deps\": [\"baz\"],\n \"outs\": [\"foo\"],\n }\n dump_yaml(PIPELINE_FILE, data)\n with pytest.raises(CyclicGraphError):\n dvc.reproduce(\":copy-baz-foo\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_os_test_run_with_name.None_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_os_test_run_with_name.None_4", "embedding": null, "metadata": {"file_path": "tests/func/test_run_multistage.py", "file_name": "test_run_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 21, "span_ids": ["test_run_with_name", "imports"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport textwrap\n\nimport pytest\n\nfrom dvc.exceptions import InvalidArgumentError\nfrom dvc.stage.exceptions import DuplicateStageName, InvalidStageName\nfrom dvc.utils.serialize import dump_yaml, parse_yaml_for_update\n\n\ndef test_run_with_name(tmp_dir, dvc, run_copy):\n from dvc.dvcfile import PIPELINE_FILE, PIPELINE_LOCK\n from dvc.stage import PipelineStage\n\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n assert not os.path.exists(PIPELINE_FILE)\n stage = run_copy(\"foo\", \"bar\", name=\"copy-foo-to-bar\")\n assert isinstance(stage, PipelineStage)\n assert stage.name == \"copy-foo-to-bar\"\n assert os.path.exists(PIPELINE_FILE)\n assert os.path.exists(PIPELINE_LOCK)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_multi_stage_run_cached_test_multistage_dump_on_non_cached_outputs.dvc_run_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_multi_stage_run_cached_test_multistage_dump_on_non_cached_outputs.dvc_run_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_multistage.py", "file_name": "test_run_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 54, "end_line": 70, "span_ids": ["test_multistage_dump_on_non_cached_outputs", "test_multi_stage_run_cached"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_multi_stage_run_cached(tmp_dir, dvc, run_copy):\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n\n run_copy(\"foo\", \"foo2\", name=\"copy-foo1-foo2\")\n stage2 = run_copy(\"foo\", \"foo2\", name=\"copy-foo1-foo2\")\n\n assert stage2 is None\n\n\ndef test_multistage_dump_on_non_cached_outputs(tmp_dir, dvc):\n tmp_dir.dvc_gen(\"foo\")\n dvc.run(\n cmd=\"cp foo foo1\",\n deps=[\"foo\"],\n name=\"copy-foo1-foo2\",\n outs_no_cache=[\"foo1\"],\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_dump_on_multistage_test_run_dump_on_multistage.assert_Dvcfile_dvc_PIPEL": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_dump_on_multistage_test_run_dump_on_multistage.assert_Dvcfile_dvc_PIPEL", "embedding": null, "metadata": {"file_path": "tests/func/test_run_multistage.py", "file_name": "test_run_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 144, "end_line": 201, "span_ids": ["test_run_dump_on_multistage"], "tokens": 395}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_run_dump_on_multistage(tmp_dir, dvc, run_head):\n from dvc.dvcfile import PIPELINE_FILE, Dvcfile\n\n tmp_dir.gen(\n {\n \"dir\": {\n \"foo\": \"foo\\nfoo\",\n \"bar\": \"bar\\nbar\",\n \"foobar\": \"foobar\\foobar\",\n }\n }\n )\n\n dvc.run(\n cmd=\"cp foo foo2\",\n deps=[\"foo\"],\n name=\"copy-foo-foo2\",\n wdir=\"dir\",\n outs_persist=[\"foo2\"],\n always_changed=True,\n )\n data = Dvcfile(dvc, PIPELINE_FILE)._load()[0]\n assert data == {\n \"stages\": {\n \"copy-foo-foo2\": {\n \"cmd\": \"cp foo foo2\",\n \"deps\": [\"foo\"],\n \"outs\": [{\"foo2\": {\"persist\": True}}],\n \"always_changed\": True,\n \"wdir\": \"dir\",\n },\n }\n }\n\n run_head(\n \"foo\",\n \"bar\",\n \"foobar\",\n name=\"head-files\",\n outs=[\"bar-1\"],\n outs_persist=[\"foo-1\"],\n metrics_no_cache=[\"foobar-1\"],\n wdir=\"dir\",\n )\n assert Dvcfile(dvc, PIPELINE_FILE)._load()[0] == {\n \"stages\": {\n \"head-files\": {\n \"cmd\": \"python {} foo bar foobar\".format(\n (tmp_dir / \"head.py\").resolve()\n ),\n \"wdir\": \"dir\",\n \"deps\": [\"bar\", \"foo\", \"foobar\"],\n \"outs\": [\"bar-1\", {\"foo-1\": {\"persist\": True}}],\n \"metrics\": [{\"foobar-1\": {\"cache\": False}}],\n },\n **data[\"stages\"],\n }\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_with_invalid_stage_name_supported_params._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_with_invalid_stage_name_supported_params._", "embedding": null, "metadata": {"file_path": "tests/func/test_run_multistage.py", "file_name": "test_run_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 206, "end_line": 233, "span_ids": ["test_run_with_name_having_hyphen_underscore", "test_run_already_exists", "test_run_with_invalid_stage_name", "impl"], "tokens": 265}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"char\", [\"@:\", \"#\", \"$\", \":\", \"/\", \"\\\\\", \".\", \";\", \",\"]\n)\ndef test_run_with_invalid_stage_name(run_copy, char):\n with pytest.raises(InvalidStageName):\n run_copy(\"foo\", \"bar\", name=f\"copy_name-{char}\")\n\n\ndef test_run_with_name_having_hyphen_underscore(tmp_dir, dvc, run_copy):\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n run_copy(\"foo\", \"bar\", name=\"copy-foo_bar\")\n\n\ndef test_run_already_exists(tmp_dir, dvc, run_copy):\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n run_copy(\"foo\", \"bar\", name=\"copy\")\n with pytest.raises(DuplicateStageName):\n run_copy(\"bar\", \"foobar\", name=\"copy\", force=False)\n run_copy(\"bar\", \"foobar\", name=\"copy\", force=True)\n\n\nsupported_params = {\n \"name\": \"Answer\",\n \"answer\": 42,\n \"floats\": 42.0,\n \"lists\": [42, 42.0, \"42\"],\n \"nested\": {\"nested1\": {\"nested2\": \"42\", \"nested2-2\": 41.99999}},\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_params_default_test_run_params_default.assert_data_stages_re": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_params_default_test_run_params_default.assert_data_stages_re", "embedding": null, "metadata": {"file_path": "tests/func/test_run_multistage.py", "file_name": "test_run_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 234, "end_line": 254, "span_ids": ["test_run_params_default"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_run_params_default(tmp_dir, dvc):\n from dvc.dependency import ParamsDependency\n\n dump_yaml(tmp_dir / \"params.yaml\", supported_params)\n stage = dvc.run(\n name=\"read_params\",\n params=[\"nested.nested1.nested2\"],\n cmd=\"cat params.yaml\",\n )\n assert isinstance(stage.deps[0], ParamsDependency)\n assert stage.deps[0].params == [\"nested.nested1.nested2\"]\n\n lockfile = stage.dvcfile._lockfile\n assert lockfile.load()[\"read_params\"][\"params\"] == {\n \"params.yaml\": {\"nested.nested1.nested2\": \"42\"}\n }\n\n data, _ = stage.dvcfile._load()\n assert data[\"stages\"][\"read_params\"][\"params\"] == [\n \"nested.nested1.nested2\"\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunCircularDependency_TestRunCircularDependency.test_non_normalized_paths.with_self_assertRaises_Ci.self_dvc_run_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunCircularDependency_TestRunCircularDependency.test_non_normalized_paths.with_self_assertRaises_Ci.self_dvc_run_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 118, "end_line": 147, "span_ids": ["TestRunCircularDependency.test", "TestRunCircularDependency.test_non_normalized_paths", "TestRunCircularDependency.test_outs_no_cache", "TestRunCircularDependency"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRunCircularDependency(TestDvc):\n def test(self):\n with self.assertRaises(CircularDependencyError):\n self.dvc.run(\n cmd=\"command\",\n deps=[self.FOO],\n outs=[self.FOO],\n fname=\"circular-dependency.dvc\",\n single_stage=True,\n )\n\n def test_outs_no_cache(self):\n with self.assertRaises(CircularDependencyError):\n self.dvc.run(\n cmd=\"command\",\n deps=[self.FOO],\n outs_no_cache=[self.FOO],\n fname=\"circular-dependency.dvc\",\n single_stage=True,\n )\n\n def test_non_normalized_paths(self):\n with self.assertRaises(CircularDependencyError):\n self.dvc.run(\n cmd=\"command\",\n deps=[\"./foo\"],\n outs=[\"foo\"],\n fname=\"circular-dependency.dvc\",\n single_stage=True,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunCircularDependency.test_graph_TestRunCircularDependency.test_graph.with_self_assertRaises_Cy.self_dvc_run_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunCircularDependency.test_graph_TestRunCircularDependency.test_graph.with_self_assertRaises_Cy.self_dvc_run_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 148, "end_line": 169, "span_ids": ["TestRunCircularDependency.test_graph"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRunCircularDependency(TestDvc):\n\n def test_graph(self):\n self.dvc.run(\n deps=[self.FOO],\n outs=[\"bar.txt\"],\n cmd=\"echo bar > bar.txt\",\n single_stage=True,\n )\n\n self.dvc.run(\n deps=[\"bar.txt\"],\n outs=[\"baz.txt\"],\n cmd=\"echo baz > baz.txt\",\n single_stage=True,\n )\n\n with self.assertRaises(CyclicGraphError):\n self.dvc.run(\n deps=[\"baz.txt\"],\n outs=[self.FOO],\n cmd=\"echo baz > foo\",\n single_stage=True,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunBadWdir_TestRunBadWdir.test_not_dir.with_self_assertRaises_St.self_dvc_run_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunBadWdir_TestRunBadWdir.test_not_dir.with_self_assertRaises_St.self_dvc_run_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 250, "end_line": 274, "span_ids": ["TestRunBadWdir.test_same_prefix", "TestRunBadWdir.test", "TestRunBadWdir", "TestRunBadWdir.test_not_found", "TestRunBadWdir.test_not_dir"], "tokens": 230}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRunBadWdir(TestDvc):\n def test(self):\n with self.assertRaises(StagePathOutsideError):\n self.dvc.run(cmd=\"command\", wdir=self.mkdtemp(), single_stage=True)\n\n def test_same_prefix(self):\n with self.assertRaises(StagePathOutsideError):\n path = f\"{self._root_dir}-{uuid.uuid4()}\"\n os.mkdir(path)\n self.dvc.run(cmd=\"command\", wdir=path, single_stage=True)\n\n def test_not_found(self):\n with self.assertRaises(StagePathNotFoundError):\n path = os.path.join(self._root_dir, str(uuid.uuid4()))\n self.dvc.run(cmd=\"command\", wdir=path, single_stage=True)\n\n def test_not_dir(self):\n with self.assertRaises(StagePathNotDirectoryError):\n path = os.path.join(self._root_dir, str(uuid.uuid4()))\n os.mkdir(path)\n path = os.path.join(path, str(uuid.uuid4()))\n open(path, \"a\").close()\n self.dvc.run(\n cmd=\"command\", wdir=path, single_stage=True,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_state.py_os_test_state.with_state_.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_state.py_os_test_state.with_state_.None_2", "embedding": null, "metadata": {"file_path": "tests/func/test_state.py", "file_name": "test_state.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 31, "span_ids": ["imports", "test_state"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nimport mock\n\nfrom dvc.hash_info import HashInfo\nfrom dvc.path_info import PathInfo\nfrom dvc.state import State\nfrom dvc.utils import file_md5\n\n\ndef test_state(tmp_dir, dvc):\n tmp_dir.gen(\"foo\", \"foo content\")\n path = tmp_dir / \"foo\"\n path_info = PathInfo(path)\n hash_info = HashInfo(\"md5\", file_md5(path)[0])\n\n state = State(dvc)\n\n with state:\n state.save(path_info, hash_info)\n assert state.get(path_info) == hash_info\n\n path.unlink()\n path.write_text(\"1\")\n\n assert state.get(path_info) is None\n\n hash_info = HashInfo(\"md5\", file_md5(path)[0])\n state.save(path_info, hash_info)\n\n assert state.get(path_info) == hash_info", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_status.py_test_status_before_and_after_dvc_init_test_status_before_and_after_dvc_init.assert_status_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_status.py_test_status_before_and_after_dvc_init_test_status_before_and_after_dvc_init.assert_status_", "embedding": null, "metadata": {"file_path": "tests/func/test_status.py", "file_name": "test_status.py", "file_type": "text/x-python", "category": "test", "start_line": 51, "end_line": 73, "span_ids": ["test_status_before_and_after_dvc_init"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_status_before_and_after_dvc_init(tmp_dir, dvc, git_dir):\n git_dir.scm_gen(\"file\", \"first version\", commit=\"first verison\")\n old_rev = git_dir.scm.get_rev()\n\n dvc.imp(os.fspath(git_dir), \"file\", \"file\")\n\n assert dvc.status([\"file.dvc\"]) == {}\n\n with git_dir.chdir():\n git_dir.init(dvc=True)\n git_dir.scm.gitpython.repo.index.remove([\"file\"])\n os.remove(\"file\")\n git_dir.dvc_gen(\"file\", \"second version\", commit=\"with dvc\")\n new_rev = git_dir.scm.get_rev()\n\n assert old_rev != new_rev\n\n (status,) = dvc.status([\"file.dvc\"])[\"file.dvc\"]\n assert status == {\n \"changed deps\": {\n \"file ({})\".format(os.fspath(git_dir)): \"update available\"\n }\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_status.py_test_status_on_pipeline_stages_test_status_on_pipeline_stages.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_status.py_test_status_on_pipeline_stages_test_status_on_pipeline_stages.None_2", "embedding": null, "metadata": {"file_path": "tests/func/test_status.py", "file_name": "test_status.py", "file_type": "text/x-python", "category": "test", "start_line": 70, "end_line": 94, "span_ids": ["test_status_on_pipeline_stages"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_status_on_pipeline_stages(tmp_dir, dvc, run_copy):\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n stage = run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n\n stage.cmd = \" \".join(stage.cmd.split())\n stage.dvcfile._dump_pipeline_file(stage)\n assert dvc.status(\"copy-foo-bar\") == {\"copy-foo-bar\": [\"changed command\"]}\n\n # delete outputs\n (tmp_dir / \"bar\").unlink()\n assert dvc.status() == {\n \"copy-foo-bar\": [\n {\"changed outs\": {\"bar\": \"deleted\"}},\n \"changed command\",\n ]\n }\n (tmp_dir / \"foo\").unlink()\n assert dvc.status() == {\n \"foo.dvc\": [{\"changed outs\": {\"foo\": \"deleted\"}}],\n \"copy-foo-bar\": [\n {\"changed deps\": {\"foo\": \"deleted\"}},\n {\"changed outs\": {\"bar\": \"deleted\"}},\n \"changed command\",\n ],\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_update.py_test_update_rev_test_update_rev.None_4.assert_foobar_foo_f_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_update.py_test_update_rev_test_update_rev.None_4.assert_foobar_foo_f_", "embedding": null, "metadata": {"file_path": "tests/func/test_update.py", "file_name": "test_update.py", "file_type": "text/x-python", "category": "test", "start_line": 136, "end_line": 167, "span_ids": ["test_update_rev"], "tokens": 320}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_update_rev(tmp_dir, dvc, scm, git_dir):\n with git_dir.chdir():\n git_dir.scm_gen({\"foo\": \"foo\"}, commit=\"first\")\n\n dvc.imp(os.fspath(git_dir), \"foo\")\n assert (tmp_dir / \"foo.dvc\").exists()\n\n with git_dir.chdir(), git_dir.branch(\"branch1\", new=True):\n git_dir.scm_gen({\"foo\": \"foobar\"}, commit=\"branch1 commit\")\n branch1_head = git_dir.scm.get_rev()\n\n with git_dir.chdir(), git_dir.branch(\"branch2\", new=True):\n git_dir.scm_gen({\"foo\": \"foobar foo\"}, commit=\"branch2 commit\")\n branch2_head = git_dir.scm.get_rev()\n\n stage = dvc.update([\"foo.dvc\"], rev=\"branch1\")[0]\n assert stage.deps[0].def_repo == {\n \"url\": os.fspath(git_dir),\n \"rev\": \"branch1\",\n \"rev_lock\": branch1_head,\n }\n with open(tmp_dir / \"foo\") as f:\n assert \"foobar\" == f.read()\n\n stage = dvc.update([\"foo.dvc\"], rev=\"branch2\")[0]\n assert stage.deps[0].def_repo == {\n \"url\": os.fspath(git_dir),\n \"rev\": \"branch2\",\n \"rev_lock\": branch2_head,\n }\n with open(tmp_dir / \"foo\") as f:\n assert \"foobar foo\" == f.read()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_no_changes_test_show_md_empty.assert__show_md_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_no_changes_test_show_md_empty.assert__show_md_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 93, "end_line": 117, "span_ids": ["test_show_md_empty", "test_no_changes"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_no_changes(mocker, caplog):\n args = parse_args([\"diff\", \"--show-json\"])\n cmd = args.func(args)\n mocker.patch(\"dvc.repo.Repo.diff\", return_value={})\n\n def info():\n return [\n msg\n for name, level, msg in caplog.record_tuples\n if name.startswith(\"dvc\") and level == logging.INFO\n ]\n\n assert 0 == cmd.run()\n assert [\"{}\"] == info()\n\n caplog.clear()\n\n args = parse_args([\"diff\"])\n cmd = args.func(args)\n assert 0 == cmd.run()\n assert not info()\n\n\ndef test_show_md_empty():\n assert _show_md({}) == (\"| Status | Path |\\n|----------|--------|\\n\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_textwrap_test_metrics_diff.m_assert_called_once_with": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_textwrap_test_metrics_diff.m_assert_called_once_with", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_metrics.py", "file_name": "test_metrics.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 46, "span_ids": ["imports", "test_metrics_diff"], "tokens": 224}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import textwrap\n\nfrom dvc.cli import parse_args\nfrom dvc.command.metrics import (\n CmdMetricsDiff,\n CmdMetricsShow,\n _show_diff,\n _show_metrics,\n)\n\n\ndef test_metrics_diff(dvc, mocker):\n cli_args = parse_args(\n [\n \"metrics\",\n \"diff\",\n \"HEAD~10\",\n \"HEAD~1\",\n \"-R\",\n \"--all\",\n \"--show-json\",\n \"--show-md\",\n \"--targets\",\n \"target1\",\n \"target2\",\n \"--show-md\",\n \"--no-path\",\n \"--precision\",\n \"10\",\n ]\n )\n assert cli_args.func == CmdMetricsDiff\n\n cmd = cli_args.func(cli_args)\n m = mocker.patch(\"dvc.repo.metrics.diff.diff\", return_value={})\n\n assert cmd.run() == 0\n\n m.assert_called_once_with(\n cmd.repo,\n targets=[\"target1\", \"target2\"],\n a_rev=\"HEAD~10\",\n b_rev=\"HEAD~1\",\n recursive=True,\n all=True,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_diff_sorted_test_metrics_diff_markdown_empty.assert__show_diff_mar": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_diff_sorted_test_metrics_diff_markdown_empty.assert__show_diff_mar", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_metrics.py", "file_name": "test_metrics.py", "file_type": "text/x-python", "category": "test", "start_line": 156, "end_line": 180, "span_ids": ["test_metrics_diff_sorted", "test_metrics_diff_markdown_empty"], "tokens": 230}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_metrics_diff_sorted():\n assert _show_diff(\n {\n \"metrics.yaml\": {\n \"x.b\": {\"old\": 5, \"new\": 6, \"diff\": 1},\n \"a.d.e\": {\"old\": 3, \"new\": 4, \"diff\": 1},\n \"a.b.c\": {\"old\": 1, \"new\": 2, \"diff\": 1},\n }\n }\n ) == textwrap.dedent(\n \"\"\"\\\n Path Metric Old New Change\n metrics.yaml a.b.c 1 2 1\n metrics.yaml a.d.e 3 4 1\n metrics.yaml x.b 5 6 1\"\"\"\n )\n\n\ndef test_metrics_diff_markdown_empty():\n assert _show_diff({}, markdown=True) == textwrap.dedent(\n \"\"\"\\\n | Path | Metric | Old | New | Change |\n |--------|----------|-------|-------|----------|\n \"\"\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_params.py_test_params_diff_sorted_test_params_diff_markdown_empty.assert__show_diff_mar": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_params.py_test_params_diff_sorted_test_params_diff_markdown_empty.assert__show_diff_mar", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_params.py", "file_name": "test_params.py", "file_type": "text/x-python", "category": "test", "start_line": 110, "end_line": 134, "span_ids": ["test_params_diff_markdown_empty", "test_params_diff_sorted"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_params_diff_sorted():\n assert _show_diff(\n {\n \"params.yaml\": {\n \"x.b\": {\"old\": 5, \"new\": 6},\n \"a.d.e\": {\"old\": 3, \"new\": 4},\n \"a.b.c\": {\"old\": 1, \"new\": 2},\n }\n }\n ) == textwrap.dedent(\n \"\"\"\\\n Path Param Old New\n params.yaml a.b.c 1 2\n params.yaml a.d.e 3 4\n params.yaml x.b 5 6\"\"\"\n )\n\n\ndef test_params_diff_markdown_empty():\n assert _show_diff({}, markdown=True) == textwrap.dedent(\n \"\"\"\\\n | Path | Param | Old | New |\n |--------|---------|-------|-------|\n \"\"\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_update.py_from_dvc_cli_import_parse_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_update.py_from_dvc_cli_import_parse_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_update.py", "file_name": "test_update.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 18, "span_ids": ["imports", "test_update"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.cli import parse_args\nfrom dvc.command.update import CmdUpdate\n\n\ndef test_update(dvc, mocker):\n cli_args = parse_args(\n [\"update\", \"target1\", \"target2\", \"--rev\", \"REV\", \"--recursive\"]\n )\n assert cli_args.func == CmdUpdate\n cmd = cli_args.func(cli_args)\n m = mocker.patch(\"dvc.repo.Repo.update\")\n\n assert cmd.run() == 0\n\n m.assert_called_once_with(\n targets=[\"target1\", \"target2\"], rev=\"REV\", recursive=True,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_gdrive.py_os_USER_CREDS_MISSED_KEY_ERROR._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_gdrive.py_os_USER_CREDS_MISSED_KEY_ERROR._", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_gdrive.py", "file_name": "test_gdrive.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 9, "span_ids": ["imports"], "tokens": 229}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nimport pytest\n\nfrom dvc.tree.gdrive import GDriveAuthError, GDriveTree\n\nUSER_CREDS_TOKEN_REFRESH_ERROR = '{\"access_token\": \"\", \"client_id\": \"\", \"client_secret\": \"\", \"refresh_token\": \"\", \"token_expiry\": \"\", \"token_uri\": \"https://oauth2.googleapis.com/token\", \"user_agent\": null, \"revoke_uri\": \"https://oauth2.googleapis.com/revoke\", \"id_token\": null, \"id_token_jwt\": null, \"token_response\": {\"access_token\": \"\", \"expires_in\": 3600, \"scope\": \"https://www.googleapis.com/auth/drive.appdata https://www.googleapis.com/auth/drive\", \"token_type\": \"Bearer\"}, \"scopes\": [\"https://www.googleapis.com/auth/drive\", \"https://www.googleapis.com/auth/drive.appdata\"], \"token_info_uri\": \"https://oauth2.googleapis.com/tokeninfo\", \"invalid\": true, \"_class\": \"OAuth2Credentials\", \"_module\": \"oauth2client.client\"}' # noqa: E501\n\nUSER_CREDS_MISSED_KEY_ERROR = \"{}\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_walk_with_submodules_test_walk_with_submodules.assert_set_files_g": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_walk_with_submodules_test_walk_with_submodules.assert_set_files_g", "embedding": null, "metadata": {"file_path": "tests/unit/scm/test_git.py", "file_name": "test_git.py", "file_type": "text/x-python", "category": "test", "start_line": 34, "end_line": 53, "span_ids": ["test_walk_with_submodules"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_walk_with_submodules(tmp_dir, scm, git_dir):\n git_dir.scm_gen(\n {\"foo\": \"foo\", \"bar\": \"bar\", \"dir\": {\"data\": \"data\"}},\n commit=\"add dir and files\",\n )\n scm.gitpython.repo.create_submodule(\n \"submodule\", \"submodule\", url=os.fspath(git_dir)\n )\n scm.commit(\"added submodule\")\n\n files = []\n dirs = []\n tree = scm.get_tree(\"HEAD\")\n for _, dnames, fnames in tree.walk(\".\"):\n dirs.extend(dnames)\n files.extend(fnames)\n\n # currently we don't walk through submodules\n assert not dirs\n assert set(files) == {\".gitmodules\", \"submodule\"}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_is_tracked_test_is_tracked.None_11": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_is_tracked_test_is_tracked.None_11", "embedding": null, "metadata": {"file_path": "tests/unit/scm/test_git.py", "file_name": "test_git.py", "file_type": "text/x-python", "category": "test", "start_line": 41, "end_line": 65, "span_ids": ["test_is_tracked"], "tokens": 261}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_is_tracked(tmp_dir, scm):\n tmp_dir.scm_gen(\n {\n \"tracked\": \"tracked\",\n \"dir\": {\"data\": \"data\", \"subdir\": {\"subdata\": \"subdata\"}},\n },\n commit=\"add dirs and files\",\n )\n tmp_dir.gen({\"untracked\": \"untracked\", \"dir\": {\"untracked\": \"untracked\"}})\n\n # sanity check\n assert (tmp_dir / \"untracked\").exists()\n assert (tmp_dir / \"tracked\").exists()\n assert (tmp_dir / \"dir\" / \"untracked\").exists()\n assert (tmp_dir / \"dir\" / \"data\").exists()\n assert (tmp_dir / \"dir\" / \"subdir\" / \"subdata\").exists()\n\n assert not scm.is_tracked(\"untracked\")\n assert not scm.is_tracked(os.path.join(\"dir\", \"untracked\"))\n\n assert scm.is_tracked(\"tracked\")\n assert scm.is_tracked(\"dir\")\n assert scm.is_tracked(os.path.join(\"dir\", \"data\"))\n assert scm.is_tracked(os.path.join(\"dir\", \"subdir\"))\n assert scm.is_tracked(os.path.join(\"dir\", \"subdir\", \"subdata\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_analytics.py_json_test_collect_and_send_report.assert_mock_daemon_call_c": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_analytics.py_json_test_collect_and_send_report.assert_mock_daemon_call_c", "embedding": null, "metadata": {"file_path": "tests/unit/test_analytics.py", "file_name": "test_analytics.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 39, "span_ids": ["imports", "tmp_global_dir", "test_collect_and_send_report"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import json\nimport platform\n\nimport mock\nimport pytest\nfrom voluptuous import Any, Schema\n\nfrom dvc import analytics\nfrom dvc.cli import parse_args\n\n\n@pytest.fixture\ndef tmp_global_dir(tmp_path):\n \"\"\"\n Fixture to prevent modifying the actual global config\n \"\"\"\n with mock.patch(\"dvc.config.Config.get_dir\", return_value=str(tmp_path)):\n yield\n\n\n@mock.patch(\"dvc.daemon._spawn\")\n@mock.patch(\"json.dump\")\ndef test_collect_and_send_report(mock_json, mock_daemon, tmp_global_dir):\n analytics.collect_and_send_report()\n report = mock_json.call_args[0][0]\n\n assert not report.get(\"cmd_class\")\n assert not report.get(\"cmd_return_code\")\n\n args = parse_args([\"add\", \"foo\"])\n return_code = 0\n\n analytics.collect_and_send_report(args, return_code)\n report = mock_json.call_args[0][0]\n\n assert report[\"cmd_class\"] == \"CmdAdd\"\n assert report[\"cmd_return_code\"] == return_code\n\n assert mock_daemon.call_count == 2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_lockfile.py_test_stage_dump_with_deps_and_outs_test_stage_dump_with_deps_and_outs.assert_lockfile_load_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_lockfile.py_test_stage_dump_with_deps_and_outs_test_stage_dump_with_deps_and_outs.assert_lockfile_load_", "embedding": null, "metadata": {"file_path": "tests/unit/test_lockfile.py", "file_name": "test_lockfile.py", "file_type": "text/x-python", "category": "test", "start_line": 27, "end_line": 42, "span_ids": ["test_stage_dump_with_deps_and_outs"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stage_dump_with_deps_and_outs(tmp_dir, dvc):\n data = {\n \"s1\": {\n \"cmd\": \"command\",\n \"deps\": [{\"md5\": \"1.txt\", \"path\": \"checksum\"}],\n \"outs\": [{\"md5\": \"2.txt\", \"path\": \"checksum\"}],\n }\n }\n dump_yaml(\"path.lock\", data)\n lockfile = Lockfile(dvc, \"path.lock\")\n stage = PipelineStage(name=\"s2\", repo=dvc, path=\"path\", cmd=\"command2\")\n lockfile.dump(stage)\n assert lockfile.load() == {\n **data,\n \"s2\": {\"cmd\": \"command2\"},\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_lockfile.py_test_stage_overwrites_if_already_exists_test_load_when_lockfile_does_not_exist.assert_Lockfile_dvc": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_lockfile.py_test_stage_overwrites_if_already_exists_test_load_when_lockfile_does_not_exist.assert_Lockfile_dvc", "embedding": null, "metadata": {"file_path": "tests/unit/test_lockfile.py", "file_name": "test_lockfile.py", "file_type": "text/x-python", "category": "test", "start_line": 48, "end_line": 60, "span_ids": ["test_load_when_lockfile_does_not_exist", "test_stage_overwrites_if_already_exists"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stage_overwrites_if_already_exists(tmp_dir, dvc):\n lockfile = Lockfile(dvc, \"path.lock\",)\n stage = PipelineStage(name=\"s2\", repo=dvc, path=\"path\", cmd=\"command2\")\n lockfile.dump(stage)\n stage = PipelineStage(name=\"s2\", repo=dvc, path=\"path\", cmd=\"command3\")\n lockfile.dump(stage)\n assert lockfile.load() == {\n \"s2\": {\"cmd\": \"command3\"},\n }\n\n\ndef test_load_when_lockfile_does_not_exist(tmp_dir, dvc):\n assert {} == Lockfile(dvc, \"pipelines.lock\").load()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_humanize.py_from_collections_import_O_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_humanize.py_from_collections_import_O_", "embedding": null, "metadata": {"file_path": "tests/unit/utils/test_humanize.py", "file_name": "test_humanize.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 41, "span_ids": ["imports", "test_get_summary"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from collections import OrderedDict\n\nfrom dvc.utils.humanize import get_summary\n\n\ndef test_get_summary():\n # dict, so that we could delete from it easily\n stats = OrderedDict(\n [\n (\"fetched\", 3),\n (\"added\", [\"file1\", \"file2\", \"file3\"]),\n (\"deleted\", [\"file4\", \"file5\"]),\n (\"modified\", [\"file6\", \"file7\"]),\n ]\n )\n\n assert get_summary(stats.items()) == (\n \"3 files fetched, \"\n \"3 files added, \"\n \"2 files deleted \"\n \"and \"\n \"2 files modified\"\n )\n\n del stats[\"fetched\"]\n del stats[\"deleted\"][1]\n assert (\n get_summary(stats.items())\n == \"3 files added, 1 file deleted and 2 files modified\"\n )\n\n del stats[\"deleted\"][0]\n assert get_summary(stats.items()) == \"3 files added and 2 files modified\"\n\n del stats[\"modified\"]\n assert get_summary(stats.items()) == \"3 files added\"\n\n assert get_summary([]) == \"\"\n assert get_summary([(\"x\", 0), (\"y\", [])]) == \"\"\n assert get_summary([(\"x\", 1), (\"y\", [])]) == \"1 file x\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_utils.py_os_test_to_chunks_chunk_size.assert_result_expected": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_utils.py_os_test_to_chunks_chunk_size.assert_result_expected", "embedding": null, "metadata": {"file_path": "tests/unit/utils/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 26, "span_ids": ["imports", "test_to_chunks_chunk_size"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport re\n\nimport pytest\n\nfrom dvc.path_info import PathInfo\nfrom dvc.utils import (\n dict_sha256,\n file_md5,\n fix_env,\n parse_target,\n relpath,\n resolve_output,\n tmp_fname,\n to_chunks,\n)\n\n\n@pytest.mark.parametrize(\n \"chunk_size, expected_chunks\",\n [(1, [[1], [2], [3], [4]]), (2, [[1, 2], [3, 4]]), (3, [[1, 2, 3], [4]])],\n)\ndef test_to_chunks_chunk_size(chunk_size, expected_chunks):\n list_to_chunk = [1, 2, 3, 4]\n result = list(to_chunks(list_to_chunk, chunk_size=chunk_size))\n assert result == expected_chunks", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_utils.py_test_resolve_output_test_resolve_output.assert_result_expected": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_utils.py_test_resolve_output_test_resolve_output.assert_result_expected", "embedding": null, "metadata": {"file_path": "tests/unit/utils/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 114, "end_line": 135, "span_ids": ["test_resolve_output"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"inp,out,is_dir,expected\",\n [\n [\"target\", None, False, \"target\"],\n [\"target\", \"dir\", True, os.path.join(\"dir\", \"target\")],\n [\"target\", \"file_target\", False, \"file_target\"],\n [\n \"target\",\n os.path.join(\"dir\", \"subdir\"),\n True,\n os.path.join(\"dir\", \"subdir\", \"target\"),\n ],\n [\"dir/\", None, False, \"dir\"],\n [\"dir\", None, False, \"dir\"],\n [\"dir\", \"other_dir\", False, \"other_dir\"],\n [\"dir\", \"other_dir\", True, os.path.join(\"other_dir\", \"dir\")],\n ],\n)\ndef test_resolve_output(inp, out, is_dir, expected, mocker):\n mocker.patch(\"os.path.isdir\", return_value=is_dir)\n result = resolve_output(inp, out)\n assert result == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/dag.py_add_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/dag.py_add_parser_", "embedding": null, "metadata": {"file_path": "dvc/command/dag.py", "file_name": "dag.py", "file_type": "text/x-python", "category": "implementation", "start_line": 112, "end_line": 150, "span_ids": ["add_parser"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n DAG_HELP = \"Visualize DVC project DAG.\"\n dag_parser = subparsers.add_parser(\n \"dag\",\n parents=[parent_parser],\n description=append_doc_link(DAG_HELP, \"dag\"),\n help=DAG_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n dag_parser.add_argument(\n \"--dot\",\n action=\"store_true\",\n default=False,\n help=\"Print DAG with .dot format.\",\n )\n dag_parser.add_argument(\n \"--full\",\n action=\"store_true\",\n default=False,\n help=(\n \"Show full DAG that the target belongs too, instead of \"\n \"showing DAG consisting only of ancestors.\"\n ),\n )\n dag_parser.add_argument(\n \"-o\",\n \"--outs\",\n action=\"store_true\",\n default=False,\n help=\"Print output files instead of stages.\",\n )\n dag_parser.add_argument(\n \"target\",\n nargs=\"?\",\n help=\"Stage or output to show pipeline for (optional). \"\n \"Finds all stages in the workspace by default.\",\n )\n dag_parser.set_defaults(func=CmdDAG)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/freeze.py_argparse_CmdUnfreeze.run.return.self__run_self_repo_unfre": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/freeze.py_argparse_CmdUnfreeze.run.return.self__run_self_repo_unfre", "embedding": null, "metadata": {"file_path": "dvc/command/freeze.py", "file_name": "freeze.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 30, "span_ids": ["CmdFreezeBase", "CmdFreeze", "imports", "CmdFreezeBase._run", "CmdFreeze.run", "CmdUnfreeze", "CmdUnfreeze.run"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nfrom dvc.command import completion\nfrom dvc.command.base import CmdBase, append_doc_link\nfrom dvc.exceptions import DvcException\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdFreezeBase(CmdBase):\n def _run(self, func, name):\n ret = 0\n for target in self.args.targets:\n try:\n func(target)\n except DvcException:\n logger.exception(f\"failed to {name} '{target}'\")\n ret = 1\n return ret\n\n\nclass CmdFreeze(CmdFreezeBase):\n def run(self):\n return self._run(self.repo.freeze, \"freeze\")\n\n\nclass CmdUnfreeze(CmdFreezeBase):\n def run(self):\n return self._run(self.repo.unfreeze, \"unfreeze\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/freeze.py_add_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/freeze.py_add_parser_", "embedding": null, "metadata": {"file_path": "dvc/command/freeze.py", "file_name": "freeze.py", "file_type": "text/x-python", "category": "implementation", "start_line": 33, "end_line": 59, "span_ids": ["add_parser"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n FREEZE_HELP = \"Freeze stages or .dvc files.\"\n freeze_parser = subparsers.add_parser(\n \"freeze\",\n parents=[parent_parser],\n description=append_doc_link(FREEZE_HELP, \"freeze\"),\n help=FREEZE_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n freeze_parser.add_argument(\n \"targets\", nargs=\"+\", help=\"Stages or .dvc files to freeze\",\n ).complete = completion.DVC_FILE\n freeze_parser.set_defaults(func=CmdFreeze)\n\n UNFREEZE_HELP = \"Unfreeze stages or .dvc files.\"\n unfreeze_parser = subparsers.add_parser(\n \"unfreeze\",\n parents=[parent_parser],\n description=append_doc_link(UNFREEZE_HELP, \"unfreeze\"),\n help=UNFREEZE_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n unfreeze_parser.add_argument(\n \"targets\", nargs=\"+\", help=\"Stages or .dvc files to unfreeze\",\n ).complete = completion.DVC_FILE\n unfreeze_parser.set_defaults(func=CmdUnfreeze)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/metrics.py__show_diff__show_diff.return.table_header_rows_markd": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/metrics.py__show_diff__show_diff.return.table_header_rows_markd", "embedding": null, "metadata": {"file_path": "dvc/command/metrics.py", "file_name": "metrics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 79, "end_line": 109, "span_ids": ["_show_diff"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _show_diff(diff, markdown=False, no_path=False, precision=None):\n from collections import OrderedDict\n\n from dvc.utils.diff import table\n\n if precision is None:\n precision = DEFAULT_PRECISION\n\n def _round(val):\n if isinstance(val, float):\n return round(val, precision)\n\n return val\n\n rows = []\n for fname, mdiff in diff.items():\n sorted_mdiff = OrderedDict(sorted(mdiff.items()))\n for metric, change in sorted_mdiff.items():\n row = [] if no_path else [fname]\n row.append(metric)\n row.append(_round(change.get(\"old\")))\n row.append(_round(change[\"new\"]))\n row.append(_round(change.get(\"diff\")))\n rows.append(row)\n\n header = [] if no_path else [\"Path\"]\n header.append(\"Metric\")\n header.extend([\"Old\", \"New\"])\n header.append(\"Change\")\n\n return table(header, rows, markdown)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/params.py_argparse__show_diff.return.table_header_rows_markd": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/params.py_argparse__show_diff.return.table_header_rows_markd", "embedding": null, "metadata": {"file_path": "dvc/command/params.py", "file_name": "params.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 30, "span_ids": ["imports", "_show_diff"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\nfrom collections import OrderedDict\n\nfrom dvc.command import completion\nfrom dvc.command.base import CmdBase, append_doc_link, fix_subparsers\nfrom dvc.exceptions import DvcException\n\nlogger = logging.getLogger(__name__)\n\n\ndef _show_diff(diff, markdown=False, no_path=False):\n from dvc.utils.diff import table\n\n rows = []\n for fname, pdiff in diff.items():\n sorted_pdiff = OrderedDict(sorted(pdiff.items()))\n for param, change in sorted_pdiff.items():\n row = [] if no_path else [fname]\n row.append(param)\n row.append(change[\"old\"])\n row.append(change[\"new\"])\n rows.append(row)\n\n header = [] if no_path else [\"Path\"]\n header.append(\"Param\")\n header.append(\"Old\")\n header.append(\"New\")\n\n return table(header, rows, markdown)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/params.py_CmdParamsDiff_CmdParamsDiff.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/params.py_CmdParamsDiff_CmdParamsDiff.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/params.py", "file_name": "params.py", "file_type": "text/x-python", "category": "implementation", "start_line": 33, "end_line": 58, "span_ids": ["CmdParamsDiff.run", "CmdParamsDiff"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdParamsDiff(CmdBase):\n UNINITIALIZED = True\n\n def run(self):\n try:\n diff = self.repo.params.diff(\n a_rev=self.args.a_rev,\n b_rev=self.args.b_rev,\n targets=self.args.targets,\n all=self.args.all,\n )\n\n if self.args.show_json:\n import json\n\n logger.info(json.dumps(diff))\n else:\n table = _show_diff(diff, self.args.show_md, self.args.no_path)\n if table:\n logger.info(table)\n\n except DvcException:\n logger.exception(\"failed to show params diff\")\n return 1\n\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/plots.py_argparse_DIV_HTML._div_id_id_div": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/plots.py_argparse_DIV_HTML._div_id_id_div", "embedding": null, "metadata": {"file_path": "dvc/command/plots.py", "file_name": "plots.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 30, "span_ids": ["imports"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\nimport os\n\nfrom dvc.command import completion\nfrom dvc.command.base import CmdBase, append_doc_link, fix_subparsers\nfrom dvc.exceptions import DvcException\nfrom dvc.schema import PLOT_PROPS\nfrom dvc.utils import format_link\n\nlogger = logging.getLogger(__name__)\n\nPAGE_HTML = \"\"\"\n\n\n DVC Plot\n \n \n \n\n\n {divs}\n\n\"\"\"\n\nDIV_HTML = \"\"\"
\n\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/plots.py_CmdPlots_CmdPlots.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/plots.py_CmdPlots_CmdPlots.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/plots.py", "file_name": "plots.py", "file_type": "text/x-python", "category": "implementation", "start_line": 33, "end_line": 78, "span_ids": ["CmdPlots._func", "CmdPlots.run", "CmdPlots", "CmdPlots._props"], "tokens": 333}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdPlots(CmdBase):\n def _func(self, *args, **kwargs):\n raise NotImplementedError\n\n def _props(self):\n # Pass only props specified by user, to not shadow ones from plot def\n props = {p: getattr(self.args, p) for p in PLOT_PROPS}\n return {k: v for k, v in props.items() if v is not None}\n\n def run(self):\n if self.args.show_vega:\n if not self.args.targets:\n logger.error(\"please specify a target for `--show-vega`\")\n return 1\n if len(self.args.targets) > 1:\n logger.error(\n \"you can only specify one target for `--show-vega`\"\n )\n return 1\n\n try:\n plots = self._func(targets=self.args.targets, props=self._props())\n\n if self.args.show_vega:\n target = self.args.targets[0]\n logger.info(plots[target])\n return 0\n\n divs = [\n DIV_HTML.format(id=f\"plot{i}\", vega_json=plot)\n for i, plot in enumerate(plots.values())\n ]\n html = PAGE_HTML.format(divs=\"\\n\".join(divs))\n path = self.args.out or \"plots.html\"\n\n path = os.path.join(os.getcwd(), path)\n with open(path, \"w\") as fobj:\n fobj.write(html)\n\n logger.info(f\"file://{path}\")\n\n except DvcException:\n logger.exception(\"\")\n return 1\n\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/plots.py_CmdPlotsShow_CmdPlotsModify.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/plots.py_CmdPlotsShow_CmdPlotsModify.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/plots.py", "file_name": "plots.py", "file_type": "text/x-python", "category": "implementation", "start_line": 82, "end_line": 106, "span_ids": ["CmdPlotsDiff._func", "CmdPlotsShow._func", "CmdPlotsModify.run", "CmdPlotsShow", "CmdPlotsModify", "CmdPlotsDiff"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdPlotsShow(CmdPlots):\n UNINITIALIZED = True\n\n def _func(self, *args, **kwargs):\n return self.repo.plots.show(*args, **kwargs)\n\n\nclass CmdPlotsDiff(CmdPlots):\n UNINITIALIZED = True\n\n def _func(self, *args, **kwargs):\n return self.repo.plots.diff(\n *args,\n revs=self.args.revisions,\n experiment=self.args.experiment,\n **kwargs,\n )\n\n\nclass CmdPlotsModify(CmdPlots):\n def run(self):\n self.repo.plots.modify(\n self.args.target, props=self._props(), unset=self.args.unset,\n )\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/plots.py_add_parser_add_parser.plots_modify_parser_set_d": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/plots.py_add_parser_add_parser.plots_modify_parser_set_d", "embedding": null, "metadata": {"file_path": "dvc/command/plots.py", "file_name": "plots.py", "file_type": "text/x-python", "category": "implementation", "start_line": 107, "end_line": 197, "span_ids": ["add_parser"], "tokens": 701}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n PLOTS_HELP = (\n \"Commands to visualize and compare plot metrics in structured files \"\n \"(JSON, YAML, CSV, TSV)\"\n )\n\n plots_parser = subparsers.add_parser(\n \"plots\",\n parents=[parent_parser],\n description=append_doc_link(PLOTS_HELP, \"plots\"),\n help=PLOTS_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n plots_subparsers = plots_parser.add_subparsers(\n dest=\"cmd\",\n help=\"Use `dvc plots CMD --help` to display command-specific help.\",\n )\n\n fix_subparsers(plots_subparsers)\n\n SHOW_HELP = \"Generate plots from metrics files.\"\n plots_show_parser = plots_subparsers.add_parser(\n \"show\",\n parents=[parent_parser],\n description=append_doc_link(SHOW_HELP, \"plots/show\"),\n help=SHOW_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n plots_show_parser.add_argument(\n \"targets\",\n nargs=\"*\",\n help=\"Files to visualize (supports any file, \"\n \"even when not found as `plots` in `dvc.yaml`). \"\n \"Shows all plots by default.\",\n ).complete = completion.FILE\n _add_props_arguments(plots_show_parser)\n _add_output_arguments(plots_show_parser)\n plots_show_parser.set_defaults(func=CmdPlotsShow)\n\n PLOTS_DIFF_HELP = (\n \"Show multiple versions of plot metrics \"\n \"by plotting them in a single image.\"\n )\n plots_diff_parser = plots_subparsers.add_parser(\n \"diff\",\n parents=[parent_parser],\n description=append_doc_link(PLOTS_DIFF_HELP, \"plots/diff\"),\n help=PLOTS_DIFF_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n plots_diff_parser.add_argument(\n \"--targets\",\n nargs=\"*\",\n help=\"Files to visualize (supports any file, \"\n \"even when not found as `plots` in `dvc.yaml`). \"\n \"Shows all plots by default.\",\n metavar=\"\",\n ).complete = completion.FILE\n plots_diff_parser.add_argument(\n \"-e\",\n \"--experiment\",\n action=\"store_true\",\n default=False,\n help=argparse.SUPPRESS,\n )\n plots_diff_parser.add_argument(\n \"revisions\", nargs=\"*\", default=None, help=\"Git commits to plot from\",\n )\n _add_props_arguments(plots_diff_parser)\n _add_output_arguments(plots_diff_parser)\n plots_diff_parser.set_defaults(func=CmdPlotsDiff)\n\n PLOTS_MODIFY_HELP = \"Modify display properties of plot metrics files.\"\n plots_modify_parser = plots_subparsers.add_parser(\n \"modify\",\n parents=[parent_parser],\n description=append_doc_link(PLOTS_MODIFY_HELP, \"plots/modify\"),\n help=PLOTS_MODIFY_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n plots_modify_parser.add_argument(\n \"target\", help=\"Metric file to set properties to\",\n ).complete = completion.FILE\n _add_props_arguments(plots_modify_parser)\n plots_modify_parser.add_argument(\n \"--unset\",\n nargs=\"*\",\n metavar=\"\",\n help=\"Unset one or more display properties.\",\n )\n plots_modify_parser.set_defaults(func=CmdPlotsModify)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/plots.py__add_props_arguments_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/plots.py__add_props_arguments_", "embedding": null, "metadata": {"file_path": "dvc/command/plots.py", "file_name": "plots.py", "file_type": "text/x-python", "category": "implementation", "start_line": 182, "end_line": 234, "span_ids": ["_add_output_arguments", "_add_props_arguments"], "tokens": 347}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _add_props_arguments(parser):\n parser.add_argument(\n \"-t\",\n \"--template\",\n nargs=\"?\",\n default=None,\n help=(\n \"Special JSON or HTML schema file to inject with the data. \"\n \"See {}\".format(\n format_link(\"https://man.dvc.org/plots#plot-templates\")\n )\n ),\n metavar=\"\",\n ).complete = completion.FILE\n parser.add_argument(\n \"-x\", default=None, help=\"Field name for X axis.\", metavar=\"\"\n )\n parser.add_argument(\n \"-y\", default=None, help=\"Field name for Y axis.\", metavar=\"\"\n )\n parser.add_argument(\n \"--no-header\",\n action=\"store_false\",\n dest=\"header\",\n default=None, # Use default None to distinguish when it's not used\n help=\"Provided CSV or TSV datafile does not have a header.\",\n )\n parser.add_argument(\n \"--title\", default=None, metavar=\"\", help=\"Plot title.\"\n )\n parser.add_argument(\n \"--x-label\", default=None, help=\"X axis label\", metavar=\"\"\n )\n parser.add_argument(\n \"--y-label\", default=None, help=\"Y axis label\", metavar=\"\"\n )\n\n\ndef _add_output_arguments(parser):\n parser.add_argument(\n \"-o\",\n \"--out\",\n default=None,\n help=\"Destination path to save plots to\",\n metavar=\"\",\n ).complete = completion.DIR\n parser.add_argument(\n \"--show-vega\",\n action=\"store_true\",\n default=False,\n help=\"Show output in Vega format.\",\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_argparse_CmdRemote._check_exists.if_self_args_name_not_in_.raise_ConfigError_f_remot": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_argparse_CmdRemote._check_exists.if_self_args_name_not_in_.raise_ConfigError_f_remot", "embedding": null, "metadata": {"file_path": "dvc/command/remote.py", "file_name": "remote.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 21, "span_ids": ["imports", "CmdRemote", "CmdRemote.__init__", "CmdRemote._check_exists"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nfrom dvc.command.base import append_doc_link, fix_subparsers\nfrom dvc.command.config import CmdConfig\nfrom dvc.config import ConfigError, merge\nfrom dvc.utils import format_link\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdRemote(CmdConfig):\n def __init__(self, args):\n super().__init__(args)\n\n if getattr(self.args, \"name\", None):\n self.args.name = self.args.name.lower()\n\n def _check_exists(self, conf):\n if self.args.name not in conf[\"remote\"]:\n raise ConfigError(f\"remote '{self.args.name}' doesn't exist.\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_CmdRemoteRename_CmdRemoteRename.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_CmdRemoteRename_CmdRemoteRename.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/remote.py", "file_name": "remote.py", "file_type": "text/x-python", "category": "implementation", "start_line": 117, "end_line": 144, "span_ids": ["CmdRemoteRename.run", "CmdRemoteRename", "CmdRemoteRename._rename_default"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdRemoteRename(CmdRemote):\n def _rename_default(self, conf):\n if conf[\"core\"].get(\"remote\") == self.args.name:\n conf[\"core\"][\"remote\"] = self.args.new\n\n def run(self):\n all_config = self.config.load_config_to_level(None)\n if self.args.new in all_config.get(\"remote\", {}):\n raise ConfigError(\n \"Rename failed. Remote name '{}' already exists.\".format(\n {self.args.new}\n )\n )\n\n with self.config.edit(self.args.level) as conf:\n self._check_exists(conf)\n conf[\"remote\"][self.args.new] = conf[\"remote\"][self.args.name]\n del conf[\"remote\"][self.args.name]\n self._rename_default(conf)\n\n up_to_level = self.args.level or \"repo\"\n for level in reversed(self.config.LEVELS):\n if level == up_to_level:\n break\n with self.config.edit(level) as level_conf:\n self._rename_default(level_conf)\n\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_add_parser_add_parser.REMOTE_REMOVE_HELP._Remove_a_data_remote_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_add_parser_add_parser.REMOTE_REMOVE_HELP._Remove_a_data_remote_", "embedding": null, "metadata": {"file_path": "dvc/command/remote.py", "file_name": "remote.py", "file_type": "text/x-python", "category": "implementation", "start_line": 145, "end_line": 249, "span_ids": ["add_parser"], "tokens": 782}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n from dvc.command.config import parent_config_parser\n\n REMOTE_HELP = \"Set up and manage data remotes.\"\n remote_parser = subparsers.add_parser(\n \"remote\",\n parents=[parent_parser],\n description=append_doc_link(REMOTE_HELP, \"remote\"),\n help=REMOTE_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n\n remote_subparsers = remote_parser.add_subparsers(\n dest=\"cmd\",\n help=\"Use `dvc remote CMD --help` for \" \"command-specific help.\",\n )\n\n fix_subparsers(remote_subparsers)\n\n REMOTE_ADD_HELP = \"Add a new data remote.\"\n remote_add_parser = remote_subparsers.add_parser(\n \"add\",\n parents=[parent_config_parser, parent_parser],\n description=append_doc_link(REMOTE_ADD_HELP, \"remote/add\"),\n help=REMOTE_ADD_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n remote_add_parser.add_argument(\"name\", help=\"Name of the remote\")\n remote_add_parser.add_argument(\n \"url\",\n help=\"Remote location. See full list of supported URLs at {}\".format(\n format_link(\"https://man.dvc.org/remote\")\n ),\n )\n remote_add_parser.add_argument(\n \"-d\",\n \"--default\",\n action=\"store_true\",\n default=False,\n help=\"Set as default remote.\",\n )\n remote_add_parser.add_argument(\n \"-f\",\n \"--force\",\n action=\"store_true\",\n default=False,\n help=\"Force overwriting existing configs\",\n )\n remote_add_parser.set_defaults(func=CmdRemoteAdd)\n\n REMOTE_DEFAULT_HELP = \"Set/unset the default data remote.\"\n remote_default_parser = remote_subparsers.add_parser(\n \"default\",\n parents=[parent_config_parser, parent_parser],\n description=append_doc_link(REMOTE_DEFAULT_HELP, \"remote/default\"),\n help=REMOTE_DEFAULT_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n remote_default_parser.add_argument(\n \"name\", nargs=\"?\", help=\"Name of the remote\"\n )\n remote_default_parser.add_argument(\n \"-u\",\n \"--unset\",\n action=\"store_true\",\n default=False,\n help=\"Unset default remote.\",\n )\n remote_default_parser.set_defaults(func=CmdRemoteDefault)\n\n REMOTE_MODIFY_HELP = \"Modify the configuration of a data remote.\"\n remote_modify_parser = remote_subparsers.add_parser(\n \"modify\",\n parents=[parent_config_parser, parent_parser],\n description=append_doc_link(REMOTE_MODIFY_HELP, \"remote/modify\"),\n help=REMOTE_MODIFY_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n remote_modify_parser.add_argument(\"name\", help=\"Name of the remote\")\n remote_modify_parser.add_argument(\n \"option\", help=\"Name of the option to modify.\"\n )\n remote_modify_parser.add_argument(\n \"value\", nargs=\"?\", help=\"(optional) Value of the option.\"\n )\n remote_modify_parser.add_argument(\n \"-u\",\n \"--unset\",\n default=False,\n action=\"store_true\",\n help=\"Unset option.\",\n )\n remote_modify_parser.set_defaults(func=CmdRemoteModify)\n\n REMOTE_LIST_HELP = \"List all available data remotes.\"\n remote_list_parser = remote_subparsers.add_parser(\n \"list\",\n parents=[parent_config_parser, parent_parser],\n description=append_doc_link(REMOTE_LIST_HELP, \"remote/list\"),\n help=REMOTE_LIST_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n remote_list_parser.set_defaults(func=CmdRemoteList)\n\n REMOTE_REMOVE_HELP = \"Remove a data remote.\"\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_add_parser.remote_remove_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_add_parser.remote_remove_parser_", "embedding": null, "metadata": {"file_path": "dvc/command/remote.py", "file_name": "remote.py", "file_type": "text/x-python", "category": "implementation", "start_line": 245, "end_line": 267, "span_ids": ["add_parser"], "tokens": 231}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n # ... other code\n remote_remove_parser = remote_subparsers.add_parser(\n \"remove\",\n parents=[parent_config_parser, parent_parser],\n description=append_doc_link(REMOTE_REMOVE_HELP, \"remote/remove\"),\n help=REMOTE_REMOVE_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n remote_remove_parser.add_argument(\n \"name\", help=\"Name of the remote to remove.\"\n )\n remote_remove_parser.set_defaults(func=CmdRemoteRemove)\n REMOTE_RENAME_HELP = \"Rename a DVC remote\"\n remote_rename_parser = remote_subparsers.add_parser(\n \"rename\",\n parents=[parent_config_parser, parent_parser],\n description=append_doc_link(REMOTE_RENAME_HELP, \"remote/rename\"),\n help=REMOTE_RENAME_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n remote_rename_parser.add_argument(\"name\", help=\"Remote to be renamed\")\n remote_rename_parser.add_argument(\"new\", help=\"New name of the remote\")\n remote_rename_parser.set_defaults(func=CmdRemoteRename)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remove.py_argparse_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remove.py_argparse_", "embedding": null, "metadata": {"file_path": "dvc/command/remove.py", "file_name": "remove.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 44, "span_ids": ["CmdRemove.run", "imports", "add_parser", "CmdRemove"], "tokens": 261}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nfrom dvc.command import completion\nfrom dvc.command.base import CmdBase, append_doc_link\nfrom dvc.exceptions import DvcException\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdRemove(CmdBase):\n def run(self):\n for target in self.args.targets:\n try:\n self.repo.remove(target, outs=self.args.outs)\n except DvcException:\n logger.exception(f\"failed to remove '{target}'\")\n return 1\n return 0\n\n\ndef add_parser(subparsers, parent_parser):\n REMOVE_HELP = (\n \"Remove stages from dvc.yaml and/or\"\n \" stop tracking files or directories.\"\n )\n remove_parser = subparsers.add_parser(\n \"remove\",\n parents=[parent_parser],\n description=append_doc_link(REMOVE_HELP, \"remove\"),\n help=REMOVE_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n remove_parser.add_argument(\n \"--outs\",\n action=\"store_true\",\n default=False,\n help=\"Remove outputs as well.\",\n )\n remove_parser.add_argument(\n \"targets\", nargs=\"+\", help=\"DVC-files to remove.\",\n ).complete = completion.DVC_FILE\n remove_parser.set_defaults(func=CmdRemove)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/run.py_CmdRun._parsed_cmd_CmdRun._quote_argument.return.f_argument_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/run.py_CmdRun._parsed_cmd_CmdRun._quote_argument.return.f_argument_", "embedding": null, "metadata": {"file_path": "dvc/command/run.py", "file_name": "run.py", "file_type": "text/x-python", "category": "implementation", "start_line": 64, "end_line": 83, "span_ids": ["CmdRun._parsed_cmd", "CmdRun._quote_argument"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdRun(CmdBase):\n\n def _parsed_cmd(self):\n \"\"\"\n We need to take into account two cases:\n\n - ['python code.py foo bar']: Used mainly with dvc as a library\n - ['echo', 'foo bar']: List of arguments received from the CLI\n\n The second case would need quoting, as it was passed through:\n dvc run echo \"foo bar\"\n \"\"\"\n if len(self.args.command) < 2:\n return \" \".join(self.args.command)\n\n return \" \".join(self._quote_argument(arg) for arg in self.args.command)\n\n def _quote_argument(self, argument):\n if \" \" not in argument or '\"' in argument:\n return argument\n\n return f'\"{argument}\"'", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py_AsciiCanvas_AsciiCanvas.draw.return.joined_lines": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dagascii.py_AsciiCanvas_AsciiCanvas.draw.return.joined_lines", "embedding": null, "metadata": {"file_path": "dvc/dagascii.py", "file_name": "dagascii.py", "file_type": "text/x-python", "category": "implementation", "start_line": 78, "end_line": 101, "span_ids": ["AsciiCanvas", "AsciiCanvas.__init__", "AsciiCanvas.draw"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AsciiCanvas:\n \"\"\"Class for drawing in ASCII.\n\n Args:\n cols (int): number of columns in the canvas. Should be > 1.\n lines (int): number of lines in the canvas. Should be > 1.\n \"\"\"\n\n TIMEOUT = 10\n\n def __init__(self, cols, lines):\n assert cols > 1\n assert lines > 1\n\n self.cols = cols\n self.lines = lines\n\n self.canvas = [[\" \"] * cols for line in range(lines)]\n\n def draw(self):\n \"\"\"Draws ASCII canvas on the screen.\"\"\"\n lines = map(\"\".join, self.canvas)\n joined_lines = os.linesep.join(lines)\n return joined_lines", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/__init__.py__merge_params_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/__init__.py__merge_params_", "embedding": null, "metadata": {"file_path": "dvc/dependency/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 91, "end_line": 117, "span_ids": ["_merge_params", "loads_params"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _merge_params(s_list):\n d = defaultdict(list)\n default_file = ParamsDependency.DEFAULT_PARAMS_FILE\n for key in s_list:\n if isinstance(key, str):\n d[default_file].append(key)\n continue\n if not isinstance(key, dict):\n msg = \"Only list of str/dict is supported. Got: \"\n msg += f\"'{type(key).__name__}'.\"\n raise ValueError(msg)\n\n for k, params in key.items():\n if not isinstance(params, list):\n msg = \"Expected list of params for custom params file \"\n msg += f\"'{k}', got '{type(params).__name__}'.\"\n raise ValueError(msg)\n d[k].extend(params)\n return d\n\n\ndef loads_params(stage, s_list):\n d = _merge_params(s_list)\n return [\n ParamsDependency(stage, path, params) for path, params in d.items()\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/azure.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/azure.py__", "embedding": null, "metadata": {"file_path": "dvc/dependency/azure.py", "file_name": "azure.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 9, "span_ids": ["imports", "AzureDependency"], "tokens": 43}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.dependency.base import BaseDependency\nfrom dvc.output.base import BaseOutput\n\nfrom ..tree.azure import AzureTree\n\n\nclass AzureDependency(BaseDependency, BaseOutput):\n TREE_CLS = AzureTree", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py_CircularDependencyError_ArgumentDuplicationError.__init__.super___init___f_file_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py_CircularDependencyError_ArgumentDuplicationError.__init__.super___init___f_file_", "embedding": null, "metadata": {"file_path": "dvc/exceptions.py", "file_name": "exceptions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 79, "end_line": 104, "span_ids": ["ArgumentDuplicationError", "ArgumentDuplicationError.__init__", "CircularDependencyError", "CircularDependencyError.__init__"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CircularDependencyError(DvcException):\n \"\"\"Thrown if a file/directory specified both as an output and as a\n dependency.\n\n Args:\n dependency (str): path to the dependency.\n \"\"\"\n\n def __init__(self, dependency):\n assert isinstance(dependency, str)\n\n msg = \"'{}' is specified as an output and as a dependency.\"\n super().__init__(msg.format(dependency))\n\n\nclass ArgumentDuplicationError(DvcException):\n \"\"\"Thrown if a file/directory is specified as a dependency/output more\n than once.\n\n Args:\n path (str): path to the file/directory.\n \"\"\"\n\n def __init__(self, path):\n assert isinstance(path, str)\n super().__init__(f\"file '{path}' is specified more than once.\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py_PathMissingError_PathMissingError.__init__.self.dvc_only.dvc_only": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py_PathMissingError_PathMissingError.__init__.self.dvc_only.dvc_only", "embedding": null, "metadata": {"file_path": "dvc/exceptions.py", "file_name": "exceptions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 302, "end_line": 315, "span_ids": ["PathMissingError", "PathMissingError.__init__"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PathMissingError(DvcException):\n default_msg = (\n \"The path '{}' does not exist in the target repository '{}'\"\n \" neither as a DVC output nor as a Git-tracked file.\"\n )\n default_msg_dvc_only = (\n \"The path '{}' does not exist in the target repository '{}'\"\n \" as an DVC output.\"\n )\n\n def __init__(self, path, repo, dvc_only=False):\n msg = self.default_msg if not dvc_only else self.default_msg_dvc_only\n super().__init__(msg.format(path, repo))\n self.dvc_only = dvc_only", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_logging_DvcIgnore.__call__.raise_NotImplementedError": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_logging_DvcIgnore.__call__.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "dvc/ignore.py", "file_name": "ignore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 23, "span_ids": ["imports", "DvcIgnore", "DvcIgnore.__call__"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nimport re\nfrom collections import namedtuple\nfrom itertools import groupby, takewhile\n\nfrom pathspec.patterns import GitWildMatchPattern\nfrom pathspec.util import normalize_file\n\nfrom dvc.path_info import PathInfo\nfrom dvc.pathspec_math import PatternInfo, merge_patterns\nfrom dvc.system import System\nfrom dvc.utils import relpath\nfrom dvc.utils.collections import PathStringTrie\n\nlogger = logging.getLogger(__name__)\n\n\nclass DvcIgnore:\n DVCIGNORE_FILE = \".dvcignore\"\n\n def __call__(self, root, dirs, files):\n raise NotImplementedError", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/logger.py__Manages_logging_config_addLoggingLevel.setattr_logging_methodNa": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/logger.py__Manages_logging_config_addLoggingLevel.setattr_logging_methodNa", "embedding": null, "metadata": {"file_path": "dvc/logger.py", "file_name": "logger.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 46, "span_ids": ["addLoggingLevel", "docstring"], "tokens": 309}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Manages logging configuration for DVC repo.\"\"\"\n\nimport logging.config\nimport logging.handlers\n\nimport colorama\n\nfrom dvc.progress import Tqdm\n\nFOOTER = (\n \"\\n{yellow}Having any troubles?{nc}\"\n \" Hit us up at {blue}https://dvc.org/support{nc},\"\n \" we are always happy to help!\"\n).format(\n blue=colorama.Fore.BLUE,\n nc=colorama.Fore.RESET,\n yellow=colorama.Fore.YELLOW,\n)\n\n\ndef addLoggingLevel(levelName, levelNum, methodName=None):\n \"\"\"\n Adds a new logging level to the `logging` module and the\n currently configured logging class.\n\n Based on https://stackoverflow.com/questions/2183233\n \"\"\"\n if methodName is None:\n methodName = levelName.lower()\n\n assert not hasattr(logging, levelName)\n assert not hasattr(logging, methodName)\n assert not hasattr(logging.getLoggerClass(), methodName)\n\n def logForLevel(self, message, *args, **kwargs):\n if self.isEnabledFor(levelNum):\n # pylint: disable=protected-access\n self._log(levelNum, message, args, **kwargs)\n\n def logToRoot(message, *args, **kwargs):\n logging.log(levelNum, message, *args, **kwargs)\n\n logging.addLevelName(levelNum, levelName)\n setattr(logging, levelName, levelNum)\n setattr(logging.getLoggerClass(), methodName, logForLevel)\n setattr(logging, methodName, logToRoot)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/logger.py_LoggingException_ColorFormatter.color_code._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/logger.py_LoggingException_ColorFormatter.color_code._", "embedding": null, "metadata": {"file_path": "dvc/logger.py", "file_name": "logger.py", "file_type": "text/x-python", "category": "implementation", "start_line": 48, "end_line": 80, "span_ids": ["LoggingException.__init__", "ColorFormatter", "excludeFilter", "LoggingException"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LoggingException(Exception):\n def __init__(self, record):\n msg = \"failed to log {}\".format(str(record))\n super().__init__(msg)\n\n\ndef excludeFilter(level):\n class ExcludeLevelFilter(logging.Filter):\n def filter(self, record):\n return record.levelno < level\n\n return ExcludeLevelFilter\n\n\nclass ColorFormatter(logging.Formatter):\n \"\"\"Spit out colored text in supported terminals.\n\n colorama__ makes ANSI escape character sequences work under Windows.\n See the colorama documentation for details.\n\n __ https://pypi.python.org/pypi/colorama\n\n If record has an extra `tb_only` attribute, it will not show the\n exception cause, just the message and the traceback.\n \"\"\"\n\n color_code = {\n \"TRACE\": colorama.Fore.GREEN,\n \"DEBUG\": colorama.Fore.BLUE,\n \"WARNING\": colorama.Fore.YELLOW,\n \"ERROR\": colorama.Fore.RED,\n \"CRITICAL\": colorama.Fore.RED,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/__init__.py_loadd_from_loadd_from.return.ret": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/__init__.py_loadd_from_loadd_from.return.ret", "embedding": null, "metadata": {"file_path": "dvc/output/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 135, "end_line": 160, "span_ids": ["loadd_from"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def loadd_from(stage, d_list):\n ret = []\n for d in d_list:\n p = d.pop(BaseOutput.PARAM_PATH)\n cache = d.pop(BaseOutput.PARAM_CACHE, True)\n metric = d.pop(BaseOutput.PARAM_METRIC, False)\n plot = d.pop(BaseOutput.PARAM_PLOT, False)\n persist = d.pop(BaseOutput.PARAM_PERSIST, False)\n checkpoint = d.pop(BaseOutput.PARAM_CHECKPOINT, False)\n desc = d.pop(BaseOutput.PARAM_DESC, False)\n isexec = d.pop(BaseOutput.PARAM_ISEXEC, False)\n ret.append(\n _get(\n stage,\n p,\n info=d,\n cache=cache,\n metric=metric,\n plot=plot,\n persist=persist,\n checkpoint=checkpoint,\n desc=desc,\n isexec=isexec,\n )\n )\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/__init__.py_loads_from__merge_data.return.d": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/__init__.py_loads_from__merge_data.return.d", "embedding": null, "metadata": {"file_path": "dvc/output/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 163, "end_line": 208, "span_ids": ["_split_dict", "loads_from", "_merge_data"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def loads_from(\n stage,\n s_list,\n use_cache=True,\n metric=False,\n plot=False,\n persist=False,\n checkpoint=False,\n isexec=False,\n):\n return [\n _get(\n stage,\n s,\n info={},\n cache=use_cache,\n metric=metric,\n plot=plot,\n persist=persist,\n checkpoint=checkpoint,\n isexec=isexec,\n )\n for s in s_list\n ]\n\n\ndef _split_dict(d, keys):\n return project(d, keys), project(d, d.keys() - keys)\n\n\ndef _merge_data(s_list):\n d = defaultdict(dict)\n for key in s_list:\n if isinstance(key, str):\n d[key].update({})\n continue\n if not isinstance(key, dict):\n raise ValueError(f\"'{type(key).__name__}' not supported.\")\n\n for k, flags in key.items():\n if not isinstance(flags, dict):\n raise ValueError(\n f\"Expected dict for '{k}', got: '{type(flags).__name__}'\"\n )\n d[k].update(flags)\n return d", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/__init__.py_load_from_pipeline_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/__init__.py_load_from_pipeline_", "embedding": null, "metadata": {"file_path": "dvc/output/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 202, "end_line": 227, "span_ids": ["load_from_pipeline"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@collecting\ndef load_from_pipeline(stage, s_list, typ=\"outs\"):\n if typ not in (stage.PARAM_OUTS, stage.PARAM_METRICS, stage.PARAM_PLOTS):\n raise ValueError(f\"'{typ}' key is not allowed for pipeline files.\")\n\n metric = typ == stage.PARAM_METRICS\n plot = typ == stage.PARAM_PLOTS\n\n d = _merge_data(s_list)\n\n for path, flags in d.items():\n plt_d = {}\n if plot:\n from dvc.schema import PLOT_PROPS\n\n plt_d, flags = _split_dict(flags, keys=PLOT_PROPS.keys())\n extra = project(\n flags,\n [\n BaseOutput.PARAM_CACHE,\n BaseOutput.PARAM_PERSIST,\n BaseOutput.PARAM_CHECKPOINT,\n ],\n )\n yield _get(stage, path, {}, plot=plt_d or plot, metric=metric, **extra)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_BaseOutput.collect_used_dir_cache_BaseOutput.collect_used_dir_cache.return.cache": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_BaseOutput.collect_used_dir_cache_BaseOutput.collect_used_dir_cache.return.cache", "embedding": null, "metadata": {"file_path": "dvc/output/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 418, "end_line": 475, "span_ids": ["BaseOutput.collect_used_dir_cache"], "tokens": 418}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseOutput:\n\n def collect_used_dir_cache(\n self, remote=None, force=False, jobs=None, filter_info=None\n ):\n \"\"\"Get a list of `info`s related to the given directory.\n\n - Pull the directory entry from the remote cache if it was changed.\n\n Example:\n\n Given the following commands:\n\n $ echo \"foo\" > directory/foo\n $ echo \"bar\" > directory/bar\n $ dvc add directory\n\n It will return a NamedCache like:\n\n nc = NamedCache()\n nc.add(self.scheme, 'c157a79031e1', 'directory/foo')\n nc.add(self.scheme, 'd3b07384d113', 'directory/bar')\n \"\"\"\n\n cache = NamedCache()\n\n try:\n self.get_dir_cache(jobs=jobs, remote=remote)\n except DvcException:\n logger.debug(f\"failed to pull cache for '{self}'\")\n\n if self.cache.changed_cache_file(self.hash_info):\n msg = (\n \"Missing cache for directory '{}'. \"\n \"Cache for files inside will be lost. \"\n \"Would you like to continue? Use '-f' to force.\"\n )\n if not force and not prompt.confirm(msg.format(self.path_info)):\n raise CollectCacheError(\n \"unable to fully collect used cache\"\n \" without cache for directory '{}'\".format(self)\n )\n else:\n return cache\n\n path = str(self.path_info)\n filter_path = str(filter_info) if filter_info else None\n is_win = os.name == \"nt\"\n for entry_relpath, entry_hash_info in self.dir_cache.items():\n if is_win:\n entry_relpath = entry_relpath.replace(\"/\", os.sep)\n entry_path = os.path.join(path, entry_relpath)\n if (\n not filter_path\n or entry_path == filter_path\n or entry_path.startswith(filter_path + os.sep)\n ):\n cache.add(self.scheme, entry_hash_info.value, entry_path)\n\n return cache", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/local.py_logging_LocalOutput._parse_path.return.self_TREE_CLS_PATH_CLS_ab": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/local.py_logging_LocalOutput._parse_path.return.self_TREE_CLS_PATH_CLS_ab", "embedding": null, "metadata": {"file_path": "dvc/output/local.py", "file_name": "local.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 48, "span_ids": ["imports", "LocalOutput.__init__", "LocalOutput", "LocalOutput._parse_path"], "tokens": 370}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nfrom urllib.parse import urlparse\n\nfrom dvc.exceptions import DvcException\nfrom dvc.istextfile import istextfile\nfrom dvc.output.base import BaseOutput\nfrom dvc.utils import relpath\nfrom dvc.utils.fs import path_isin\n\nfrom ..tree.local import LocalTree\n\nlogger = logging.getLogger(__name__)\n\n\nclass LocalOutput(BaseOutput):\n TREE_CLS = LocalTree\n sep = os.sep\n\n def __init__(self, stage, path, *args, **kwargs):\n if stage and path_isin(path, stage.repo.root_dir):\n path = relpath(path, stage.wdir)\n\n super().__init__(stage, path, *args, **kwargs)\n if (\n self.is_in_repo\n and self.repo\n and isinstance(self.repo.tree, LocalTree)\n ):\n self.tree = self.repo.tree\n\n def _parse_path(self, tree, path):\n parsed = urlparse(path)\n if parsed.scheme == \"remote\":\n p = tree.path_info / parsed.path.lstrip(\"/\")\n else:\n # NOTE: we can path either from command line or .dvc file,\n # so we should expect both posix and windows style paths.\n # PathInfo accepts both, i.e. / works everywhere, \\ only on win.\n #\n # FIXME: if we have Windows path containing / or posix one with \\\n # then we have #2059 bug and can't really handle that.\n p = self.TREE_CLS.PATH_CLS(path)\n if self.stage and not p.is_absolute():\n p = self.stage.wdir / p\n\n abs_p = os.path.abspath(os.path.normpath(p))\n return self.TREE_CLS.PATH_CLS(abs_p)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/local.py_LocalOutput.__str___LocalOutput.dumpd.return.ret": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/local.py_LocalOutput.__str___LocalOutput.dumpd.return.ret", "embedding": null, "metadata": {"file_path": "dvc/output/local.py", "file_name": "local.py", "file_type": "text/x-python", "category": "implementation", "start_line": 44, "end_line": 72, "span_ids": ["LocalOutput.fspath", "LocalOutput.is_in_repo", "LocalOutput.dumpd", "LocalOutput.__str__"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LocalOutput(BaseOutput):\n\n def __str__(self):\n if not self.repo or not self.is_in_repo:\n return str(self.def_path)\n\n cur_dir = os.getcwd()\n if path_isin(cur_dir, self.repo.root_dir):\n return relpath(self.path_info, cur_dir)\n\n return relpath(self.path_info, self.repo.root_dir)\n\n @property\n def fspath(self):\n return self.path_info.fspath\n\n @property\n def is_in_repo(self):\n def_scheme = urlparse(self.def_path).scheme\n return def_scheme != \"remote\" and not os.path.isabs(self.def_path)\n\n def dumpd(self):\n ret = super().dumpd()\n if self.is_in_repo:\n path = self.path_info.relpath(self.stage.wdir).as_posix()\n else:\n path = self.def_path\n\n ret[self.PARAM_PATH] = path\n\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/local.py_LocalOutput.verify_metric_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/local.py_LocalOutput.verify_metric_", "embedding": null, "metadata": {"file_path": "dvc/output/local.py", "file_name": "local.py", "file_type": "text/x-python", "category": "implementation", "start_line": 80, "end_line": 97, "span_ids": ["LocalOutput.verify_metric"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LocalOutput(BaseOutput):\n\n def verify_metric(self):\n if not self.metric or self.plot:\n return\n\n path = os.fspath(self.path_info)\n if not os.path.exists(path):\n return\n\n name = \"metrics\" if self.metric else \"plot\"\n if os.path.isdir(path):\n msg = \"directory '%s' cannot be used as %s.\"\n logger.debug(msg, str(self.path_info), name)\n return\n\n if not istextfile(path):\n msg = \"binary file '{}' cannot be used as {}.\"\n raise DvcException(msg.format(self.path_info, name))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_WindowsPathInfo__URLPathParents.__repr__.return.f_self_src_parents_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_WindowsPathInfo__URLPathParents.__repr__.return.f_self_src_parents_", "embedding": null, "metadata": {"file_path": "dvc/path_info.py", "file_name": "path_info.py", "file_type": "text/x-python", "category": "implementation", "start_line": 75, "end_line": 102, "span_ids": ["_URLPathInfo:2", "_URLPathInfo.__str__", "_URLPathParents.__getitem__", "_URLPathInfo", "_URLPathParents", "_URLPathParents.__repr__", "WindowsPathInfo", "PosixPathInfo", "_URLPathParents.__len__", "_URLPathParents.__init__"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class WindowsPathInfo(PathInfo, pathlib.PureWindowsPath):\n pass\n\n\nclass PosixPathInfo(PathInfo, pathlib.PurePosixPath):\n pass\n\n\nclass _URLPathInfo(PosixPathInfo):\n def __str__(self):\n return self.__fspath__()\n\n __unicode__ = __str__\n\n\nclass _URLPathParents:\n def __init__(self, src):\n self.src = src\n self._parents = self.src._path.parents\n\n def __len__(self):\n return len(self._parents)\n\n def __getitem__(self, idx):\n return self.src.replace(path=self._parents[idx])\n\n def __repr__(self):\n return f\"<{self.src}.parents>\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_logging_locked.return.wrapper": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_logging_locked.return.wrapper", "embedding": null, "metadata": {"file_path": "dvc/repo/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 55, "span_ids": ["locked", "imports", "lock_repo"], "tokens": 325}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nfrom contextlib import contextmanager\nfrom functools import wraps\nfrom typing import TYPE_CHECKING\n\nfrom funcy import cached_property, cat\nfrom git import InvalidGitRepositoryError\n\nfrom dvc.config import Config\nfrom dvc.exceptions import FileMissingError\nfrom dvc.exceptions import IsADirectoryError as DvcIsADirectoryError\nfrom dvc.exceptions import NotDvcRepoError, OutputNotFoundError\nfrom dvc.path_info import PathInfo\nfrom dvc.scm import Base\nfrom dvc.scm.base import SCMError\nfrom dvc.tree.repo import RepoTree\nfrom dvc.utils.fs import path_isin\n\nfrom .graph import build_graph, build_outs_graph, get_pipelines\nfrom .trie import build_outs_trie\n\nif TYPE_CHECKING:\n from dvc.tree.base import BaseTree\n\n\nlogger = logging.getLogger(__name__)\n\n\n@contextmanager\ndef lock_repo(repo: \"Repo\"):\n # pylint: disable=protected-access\n depth = repo._lock_depth\n repo._lock_depth += 1\n\n try:\n if depth > 0:\n yield\n else:\n with repo.lock, repo.state:\n repo._reset()\n yield\n # Graph cache is no longer valid after we release the repo.lock\n repo._reset()\n finally:\n repo._lock_depth = depth\n\n\ndef locked(f):\n @wraps(f)\n def wrapper(repo, *args, **kwargs):\n with lock_repo(repo):\n return f(repo, *args, **kwargs)\n\n return wrapper", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/commit.py_from_dvc_import_prompt__prepare_message.return.msg_format_map_kw_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/commit.py_from_dvc_import_prompt__prepare_message.return.msg_format_map_kw_", "embedding": null, "metadata": {"file_path": "dvc/repo/commit.py", "file_name": "commit.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 27, "span_ids": ["imports", "_prepare_message"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc import prompt\nfrom dvc.dvcfile import Dvcfile\nfrom dvc.stage.exceptions import StageCommitError\n\nfrom . import locked\n\n\ndef _prepare_message(stage, changes):\n changed_deps, changed_outs, changed_stage = changes\n if changed_deps and changed_outs:\n msg = \"dependencies {deps} and outputs {outs} of {stage} changed.\"\n elif changed_deps:\n msg = \"dependencies {deps} of {stage} changed.\"\n elif changed_outs:\n msg = \"outputs {outs} of {stage} changed.\"\n else:\n msg = \"{stage_changed}\"\n\n msg += \" Are you sure you want to commit it?\"\n\n kw = {\n \"stage\": stage,\n \"deps\": changed_deps,\n \"outs\": changed_outs,\n \"stage_changed\": changed_stage,\n }\n return msg.format_map(kw)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/commit.py_prompt_to_commit_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/commit.py_prompt_to_commit_", "embedding": null, "metadata": {"file_path": "dvc/repo/commit.py", "file_name": "commit.py", "file_type": "text/x-python", "category": "implementation", "start_line": 30, "end_line": 54, "span_ids": ["commit", "prompt_to_commit"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def prompt_to_commit(stage, changes, force=False):\n if not (force or prompt.confirm(_prepare_message(stage, changes))):\n raise StageCommitError(\n \"unable to commit changed {}. Use `-f|--force` to \"\n \"force.\".format(stage)\n )\n\n\n@locked\ndef commit(\n self, target, with_deps=False, recursive=False, force=False,\n):\n stages = self.stage.collect(\n target, with_deps=with_deps, recursive=recursive\n )\n for stage in stages:\n changes = stage.changed_entries()\n if any(changes):\n prompt_to_commit(stage, changes, force=force)\n stage.save()\n stage.commit()\n\n Dvcfile(self, stage.path).dump(stage, update_pipeline=False)\n return stages", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/fetch.py__fetch_external_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/fetch.py__fetch_external_", "embedding": null, "metadata": {"file_path": "dvc/repo/fetch.py", "file_name": "fetch.py", "file_type": "text/x-python", "category": "implementation", "start_line": 80, "end_line": 99, "span_ids": ["_fetch_external"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _fetch_external(self, repo_url, repo_rev, files, jobs):\n from dvc.external_repo import external_repo\n\n failed, downloaded = 0, 0\n cache = self.cache.local\n try:\n with external_repo(\n repo_url, repo_rev, cache_dir=cache.cache_dir\n ) as repo:\n d, f, _ = repo.fetch_external(files, jobs=jobs)\n downloaded += d\n failed += f\n except CloneError:\n failed += 1\n logger.exception(\n \"failed to fetch data for '{}'\".format(\", \".join(files))\n )\n\n return downloaded, failed", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/freeze.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/freeze.py__", "embedding": null, "metadata": {"file_path": "dvc/repo/freeze.py", "file_name": "freeze.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 24, "span_ids": ["imports", "freeze", "_set", "unfreeze"], "tokens": 100}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import typing\n\nfrom . import locked\n\nif typing.TYPE_CHECKING:\n from . import Repo\n\n\n@locked\ndef _set(repo: \"Repo\", target, frozen):\n stage = repo.stage.get_target(target)\n stage.frozen = frozen\n stage.dvcfile.dump(stage, update_lock=False)\n\n return stage\n\n\ndef freeze(repo, target):\n return _set(repo, target, True)\n\n\ndef unfreeze(repo, target):\n return _set(repo, target, False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/metrics/__init__.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/metrics/__init__.py__", "embedding": null, "metadata": {"file_path": "dvc/repo/metrics/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 14, "span_ids": ["Metrics.show", "Metrics.diff", "Metrics", "Metrics.__init__"], "tokens": 81}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Metrics:\n def __init__(self, repo):\n self.repo = repo\n\n def show(self, *args, **kwargs):\n from dvc.repo.metrics.show import show\n\n return show(self.repo, *args, **kwargs)\n\n def diff(self, *args, **kwargs):\n from .diff import diff\n\n return diff(self.repo, *args, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py_logging_PropsNotFoundError.pass": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py_logging_PropsNotFoundError.pass", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 29, "span_ids": ["imports", "PropsNotFoundError", "NotAPlotError.__init__", "NotAPlotError"], "tokens": 160}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\n\nfrom funcy import cached_property, first, project\n\nfrom dvc.exceptions import (\n DvcException,\n MetricDoesNotExistError,\n NoMetricsFoundError,\n NoMetricsParsedError,\n)\nfrom dvc.repo.collect import collect\nfrom dvc.repo.plots.data import PlotParsingError\nfrom dvc.schema import PLOT_PROPS\nfrom dvc.tree.repo import RepoTree\nfrom dvc.utils import relpath\n\nlogger = logging.getLogger(__name__)\n\n\nclass NotAPlotError(DvcException):\n def __init__(self, out):\n super().__init__(\n f\"'{out}' is not a known plot. Use `dvc plots modify` to turn it \"\n \"into one.\"\n )\n\n\nclass PropsNotFoundError(DvcException):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py_Plots_Plots.collect.return.data": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py_Plots_Plots.collect.return.data", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 24, "end_line": 62, "span_ids": ["Plots.__init__", "Plots.collect", "Plots"], "tokens": 300}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Plots:\n def __init__(self, repo):\n self.repo = repo\n\n def collect(self, targets=None, revs=None):\n \"\"\"Collects all props and data for plots.\n\n Returns a structure like:\n {rev: {plots.csv: {\n props: {x: ..., \"header\": ..., ...},\n data: \"...data as a string...\",\n }}}\n Data parsing is postponed, since it's affected by props.\n \"\"\"\n targets = [targets] if isinstance(targets, str) else targets or []\n data = {}\n for rev in self.repo.brancher(revs=revs):\n # .brancher() adds unwanted workspace\n if revs is not None and rev not in revs:\n continue\n rev = rev or \"workspace\"\n\n tree = RepoTree(self.repo)\n plots = _collect_plots(self.repo, targets, rev)\n for path_info, props in plots.items():\n datafile = relpath(path_info, self.repo.root_dir)\n if rev not in data:\n data[rev] = {}\n data[rev].update({datafile: {\"props\": props}})\n\n # Load data from git or dvc cache\n try:\n with tree.open(path_info) as fd:\n data[rev][datafile][\"data\"] = fd.read()\n except FileNotFoundError:\n # This might happen simply because cache is absent\n pass\n\n return data", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py__prepare_plots__prepare_plots.return.plots": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py__prepare_plots__prepare_plots.return.plots", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 175, "end_line": 216, "span_ids": ["_prepare_plots"], "tokens": 316}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _prepare_plots(data, revs, props):\n \"\"\"Groups data by plot file.\n\n Also resolves props conflicts between revs and applies global props.\n \"\"\"\n # we go in order revs are supplied on props conflict first ones win.\n revs = iter(data) if revs is None else revs\n\n plots, props_revs = {}, {}\n for rev in revs:\n # Asked for revision without data\n if rev not in data:\n continue\n\n for datafile, desc in data[rev].items():\n # We silently skip on an absent data file,\n # see also try/except/pass in .collect()\n if \"data\" not in desc:\n continue\n\n # props from command line overwrite plot props from out definition\n full_props = {**desc[\"props\"], **props}\n\n if datafile in plots:\n saved = plots[datafile]\n if saved[\"props\"] != full_props:\n logger.warning(\n f\"Inconsistent plot props for '{datafile}' in \"\n f\"'{props_revs[datafile]}' and '{rev}'. \"\n f\"Going to use ones from '{props_revs[datafile]}'\"\n )\n\n saved[\"data\"][rev] = desc[\"data\"]\n else:\n plots[datafile] = {\n \"props\": full_props,\n \"data\": {rev: desc[\"data\"]},\n }\n # Save rev we got props from\n props_revs[datafile] = rev\n\n return plots", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py__render_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py__render_", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 219, "end_line": 255, "span_ids": ["_render"], "tokens": 322}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _render(datafile, datas, props, templates):\n from .data import PlotData, plot_data\n\n # Copy it to not modify a passed value\n props = props.copy()\n\n # Add x and y to fields if set\n fields = props.get(\"fields\")\n if fields is not None:\n fields = {*fields, props.get(\"x\"), props.get(\"y\")} - {None}\n\n template = templates.load(props.get(\"template\") or \"default\")\n\n # If x is not set add index field\n if not props.get(\"x\") and template.has_anchor(\"x\"):\n props[\"append_index\"] = True\n props[\"x\"] = PlotData.INDEX_FIELD\n\n # Parse all data, preprocess it and collect as a list of dicts\n data = []\n for rev, datablob in datas.items():\n rev_data = plot_data(datafile, rev, datablob).to_datapoints(\n fields=fields,\n path=props.get(\"path\"),\n header=props.get(\"header\", True),\n append_index=props.get(\"append_index\", False),\n )\n data.extend(rev_data)\n\n # If y is not set then use last field not used yet\n if not props.get(\"y\") and template.has_anchor(\"y\"):\n fields = list(first(data))\n skip = (PlotData.REVISION_FIELD, props.get(\"x\"))\n props[\"y\"] = first(f for f in reversed(fields) if f not in skip)\n\n return template.render(data, props=props)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/data.py_csv_plot_data.raise_PlotMetricTypeError": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/data.py_csv_plot_data.raise_PlotMetricTypeError", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/data.py", "file_name": "data.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 47, "span_ids": ["PlotParsingError.__init__", "PlotMetricTypeError", "plot_data", "PlotMetricTypeError.__init__", "imports", "PlotDataStructureError", "PlotParsingError", "PlotDataStructureError.__init__"], "tokens": 302}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import csv\nimport io\nimport os\nfrom collections import OrderedDict\nfrom copy import copy\n\nfrom funcy import first, reraise\n\nfrom dvc.exceptions import DvcException\nfrom dvc.utils.serialize import ParseError, parse_json, parse_yaml\n\n\nclass PlotMetricTypeError(DvcException):\n def __init__(self, file):\n super().__init__(\n \"'{}' - file type error\\n\"\n \"Only JSON, YAML, CSV and TSV formats are supported.\".format(file)\n )\n\n\nclass PlotDataStructureError(DvcException):\n def __init__(self):\n super().__init__(\n \"Plot data extraction failed. Please see \"\n \"https://man.dvc.org/plot for supported data formats.\"\n )\n\n\nclass PlotParsingError(ParseError):\n def __init__(self, path, revision):\n self.path = path\n self.revision = revision\n\n super().__init__(path, f\"revision: {revision}\")\n\n\ndef plot_data(filename, revision, content):\n _, extension = os.path.splitext(filename.lower())\n if extension == \".json\":\n return JSONPlotData(filename, revision, content)\n elif extension == \".csv\":\n return CSVPlotData(filename, revision, content)\n elif extension == \".tsv\":\n return CSVPlotData(filename, revision, content, delimiter=\"\\t\")\n elif extension == \".yaml\":\n return YAMLPlotData(filename, revision, content)\n raise PlotMetricTypeError(filename)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/data.py__filter_fields__filter_fields.return.new_data": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/data.py__filter_fields__filter_fields.return.new_data", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/data.py", "file_name": "data.py", "file_type": "text/x-python", "category": "implementation", "start_line": 49, "end_line": 70, "span_ids": ["_filter_fields"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _filter_fields(data_points, filename, revision, fields=None, **kwargs):\n if not fields:\n return data_points\n assert isinstance(fields, set)\n\n new_data = []\n for data_point in data_points:\n new_dp = copy(data_point)\n\n keys = set(data_point.keys())\n if keys & fields != fields:\n raise DvcException(\n \"Could not find fields: '{}' for '{}' at '{}'.\".format(\n \", \".join(fields), filename, revision\n )\n )\n\n to_del = keys - fields\n for key in to_del:\n del new_dp[key]\n new_data.append(new_dp)\n return new_data", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/data.py__apply_path__apply_path.return.data_points": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/data.py__apply_path__apply_path.return.data_points", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/data.py", "file_name": "data.py", "file_type": "text/x-python", "category": "implementation", "start_line": 73, "end_line": 98, "span_ids": ["_apply_path"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _apply_path(data, path=None, **kwargs):\n if not path or not isinstance(data, dict):\n return data\n\n import jsonpath_ng\n\n found = jsonpath_ng.parse(path).find(data)\n first_datum = first(found)\n if (\n len(found) == 1\n and isinstance(first_datum.value, list)\n and isinstance(first(first_datum.value), dict)\n ):\n data_points = first_datum.value\n elif len(first_datum.path.fields) == 1:\n field_name = first(first_datum.path.fields)\n data_points = [{field_name: datum.value} for datum in found]\n else:\n raise PlotDataStructureError()\n\n if not isinstance(data_points, list) or not (\n isinstance(first(data_points), dict)\n ):\n raise PlotDataStructureError()\n\n return data_points", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/data.py__lists__find_data.raise_PlotDataStructureEr": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/data.py__lists__find_data.raise_PlotDataStructureEr", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/data.py", "file_name": "data.py", "file_type": "text/x-python", "category": "implementation", "start_line": 100, "end_line": 122, "span_ids": ["_lists", "_find_data"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _lists(dictionary):\n for _, value in dictionary.items():\n if isinstance(value, dict):\n yield from _lists(value)\n elif isinstance(value, list):\n yield value\n\n\ndef _find_data(data, fields=None, **kwargs):\n if not isinstance(data, dict):\n return data\n\n if not fields:\n # just look for first list of dicts\n fields = set()\n\n for lst in _lists(data):\n if (\n all(isinstance(dp, dict) for dp in lst)\n and set(first(lst).keys()) & fields == fields\n ):\n return lst\n raise PlotDataStructureError()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/data.py__append_index__append_revision.return.data_points": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/data.py__append_index__append_revision.return.data_points", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/data.py", "file_name": "data.py", "file_type": "text/x-python", "category": "implementation", "start_line": 124, "end_line": 142, "span_ids": ["_append_index", "_append_revision"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _append_index(data_points, append_index=False, **kwargs):\n if not append_index:\n return data_points\n\n if PlotData.INDEX_FIELD in first(data_points).keys():\n raise DvcException(\n \"Cannot append index. Field of same name ('{}') found in data. \"\n \"Use `-x` to specify x axis field.\".format(PlotData.INDEX_FIELD)\n )\n\n for index, data_point in enumerate(data_points):\n data_point[PlotData.INDEX_FIELD] = index\n return data_points\n\n\ndef _append_revision(data_points, revision, **kwargs):\n for data_point in data_points:\n data_point[PlotData.REVISION_FIELD] = revision\n return data_points", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/data.py_PlotData_JSONPlotData._processors.return.__apply_path__find_data_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/data.py_PlotData_JSONPlotData._processors.return.__apply_path__find_data_", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/data.py", "file_name": "data.py", "file_type": "text/x-python", "category": "implementation", "start_line": 153, "end_line": 190, "span_ids": ["PlotData.raw", "PlotData._processors", "JSONPlotData", "PlotData.__init__", "JSONPlotData.raw", "PlotData.to_datapoints", "PlotData", "JSONPlotData._processors"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PlotData:\n REVISION_FIELD = \"rev\"\n INDEX_FIELD = \"index\"\n\n def __init__(self, filename, revision, content, **kwargs):\n self.filename = filename\n self.revision = revision\n self.content = content\n\n def raw(self, **kwargs):\n raise NotImplementedError\n\n def _processors(self):\n return [_filter_fields, _append_index, _append_revision]\n\n def to_datapoints(self, **kwargs):\n with reraise(\n [ParseError, csv.Error],\n PlotParsingError(self.filename, self.revision),\n ):\n data = self.raw(**kwargs)\n\n for data_proc in self._processors():\n data = data_proc(\n data, filename=self.filename, revision=self.revision, **kwargs\n )\n return data\n\n\nclass JSONPlotData(PlotData):\n def raw(self, **kwargs):\n return parse_json(\n self.content, self.filename, object_pairs_hook=OrderedDict\n )\n\n def _processors(self):\n parent_processors = super()._processors()\n return [_apply_path, _find_data] + parent_processors", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/data.py_CSVPlotData_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/data.py_CSVPlotData_", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/data.py", "file_name": "data.py", "file_type": "text/x-python", "category": "implementation", "start_line": 193, "end_line": 228, "span_ids": ["YAMLPlotData", "CSVPlotData.raw", "YAMLPlotData.raw", "YAMLPlotData._processors", "CSVPlotData", "CSVPlotData.__init__"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CSVPlotData(PlotData):\n def __init__(self, filename, revision, content, delimiter=\",\"):\n super().__init__(filename, revision, content)\n self.delimiter = delimiter\n\n def raw(self, header=True, **kwargs): # pylint: disable=arguments-differ\n first_row = first(csv.reader(io.StringIO(self.content)))\n\n if header:\n reader = csv.DictReader(\n io.StringIO(self.content), delimiter=self.delimiter,\n )\n else:\n reader = csv.DictReader(\n io.StringIO(self.content),\n delimiter=self.delimiter,\n fieldnames=[str(i) for i in range(len(first_row))],\n )\n\n fieldnames = reader.fieldnames\n data = list(reader)\n\n return [\n OrderedDict([(field, data_point[field]) for field in fieldnames])\n for data_point in data\n ]\n\n\nclass YAMLPlotData(PlotData):\n def raw(self, **kwargs):\n return parse_yaml(self.content, self.filename, typ=\"rt\")\n\n def _processors(self):\n parent_processors = super()._processors()\n return [_find_data] + parent_processors", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_json_NoFieldInDataError.__init__.super___init___": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_json_NoFieldInDataError.__init__.super___init___", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/template.py", "file_name": "template.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 24, "span_ids": ["TemplateNotFoundError.__init__", "TemplateNotFoundError", "imports", "BadTemplateError", "NoFieldInDataError.__init__", "NoFieldInDataError"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import json\nimport os\nfrom typing import Any, Dict, Optional\n\nfrom funcy import cached_property\n\nfrom dvc.exceptions import DvcException\nfrom dvc.utils.fs import makedirs\n\n\nclass TemplateNotFoundError(DvcException):\n def __init__(self, path):\n super().__init__(f\"Template '{path}' not found.\")\n\n\nclass BadTemplateError(DvcException):\n pass\n\n\nclass NoFieldInDataError(DvcException):\n def __init__(self, field_name):\n super().__init__(\n f\"Field '{field_name}' does not exist in provided data.\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_Template.anchor_Template._check_field_exists.if_not_any_field_in_row_f.raise_NoFieldInDataError_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_Template.anchor_Template._check_field_exists.if_not_any_field_in_row_f.raise_NoFieldInDataError_", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/template.py", "file_name": "template.py", "file_type": "text/x-python", "category": "implementation", "start_line": 56, "end_line": 91, "span_ids": ["Template.has_anchor", "Template._fill_metadata", "Template._fill_anchor", "Template._check_field_exists", "Template._anchor_str", "Template.anchor"], "tokens": 268}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Template:\n\n @classmethod\n def anchor(cls, name):\n return cls.ANCHOR.format(name.upper())\n\n def has_anchor(self, name):\n return self._anchor_str(name) in self.content\n\n @classmethod\n def _fill_anchor(cls, content, name, value):\n value_str = json.dumps(\n value, indent=cls.INDENT, separators=cls.SEPARATORS, sort_keys=True\n )\n return content.replace(cls._anchor_str(name), value_str)\n\n @classmethod\n def _anchor_str(cls, name):\n return '\"{}\"'.format(cls.anchor(name))\n\n @classmethod\n def _fill_metadata(cls, content, props):\n props.setdefault(\"title\", \"\")\n props.setdefault(\"x_label\", props.get(\"x\"))\n props.setdefault(\"y_label\", props.get(\"y\"))\n\n names = [\"title\", \"x\", \"y\", \"x_label\", \"y_label\"]\n for name in names:\n value = props.get(name)\n if value is not None:\n content = cls._fill_anchor(content, name, value)\n\n return content\n\n @staticmethod\n def _check_field_exists(data, field):\n if not any(field in row for row in data):\n raise NoFieldInDataError(field)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_SmoothLinearTemplate_SmoothLinearTemplate.DEFAULT_CONTENT._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_SmoothLinearTemplate_SmoothLinearTemplate.DEFAULT_CONTENT._", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/template.py", "file_name": "template.py", "file_type": "text/x-python", "category": "implementation", "start_line": 169, "end_line": 199, "span_ids": ["SmoothLinearTemplate"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SmoothLinearTemplate(Template):\n DEFAULT_NAME = \"smooth\"\n\n DEFAULT_CONTENT = {\n \"$schema\": \"https://vega.github.io/schema/vega-lite/v4.json\",\n \"data\": {\"values\": Template.anchor(\"data\")},\n \"title\": Template.anchor(\"title\"),\n \"mark\": {\"type\": \"line\"},\n \"encoding\": {\n \"x\": {\n \"field\": Template.anchor(\"x\"),\n \"type\": \"quantitative\",\n \"title\": Template.anchor(\"x_label\"),\n },\n \"y\": {\n \"field\": Template.anchor(\"y\"),\n \"type\": \"quantitative\",\n \"title\": Template.anchor(\"y_label\"),\n \"scale\": {\"zero\": False},\n },\n \"color\": {\"field\": \"rev\", \"type\": \"nominal\"},\n },\n \"transform\": [\n {\n \"loess\": Template.anchor(\"y\"),\n \"on\": Template.anchor(\"x\"),\n \"groupby\": [\"rev\"],\n \"bandwidth\": 0.3,\n }\n ],\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_PlotTemplates.__init___": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_PlotTemplates.__init___", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/template.py", "file_name": "template.py", "file_type": "text/x-python", "category": "implementation", "start_line": 255, "end_line": 281, "span_ids": ["PlotTemplates.init", "PlotTemplates._dump", "PlotTemplates.load", "PlotTemplates.__init__"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PlotTemplates:\n\n def __init__(self, dvc_dir):\n self.dvc_dir = dvc_dir\n\n def init(self):\n makedirs(self.templates_dir, exist_ok=True)\n for t in self.TEMPLATES:\n self._dump(t())\n\n def _dump(self, template):\n path = os.path.join(self.templates_dir, template.filename)\n with open(path, \"w\") as fd:\n fd.write(template.content)\n\n def load(self, name):\n try:\n path = self.get_template(name)\n\n with open(path) as fd:\n content = fd.read()\n\n return Template(content, name=name)\n except TemplateNotFoundError:\n for template in self.TEMPLATES:\n if template.DEFAULT_NAME == name:\n return template()\n raise", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/run.py_os_parse_params.return.ret": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/run.py_os_parse_params.return.ret", "embedding": null, "metadata": {"file_path": "dvc/repo/run.py", "file_name": "run.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 35, "span_ids": ["imports", "parse_params", "is_valid_name"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nfrom contextlib import suppress\n\nfrom funcy import concat, first, lfilter\n\nfrom dvc.exceptions import InvalidArgumentError\nfrom dvc.stage import PipelineStage\nfrom dvc.stage.exceptions import (\n DuplicateStageName,\n InvalidStageName,\n StageFileAlreadyExistsError,\n)\n\nfrom ..exceptions import OutputDuplicationError\nfrom . import locked\nfrom .scm_context import scm_context\n\n\ndef is_valid_name(name: str):\n from ..stage import INVALID_STAGENAME_CHARS\n\n return not INVALID_STAGENAME_CHARS & set(name)\n\n\ndef parse_params(path_params):\n ret = []\n for path_param in path_params:\n path, _, params_str = path_param.rpartition(\":\")\n # remove empty strings from params, on condition such as `-p \"file1:\"`\n params = lfilter(bool, params_str.split(\",\"))\n if not path:\n ret.extend(params)\n else:\n ret.append({path: params})\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/run.py__get_file_path__get_file_path.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/run.py__get_file_path__get_file_path.return._", "embedding": null, "metadata": {"file_path": "dvc/repo/run.py", "file_name": "run.py", "file_type": "text/x-python", "category": "implementation", "start_line": 38, "end_line": 59, "span_ids": ["_get_file_path"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _get_file_path(kwargs):\n from dvc.dvcfile import DVC_FILE, DVC_FILE_SUFFIX\n\n out = first(\n concat(\n kwargs.get(\"outs\", []),\n kwargs.get(\"outs_no_cache\", []),\n kwargs.get(\"metrics\", []),\n kwargs.get(\"metrics_no_cache\", []),\n kwargs.get(\"plots\", []),\n kwargs.get(\"plots_no_cache\", []),\n kwargs.get(\"outs_persist\", []),\n kwargs.get(\"outs_persist_no_cache\", []),\n kwargs.get(\"checkpoints\", []),\n )\n )\n\n return (\n os.path.basename(os.path.normpath(out)) + DVC_FILE_SUFFIX\n if out\n else DVC_FILE\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/run.py__check_stage_exists__check_stage_exists.if_stage___class___Pip.elif_stage_name_and_stage.raise_DuplicateStageName_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/run.py__check_stage_exists__check_stage_exists.if_stage___class___Pip.elif_stage_name_and_stage.raise_DuplicateStageName_", "embedding": null, "metadata": {"file_path": "dvc/repo/run.py", "file_name": "run.py", "file_type": "text/x-python", "category": "implementation", "start_line": 61, "end_line": 73, "span_ids": ["_check_stage_exists"], "tokens": 108}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _check_stage_exists(dvcfile, stage):\n if not dvcfile.exists():\n return\n\n hint = \"Use '--force' to overwrite.\"\n if stage.__class__ != PipelineStage:\n raise StageFileAlreadyExistsError(\n f\"'{stage.relpath}' already exists. {hint}\"\n )\n elif stage.name and stage.name in dvcfile.stages:\n raise DuplicateStageName(\n f\"Stage '{stage.name}' already exists in '{stage.relpath}'. {hint}\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/imports.py_logging_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/imports.py_logging_", "embedding": null, "metadata": {"file_path": "dvc/stage/imports.py", "file_name": "imports.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 31, "span_ids": ["imports", "sync_import", "update_import"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\n\nlogger = logging.getLogger(__name__)\n\n\ndef update_import(stage, rev=None):\n stage.deps[0].update(rev=rev)\n frozen = stage.frozen\n stage.frozen = False\n try:\n stage.reproduce()\n finally:\n stage.frozen = frozen\n\n\ndef sync_import(stage, dry=False, force=False, jobs=None):\n \"\"\"Synchronize import's outs to the workspace.\"\"\"\n logger.info(\n \"Importing '{dep}' -> '{out}'\".format(\n dep=stage.deps[0], out=stage.outs[0]\n )\n )\n if dry:\n return\n\n if not force and stage.already_cached():\n stage.outs[0].checkout()\n else:\n stage.save_deps()\n stage.deps[0].download(stage.outs[0], jobs=jobs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/params.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/params.py__", "embedding": null, "metadata": {"file_path": "dvc/stage/params.py", "file_name": "params.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 15, "span_ids": ["StageParams"], "tokens": 115}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StageParams:\n PARAM_MD5 = \"md5\"\n PARAM_CMD = \"cmd\"\n PARAM_WDIR = \"wdir\"\n PARAM_DEPS = \"deps\"\n PARAM_OUTS = \"outs\"\n PARAM_LOCKED = \"locked\" # backward compatibility\n PARAM_FROZEN = \"frozen\"\n PARAM_META = \"meta\"\n PARAM_ALWAYS_CHANGED = \"always_changed\"\n PARAM_PARAMS = \"params\"\n PARAM_METRICS = \"metrics\"\n PARAM_PLOTS = \"plots\"\n PARAM_DESC = \"desc\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/serialize.py__serialize_params_keys__serialize_params_keys.return.keys": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/serialize.py__serialize_params_keys__serialize_params_keys.return.keys", "embedding": null, "metadata": {"file_path": "dvc/stage/serialize.py", "file_name": "serialize.py", "file_type": "text/x-python", "category": "implementation", "start_line": 66, "end_line": 89, "span_ids": ["_serialize_params_keys"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _serialize_params_keys(params):\n \"\"\"\n Returns the following format of data:\n ['lr', 'train', {'params2.yaml': ['lr']}]\n\n The output is sorted, with keys of params from default params file being\n at the first, and then followed by entry of other files in lexicographic\n order. The keys of those custom files are also sorted in the same order.\n \"\"\"\n keys = []\n for param_dep in sort_by_path(params):\n dump = param_dep.dumpd()\n path, params = dump[PARAM_PATH], dump[PARAM_PARAMS]\n assert isinstance(params, (dict, list))\n # when on no_exec, params are not filled and are saved as list\n k = sorted(params.keys() if isinstance(params, dict) else params)\n if not k:\n continue\n\n if path == DEFAULT_PARAMS_FILE:\n keys = k + keys\n else:\n keys.append({path: k})\n return keys", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/serialize.py__serialize_params_values__serialize_params_values.return.key_vals": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/serialize.py__serialize_params_values__serialize_params_values.return.key_vals", "embedding": null, "metadata": {"file_path": "dvc/stage/serialize.py", "file_name": "serialize.py", "file_type": "text/x-python", "category": "implementation", "start_line": 99, "end_line": 116, "span_ids": ["_serialize_params_values"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@no_type_check\ndef _serialize_params_values(params: List[ParamsDependency]):\n \"\"\"Returns output of following format, used for lockfile:\n {'params.yaml': {'lr': '1', 'train': 2}, {'params2.yaml': {'lr': '1'}}\n\n Default params file are always kept at the start, followed by others in\n alphabetical order. The param values are sorted too(not recursively though)\n \"\"\"\n key_vals = OrderedDict()\n for param_dep in sort_by_path(params):\n dump = param_dep.dumpd()\n path, params = dump[PARAM_PATH], dump[PARAM_PARAMS]\n if isinstance(params, dict):\n kv = [(key, params[key]) for key in sorted(params.keys())]\n key_vals[path] = OrderedDict(kv)\n if path == DEFAULT_PARAMS_FILE:\n key_vals.move_to_end(path, last=False)\n return key_vals", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/serialize.py_to_pipeline_file_to_pipeline_file.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/serialize.py_to_pipeline_file_to_pipeline_file.return._", "embedding": null, "metadata": {"file_path": "dvc/stage/serialize.py", "file_name": "serialize.py", "file_type": "text/x-python", "category": "implementation", "start_line": 119, "end_line": 141, "span_ids": ["to_pipeline_file"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def to_pipeline_file(stage: \"PipelineStage\"):\n wdir = resolve_wdir(stage.wdir, stage.path)\n params, deps = split_params_deps(stage)\n deps = sorted(d.def_path for d in deps)\n params = _serialize_params_keys(params)\n\n outs, metrics, plots = _serialize_outs(stage.outs)\n res = [\n (stage.PARAM_DESC, stage.desc),\n (stage.PARAM_CMD, stage.cmd),\n (stage.PARAM_WDIR, wdir),\n (stage.PARAM_DEPS, deps),\n (stage.PARAM_PARAMS, params),\n (stage.PARAM_OUTS, outs),\n (stage.PARAM_METRICS, metrics),\n (stage.PARAM_PLOTS, plots),\n (stage.PARAM_FROZEN, stage.frozen),\n (stage.PARAM_ALWAYS_CHANGED, stage.always_changed),\n (stage.PARAM_META, stage.meta),\n ]\n return {\n stage.name: OrderedDict([(key, value) for key, value in res if value])\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_os_MissingDataSource": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_os_MissingDataSource", "embedding": null, "metadata": {"file_path": "dvc/stage/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 21, "span_ids": ["imports"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport pathlib\nfrom itertools import product\n\nfrom funcy import lsplit, rpartial\n\nfrom dvc import dependency, output\nfrom dvc.utils.fs import path_isin\n\nfrom ..dependency import ParamsDependency\nfrom ..hash_info import HashInfo\nfrom ..tree.local import LocalTree\nfrom ..tree.s3 import S3Tree\nfrom ..utils import dict_md5, format_link, relpath\nfrom .exceptions import (\n MissingDataSource,\n StageExternalOutputsError,\n StagePathNotDirectoryError,\n StagePathNotFoundError,\n StagePathOutsideError,\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_check_stage_path_check_stage_path.if_real_path_proj_dir_.raise_StagePathOutsideErr": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_check_stage_path_check_stage_path.if_real_path_proj_dir_.raise_StagePathOutsideErr", "embedding": null, "metadata": {"file_path": "dvc/stage/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 23, "end_line": 40, "span_ids": ["check_stage_path"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def check_stage_path(repo, path, is_wdir=False):\n assert repo is not None\n\n error_msg = \"{wdir_or_path} '{path}' {{}}\".format(\n wdir_or_path=\"stage working dir\" if is_wdir else \"file path\",\n path=path,\n )\n\n real_path = os.path.realpath(path)\n if not os.path.exists(real_path):\n raise StagePathNotFoundError(error_msg.format(\"does not exist\"))\n\n if not os.path.isdir(real_path):\n raise StagePathNotDirectoryError(error_msg.format(\"is not directory\"))\n\n proj_dir = os.path.realpath(repo.root_dir)\n if real_path != proj_dir and not path_isin(real_path, proj_dir):\n raise StagePathOutsideError(error_msg.format(\"is outside of DVC repo\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_fill_stage_outputs_fill_stage_dependencies.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_fill_stage_outputs_fill_stage_dependencies.None_2", "embedding": null, "metadata": {"file_path": "dvc/stage/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 44, "end_line": 76, "span_ids": ["fill_stage_outputs", "fill_stage_dependencies"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def fill_stage_outputs(stage, **kwargs):\n assert not stage.outs\n\n keys = [\n \"outs_persist\",\n \"outs_persist_no_cache\",\n \"metrics_no_cache\",\n \"metrics\",\n \"plots_no_cache\",\n \"plots\",\n \"outs_no_cache\",\n \"outs\",\n \"checkpoints\",\n ]\n\n stage.outs = []\n for key in keys:\n stage.outs += output.loads_from(\n stage,\n kwargs.get(key, []),\n use_cache=\"no_cache\" not in key,\n persist=\"persist\" in key,\n metric=\"metrics\" in key,\n plot=\"plots\" in key,\n checkpoint=\"checkpoints\" in key,\n )\n\n\ndef fill_stage_dependencies(stage, deps=None, erepo=None, params=None):\n assert not stage.deps\n stage.deps = []\n stage.deps += dependency.loads_from(stage, deps or [], erepo=erepo)\n stage.deps += dependency.loads_params(stage, params or [])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_check_no_externals_check_no_externals.raise_StageExternalOutput": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_check_no_externals_check_no_externals.raise_StageExternalOutput", "embedding": null, "metadata": {"file_path": "dvc/stage/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 76, "end_line": 98, "span_ids": ["check_no_externals"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def check_no_externals(stage):\n from urllib.parse import urlparse\n\n # NOTE: preventing users from accidentally using external outputs. See\n # https://github.com/iterative/dvc/issues/1545 for more details.\n\n def _is_external(out):\n # NOTE: in case of `remote://` notation, the user clearly knows that\n # this is an advanced feature and so we shouldn't error-out.\n if out.is_in_repo or urlparse(out.def_path).scheme == \"remote\":\n return False\n return True\n\n outs = [str(out) for out in stage.outs if _is_external(out)]\n if not outs:\n return\n\n str_outs = \", \".join(outs)\n link = format_link(\"https://dvc.org/doc/user-guide/managing-external-data\")\n raise StageExternalOutputsError(\n f\"Output(s) outside of DVC project: {str_outs}. \"\n f\"See {link} for more info.\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_check_circular_dependency_check_missing_outputs.if_paths_.raise_MissingDataSource_p": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_check_circular_dependency_check_missing_outputs.if_paths_.raise_MissingDataSource_p", "embedding": null, "metadata": {"file_path": "dvc/stage/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 101, "end_line": 127, "span_ids": ["check_duplicated_arguments", "check_missing_outputs", "check_circular_dependency"], "tokens": 167}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def check_circular_dependency(stage):\n from dvc.exceptions import CircularDependencyError\n\n circular_dependencies = {d.path_info for d in stage.deps} & {\n o.path_info for o in stage.outs\n }\n\n if circular_dependencies:\n raise CircularDependencyError(str(circular_dependencies.pop()))\n\n\ndef check_duplicated_arguments(stage):\n from collections import Counter\n\n from dvc.exceptions import ArgumentDuplicationError\n\n path_counts = Counter(edge.path_info for edge in stage.deps + stage.outs)\n\n for path, occurrence in path_counts.items():\n if occurrence > 1:\n raise ArgumentDuplicationError(str(path))\n\n\ndef check_missing_outputs(stage):\n paths = [str(out) for out in stage.outs if not out.exists]\n if paths:\n raise MissingDataSource(paths)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_stage_dump_eq_stage_dump_eq.return.old_d_new_d": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_stage_dump_eq_stage_dump_eq.return.old_d_new_d", "embedding": null, "metadata": {"file_path": "dvc/stage/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 133, "end_line": 153, "span_ids": ["stage_dump_eq"], "tokens": 239}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def stage_dump_eq(stage_cls, old_d, new_d):\n # NOTE: need to remove checksums from old dict in order to compare\n # it to the new one, since the new one doesn't have checksums yet.\n old_d.pop(stage_cls.PARAM_MD5, None)\n new_d.pop(stage_cls.PARAM_MD5, None)\n outs = old_d.get(stage_cls.PARAM_OUTS, [])\n for out in outs:\n out.pop(LocalTree.PARAM_CHECKSUM, None)\n out.pop(S3Tree.PARAM_CHECKSUM, None)\n out.pop(HashInfo.PARAM_SIZE, None)\n out.pop(HashInfo.PARAM_NFILES, None)\n\n # outs and deps are lists of dicts. To check equality, we need to make\n # them independent of the order, so, we convert them to dicts.\n combination = product(\n [old_d, new_d], [stage_cls.PARAM_DEPS, stage_cls.PARAM_OUTS]\n )\n for coll, key in combination:\n if coll.get(key):\n coll[key] = {item[\"path\"]: item for item in coll[key]}\n return old_d == new_d", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_compute_md5_compute_md5.return.dict_md5_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_compute_md5_compute_md5.return.dict_md5_", "embedding": null, "metadata": {"file_path": "dvc/stage/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 156, "end_line": 186, "span_ids": ["compute_md5"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def compute_md5(stage):\n from dvc.output.base import BaseOutput\n\n d = stage.dumpd()\n\n # Remove md5 and meta, these should not affect stage md5\n d.pop(stage.PARAM_MD5, None)\n d.pop(stage.PARAM_META, None)\n d.pop(stage.PARAM_DESC, None)\n\n # Ignore the wdir default value. In this case DVC-file w/o\n # wdir has the same md5 as a file with the default value specified.\n # It's important for backward compatibility with pipelines that\n # didn't have WDIR in their DVC-files.\n if d.get(stage.PARAM_WDIR) == \".\":\n del d[stage.PARAM_WDIR]\n\n return dict_md5(\n d,\n exclude=[\n stage.PARAM_LOCKED, # backward compatibility\n stage.PARAM_FROZEN,\n BaseOutput.PARAM_DESC,\n BaseOutput.PARAM_METRIC,\n BaseOutput.PARAM_PERSIST,\n BaseOutput.PARAM_CHECKPOINT,\n BaseOutput.PARAM_ISEXEC,\n HashInfo.PARAM_SIZE,\n HashInfo.PARAM_NFILES,\n ],\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_resolve_wdir_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/utils.py_resolve_wdir_", "embedding": null, "metadata": {"file_path": "dvc/stage/utils.py", "file_name": "utils.py", "file_type": "text/x-python", "category": "implementation", "start_line": 186, "end_line": 218, "span_ids": ["resolve_wdir", "get_dump", "split_params_deps", "resolve_paths"], "tokens": 260}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def resolve_wdir(wdir, path):\n rel_wdir = relpath(wdir, os.path.dirname(path))\n return pathlib.PurePath(rel_wdir).as_posix() if rel_wdir != \".\" else None\n\n\ndef resolve_paths(path, wdir=None):\n path = os.path.abspath(path)\n wdir = wdir or os.curdir\n wdir = os.path.abspath(os.path.join(os.path.dirname(path), wdir))\n return path, wdir\n\n\ndef get_dump(stage):\n return {\n key: value\n for key, value in {\n stage.PARAM_DESC: stage.desc,\n stage.PARAM_MD5: stage.md5,\n stage.PARAM_CMD: stage.cmd,\n stage.PARAM_WDIR: resolve_wdir(stage.wdir, stage.path),\n stage.PARAM_FROZEN: stage.frozen,\n stage.PARAM_DEPS: [d.dumpd() for d in stage.deps],\n stage.PARAM_OUTS: [o.dumpd() for o in stage.outs],\n stage.PARAM_ALWAYS_CHANGED: stage.always_changed,\n stage.PARAM_META: stage.meta,\n }.items()\n if value\n }\n\n\ndef split_params_deps(stage):\n return lsplit(rpartial(isinstance, ParamsDependency), stage.deps)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/system.py_System._reflink_windows_System.reflink.if_ret_0_.raise_DvcException_refli": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/system.py_System._reflink_windows_System.reflink.if_ret_0_.raise_DvcException_refli", "embedding": null, "metadata": {"file_path": "dvc/system.py", "file_name": "system.py", "file_type": "text/x-python", "category": "implementation", "start_line": 79, "end_line": 117, "span_ids": ["System.reflink", "System._reflink_linux", "System._reflink_windows"], "tokens": 261}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class System:\n\n @staticmethod\n def _reflink_windows(_src, _dst):\n return -1\n\n @staticmethod\n def _reflink_linux(src, dst):\n import fcntl\n\n FICLONE = 0x40049409\n\n try:\n ret = 255\n with open(src) as s, open(dst, \"w+\") as d:\n ret = fcntl.ioctl(d.fileno(), FICLONE, s.fileno())\n finally:\n if ret != 0:\n os.unlink(dst)\n\n return ret\n\n @staticmethod\n def reflink(source, link_name):\n source, link_name = os.fspath(source), os.fspath(link_name)\n\n system = platform.system()\n try:\n if system == \"Windows\":\n ret = System._reflink_windows(source, link_name)\n elif system == \"Darwin\":\n ret = System._reflink_darwin(source, link_name)\n elif system == \"Linux\":\n ret = System._reflink_linux(source, link_name)\n else:\n ret = -1\n except OSError:\n ret = -1\n\n if ret != 0:\n raise DvcException(\"reflink is not supported\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py__Helpers_for_other_modu__fobj_md5.while_True_.if_progress_func_.progress_func_len_data_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py__Helpers_for_other_modu__fobj_md5.while_True_.if_progress_func_.progress_func_len_data_", "embedding": null, "metadata": {"file_path": "dvc/utils/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 43, "span_ids": ["_fobj_md5", "dos2unix", "docstring"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Helpers for other modules.\"\"\"\n\nimport hashlib\nimport json\nimport logging\nimport math\nimport os\nimport re\nimport stat\nimport sys\nimport time\nfrom typing import Optional, Tuple\n\nimport colorama\nimport nanotime\nfrom shortuuid import uuid\n\nlogger = logging.getLogger(__name__)\n\nLOCAL_CHUNK_SIZE = 2 ** 20 # 1 MB\nLARGE_FILE_SIZE = 2 ** 30 # 1 GB\nLARGE_DIR_SIZE = 100\nTARGET_REGEX = re.compile(r\"(?P.*?)(:(?P[^\\\\/:]*))??$\")\n\n\ndef dos2unix(data):\n return data.replace(b\"\\r\\n\", b\"\\n\")\n\n\ndef _fobj_md5(fobj, hash_md5, binary, progress_func=None):\n while True:\n data = fobj.read(LOCAL_CHUNK_SIZE)\n if not data:\n break\n\n if binary:\n chunk = data\n else:\n chunk = dos2unix(data)\n\n hash_md5.update(chunk)\n if progress_func:\n progress_func(len(data))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/http.py_iter_url_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/http.py_iter_url_", "embedding": null, "metadata": {"file_path": "dvc/utils/http.py", "file_name": "http.py", "file_type": "text/x-python", "category": "implementation", "start_line": 26, "end_line": 66, "span_ids": ["iter_url"], "tokens": 235}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@contextmanager\ndef iter_url(url, chunk_size=io.DEFAULT_BUFFER_SIZE):\n \"\"\"Iterate over chunks requested from url.\"\"\"\n import requests\n\n def request(headers=None):\n the_url = url() if callable(url) else url\n response = requests.get(the_url, stream=True, headers=headers)\n if response.status_code == 404:\n raise FileNotFoundError(f\"Can't open {the_url}\")\n response.raise_for_status()\n return response\n\n def gen(response):\n try:\n pos = 0\n while True:\n try:\n for chunk in response.iter_content(chunk_size):\n pos += len(chunk)\n yield chunk\n break\n except requests.ConnectionError:\n response.close()\n if response.headers.get(\"Accept-Ranges\") != \"bytes\":\n raise\n\n # Reopen request from where we stopped\n headers = {\"Range\": f\"bytes={pos}-\"}\n response = request(headers)\n finally:\n response.close()\n\n response = request()\n it = gen(response)\n try:\n yield response, it\n finally:\n # Ensure connection is closed\n it.close()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/stream.py_io_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/stream.py_io_", "embedding": null, "metadata": {"file_path": "dvc/utils/stream.py", "file_name": "stream.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 57, "span_ids": ["IterStream.read1", "imports", "IterStream:3", "IterStream.peek", "IterStream.__init__", "IterStream.writable", "IterStream", "IterStream.readable", "IterStream.readinto"], "tokens": 366}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import io\n\n\nclass IterStream(io.RawIOBase):\n \"\"\"Wraps an iterator yielding bytes as a file object\"\"\"\n\n def __init__(self, iterator): # pylint: disable=super-init-not-called\n self.iterator = iterator\n self.leftover = b\"\"\n\n def readable(self):\n return True\n\n def writable(self) -> bool:\n return False\n\n # Python 3 requires only .readinto() method, it still uses other ones\n # under some circumstances and falls back if those are absent. Since\n # iterator already constructs byte strings for us, .readinto() is not the\n # most optimal, so we provide .read1() too.\n\n def readinto(self, b):\n try:\n n = len(b) # We're supposed to return at most this much\n chunk = self.leftover or next(self.iterator)\n output, self.leftover = chunk[:n], chunk[n:]\n\n n_out = len(output)\n b[:n_out] = output\n return n_out\n except StopIteration:\n return 0 # indicate EOF\n\n readinto1 = readinto\n\n def read1(self, n=-1):\n try:\n chunk = self.leftover or next(self.iterator)\n except StopIteration:\n return b\"\"\n\n # Return an arbitrary number or bytes\n if n <= 0:\n self.leftover = b\"\"\n return chunk\n\n output, self.leftover = chunk[:n], chunk[n:]\n return output\n\n def peek(self, n):\n while len(self.leftover) < n:\n try:\n self.leftover += next(self.iterator)\n except StopIteration:\n break\n return self.leftover[:n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/hooks/hook-pydrive2.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/hooks/hook-pydrive2.py__", "embedding": null, "metadata": {"file_path": "scripts/hooks/hook-pydrive2.py", "file_name": "hook-pydrive2.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["imports"], "tokens": 40}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from PyInstaller.utils.hooks import ( # pylint:disable=import-error\n copy_metadata,\n)\n\ndatas = copy_metadata(\"pydrive2\")\ndatas += copy_metadata(\"google-api-python-client\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/basic_env.py_logging_TestDirFixture.setUp.self_create_self_UNICODE_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/basic_env.py_logging_TestDirFixture.setUp.self_create_self_UNICODE_", "embedding": null, "metadata": {"file_path": "tests/basic_env.py", "file_name": "basic_env.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 93, "span_ids": ["TestDirFixture.mkdtemp", "TestDirFixture.__init__", "TestDirFixture._pushd", "TestDirFixture.setUp", "TestDirFixture.create", "imports", "TestDirFixture", "TestDirFixture._popd", "TestDirFixture.root_dir"], "tokens": 727}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nimport tempfile\nimport warnings\nfrom unittest import TestCase\n\nimport pytest\nimport shortuuid\nfrom git import Repo\nfrom git.exc import GitCommandNotFound\n\nfrom dvc.repo import Repo as DvcRepo\nfrom dvc.utils.fs import remove\n\nlogger = logging.getLogger(\"dvc\")\n\n\nclass TestDirFixture:\n DATA_DIR = \"data_dir\"\n DATA_SUB_DIR = os.path.join(DATA_DIR, \"data_sub_dir\")\n DATA = os.path.join(DATA_DIR, \"data\")\n DATA_SUB = os.path.join(DATA_SUB_DIR, \"data_sub\")\n DATA_CONTENTS = DATA\n DATA_SUB_CONTENTS = DATA_SUB\n FOO = \"foo\"\n FOO_CONTENTS = FOO\n BAR = \"bar\"\n # NOTE: len(FOO_CONTENTS) must be != len(BAR_CONTENTS)\n #\n # Our state database relies on file mtime and file size to determine\n # that a file has changed. Usually, mtime is enough by itself but on\n # some filesystems like APFS on macOS mtime resolution is so bad,\n # that our tests can overwrite a file in that time window without dvc\n # being able to detect that, thus causing tests to fail. Usually,\n # in tests, we replace foo with bar, so we need to make sure that when we\n # modify a file in our tests, its content length changes.\n BAR_CONTENTS = BAR + \"r\"\n CODE = \"code.py\"\n CODE_CONTENTS = (\n \"import sys\\nimport shutil\\n\"\n \"shutil.copyfile(sys.argv[1], sys.argv[2])\"\n )\n UNICODE = \"\u0442\u0435\u0441\u0442\"\n UNICODE_CONTENTS = \"\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\"\n\n def __init__(self):\n root_dir = self.mkdtemp()\n self._root_dir = os.path.realpath(root_dir)\n self._saved_dir = None\n\n @property\n def root_dir(self):\n return self._root_dir\n\n def _pushd(self, d):\n if not self._saved_dir:\n self._saved_dir = os.path.realpath(os.curdir)\n os.chdir(d)\n\n def _popd(self):\n os.chdir(self._saved_dir)\n self._saved_dir = None\n\n def create(self, name, contents):\n dname = os.path.dirname(name)\n if len(dname) > 0 and not os.path.isdir(dname):\n os.makedirs(dname)\n\n with open(name, \"a\", encoding=\"utf-8\") as f:\n f.write(\n contents\n if isinstance(contents, str)\n else contents.decode(\"utf-8\")\n )\n\n @staticmethod\n def mkdtemp(base_directory=None):\n prefix = f\"dvc-test.{os.getpid()}.\"\n suffix = f\".{shortuuid.uuid()}\"\n return tempfile.mkdtemp(\n prefix=prefix, suffix=suffix, dir=base_directory\n )\n\n def setUp(self):\n self._pushd(self._root_dir)\n self.create(self.FOO, self.FOO_CONTENTS)\n self.create(self.BAR, self.BAR_CONTENTS)\n self.create(self.CODE, self.CODE_CONTENTS)\n os.mkdir(self.DATA_DIR)\n os.mkdir(self.DATA_SUB_DIR)\n self.create(self.DATA, self.DATA_CONTENTS)\n self.create(self.DATA_SUB, self.DATA_SUB_CONTENTS)\n self.create(self.UNICODE, self.UNICODE_CONTENTS)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/conftest.py_os_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/conftest.py_os_", "embedding": null, "metadata": {"file_path": "tests/func/conftest.py", "file_name": "conftest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 31, "span_ids": ["imports", "run_copy_metrics"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nimport pytest\n\n\n@pytest.fixture\ndef run_copy_metrics(tmp_dir, run_copy):\n def run(file1, file2, commit=None, tag=None, single_stage=True, **kwargs):\n stage = tmp_dir.dvc.run(\n cmd=f\"python copy.py {file1} {file2}\",\n deps=[file1],\n single_stage=single_stage,\n **kwargs,\n )\n\n if hasattr(tmp_dir.dvc, \"scm\"):\n files = [stage.path]\n files += [\n os.fspath(out.path_info)\n for out in stage.outs\n if not out.use_cache\n ]\n tmp_dir.dvc.scm.add(files)\n if commit:\n tmp_dir.dvc.scm.commit(commit)\n if tag:\n tmp_dir.dvc.scm.tag(tag)\n return stage\n\n return run", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_diff.py_test_diff_dirty_test_diff_dirty.assert_dvc_params_diff_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_diff.py_test_diff_dirty_test_diff_dirty.assert_dvc_params_diff_", "embedding": null, "metadata": {"file_path": "tests/func/params/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 27, "end_line": 38, "span_ids": ["test_diff_dirty"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_diff_dirty(tmp_dir, scm, dvc):\n tmp_dir.gen(\"params.yaml\", \"foo: bar\")\n dvc.run(cmd=\"echo params.yaml\", params=[\"foo\"], single_stage=True)\n scm.add([\"params.yaml\", \"Dvcfile\"])\n scm.commit(\"bar\")\n\n tmp_dir.scm_gen(\"params.yaml\", \"foo: baz\", commit=\"baz\")\n tmp_dir.gen(\"params.yaml\", \"foo: qux\")\n\n assert dvc.params.diff() == {\n \"params.yaml\": {\"foo\": {\"old\": \"baz\", \"new\": \"qux\"}}\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/remote/test_index.py_os_remote.return.dvc_cloud_get_remote_ups": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/remote/test_index.py_os_remote.return.dvc_cloud_get_remote_ups", "embedding": null, "metadata": {"file_path": "tests/func/remote/test_index.py", "file_name": "test_index.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 29, "span_ids": ["imports", "remote"], "tokens": 225}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nimport pytest\n\nfrom dvc.exceptions import DownloadError, UploadError\nfrom dvc.remote.base import Remote\nfrom dvc.remote.index import RemoteIndex\nfrom dvc.remote.local import LocalRemote\nfrom dvc.tree.local import LocalTree\nfrom dvc.utils.fs import remove\n\n\n@pytest.fixture(scope=\"function\")\ndef remote(tmp_dir, dvc, tmp_path_factory, mocker):\n url = os.fspath(tmp_path_factory.mktemp(\"upstream\"))\n dvc.config[\"remote\"][\"upstream\"] = {\"url\": url}\n dvc.config[\"core\"][\"remote\"] = \"upstream\"\n\n # patch hashes_exist since the LocalRemote normally overrides\n # BaseTree.hashes_exist.\n def hashes_exist(self, *args, **kwargs):\n return Remote.hashes_exist(self, *args, **kwargs)\n\n mocker.patch.object(LocalRemote, \"hashes_exist\", hashes_exist)\n\n # patch index class since LocalRemote normally overrides index class\n mocker.patch.object(LocalRemote, \"INDEX_CLS\", RemoteIndex)\n\n return dvc.cloud.get_remote(\"upstream\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_test_add.assert_load_yaml_foo_dvc": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_test_add.assert_load_yaml_foo_dvc", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 34, "end_line": 56, "span_ids": ["test_add"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_add(tmp_dir, dvc):\n (stage,) = tmp_dir.dvc_gen({\"foo\": \"foo\"})\n md5, _ = file_md5(\"foo\")\n\n assert stage is not None\n\n assert isinstance(stage, Stage)\n assert os.path.isfile(stage.path)\n assert len(stage.outs) == 1\n assert len(stage.deps) == 0\n assert stage.cmd is None\n assert stage.outs[0].hash_info == HashInfo(\"md5\", md5)\n assert stage.md5 is None\n\n assert load_yaml(\"foo.dvc\") == {\n \"outs\": [\n {\n \"md5\": \"acbd18db4cc2f85cedef654fccc4a4d8\",\n \"path\": \"foo\",\n \"size\": 3,\n }\n ],\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestAddDirectoryWithForwardSlash_test_add_tracked_file.with_pytest_raises_Output.dvc_add_path_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestAddDirectoryWithForwardSlash_test_add_tracked_file.with_pytest_raises_Output.dvc_add_path_", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 118, "end_line": 140, "span_ids": ["test_add_tracked_file", "TestAddDirectoryWithForwardSlash.test", "TestAddDirectoryWithForwardSlash"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestAddDirectoryWithForwardSlash(TestDvc):\n def test(self):\n dname = \"directory/\"\n os.mkdir(dname)\n self.create(os.path.join(dname, \"file\"), \"file\")\n stages = self.dvc.add(dname)\n self.assertEqual(len(stages), 1)\n stage = stages[0]\n self.assertTrue(stage is not None)\n self.assertEqual(os.path.abspath(\"directory.dvc\"), stage.path)\n\n\ndef test_add_tracked_file(tmp_dir, scm, dvc):\n path = \"tracked_file\"\n tmp_dir.scm_gen(path, \"...\", commit=\"add tracked file\")\n msg = f\"\"\" output '{path}' is already tracked by SCM \\\\(e.g. Git\\\\).\n You can remove it from Git, then add to DVC.\n To stop tracking from Git:\n git rm -r --cached '{path}'\n git commit -m \"stop tracking {path}\" \"\"\"\n\n with pytest.raises(OutputAlreadyTrackedError, match=msg):\n dvc.add(path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestAddCommit_test_should_collect_dir_cache_only_once.assert_get_dir_hash_count": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestAddCommit_test_should_collect_dir_cache_only_once.assert_get_dir_hash_count", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 398, "end_line": 422, "span_ids": ["test_should_collect_dir_cache_only_once", "TestAddCommit", "TestAddCommit.test"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestAddCommit(TestDvc):\n def test(self):\n ret = main([\"add\", self.FOO, \"--no-commit\"])\n self.assertEqual(ret, 0)\n self.assertTrue(os.path.isfile(self.FOO))\n self.assertFalse(os.path.exists(self.dvc.cache.local.cache_dir))\n\n ret = main([\"commit\", self.FOO + \".dvc\"])\n self.assertEqual(ret, 0)\n self.assertTrue(os.path.isfile(self.FOO))\n self.assertEqual(len(os.listdir(self.dvc.cache.local.cache_dir)), 1)\n\n\ndef test_should_collect_dir_cache_only_once(mocker, tmp_dir, dvc):\n tmp_dir.gen({\"data/data\": \"foo\"})\n get_dir_hash_counter = mocker.spy(LocalTree, \"get_dir_hash\")\n ret = main([\"add\", \"data\"])\n assert ret == 0\n\n ret = main([\"status\"])\n assert ret == 0\n\n ret = main([\"status\"])\n assert ret == 0\n assert get_dir_hash_counter.mock.call_count == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_analytics.py_os_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_analytics.py_os_", "embedding": null, "metadata": {"file_path": "tests/func/test_analytics.py", "file_name": "test_analytics.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 46, "span_ids": ["test_main_analytics", "test_scm_subrepo", "imports", "test_scm_dvc_only", "test_daemon_analytics", "test_scm_git"], "tokens": 275}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nimport mock\n\nfrom dvc.analytics import _scm_in_use\nfrom dvc.main import main\nfrom dvc.repo import Repo\n\n\n@mock.patch(\"dvc.analytics.send\")\ndef test_daemon_analytics(mock_send, tmp_path):\n report = os.fspath(tmp_path)\n assert 0 == main([\"daemon\", \"analytics\", report])\n\n mock_send.assert_called_with(report)\n\n\n@mock.patch(\"dvc.analytics.collect_and_send_report\")\n@mock.patch(\"dvc.analytics.is_enabled\", return_value=True)\ndef test_main_analytics(mock_is_enabled, mock_report, tmp_dir, dvc):\n tmp_dir.gen(\"foo\", \"text\")\n assert 0 == main([\"add\", \"foo\"])\n assert mock_is_enabled.called\n assert mock_report.called\n\n\ndef test_scm_dvc_only(tmp_dir, dvc):\n scm = _scm_in_use()\n assert scm == \"NoSCM\"\n\n\ndef test_scm_git(tmp_dir, scm, dvc):\n scm = _scm_in_use()\n assert scm == \"Git\"\n\n\ndef test_scm_subrepo(tmp_dir, scm):\n subdir = tmp_dir / \"subdir\"\n subdir.mkdir()\n\n with subdir.chdir():\n Repo.init(subdir=True)\n scm = _scm_in_use()\n\n assert scm == \"Git\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cache.py_os_TestCache.test_get.self_assertEqual_os_fspat": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cache.py_os_TestCache.test_get.self_assertEqual_os_fspat", "embedding": null, "metadata": {"file_path": "tests/func/test_cache.py", "file_name": "test_cache.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 43, "span_ids": ["TestCache.test_get", "imports", "TestCache.setUp", "TestCache", "TestCache.test_all"], "tokens": 314}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport stat\nimport textwrap\n\nimport configobj\nimport pytest\n\nfrom dvc.cache import Cache\nfrom dvc.cache.base import DirCacheError\nfrom dvc.dir_info import DirInfo\nfrom dvc.hash_info import HashInfo\nfrom dvc.main import main\nfrom dvc.utils import relpath\nfrom tests.basic_env import TestDir, TestDvc\n\n\nclass TestCache(TestDvc):\n def setUp(self):\n super().setUp()\n self.cache1_md5 = \"123\"\n self.cache2_md5 = \"234\"\n self.cache1 = os.path.join(\n self.dvc.cache.local.cache_dir,\n self.cache1_md5[0:2],\n self.cache1_md5[2:],\n )\n self.cache2 = os.path.join(\n self.dvc.cache.local.cache_dir,\n self.cache2_md5[0:2],\n self.cache2_md5[2:],\n )\n self.create(self.cache1, \"1\")\n self.create(self.cache2, \"2\")\n\n def test_all(self):\n md5_list = list(Cache(self.dvc).local.all())\n self.assertEqual(len(md5_list), 2)\n self.assertIn(self.cache1_md5, md5_list)\n self.assertIn(self.cache2_md5, md5_list)\n\n def test_get(self):\n cache = Cache(self.dvc).local.tree.hash_to_path_info(self.cache1_md5)\n self.assertEqual(os.fspath(cache), self.cache1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutSuggestGit_TestCheckoutSuggestGit.test.None_2.except_DvcException_as_ex.self_assertIsNone_exc___c": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_TestCheckoutSuggestGit_TestCheckoutSuggestGit.test.None_2.except_DvcException_as_ex.self_assertIsNone_exc___c", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 403, "end_line": 428, "span_ids": ["TestCheckoutSuggestGit", "TestCheckoutSuggestGit.test"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCheckoutSuggestGit(TestRepro):\n def test(self):\n # pylint: disable=no-member\n\n try:\n self.dvc.checkout(targets=\"gitbranch\")\n except DvcException as exc:\n self.assertIsInstance(exc, CheckoutErrorSuggestGit)\n self.assertIsInstance(exc.__cause__, NoOutputOrStageError)\n self.assertIsInstance(\n exc.__cause__.__cause__, StageFileDoesNotExistError\n )\n\n try:\n self.dvc.checkout(targets=self.FOO)\n except DvcException as exc:\n self.assertIsInstance(exc, CheckoutErrorSuggestGit)\n self.assertIsInstance(exc.__cause__, NoOutputOrStageError)\n self.assertIsNone(exc.__cause__.__cause__)\n\n try:\n self.dvc.checkout(targets=\"looks-like-dvcfile.dvc\")\n except DvcException as exc:\n self.assertIsInstance(exc, CheckoutErrorSuggestGit)\n self.assertIsInstance(exc.__cause__, StageFileDoesNotExistError)\n self.assertIsNone(exc.__cause__.__cause__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkouts_with_different_addressing_test_checkouts_with_different_addressing.assert_dvc_checkout_bar_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkouts_with_different_addressing_test_checkouts_with_different_addressing.assert_dvc_checkout_bar_", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 781, "end_line": 811, "span_ids": ["test_checkouts_with_different_addressing"], "tokens": 343}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_checkouts_with_different_addressing(tmp_dir, dvc, run_copy):\n tmp_dir.gen({\"foo\": \"foo\", \"lorem\": \"lorem\"})\n run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n run_copy(\"lorem\", \"ipsum\", name=\"copy-lorem-ipsum\")\n\n (tmp_dir / \"bar\").unlink()\n (tmp_dir / \"ipsum\").unlink()\n assert set(dvc.checkout(PIPELINE_FILE)[\"added\"]) == {\"bar\", \"ipsum\"}\n\n (tmp_dir / \"bar\").unlink()\n (tmp_dir / \"ipsum\").unlink()\n assert set(dvc.checkout(\":\")[\"added\"]) == {\"bar\", \"ipsum\"}\n\n (tmp_dir / \"bar\").unlink()\n assert dvc.checkout(\"copy-foo-bar\")[\"added\"] == [\"bar\"]\n\n (tmp_dir / \"bar\").unlink()\n assert dvc.checkout(\"dvc.yaml:copy-foo-bar\")[\"added\"] == [\"bar\"]\n\n (tmp_dir / \"bar\").unlink()\n assert dvc.checkout(\":copy-foo-bar\")[\"added\"] == [\"bar\"]\n\n (tmp_dir / \"bar\").unlink()\n (tmp_dir / \"data\").mkdir()\n with (tmp_dir / \"data\").chdir():\n assert dvc.checkout(relpath(tmp_dir / \"dvc.yaml\") + \":copy-foo-bar\")[\n \"added\"\n ] == [relpath(tmp_dir / \"bar\")]\n\n (tmp_dir / \"bar\").unlink()\n assert dvc.checkout(\"bar\")[\"added\"] == [\"bar\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkouts_on_same_stage_name_and_output_name_test_checkouts_on_same_stage_name_and_output_name.assert_dvc_checkout_co": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkouts_on_same_stage_name_and_output_name_test_checkouts_on_same_stage_name_and_output_name.assert_dvc_checkout_co", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 814, "end_line": 822, "span_ids": ["test_checkouts_on_same_stage_name_and_output_name"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_checkouts_on_same_stage_name_and_output_name(tmp_dir, dvc, run_copy):\n tmp_dir.gen(\"foo\", \"foo\")\n run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n run_copy(\"foo\", \"copy-foo-bar\", name=\"make_collision\")\n\n (tmp_dir / \"bar\").unlink()\n (tmp_dir / \"copy-foo-bar\").unlink()\n assert dvc.checkout(\"copy-foo-bar\")[\"added\"] == [\"bar\"]\n assert dvc.checkout(\"./copy-foo-bar\")[\"added\"] == [\"copy-foo-bar\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_commit.py_test_commit_pipeline_stage_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_commit.py_test_commit_pipeline_stage_", "embedding": null, "metadata": {"file_path": "tests/func/test_commit.py", "file_name": "test_commit.py", "file_type": "text/x-python", "category": "test", "start_line": 104, "end_line": 124, "span_ids": ["test_imported_entries_unchanged", "test_commit_pipeline_stage"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_commit_pipeline_stage(tmp_dir, dvc, run_copy):\n tmp_dir.gen(\"foo\", \"foo\")\n stage = run_copy(\"foo\", \"bar\", no_commit=True, name=\"copy-foo-bar\")\n assert dvc.status(stage.addressing)\n assert dvc.commit(stage.addressing, force=True) == [stage]\n assert not dvc.status(stage.addressing)\n\n # just to confirm different variants work\n assert dvc.commit(f\":{stage.addressing}\") == [stage]\n assert dvc.commit(f\"{PIPELINE_FILE}:{stage.addressing}\") == [stage]\n assert dvc.commit(PIPELINE_FILE) == [stage]\n\n\ndef test_imported_entries_unchanged(tmp_dir, dvc, erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\"file\", \"file content\", \"initial commit\")\n\n stage = dvc.imp(fspath(erepo_dir), \"file\")\n\n assert stage.changed_entries() == ([], [], None)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_cloud_cli_test_cloud_cli.None_25": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_cloud_cli_test_cloud_cli.None_25", "embedding": null, "metadata": {"file_path": "tests/func/test_data_cloud.py", "file_name": "test_data_cloud.py", "file_type": "text/x-python", "category": "test", "start_line": 129, "end_line": 190, "span_ids": ["test_cloud_cli"], "tokens": 449}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"remote\", all_clouds, indirect=True)\ndef test_cloud_cli(tmp_dir, dvc, remote):\n args = [\"-v\", \"-j\", \"2\"]\n\n (stage,) = tmp_dir.dvc_gen(\"foo\", \"foo\")\n cache = stage.outs[0].cache_path\n\n (stage_dir,) = tmp_dir.dvc_gen(\n {\n \"data_dir\": {\n \"data_sub_dir\": {\"data_sub\": \"data_sub\"},\n \"data\": \"data\",\n \"empty\": \"\",\n }\n }\n )\n assert stage_dir is not None\n cache_dir = stage_dir.outs[0].cache_path\n\n # FIXME check status output\n\n assert main([\"push\"] + args) == 0\n assert os.path.exists(cache)\n assert os.path.isfile(cache)\n assert os.path.isfile(cache_dir)\n\n remove(dvc.cache.local.cache_dir)\n\n assert main([\"fetch\"] + args) == 0\n assert os.path.exists(cache)\n assert os.path.isfile(cache)\n assert os.path.isfile(cache_dir)\n\n assert main([\"pull\"] + args) == 0\n assert os.path.exists(cache)\n assert os.path.isfile(cache)\n assert os.path.isfile(cache_dir)\n assert os.path.isfile(\"foo\")\n assert os.path.isdir(\"data_dir\")\n\n with open(cache) as fd:\n assert fd.read() == \"foo\"\n assert os.path.isfile(cache_dir)\n\n # NOTE: http doesn't support gc yet\n if remote.url.startswith(\"http\"):\n return\n\n # NOTE: check if remote gc works correctly on directories\n assert main([\"gc\", \"-cw\", \"-f\"] + args) == 0\n shutil.move(\n dvc.cache.local.cache_dir, dvc.cache.local.cache_dir + \".back\",\n )\n\n assert main([\"fetch\"] + args) == 0\n\n assert main([\"pull\", \"-f\"] + args) == 0\n assert os.path.exists(cache)\n assert os.path.isfile(cache)\n assert os.path.isfile(cache_dir)\n assert os.path.isfile(\"foo\")\n assert os.path.isdir(\"data_dir\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_hash_recalculation_test_hash_recalculation.assert_test_get_file_hash": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_hash_recalculation_test_hash_recalculation.assert_test_get_file_hash", "embedding": null, "metadata": {"file_path": "tests/func/test_data_cloud.py", "file_name": "test_data_cloud.py", "file_type": "text/x-python", "category": "test", "start_line": 222, "end_line": 233, "span_ids": ["test_hash_recalculation"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_hash_recalculation(mocker, dvc, tmp_dir, local_remote):\n tmp_dir.gen({\"foo\": \"foo\"})\n test_get_file_hash = mocker.spy(LocalTree, \"get_file_hash\")\n ret = main([\"config\", \"cache.type\", \"hardlink\"])\n assert ret == 0\n ret = main([\"add\", \"foo\"])\n assert ret == 0\n ret = main([\"push\"])\n assert ret == 0\n ret = main([\"run\", \"--single-stage\", \"-d\", \"foo\", \"echo foo\"])\n assert ret == 0\n assert test_get_file_hash.mock.call_count == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_verify_hashes_test_verify_hashes.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_verify_hashes_test_verify_hashes.None_2", "embedding": null, "metadata": {"file_path": "tests/func/test_data_cloud.py", "file_name": "test_data_cloud.py", "file_type": "text/x-python", "category": "test", "start_line": 261, "end_line": 284, "span_ids": ["test_verify_hashes"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_verify_hashes(\n tmp_dir, scm, dvc, mocker, tmp_path_factory, local_remote\n):\n tmp_dir.dvc_gen({\"file\": \"file1 content\"}, commit=\"add file\")\n tmp_dir.dvc_gen({\"dir\": {\"subfile\": \"file2 content\"}}, commit=\"add dir\")\n dvc.push()\n\n # remove artifacts and cache to trigger fetching\n remove(\"file\")\n remove(\"dir\")\n remove(dvc.cache.local.cache_dir)\n\n hash_spy = mocker.spy(dvc.cache.local.tree, \"get_file_hash\")\n\n dvc.pull()\n assert hash_spy.call_count == 0\n\n # Removing cache will invalidate existing state entries\n remove(dvc.cache.local.cache_dir)\n\n dvc.config[\"remote\"][\"upstream\"][\"verify\"] = True\n\n dvc.pull()\n assert hash_spy.call_count == 3", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_pull_stats_test_pull_stats.assert_Everything_is_up_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_pull_stats_test_pull_stats.assert_Everything_is_up_", "embedding": null, "metadata": {"file_path": "tests/func/test_data_cloud.py", "file_name": "test_data_cloud.py", "file_type": "text/x-python", "category": "test", "start_line": 467, "end_line": 482, "span_ids": ["test_pull_stats"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pull_stats(tmp_dir, dvc, caplog, local_remote):\n tmp_dir.dvc_gen({\"foo\": \"foo\", \"bar\": \"bar\"})\n dvc.push()\n clean([\"foo\", \"bar\"], dvc)\n (tmp_dir / \"bar\").write_text(\"foobar\")\n caplog.clear()\n with caplog.at_level(level=logging.INFO, logger=\"dvc\"):\n main([\"pull\", \"--force\"])\n assert \"M\\tbar\" in caplog.text\n assert \"A\\tfoo\" in caplog.text\n assert \"2 files fetched\" in caplog.text\n assert \"1 file added\" in caplog.text\n assert \"1 file modified\" in caplog.text\n with caplog.at_level(level=logging.INFO, logger=\"dvc\"):\n main([\"pull\"])\n assert \"Everything is up to date.\" in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_push_pull_all_test_push_pull_all.assert_dvc_pull_key_T": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_push_pull_all_test_push_pull_all.assert_dvc_pull_key_T", "embedding": null, "metadata": {"file_path": "tests/func/test_data_cloud.py", "file_name": "test_data_cloud.py", "file_type": "text/x-python", "category": "test", "start_line": 485, "end_line": 501, "span_ids": ["test_push_pull_all"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"key,expected\", [(\"all_tags\", 2), (\"all_branches\", 3), (\"all_commits\", 3)]\n)\ndef test_push_pull_all(tmp_dir, scm, dvc, local_remote, key, expected):\n tmp_dir.dvc_gen({\"foo\": \"foo\"}, commit=\"first\")\n scm.tag(\"v1\")\n dvc.remove(\"foo.dvc\")\n tmp_dir.dvc_gen({\"bar\": \"bar\"}, commit=\"second\")\n scm.tag(\"v2\")\n with tmp_dir.branch(\"branch\", new=True):\n dvc.remove(\"bar.dvc\")\n tmp_dir.dvc_gen({\"baz\": \"baz\"}, commit=\"branch\")\n\n assert dvc.push(**{key: True}) == expected\n\n clean([\"foo\", \"bar\", \"baz\"], dvc)\n assert dvc.pull(**{key: True})[\"fetched\"] == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_push_pull_fetch_pipeline_stages_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_push_pull_fetch_pipeline_stages_", "embedding": null, "metadata": {"file_path": "tests/func/test_data_cloud.py", "file_name": "test_data_cloud.py", "file_type": "text/x-python", "category": "test", "start_line": 504, "end_line": 522, "span_ids": ["test_push_pull_fetch_pipeline_stages"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_push_pull_fetch_pipeline_stages(tmp_dir, dvc, run_copy, local_remote):\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n run_copy(\"foo\", \"bar\", no_commit=True, name=\"copy-foo-bar\")\n\n dvc.push(\"copy-foo-bar\")\n assert len(recurse_list_dir(local_remote.url)) == 1\n # pushing everything so as we can check pull/fetch only downloads\n # from specified targets\n dvc.push()\n clean([\"foo\", \"bar\"], dvc)\n\n dvc.pull(\"copy-foo-bar\")\n assert (tmp_dir / \"bar\").exists()\n assert len(recurse_list_dir(dvc.cache.local.cache_dir)) == 1\n clean([\"bar\"], dvc)\n\n dvc.fetch(\"copy-foo-bar\")\n assert len(recurse_list_dir(dvc.cache.local.cache_dir)) == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_run_load_one_for_multistage_non_existing_test_run_load_one_for_multistage_non_existing_stage_name.with_pytest_raises_StageN.assert_Dvcfile_dvc_stage": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_run_load_one_for_multistage_non_existing_test_run_load_one_for_multistage_non_existing_stage_name.with_pytest_raises_StageN.assert_Dvcfile_dvc_stage", "embedding": null, "metadata": {"file_path": "tests/func/test_dvcfile.py", "file_name": "test_dvcfile.py", "file_type": "text/x-python", "category": "test", "start_line": 35, "end_line": 50, "span_ids": ["test_run_load_one_for_multistage_non_existing", "test_run_load_one_for_multistage_non_existing_stage_name"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_run_load_one_for_multistage_non_existing(tmp_dir, dvc):\n with pytest.raises(StageFileDoesNotExistError):\n assert Dvcfile(dvc, PIPELINE_FILE).stages.get(\"copy-foo-foo2\")\n\n\ndef test_run_load_one_for_multistage_non_existing_stage_name(tmp_dir, dvc):\n tmp_dir.gen(\"foo\", \"foo\")\n stage = dvc.run(\n cmd=\"cp foo foo2\",\n deps=[\"foo\"],\n name=\"copy-foo-foo2\",\n metrics=[\"foo2\"],\n always_changed=True,\n )\n with pytest.raises(StageNotFound):\n assert Dvcfile(dvc, stage.path).stages[\"random-name\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_run_load_one_on_single_stage_test_run_load_one_on_single_stage.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_run_load_one_on_single_stage_test_run_load_one_on_single_stage.None_2", "embedding": null, "metadata": {"file_path": "tests/func/test_dvcfile.py", "file_name": "test_dvcfile.py", "file_type": "text/x-python", "category": "test", "start_line": 53, "end_line": 64, "span_ids": ["test_run_load_one_on_single_stage"], "tokens": 113}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_run_load_one_on_single_stage(tmp_dir, dvc):\n tmp_dir.gen(\"foo\", \"foo\")\n stage = dvc.run(\n cmd=\"cp foo foo2\",\n deps=[\"foo\"],\n metrics=[\"foo2\"],\n always_changed=True,\n single_stage=True,\n )\n assert isinstance(Dvcfile(dvc, stage.path), SingleStageFile)\n assert Dvcfile(dvc, stage.path).stages.get(\"random-name\") == stage\n assert Dvcfile(dvc, stage.path).stage == stage", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_remove_stage_test_remove_stage.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_remove_stage_test_remove_stage.None_5", "embedding": null, "metadata": {"file_path": "tests/func/test_dvcfile.py", "file_name": "test_dvcfile.py", "file_type": "text/x-python", "category": "test", "start_line": 163, "end_line": 185, "span_ids": ["test_remove_stage"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_remove_stage(tmp_dir, dvc, run_copy):\n tmp_dir.gen(\"foo\", \"foo\")\n stage = run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n stage2 = run_copy(\"bar\", \"foobar\", name=\"copy-bar-foobar\")\n\n dvc_file = Dvcfile(dvc, PIPELINE_FILE)\n assert dvc_file.exists()\n assert {\"copy-bar-foobar\", \"copy-foo-bar\"} == set(\n dvc_file._load()[0][\"stages\"].keys()\n )\n\n dvc_file.remove_stage(stage)\n\n assert [\"copy-bar-foobar\"] == list(dvc_file._load()[0][\"stages\"].keys())\n\n # sanity check\n stage2.reload()\n\n # re-check to see if it fails if there's no stage entry\n dvc_file.remove_stage(stage)\n dvc_file.remove(force=True)\n # should not fail when there's no file at all.\n dvc_file.remove_stage(stage)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_remove_stage_lockfile_test_remove_stage_lockfile.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_remove_stage_lockfile_test_remove_stage_lockfile.None_5", "embedding": null, "metadata": {"file_path": "tests/func/test_dvcfile.py", "file_name": "test_dvcfile.py", "file_type": "text/x-python", "category": "test", "start_line": 188, "end_line": 209, "span_ids": ["test_remove_stage_lockfile"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_remove_stage_lockfile(tmp_dir, dvc, run_copy):\n tmp_dir.gen(\"foo\", \"foo\")\n stage = run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n stage2 = run_copy(\"bar\", \"foobar\", name=\"copy-bar-foobar\")\n\n dvc_file = Dvcfile(dvc, PIPELINE_FILE)\n lock_file = dvc_file._lockfile\n assert dvc_file.exists()\n assert lock_file.exists()\n assert {\"copy-bar-foobar\", \"copy-foo-bar\"} == set(lock_file.load().keys())\n lock_file.remove_stage(stage)\n\n assert [\"copy-bar-foobar\"] == list(lock_file.load().keys())\n\n # sanity check\n stage2.reload()\n\n # re-check to see if it fails if there's no stage entry\n lock_file.remove_stage(stage)\n lock_file.remove()\n # should not fail when there's no file at all.\n lock_file.remove_stage(stage)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_remove_stage_dvcfiles_test_remove_stage_dvcfiles.None_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_remove_stage_dvcfiles_test_remove_stage_dvcfiles.None_4", "embedding": null, "metadata": {"file_path": "tests/func/test_dvcfile.py", "file_name": "test_dvcfile.py", "file_type": "text/x-python", "category": "test", "start_line": 212, "end_line": 226, "span_ids": ["test_remove_stage_dvcfiles"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_remove_stage_dvcfiles(tmp_dir, dvc, run_copy):\n tmp_dir.gen(\"foo\", \"foo\")\n stage = run_copy(\"foo\", \"bar\", single_stage=True)\n\n dvc_file = Dvcfile(dvc, stage.path)\n assert dvc_file.exists()\n dvc_file.remove_stage(stage)\n assert not dvc_file.exists()\n\n # re-check to see if it fails if there's no stage entry\n dvc_file.remove_stage(stage)\n dvc_file.remove(force=True)\n\n # should not fail when there's no file at all.\n dvc_file.remove_stage(stage)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_remove_stage_on_lockfile_format_error_test_remove_stage_on_lockfile_format_error.None_1.dvc_file_remove_stage_sta": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_remove_stage_on_lockfile_format_error_test_remove_stage_on_lockfile_format_error.None_1.dvc_file_remove_stage_sta", "embedding": null, "metadata": {"file_path": "tests/func/test_dvcfile.py", "file_name": "test_dvcfile.py", "file_type": "text/x-python", "category": "test", "start_line": 230, "end_line": 249, "span_ids": ["test_remove_stage_on_lockfile_format_error"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_remove_stage_on_lockfile_format_error(tmp_dir, dvc, run_copy):\n tmp_dir.gen(\"foo\", \"foo\")\n stage = run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n dvc_file = Dvcfile(dvc, stage.path)\n lock_file = dvc_file._lockfile\n\n data = dvc_file._load()[0]\n lock_data = lock_file.load()\n lock_data[\"gibberish\"] = True\n data[\"gibberish\"] = True\n dump_yaml(lock_file.relpath, lock_data)\n with pytest.raises(StageFileFormatError):\n dvc_file.remove_stage(stage)\n\n lock_file.remove()\n dvc_file.dump(stage, update_pipeline=False)\n\n dump_yaml(dvc_file.relpath, data)\n with pytest.raises(StageFileFormatError):\n dvc_file.remove_stage(stage)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_remove_stage_preserves_comment_test_remove_stage_preserves_comment.assert_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_remove_stage_preserves_comment_test_remove_stage_preserves_comment.assert_", "embedding": null, "metadata": {"file_path": "tests/func/test_dvcfile.py", "file_name": "test_dvcfile.py", "file_type": "text/x-python", "category": "test", "start_line": 251, "end_line": 284, "span_ids": ["test_remove_stage_preserves_comment"], "tokens": 224}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_remove_stage_preserves_comment(tmp_dir, dvc, run_copy):\n tmp_dir.gen(\n \"dvc.yaml\",\n textwrap.dedent(\n \"\"\"\\\n stages:\n generate-foo:\n cmd: \"echo foo > foo\"\n # This copies 'foo' text to 'foo' file.\n outs:\n - foo\n copy-foo-bar:\n cmd: \"python copy.py foo bar\"\n deps:\n - foo\n outs:\n - bar\"\"\"\n ),\n )\n\n dvc.reproduce(PIPELINE_FILE)\n\n dvc_file = Dvcfile(dvc, PIPELINE_FILE)\n\n assert dvc_file.exists()\n assert (tmp_dir / PIPELINE_LOCK).exists()\n assert (tmp_dir / \"foo\").exists()\n assert (tmp_dir / \"bar\").exists()\n\n dvc_file.remove_stage(dvc_file.stages[\"copy-foo-bar\"])\n assert (\n \"# This copies 'foo' text to 'foo' file.\"\n in (tmp_dir / PIPELINE_FILE).read_text()\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_dvcfile_dump_preserves_meta_test_dvcfile_dump_preserves_meta.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_dvcfile_dump_preserves_meta_test_dvcfile_dump_preserves_meta.None_2", "embedding": null, "metadata": {"file_path": "tests/func/test_dvcfile.py", "file_name": "test_dvcfile.py", "file_type": "text/x-python", "category": "test", "start_line": 311, "end_line": 323, "span_ids": ["test_dvcfile_dump_preserves_meta"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_dvcfile_dump_preserves_meta(tmp_dir, dvc, run_copy):\n tmp_dir.gen(\"foo\", \"foo\")\n stage = run_copy(\"foo\", \"bar\", name=\"run_copy\")\n dvcfile = stage.dvcfile\n\n data = dvcfile._load()[0]\n metadata = {\"name\": \"copy-file\"}\n stage.meta = metadata\n data[\"stages\"][\"run_copy\"][\"meta\"] = metadata\n\n dvcfile.dump(stage)\n assert dvcfile._load()[0] == data\n assert dvcfile._load()[0][\"stages\"][\"run_copy\"][\"meta\"] == metadata", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_test_known_sha_test_pull_subdir_file.assert_dest_read_text_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_test_known_sha_test_pull_subdir_file.assert_dest_read_text_", "embedding": null, "metadata": {"file_path": "tests/func/test_external_repo.py", "file_name": "test_external_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 67, "end_line": 99, "span_ids": ["test_known_sha", "test_pull_subdir_file"], "tokens": 258}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_known_sha(erepo_dir):\n erepo_dir.scm.commit(\"init\")\n\n url = f\"file://{erepo_dir}\"\n with external_repo(url) as repo:\n rev = repo.scm.get_rev()\n prev_rev = repo.scm.resolve_rev(\"HEAD^\")\n\n # Hits cache\n with external_repo(url, rev) as repo:\n pass\n\n # No clone, no pull, copies a repo, checks out the known sha\n with external_repo(url, prev_rev) as repo:\n pass\n\n\ndef test_pull_subdir_file(tmp_dir, erepo_dir):\n with erepo_dir.chdir():\n subdir = erepo_dir / \"subdir\"\n subdir.mkdir()\n (subdir / \"file\").write_text(\"contents\")\n erepo_dir.dvc_add(subdir / \"file\", commit=\"create file\")\n\n dest = tmp_dir / \"file\"\n with external_repo(os.fspath(erepo_dir)) as repo:\n _, _, save_infos = repo.fetch_external(\n [os.path.join(\"subdir\", \"file\")]\n )\n repo.cache.local.checkout(PathInfo(dest), save_infos[0])\n\n assert dest.is_file()\n assert dest.read_text() == \"contents\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_gc_no_dir_cache__count_files.return.sum_len_files_for_____": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_gc_no_dir_cache__count_files.return.sum_len_files_for_____", "embedding": null, "metadata": {"file_path": "tests/func/test_gc.py", "file_name": "test_gc.py", "file_type": "text/x-python", "category": "test", "start_line": 196, "end_line": 211, "span_ids": ["_count_files", "test_gc_no_dir_cache"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_gc_no_dir_cache(tmp_dir, dvc):\n tmp_dir.dvc_gen({\"foo\": \"foo\", \"bar\": \"bar\"})\n (dir_stage,) = tmp_dir.dvc_gen({\"dir\": {\"x\": \"x\", \"subdir\": {\"y\": \"y\"}}})\n\n remove(dir_stage.outs[0].cache_path)\n\n with pytest.raises(CollectCacheError):\n dvc.gc(workspace=True)\n\n assert _count_files(dvc.cache.local.cache_dir) == 4\n dvc.gc(force=True, workspace=True)\n assert _count_files(dvc.cache.local.cache_dir) == 2\n\n\ndef _count_files(path):\n return sum(len(files) for _, _, files in os.walk(path))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_gc_no_unpacked_dir_test_gc_no_unpacked_dir.assert_not_os_path_exists": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_gc_no_unpacked_dir_test_gc_no_unpacked_dir.assert_not_os_path_exists", "embedding": null, "metadata": {"file_path": "tests/func/test_gc.py", "file_name": "test_gc.py", "file_type": "text/x-python", "category": "test", "start_line": 215, "end_line": 229, "span_ids": ["test_gc_no_unpacked_dir"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_gc_no_unpacked_dir(tmp_dir, dvc):\n dir_stages = tmp_dir.dvc_gen({\"dir\": {\"file\": \"text\"}})\n dvc.status()\n\n os.remove(\"dir.dvc\")\n unpackeddir = (\n dir_stages[0].outs[0].cache_path + LocalCache.UNPACKED_DIR_SUFFIX\n )\n\n # older (pre 1.0) versions of dvc used to generate this dir\n shutil.copytree(\"dir\", unpackeddir)\n assert os.path.exists(unpackeddir)\n\n dvc.gc(force=True, workspace=True)\n assert not os.path.exists(unpackeddir)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_gc_without_workspace_raises_error_test_gc_cloud_with_or_without_specifier.None_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_gc_without_workspace_raises_error_test_gc_cloud_with_or_without_specifier.None_4", "embedding": null, "metadata": {"file_path": "tests/func/test_gc.py", "file_name": "test_gc.py", "file_type": "text/x-python", "category": "test", "start_line": 231, "end_line": 254, "span_ids": ["test_gc_cloud_with_or_without_specifier", "test_gc_without_workspace_raises_error"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_gc_without_workspace_raises_error(tmp_dir, dvc):\n dvc.gc(force=True, workspace=True) # works without error\n\n from dvc.exceptions import InvalidArgumentError\n\n with pytest.raises(InvalidArgumentError):\n dvc.gc(force=True)\n\n with pytest.raises(InvalidArgumentError):\n dvc.gc(force=True, workspace=False)\n\n\ndef test_gc_cloud_with_or_without_specifier(tmp_dir, erepo_dir, local_cloud):\n erepo_dir.add_remote(config=local_cloud.config)\n dvc = erepo_dir.dvc\n from dvc.exceptions import InvalidArgumentError\n\n with pytest.raises(InvalidArgumentError):\n dvc.gc(force=True, cloud=True)\n\n dvc.gc(cloud=True, all_tags=True)\n dvc.gc(cloud=True, all_commits=True)\n dvc.gc(cloud=True, all_branches=True)\n dvc.gc(cloud=True, all_commits=False, all_branches=True, all_tags=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_repo_rev_test_get_a_dvc_file.with_pytest_raises_GetDVC.Repo_get_os_fspath_erepo_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_repo_rev_test_get_a_dvc_file.with_pytest_raises_GetDVC.Repo_get_os_fspath_erepo_", "embedding": null, "metadata": {"file_path": "tests/func/test_get.py", "file_name": "test_get.py", "file_type": "text/x-python", "category": "test", "start_line": 81, "end_line": 98, "span_ids": ["test_get_from_non_dvc_repo", "test_get_repo_rev", "test_get_a_dvc_file"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_repo_rev(tmp_dir, erepo_dir):\n with erepo_dir.chdir(), erepo_dir.branch(\"branch\", new=True):\n erepo_dir.dvc_gen(\"file\", \"contents\", commit=\"create file on branch\")\n\n Repo.get(os.fspath(erepo_dir), \"file\", \"file_imported\", rev=\"branch\")\n assert (tmp_dir / \"file_imported\").read_text() == \"contents\"\n\n\ndef test_get_from_non_dvc_repo(tmp_dir, git_dir):\n git_dir.scm_gen({\"some_file\": \"contents\"}, commit=\"create file\")\n\n Repo.get(os.fspath(git_dir), \"some_file\", \"file_imported\")\n assert (tmp_dir / \"file_imported\").read_text() == \"contents\"\n\n\ndef test_get_a_dvc_file(tmp_dir, erepo_dir):\n with pytest.raises(GetDVCFileError):\n Repo.get(os.fspath(erepo_dir), \"some_file.dvc\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_None_1_test_unknown_path.with_pytest_raises_PathMi.Repo_get_os_fspath_erepo_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_None_1_test_unknown_path.with_pytest_raises_PathMi.Repo_get_os_fspath_erepo_", "embedding": null, "metadata": {"file_path": "tests/func/test_get.py", "file_name": "test_get.py", "file_type": "text/x-python", "category": "test", "start_line": 136, "end_line": 149, "span_ids": ["test_unknown_path", "test_non_cached_output", "test_absolute_file_outside_repo", "test_absolute_file_outside_git_repo"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# https://github.com/iterative/dvc/pull/2837#discussion_r352123053\ndef test_absolute_file_outside_repo(tmp_dir, erepo_dir):\n with pytest.raises(PathMissingError):\n Repo.get(os.fspath(erepo_dir), \"/root/\")\n\n\ndef test_absolute_file_outside_git_repo(tmp_dir, git_dir):\n with pytest.raises(PathMissingError):\n Repo.get(os.fspath(git_dir), \"/root/\")\n\n\ndef test_unknown_path(tmp_dir, erepo_dir):\n with pytest.raises(PathMissingError):\n Repo.get(os.fspath(erepo_dir), \"a_non_existing_file\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_to_dir_test_get_from_non_dvc_master.assert_tmp_dir_some_d": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_to_dir_test_get_from_non_dvc_master.assert_tmp_dir_some_d", "embedding": null, "metadata": {"file_path": "tests/func/test_get.py", "file_name": "test_get.py", "file_type": "text/x-python", "category": "test", "start_line": 152, "end_line": 172, "span_ids": ["test_get_to_dir", "test_get_from_non_dvc_master"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"dname\", [\".\", \"dir\", \"dir/subdir\"])\ndef test_get_to_dir(tmp_dir, erepo_dir, dname):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\"file\", \"contents\", commit=\"create file\")\n\n makedirs(dname, exist_ok=True)\n\n Repo.get(os.fspath(erepo_dir), \"file\", dname)\n\n assert (tmp_dir / dname).is_dir()\n assert (tmp_dir / dname / \"file\").read_text() == \"contents\"\n\n\ndef test_get_from_non_dvc_master(tmp_dir, git_dir):\n with git_dir.chdir(), git_dir.branch(\"branch\", new=True):\n git_dir.init(dvc=True)\n git_dir.dvc_gen(\"some_file\", \"some text\", commit=\"create some file\")\n\n Repo.get(os.fspath(git_dir), \"some_file\", out=\"some_dst\", rev=\"branch\")\n\n assert (tmp_dir / \"some_dst\").read_text() == \"some text\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_cached_file_test_import_cached_file.assert_filecmp_cmp_erepo_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_cached_file_test_import_cached_file.assert_filecmp_cmp_erepo_", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 49, "end_line": 64, "span_ids": ["test_import_cached_file"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_import_cached_file(erepo_dir, tmp_dir, dvc, scm, monkeypatch):\n src = \"some_file\"\n dst = \"some_file_imported\"\n\n with erepo_dir.chdir():\n erepo_dir.dvc_gen({src: \"hello\"}, commit=\"add a regular file\")\n\n tmp_dir.dvc_gen({dst: \"hello\"})\n (tmp_dir / dst).unlink()\n\n remote_exception = NoRemoteError(\"dvc import\")\n with patch.object(cloud.DataCloud, \"pull\", side_effect=remote_exception):\n tmp_dir.dvc.imp(os.fspath(erepo_dir), src, dst)\n\n assert (tmp_dir / dst).is_file()\n assert filecmp.cmp(erepo_dir / src, tmp_dir / dst, shallow=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_from_bare_git_repo_test_import_from_bare_git_repo.with_dvc_repo_chdir_.dvc_repo_dvc_imp_os_fspat": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_from_bare_git_repo_test_import_from_bare_git_repo.with_dvc_repo_chdir_.dvc_repo_dvc_imp_os_fspat", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 347, "end_line": 364, "span_ids": ["test_import_from_bare_git_repo"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_import_from_bare_git_repo(\n tmp_dir, make_tmp_dir, erepo_dir, local_cloud\n):\n import git\n\n git.Repo.init(os.fspath(tmp_dir), bare=True)\n\n erepo_dir.add_remote(config=local_cloud.config)\n with erepo_dir.chdir():\n erepo_dir.dvc_gen({\"foo\": \"foo\"}, commit=\"initial\")\n erepo_dir.dvc.push()\n\n erepo_dir.scm.gitpython.repo.create_remote(\"origin\", os.fspath(tmp_dir))\n erepo_dir.scm.gitpython.repo.remote(\"origin\").push(\"master\")\n\n dvc_repo = make_tmp_dir(\"dvc-repo\", scm=True, dvc=True)\n with dvc_repo.chdir():\n dvc_repo.dvc.imp(os.fspath(tmp_dir), \"foo\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_TestImportFilename_TestImportFilename.test.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_TestImportFilename_TestImportFilename.test.None_5", "embedding": null, "metadata": {"file_path": "tests/func/test_import_url.py", "file_name": "test_import_url.py", "file_type": "text/x-python", "category": "test", "start_line": 53, "end_line": 72, "span_ids": ["TestImportFilename.setUp", "TestImportFilename.test", "TestImportFilename"], "tokens": 167}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestImportFilename(TestDvc):\n def setUp(self):\n super().setUp()\n tmp_dir = self.mkdtemp()\n self.external_source = os.path.join(tmp_dir, \"file\")\n with open(self.external_source, \"w\") as fobj:\n fobj.write(\"content\")\n\n def test(self):\n ret = main([\"import-url\", \"--file\", \"bar.dvc\", self.external_source])\n self.assertEqual(0, ret)\n self.assertTrue(os.path.exists(\"bar.dvc\"))\n\n os.remove(\"bar.dvc\")\n os.mkdir(\"sub\")\n\n path = os.path.join(\"sub\", \"bar.dvc\")\n ret = main([\"import-url\", \"--file\", path, self.external_source])\n self.assertEqual(0, ret)\n self.assertTrue(os.path.exists(path))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_lockfile.py_from_collections_import_O_assert_eq_lockfile.assert_previous_new": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_lockfile.py_from_collections_import_O_assert_eq_lockfile.assert_previous_new", "embedding": null, "metadata": {"file_path": "tests/func/test_lockfile.py", "file_name": "test_lockfile.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 31, "span_ids": ["imports", "read_lock_file", "assert_eq_lockfile"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from collections import OrderedDict\nfrom operator import itemgetter\n\nfrom dvc.dvcfile import PIPELINE_LOCK\nfrom dvc.stage.utils import split_params_deps\nfrom dvc.utils.fs import remove\nfrom dvc.utils.serialize import dumps_yaml, parse_yaml_for_update\nfrom tests.func.test_run_multistage import supported_params\n\nFS_STRUCTURE = {\n \"foo\": \"bar\\nfoobar\",\n \"bar\": \"foo\\nfoobar\",\n \"foobar\": \"foobar\\nbar\",\n \"params.yaml\": dumps_yaml(supported_params),\n \"params2.yaml\": dumps_yaml(supported_params),\n}\n\n\ndef read_lock_file(file=PIPELINE_LOCK):\n with open(file) as f:\n data = parse_yaml_for_update(f.read(), file)\n assert isinstance(data, OrderedDict)\n return data\n\n\ndef assert_eq_lockfile(previous, new):\n for content in (previous, new):\n assert isinstance(content, OrderedDict)\n\n # if they both are OrderedDict, then `==` will also check for order\n assert previous == new", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_dvc_only_recursive_test_ls_repo_dvc_only_recursive.match_files_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_dvc_only_recursive_test_ls_repo_dvc_only_recursive.match_files_", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 129, "end_line": 142, "span_ids": ["test_ls_repo_dvc_only_recursive"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ls_repo_dvc_only_recursive(tmp_dir, dvc, scm):\n tmp_dir.scm_gen(FS_STRUCTURE, commit=\"init\")\n tmp_dir.dvc_gen(DVC_STRUCTURE, commit=\"dvc\")\n\n files = Repo.ls(os.fspath(tmp_dir), recursive=True, dvc_only=True)\n match_files(\n files,\n (\n ((\"data\", \"subcontent\", \"statistics\", \"data.csv\"), True),\n ((\"data\", \"subcontent\", \"data.xml\"), True),\n ((\"model\", \"people.csv\"), True),\n ((\"structure.xml\",), True),\n ),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_path_dir_test_ls_repo_with_path_dir_dvc_only_empty.with_pytest_raises_PathMi.Repo_ls_os_fspath_tmp_dir": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_path_dir_test_ls_repo_with_path_dir_dvc_only_empty.with_pytest_raises_PathMi.Repo_ls_os_fspath_tmp_dir", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 145, "end_line": 168, "span_ids": ["test_ls_repo_with_path_dir_dvc_only_empty", "test_ls_repo_with_path_dir"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ls_repo_with_path_dir(tmp_dir, dvc, scm):\n tmp_dir.scm_gen(FS_STRUCTURE, commit=\"init\")\n tmp_dir.dvc_gen(DVC_STRUCTURE, commit=\"dvc\")\n\n files = Repo.ls(os.fspath(tmp_dir), path=\"model\")\n match_files(\n files,\n (\n ((\"script.py\",), False),\n ((\"train.py\",), False),\n ((\"people.csv\",), True),\n ((\"people.csv.dvc\",), False),\n ((\".gitignore\",), False),\n ),\n )\n\n\ndef test_ls_repo_with_path_dir_dvc_only_empty(tmp_dir, dvc, scm):\n tmp_dir.scm_gen(FS_STRUCTURE, commit=\"init\")\n tmp_dir.dvc_gen(DVC_STRUCTURE, commit=\"dvc\")\n tmp_dir.scm_gen({\"folder/.keep\": \"content\"}, commit=\"add .keep\")\n\n with pytest.raises(PathMissingError):\n Repo.ls(os.fspath(tmp_dir), path=\"folder\", dvc_only=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_path_subdir_dvc_only_test_ls_repo_with_path_subdir_dvc_only_recursive.match_files_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_path_subdir_dvc_only_test_ls_repo_with_path_subdir_dvc_only_recursive.match_files_", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 188, "end_line": 205, "span_ids": ["test_ls_repo_with_path_subdir_dvc_only_recursive", "test_ls_repo_with_path_subdir_dvc_only"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ls_repo_with_path_subdir_dvc_only(tmp_dir, dvc, scm):\n tmp_dir.scm_gen(FS_STRUCTURE, commit=\"init\")\n tmp_dir.dvc_gen(DVC_STRUCTURE, commit=\"dvc\")\n\n path = os.path.join(\"data\", \"subcontent\")\n files = Repo.ls(os.fspath(tmp_dir), path, dvc_only=True)\n match_files(files, (((\"data.xml\",), True), ((\"statistics\",), False),))\n\n\ndef test_ls_repo_with_path_subdir_dvc_only_recursive(tmp_dir, dvc, scm):\n tmp_dir.scm_gen(FS_STRUCTURE, commit=\"init\")\n tmp_dir.dvc_gen(DVC_STRUCTURE, commit=\"dvc\")\n\n path = os.path.join(\"data\", \"subcontent\")\n files = Repo.ls(os.fspath(tmp_dir), path, dvc_only=True, recursive=True)\n match_files(\n files, (((\"data.xml\",), True), ((\"statistics\", \"data.csv\"), True),)\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_dir_hash_should_be_key_order_agnostic_test_dir_hash_should_be_key_order_agnostic.assert_hash1_hash2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_dir_hash_should_be_key_order_agnostic_test_dir_hash_should_be_key_order_agnostic.assert_hash1_hash2", "embedding": null, "metadata": {"file_path": "tests/func/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 149, "end_line": 170, "span_ids": ["test_dir_hash_should_be_key_order_agnostic"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_dir_hash_should_be_key_order_agnostic(tmp_dir, dvc):\n tmp_dir.gen({\"data\": {\"1\": \"1 content\", \"2\": \"2 content\"}})\n\n path_info = PathInfo(\"data\")\n\n dir_info = DirInfo.from_list(\n [{\"relpath\": \"1\", \"md5\": \"1\"}, {\"relpath\": \"2\", \"md5\": \"2\"}]\n )\n with patch.object(\n BaseTree, \"_collect_dir\", return_value=dir_info,\n ):\n hash1 = dvc.cache.local.tree.get_hash(path_info)\n\n dir_info = DirInfo.from_list(\n [{\"md5\": \"1\", \"relpath\": \"1\"}, {\"md5\": \"2\", \"relpath\": \"2\"}]\n )\n with patch.object(\n BaseTree, \"_collect_dir\", return_value=dir_info,\n ):\n hash2 = dvc.cache.local.tree.get_hash(path_info)\n\n assert hash1 == hash2", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_external_dir_resource_on_no_cache_test_external_dir_resource_on_no_cache.with_pytest_raises_Remote.dvc_run_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_external_dir_resource_on_no_cache_test_external_dir_resource_on_no_cache.with_pytest_raises_Remote.dvc_run_", "embedding": null, "metadata": {"file_path": "tests/func/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 254, "end_line": 266, "span_ids": ["test_external_dir_resource_on_no_cache"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_external_dir_resource_on_no_cache(tmp_dir, dvc, tmp_path_factory):\n # https://github.com/iterative/dvc/issues/2647, is some situations\n # (external dir dependency) cache is required to calculate dir md5\n external_dir = tmp_path_factory.mktemp(\"external_dir\")\n (external_dir / \"file\").write_text(\"content\")\n\n dvc.cache.local = None\n with pytest.raises(RemoteCacheRequiredError):\n dvc.run(\n cmd=\"echo hello world\",\n outs=[os.fspath(external_dir)],\n single_stage=True,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remote_modify_unset_test_remote_modify_unset.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remote_modify_unset_test_remote_modify_unset.None_5", "embedding": null, "metadata": {"file_path": "tests/func/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 274, "end_line": 294, "span_ids": ["test_remote_modify_unset"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_remote_modify_unset(dvc):\n assert main([\"remote\", \"add\", \"-d\", \"myremote\", \"gdrive://test/test\"]) == 0\n config = configobj.ConfigObj(dvc.config.files[\"repo\"])\n assert config['remote \"myremote\"'] == {\"url\": \"gdrive://test/test\"}\n\n assert (\n main([\"remote\", \"modify\", \"myremote\", \"gdrive_client_id\", \"something\"])\n == 0\n )\n config = configobj.ConfigObj(dvc.config.files[\"repo\"])\n assert config['remote \"myremote\"'] == {\n \"url\": \"gdrive://test/test\",\n \"gdrive_client_id\": \"something\",\n }\n\n assert (\n main([\"remote\", \"modify\", \"myremote\", \"gdrive_client_id\", \"--unset\"])\n == 0\n )\n config = configobj.ConfigObj(dvc.config.files[\"repo\"])\n assert config['remote \"myremote\"'] == {\"url\": \"gdrive://test/test\"}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remote_modify_default_test_remote_modify_default.assert_local_config_core": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remote_modify_default_test_remote_modify_default.assert_local_config_core", "embedding": null, "metadata": {"file_path": "tests/func/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 297, "end_line": 312, "span_ids": ["test_remote_modify_default"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_remote_modify_default(dvc):\n remote_repo = \"repo_level\"\n remote_local = \"local_level\"\n wrong_name = \"anything\"\n assert main([\"remote\", \"add\", remote_repo, \"s3://bucket/repo\"]) == 0\n assert main([\"remote\", \"add\", remote_local, \"s3://bucket/local\"]) == 0\n\n assert main([\"remote\", \"default\", wrong_name]) == 251\n assert main([\"remote\", \"default\", remote_repo]) == 0\n assert main([\"remote\", \"default\", \"--local\", remote_local]) == 0\n\n repo_config = configobj.ConfigObj(dvc.config.files[\"repo\"])\n local_config = configobj.ConfigObj(dvc.config.files[\"local\"])\n\n assert repo_config[\"core\"][\"remote\"] == remote_repo\n assert local_config[\"core\"][\"remote\"] == remote_local", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remote_rename_test_remote_rename.assert_config_remote_n": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remote_rename_test_remote_rename.assert_config_remote_n", "embedding": null, "metadata": {"file_path": "tests/func/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 315, "end_line": 337, "span_ids": ["test_remote_rename"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_remote_rename(dvc):\n remote_name = \"drive\"\n remote_url = \"gdrive://test/test\"\n new_name = \"new\"\n other_name = \"other\"\n # prepare\n assert main([\"remote\", \"add\", remote_name, remote_url]) == 0\n config = dvc.config.load_one(\"repo\")\n assert config[\"remote\"][remote_name][\"url\"] == remote_url\n assert new_name not in config.get(\"remote\", {})\n\n # rename failed\n assert main([\"remote\", \"rename\", remote_name]) == 254\n assert main([\"remote\", \"rename\", new_name, other_name]) == 251\n config = dvc.config.load_one(\"repo\")\n assert config[\"remote\"][remote_name][\"url\"] == remote_url\n assert new_name not in config.get(\"remote\", {})\n\n # rename success\n assert main([\"remote\", \"rename\", remote_name, new_name]) == 0\n config = dvc.config.load_one(\"repo\")\n assert remote_name not in config.get(\"remote\", {})\n assert config[\"remote\"][new_name][\"url\"] == remote_url", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remote_duplicated_test_remote_duplicated.None_6": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remote_duplicated_test_remote_duplicated.None_6", "embedding": null, "metadata": {"file_path": "tests/func/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 340, "end_line": 358, "span_ids": ["test_remote_duplicated"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_remote_duplicated(dvc):\n remote_name = \"drive\"\n remote_url = \"gdrive://test/test\"\n used_name = \"overlap\"\n another_url = \"gdrive://test/test1\"\n # prepare\n assert main([\"remote\", \"add\", remote_name, remote_url]) == 0\n assert main([\"remote\", \"add\", \"--local\", used_name, another_url]) == 0\n config = dvc.config.load_one(\"repo\")\n assert config[\"remote\"][remote_name][\"url\"] == remote_url\n local_config = dvc.config.load_one(\"local\")\n assert local_config[\"remote\"][used_name][\"url\"] == another_url\n\n # rename duplicated\n assert main([\"remote\", \"rename\", remote_name, used_name]) == 251\n config = dvc.config.load_one(\"repo\")\n assert config[\"remote\"][remote_name][\"url\"] == remote_url\n local_config = dvc.config.load_one(\"local\")\n assert local_config[\"remote\"][used_name][\"url\"] == another_url", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remove.py_test_remove_non_existent_file_test_remove_broken_symlink.assert_not_tmp_dir_sta": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remove.py_test_remove_non_existent_file_test_remove_broken_symlink.assert_not_tmp_dir_sta", "embedding": null, "metadata": {"file_path": "tests/func/test_remove.py", "file_name": "test_remove.py", "file_type": "text/x-python", "category": "test", "start_line": 28, "end_line": 50, "span_ids": ["test_remove_non_existent_file", "test_remove_broken_symlink"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_remove_non_existent_file(tmp_dir, dvc):\n with pytest.raises(StageFileDoesNotExistError):\n dvc.remove(\"non_existent_dvc_file.dvc\")\n with pytest.raises(StageFileDoesNotExistError):\n dvc.remove(\"non_existent_stage_name\")\n\n\ndef test_remove_broken_symlink(tmp_dir, dvc):\n tmp_dir.gen(\"foo\", \"foo\")\n dvc.cache.local.cache_types = [\"symlink\"]\n\n (stage,) = dvc.add(\"foo\")\n remove(dvc.cache.local.cache_dir)\n assert System.is_symlink(\"foo\")\n\n with pytest.raises(DvcException):\n dvc.remove(stage.addressing)\n assert os.path.lexists(\"foo\")\n assert (tmp_dir / stage.relpath).exists()\n\n dvc.remove(stage.addressing, outs=True)\n assert not os.path.lexists(\"foo\")\n assert not (tmp_dir / stage.relpath).exists()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_filecmp_SingleStageRun._get_stage_target.return.stage_addressing": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_filecmp_SingleStageRun._get_stage_target.return.stage_addressing", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 36, "span_ids": ["imports", "SingleStageRun._run", "SingleStageRun", "SingleStageRun._get_stage_target"], "tokens": 225}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import filecmp\nimport os\nimport re\nimport shutil\nfrom pathlib import Path\n\nimport pytest\nfrom mock import patch\n\nfrom dvc.dvcfile import DVC_FILE, Dvcfile\nfrom dvc.exceptions import (\n CyclicGraphError,\n ReproductionError,\n StagePathAsOutputError,\n)\nfrom dvc.main import main\nfrom dvc.output.base import BaseOutput\nfrom dvc.stage import Stage\nfrom dvc.stage.exceptions import StageFileDoesNotExistError\nfrom dvc.system import System\nfrom dvc.tree.local import LocalTree\nfrom dvc.utils import file_md5, relpath\nfrom dvc.utils.fs import remove\nfrom dvc.utils.serialize import dump_yaml, load_yaml\nfrom tests.basic_env import TestDvc\n\n\nclass SingleStageRun:\n def _run(self, **kwargs):\n kwargs[\"single_stage\"] = True\n kwargs.pop(\"name\", None)\n return self.dvc.run(**kwargs) # noqa, pylint: disable=no-member\n\n @staticmethod\n def _get_stage_target(stage):\n return stage.addressing", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproForceDownstream_TestReproForceDownstream.test.self_assertEqual_stages_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproForceDownstream_TestReproForceDownstream.test.self_assertEqual_stages_1", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 451, "end_line": 497, "span_ids": ["TestReproForceDownstream.test", "TestReproForceDownstream"], "tokens": 393}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproForceDownstream(TestDvc):\n def test(self):\n stages = self.dvc.add(self.FOO)\n self.assertEqual(len(stages), 1)\n foo_stage = stages[0]\n self.assertTrue(foo_stage is not None)\n\n code1 = \"code1.py\"\n shutil.copyfile(self.CODE, code1)\n file1 = \"file1\"\n file1_stage = self.dvc.run(\n outs=[file1],\n deps=[self.FOO, code1],\n cmd=f\"python {code1} {self.FOO} {file1}\",\n single_stage=True,\n )\n self.assertTrue(file1_stage is not None)\n\n code2 = \"code2.py\"\n shutil.copyfile(self.CODE, code2)\n file2 = \"file2\"\n file2_stage = self.dvc.run(\n outs=[file2],\n deps=[file1, code2],\n cmd=f\"python {code2} {file1} {file2}\",\n single_stage=True,\n )\n self.assertTrue(file2_stage is not None)\n\n code3 = \"code3.py\"\n shutil.copyfile(self.CODE, code3)\n file3 = \"file3\"\n file3_stage = self.dvc.run(\n outs=[file3],\n deps=[file2, code3],\n cmd=f\"python {code3} {file2} {file3}\",\n single_stage=True,\n )\n self.assertTrue(file3_stage is not None)\n\n with open(code2, \"a\") as fobj:\n fobj.write(\"\\n\\n\")\n\n stages = self.dvc.reproduce(file3_stage.path, force_downstream=True)\n self.assertEqual(len(stages), 2)\n self.assertEqual(stages[0].path, file2_stage.path)\n self.assertEqual(stages[1].path, file3_stage.path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproFrozen_TestReproFrozen.test.None_6": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproFrozen_TestReproFrozen.test.None_6", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 557, "end_line": 580, "span_ids": ["TestReproFrozen.test", "TestReproFrozen"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproFrozen(TestReproChangedData):\n def test(self):\n file2 = \"file2\"\n file2_stage = self._run(\n fname=file2 + \".dvc\",\n outs=[file2],\n deps=[self.file1, self.CODE],\n cmd=f\"python {self.CODE} {self.file1} {file2}\",\n name=\"copy-file1-file2\",\n )\n\n self.swap_foo_with_bar()\n\n ret = main([\"freeze\", self._get_stage_target(file2_stage)])\n self.assertEqual(ret, 0)\n stages = self.dvc.reproduce(self._get_stage_target(file2_stage))\n self.assertEqual(len(stages), 0)\n\n ret = main([\"unfreeze\", self._get_stage_target(file2_stage)])\n self.assertEqual(ret, 0)\n stages = self.dvc.reproduce(self._get_stage_target(file2_stage))\n self.assertTrue(filecmp.cmp(self.file1, self.BAR, shallow=False))\n self.assertTrue(filecmp.cmp(file2, self.BAR, shallow=False))\n self.assertEqual(len(stages), 3)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproFrozen.test_non_existing_TestReproFrozen.test_non_existing.self_assertNotEqual_ret_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproFrozen.test_non_existing_TestReproFrozen.test_non_existing.self_assertNotEqual_ret_", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 582, "end_line": 593, "span_ids": ["TestReproFrozen.test_non_existing"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproFrozen(TestReproChangedData):\n\n def test_non_existing(self):\n with self.assertRaises(StageFileDoesNotExistError):\n self.dvc.freeze(\"Dvcfile\")\n self.dvc.freeze(\"pipelines.yaml\")\n self.dvc.freeze(\"pipelines.yaml:name\")\n self.dvc.freeze(\"Dvcfile:name\")\n self.dvc.freeze(\"stage.dvc\")\n self.dvc.freeze(\"stage.dvc:name\")\n self.dvc.freeze(\"not-existing-stage.json\")\n\n ret = main([\"freeze\", \"non-existing-stage\"])\n self.assertNotEqual(ret, 0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproFrozenCallback_TestReproFrozenUnchanged.test.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproFrozenCallback_TestReproFrozenUnchanged.test.None_3", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 596, "end_line": 634, "span_ids": ["TestReproFrozenUnchanged.test", "TestReproFrozenCallback", "TestReproFrozenCallback.test", "TestReproFrozenUnchanged"], "tokens": 314}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproFrozenCallback(SingleStageRun, TestDvc):\n def test(self):\n file1 = \"file1\"\n file1_stage = file1 + \".dvc\"\n # NOTE: purposefully not specifying dependencies\n # to create a callback stage.\n stage = self._run(\n fname=file1_stage,\n outs=[file1],\n cmd=f\"python {self.CODE} {self.FOO} {file1}\",\n name=\"copy-FOO-file1\",\n )\n self.assertTrue(stage is not None)\n\n stages = self.dvc.reproduce(self._get_stage_target(stage))\n self.assertEqual(len(stages), 1)\n\n self.dvc.freeze(self._get_stage_target(stage))\n stages = self.dvc.reproduce(self._get_stage_target(stage))\n self.assertEqual(len(stages), 0)\n\n self.dvc.unfreeze(self._get_stage_target(stage))\n stages = self.dvc.reproduce(self._get_stage_target(stage))\n self.assertEqual(len(stages), 1)\n\n\nclass TestReproFrozenUnchanged(TestRepro):\n def test(self):\n \"\"\"\n Check that freezing/unfreezing doesn't affect stage state\n \"\"\"\n target = self._get_stage_target(self.stage)\n self.dvc.freeze(target)\n stages = self.dvc.reproduce(target)\n self.assertEqual(len(stages), 0)\n\n self.dvc.unfreeze(target)\n stages = self.dvc.reproduce(target)\n self.assertEqual(len(stages), 0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_test_repro_when_cmd_changes_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_test_repro_when_cmd_changes_", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 1252, "end_line": 1272, "span_ids": ["test_repro_when_cmd_changes"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_repro_when_cmd_changes(tmp_dir, dvc, run_copy, mocker):\n from dvc.dvcfile import SingleStageFile\n\n tmp_dir.gen(\"foo\", \"foo\")\n stage = run_copy(\"foo\", \"bar\", single_stage=True)\n assert not dvc.reproduce(stage.addressing)\n\n from dvc.stage.run import cmd_run\n\n m = mocker.patch(\"dvc.stage.run.cmd_run\", wraps=cmd_run)\n\n data = SingleStageFile(dvc, stage.path)._load()[0]\n data[\"cmd\"] = \" \".join(stage.cmd.split()) # change cmd spacing by two\n dump_yaml(stage.path, data)\n\n assert dvc.status([stage.addressing]) == {\n stage.addressing: [\"changed checksum\"]\n }\n assert dvc.reproduce(stage.addressing)[0] == stage\n m.assert_called_once_with(stage, checkpoint_func=None, dry=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_TestReproChangedDirDataMultiStage_test_non_existing_stage_name.assert_main_freeze_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_TestReproChangedDirDataMultiStage_test_non_existing_stage_name.assert_main_freeze_", "embedding": null, "metadata": {"file_path": "tests/func/test_repro_multistage.py", "file_name": "test_repro_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 156, "end_line": 171, "span_ids": ["test_non_existing_stage_name", "TestReproChangedDirDataMultiStage"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproChangedDirDataMultiStage(\n MultiStageRun, test_repro.TestReproChangedDirData\n):\n pass\n\n\ndef test_non_existing_stage_name(tmp_dir, dvc, run_copy):\n from dvc.exceptions import DvcException\n\n tmp_dir.gen(\"file1\", \"file1\")\n run_copy(\"file1\", \"file2\", name=\"copy-file1-file2\")\n\n with pytest.raises(DvcException):\n dvc.freeze(\":copy-file1-file3\")\n\n assert main([\"freeze\", \":copy-file1-file3\"]) != 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_cmd_changes_test_repro_when_cmd_changes.m_assert_called_once_with": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro_multistage.py_test_repro_when_cmd_changes_test_repro_when_cmd_changes.m_assert_called_once_with", "embedding": null, "metadata": {"file_path": "tests/func/test_repro_multistage.py", "file_name": "test_repro_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 286, "end_line": 302, "span_ids": ["test_repro_when_cmd_changes"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_repro_when_cmd_changes(tmp_dir, dvc, run_copy, mocker):\n from dvc.dvcfile import PipelineFile\n\n tmp_dir.gen(\"foo\", \"foo\")\n stage = run_copy(\"foo\", \"bar\", name=\"copy-file\")\n target = \"copy-file\"\n assert not dvc.reproduce(target)\n\n from dvc.stage.run import cmd_run\n\n m = mocker.patch(\"dvc.stage.run.cmd_run\", wraps=cmd_run)\n stage.cmd = \" \".join(stage.cmd.split()) # change cmd spacing by two\n PipelineFile(dvc, PIPELINE_FILE)._dump_pipeline_file(stage)\n\n assert dvc.status([target]) == {target: [\"changed command\"]}\n assert dvc.reproduce(target)[0] == stage\n m.assert_called_once_with(stage, checkpoint_func=None, dry=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_cache.py_os_test_push_pull.with_erepo_dir_chdir_.assert_os_listdir_erepo_d": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_cache.py_os_test_push_pull.with_erepo_dir_chdir_.assert_os_listdir_erepo_d", "embedding": null, "metadata": {"file_path": "tests/func/test_run_cache.py", "file_name": "test_run_cache.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 20, "span_ids": ["imports", "test_push_pull", "_recurse_count_files"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nfrom dvc.dvcfile import PIPELINE_LOCK\nfrom dvc.utils import relpath\nfrom dvc.utils.fs import remove\n\n\ndef _recurse_count_files(path):\n return len([os.path.join(r, f) for r, _, fs in os.walk(path) for f in fs])\n\n\ndef test_push_pull(tmp_dir, dvc, erepo_dir, run_copy, local_remote):\n tmp_dir.gen(\"foo\", \"foo\")\n run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n assert dvc.push(run_cache=True) == 2\n erepo_dir.add_remote(config=local_remote.config)\n with erepo_dir.chdir():\n assert not os.path.exists(erepo_dir.dvc.stage_cache.cache_dir)\n assert erepo_dir.dvc.pull(run_cache=True)[\"fetched\"] == 0\n assert os.listdir(erepo_dir.dvc.stage_cache.cache_dir)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_cache.py_test_restore_test_restore.assert_tmp_dir_PIPELIN": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_cache.py_test_restore_test_restore.assert_tmp_dir_PIPELIN", "embedding": null, "metadata": {"file_path": "tests/func/test_run_cache.py", "file_name": "test_run_cache.py", "file_type": "text/x-python", "category": "test", "start_line": 22, "end_line": 38, "span_ids": ["test_restore"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_restore(tmp_dir, dvc, run_copy, mocker):\n tmp_dir.gen(\"foo\", \"foo\")\n run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n\n mock_restore = mocker.spy(dvc.stage_cache, \"restore\")\n mock_run = mocker.patch(\"dvc.stage.run.cmd_run\")\n\n # removing any information that `dvc` could use to re-generate from\n (tmp_dir / \"bar\").unlink()\n (tmp_dir / PIPELINE_LOCK).unlink()\n\n (stage,) = dvc.reproduce(\"copy-foo-bar\")\n\n mock_restore.assert_called_once_with(stage)\n mock_run.assert_not_called()\n assert (tmp_dir / \"bar\").exists() and not (tmp_dir / \"foo\").unlink()\n assert (tmp_dir / PIPELINE_LOCK).exists()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_cache.py_test_save_test_uncached_outs_are_cached.assert_os_path_exists_rel": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_cache.py_test_save_test_uncached_outs_are_cached.assert_os_path_exists_rel", "embedding": null, "metadata": {"file_path": "tests/func/test_run_cache.py", "file_name": "test_run_cache.py", "file_type": "text/x-python", "category": "test", "start_line": 42, "end_line": 77, "span_ids": ["test_do_not_save_on_no_exec_and_dry", "test_save", "test_uncached_outs_are_cached"], "tokens": 329}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_save(tmp_dir, dvc, run_copy):\n run_cache_dir = dvc.stage_cache.cache_dir\n assert not os.path.exists(run_cache_dir)\n\n tmp_dir.gen(\"foo\", \"foo\")\n stage = run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n assert _recurse_count_files(run_cache_dir) == 1\n assert dvc.stage_cache._load(stage)\n\n\ndef test_do_not_save_on_no_exec_and_dry(tmp_dir, dvc, run_copy):\n run_cache_dir = dvc.stage_cache.cache_dir\n assert not os.path.exists(run_cache_dir)\n\n tmp_dir.gen(\"foo\", \"foo\")\n stage = run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\", no_exec=True)\n\n assert _recurse_count_files(run_cache_dir) == 0\n assert not dvc.stage_cache._load(stage)\n\n (stage,) = dvc.reproduce(\"copy-foo-bar\", dry=True)\n\n assert _recurse_count_files(run_cache_dir) == 0\n assert not dvc.stage_cache._load(stage)\n\n\ndef test_uncached_outs_are_cached(tmp_dir, dvc, run_copy):\n tmp_dir.gen(\"foo\", \"foo\")\n stage = dvc.run(\n deps=[\"foo\"],\n cmd=\"cp foo bar\",\n outs_no_cache=[\"bar\"],\n name=\"copy-foo-bar\",\n )\n stage.outs[0].hash_info = stage.outs[0].get_hash()\n assert os.path.exists(relpath(stage.outs[0].cache_path))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_cache.py_test_memory_for_multiple_runs_of_same_stage_test_memory_for_multiple_runs_of_same_stage.None_8": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_cache.py_test_memory_for_multiple_runs_of_same_stage_test_memory_for_multiple_runs_of_same_stage.None_8", "embedding": null, "metadata": {"file_path": "tests/func/test_run_cache.py", "file_name": "test_run_cache.py", "file_type": "text/x-python", "category": "test", "start_line": 83, "end_line": 117, "span_ids": ["test_memory_for_multiple_runs_of_same_stage"], "tokens": 346}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_memory_for_multiple_runs_of_same_stage(\n tmp_dir, dvc, run_copy, mocker\n):\n tmp_dir.gen(\"foo\", \"foo\")\n assert not os.path.exists(dvc.stage_cache.cache_dir)\n run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n assert _recurse_count_files(dvc.stage_cache.cache_dir) == 1\n tmp_dir.gen(\"foo\", \"foobar\")\n run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n assert _recurse_count_files(dvc.stage_cache.cache_dir) == 2\n\n from dvc.stage import run as _run\n\n mock_restore = mocker.spy(dvc.stage_cache, \"restore\")\n mock_run = mocker.spy(_run, \"cmd_run\")\n\n (tmp_dir / \"bar\").unlink()\n (tmp_dir / PIPELINE_LOCK).unlink()\n (stage,) = dvc.reproduce(\"copy-foo-bar\")\n\n assert (tmp_dir / PIPELINE_LOCK).exists()\n assert (tmp_dir / \"bar\").read_text() == \"foobar\"\n mock_run.assert_not_called()\n mock_restore.assert_called_once_with(stage)\n mock_restore.reset_mock()\n\n (tmp_dir / PIPELINE_LOCK).unlink()\n tmp_dir.gen(\"foo\", \"foo\")\n dvc.reproduce(\"copy-foo-bar\")\n\n assert (tmp_dir / \"bar\").read_text() == \"foo\"\n mock_run.assert_not_called()\n mock_restore.assert_called_once_with(stage)\n assert (tmp_dir / \"bar\").exists() and not (tmp_dir / \"foo\").unlink()\n assert (tmp_dir / PIPELINE_LOCK).exists()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_no_exec_test_run_no_exec.assert_data_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_no_exec_test_run_no_exec.assert_data_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_multistage.py", "file_name": "test_run_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 24, "end_line": 45, "span_ids": ["test_run_no_exec"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_run_no_exec(tmp_dir, dvc, run_copy):\n from dvc.dvcfile import PIPELINE_FILE, PIPELINE_LOCK\n from dvc.stage import PipelineStage\n\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n assert not os.path.exists(PIPELINE_FILE)\n stage = run_copy(\"foo\", \"bar\", name=\"copy-foo-to-bar\", no_exec=True)\n assert isinstance(stage, PipelineStage)\n assert stage.name == \"copy-foo-to-bar\"\n assert os.path.exists(PIPELINE_FILE)\n assert not os.path.exists(PIPELINE_LOCK)\n\n data, _ = stage.dvcfile._load()\n assert data == {\n \"stages\": {\n \"copy-foo-to-bar\": {\n \"cmd\": \"python copy.py foo bar\",\n \"deps\": [\"copy.py\", \"foo\"],\n \"outs\": [\"bar\"],\n }\n }\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_multi_stage_repeat_test_run_multi_stage_repeat.assert_stage_name_for_st": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_multi_stage_repeat_test_run_multi_stage_repeat.assert_stage_name_for_st", "embedding": null, "metadata": {"file_path": "tests/func/test_run_multistage.py", "file_name": "test_run_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 62, "end_line": 77, "span_ids": ["test_run_multi_stage_repeat"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_run_multi_stage_repeat(tmp_dir, dvc, run_copy):\n from dvc.dvcfile import PIPELINE_FILE, Dvcfile\n from dvc.stage import PipelineStage\n\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n run_copy(\"foo\", \"foo1\", name=\"copy-foo-foo1\")\n run_copy(\"foo1\", \"foo2\", name=\"copy-foo1-foo2\")\n run_copy(\"foo2\", \"foo3\", single_stage=True)\n\n stages = list(Dvcfile(dvc, PIPELINE_FILE).stages.values())\n assert len(stages) == 2\n assert all(isinstance(stage, PipelineStage) for stage in stages)\n assert {stage.name for stage in stages} == {\n \"copy-foo-foo1\",\n \"copy-foo1-foo2\",\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_params_custom_file_test_run_params_custom_file.assert_data_stages_re": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_params_custom_file_test_run_params_custom_file.assert_data_stages_re", "embedding": null, "metadata": {"file_path": "tests/func/test_run_multistage.py", "file_name": "test_run_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 257, "end_line": 277, "span_ids": ["test_run_params_custom_file"], "tokens": 176}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_run_params_custom_file(tmp_dir, dvc):\n from dvc.dependency import ParamsDependency\n\n dump_yaml(tmp_dir / \"params2.yaml\", supported_params)\n stage = dvc.run(\n name=\"read_params\",\n params=[\"params2.yaml:lists\"],\n cmd=\"cat params2.yaml\",\n )\n\n isinstance(stage.deps[0], ParamsDependency)\n assert stage.deps[0].params == [\"lists\"]\n lockfile = stage.dvcfile._lockfile\n assert lockfile.load()[\"read_params\"][\"params\"] == {\n \"params2.yaml\": {\"lists\": [42, 42.0, \"42\"]}\n }\n\n data, _ = stage.dvcfile._load()\n assert data[\"stages\"][\"read_params\"][\"params\"] == [\n {\"params2.yaml\": [\"lists\"]}\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunEmpty_TestRunNoExec.test.with_open_gitignore_a.self_assertEqual_fobj_rea": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunEmpty_TestRunNoExec.test.with_open_gitignore_a.self_assertEqual_fobj_rea", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 77, "end_line": 115, "span_ids": ["TestRunNoExec.test", "TestRunMissingDep", "TestRunEmpty", "TestRunNoExec", "TestRunEmpty.test", "TestRunMissingDep.test"], "tokens": 231}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRunEmpty(TestDvc):\n def test(self):\n self.dvc.run(\n cmd=\"echo hello world\",\n deps=[],\n outs=[],\n outs_no_cache=[],\n fname=\"empty.dvc\",\n single_stage=True,\n )\n\n\nclass TestRunMissingDep(TestDvc):\n def test(self):\n from dvc.dependency.base import DependencyDoesNotExistError\n\n with self.assertRaises(DependencyDoesNotExistError):\n self.dvc.run(\n cmd=\"command\",\n deps=[\"non-existing-dep\"],\n outs=[],\n outs_no_cache=[],\n fname=\"empty.dvc\",\n single_stage=True,\n )\n\n\nclass TestRunNoExec(TestDvcGit):\n def test(self):\n self.dvc.run(\n cmd=\"python {} {} {}\".format(self.CODE, self.FOO, \"out\"),\n deps=[self.CODE, self.FOO],\n outs=[\"out\"],\n no_exec=True,\n single_stage=True,\n )\n self.assertFalse(os.path.exists(\"out\"))\n with open(\".gitignore\") as fobj:\n self.assertEqual(fobj.read(), \"/out\\n\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunStageInsideOutput_TestRunBadCwd.test_same_prefix.with_self_assertRaises_St.self_dvc_run_cmd_command": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestRunStageInsideOutput_TestRunBadCwd.test_same_prefix.with_self_assertRaises_St.self_dvc_run_cmd_command", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 205, "end_line": 247, "span_ids": ["TestRunStageInsideOutput.test_cwd", "TestRunBadCwd.test", "TestRunStageInsideOutput", "TestRunStageInsideOutput.test_file_name", "TestRunBadCwd", "TestRunBadCwd.test_same_prefix"], "tokens": 288}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRunStageInsideOutput(TestDvc):\n def test_cwd(self):\n self.dvc.run(\n cmd=f\"mkdir {self.DATA_DIR}\",\n deps=[],\n outs=[self.DATA_DIR],\n single_stage=True,\n )\n\n with self.assertRaises(StagePathAsOutputError):\n self.dvc.run(\n cmd=\"command\",\n fname=os.path.join(self.DATA_DIR, \"inside-cwd.dvc\"),\n single_stage=True,\n )\n\n def test_file_name(self):\n self.dvc.run(\n cmd=f\"mkdir {self.DATA_DIR}\",\n deps=[],\n outs=[self.DATA_DIR],\n single_stage=True,\n )\n\n with self.assertRaises(StagePathAsOutputError):\n self.dvc.run(\n cmd=\"command\",\n outs=[self.FOO],\n fname=os.path.join(self.DATA_DIR, \"inside-cwd.dvc\"),\n single_stage=True,\n )\n\n\nclass TestRunBadCwd(TestDvc):\n def test(self):\n with self.assertRaises(StagePathOutsideError):\n self.dvc.run(cmd=\"command\", wdir=self.mkdtemp(), single_stage=True)\n\n def test_same_prefix(self):\n with self.assertRaises(StagePathOutsideError):\n path = f\"{self._root_dir}-{uuid.uuid4()}\"\n os.mkdir(path)\n self.dvc.run(cmd=\"command\", wdir=path, single_stage=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_test_rerun_deterministic_test_rerun_changed_out.with_pytest_raises_StageF.run_copy_foo_out_fo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_test_rerun_deterministic_test_rerun_changed_out.with_pytest_raises_StageF.run_copy_foo_out_fo", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 663, "end_line": 720, "span_ids": ["test_rerun_callback", "test_rerun_deterministic_ignore_cache", "test_rerun_changed_out", "test_rerun_changed_dep", "test_rerun_changed_stage", "test_rerun_deterministic"], "tokens": 478}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rerun_deterministic(tmp_dir, run_copy):\n tmp_dir.gen(\"foo\", \"foo content\")\n\n assert run_copy(\"foo\", \"out\", single_stage=True) is not None\n assert run_copy(\"foo\", \"out\", single_stage=True) is None\n\n\ndef test_rerun_deterministic_ignore_cache(tmp_dir, run_copy):\n tmp_dir.gen(\"foo\", \"foo content\")\n\n assert run_copy(\"foo\", \"out\", single_stage=True) is not None\n assert (\n run_copy(\"foo\", \"out\", run_cache=False, single_stage=True) is not None\n )\n\n\ndef test_rerun_callback(dvc):\n def run_callback(force=False):\n return dvc.run(\n cmd=\"echo content > out\",\n outs=[\"out\"],\n deps=[],\n force=force,\n single_stage=True,\n )\n\n assert run_callback() is not None\n with pytest.raises(StageFileAlreadyExistsError):\n assert run_callback() is not None\n assert run_callback(force=True) is not None\n\n\ndef test_rerun_changed_dep(tmp_dir, run_copy):\n tmp_dir.gen(\"foo\", \"foo content\")\n assert run_copy(\"foo\", \"out\", single_stage=True) is not None\n\n tmp_dir.gen(\"foo\", \"changed content\")\n with pytest.raises(StageFileAlreadyExistsError):\n run_copy(\"foo\", \"out\", force=False, single_stage=True)\n assert run_copy(\"foo\", \"out\", force=True, single_stage=True)\n\n\ndef test_rerun_changed_stage(tmp_dir, run_copy):\n tmp_dir.gen(\"foo\", \"foo content\")\n assert run_copy(\"foo\", \"out\", single_stage=True) is not None\n\n tmp_dir.gen(\"bar\", \"bar content\")\n with pytest.raises(StageFileAlreadyExistsError):\n run_copy(\"bar\", \"out\", force=False, single_stage=True)\n\n\ndef test_rerun_changed_out(tmp_dir, run_copy):\n tmp_dir.gen(\"foo\", \"foo content\")\n assert run_copy(\"foo\", \"out\", single_stage=True) is not None\n\n Path(\"out\").write_text(\"modification\")\n with pytest.raises(StageFileAlreadyExistsError):\n run_copy(\"foo\", \"out\", force=False, single_stage=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestPersistentOutput_TestPersistentOutput.test_ignore_run_cache.with_open_greetings_as.assert_hello_nhello_n_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_TestPersistentOutput_TestPersistentOutput.test_ignore_run_cache.with_open_greetings_as.assert_hello_nhello_n_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 941, "end_line": 969, "span_ids": ["TestPersistentOutput", "TestPersistentOutput.test_ignore_run_cache"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestPersistentOutput(TestDvc):\n def test_ignore_run_cache(self):\n warning = \"Build cache is ignored when persisting outputs.\"\n\n with open(\"immutable\", \"w\") as fobj:\n fobj.write(\"1\")\n\n cmd = [\n \"run\",\n \"--force\",\n \"--single-stage\",\n \"--deps\",\n \"immutable\",\n \"--outs-persist\",\n \"greetings\",\n \"echo hello>>greetings\",\n ]\n\n with self._caplog.at_level(logging.WARNING, logger=\"dvc\"):\n assert main(cmd) == 0\n assert warning not in self._caplog.text\n\n assert main(cmd) == 0\n assert warning in self._caplog.text\n\n # Even if the \"immutable\" dependency didn't change\n # it should run the command again, as it is \"ignoring build cache\"\n with open(\"greetings\") as fobj:\n assert \"hello\\nhello\\n\" == fobj.read()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_test_bad_stage_fname_test_should_raise_on_stage_output.with_pytest_raises_Output.run_copy_foo_name_dvc": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_test_bad_stage_fname_test_should_raise_on_stage_output.with_pytest_raises_Output.run_copy_foo_name_dvc", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 972, "end_line": 992, "span_ids": ["test_should_raise_on_stage_output", "test_bad_stage_fname", "test_should_raise_on_stage_dependency"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_bad_stage_fname(tmp_dir, dvc, run_copy):\n tmp_dir.dvc_gen(\"foo\", \"foo content\")\n\n with pytest.raises(StageFileBadNameError):\n # fname should end with .dvc\n run_copy(\"foo\", \"foo_copy\", fname=\"out_stage\", single_stage=True)\n\n # Check that command hasn't been run\n assert not (tmp_dir / \"foo_copy\").exists()\n\n\ndef test_should_raise_on_stage_dependency(run_copy):\n with pytest.raises(DependencyIsStageFileError):\n run_copy(\"name.dvc\", \"stage_copy\", single_stage=True)\n\n\ndef test_should_raise_on_stage_output(tmp_dir, dvc, run_copy):\n tmp_dir.dvc_gen(\"foo\", \"foo content\")\n\n with pytest.raises(OutputIsStageFileError):\n run_copy(\"foo\", \"name.dvc\", single_stage=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_s3.py_test_link_created_on_non_nested_path_test_makedirs_doesnot_try_on_top_level_paths.tree_makedirs_base_info_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_s3.py_test_link_created_on_non_nested_path_test_makedirs_doesnot_try_on_top_level_paths.tree_makedirs_base_info_", "embedding": null, "metadata": {"file_path": "tests/func/test_s3.py", "file_name": "test_s3.py", "file_type": "text/x-python", "category": "test", "start_line": 49, "end_line": 72, "span_ids": ["test_link_created_on_non_nested_path", "test_makedirs_doesnot_try_on_top_level_paths"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@mock_s3\n@pytest.mark.parametrize(\n \"base_info\",\n [S3Tree.PATH_CLS(\"s3://bucket/\"), S3Tree.PATH_CLS(\"s3://bucket/ns/\")],\n)\ndef test_link_created_on_non_nested_path(base_info, tmp_dir, dvc, scm):\n tree = S3Tree(dvc, {\"url\": str(base_info.parent)})\n cache = CloudCache(tree)\n s3 = cache.tree.s3.meta.client\n s3.create_bucket(Bucket=base_info.bucket)\n s3.put_object(\n Bucket=base_info.bucket, Key=(base_info / \"from\").path, Body=\"data\"\n )\n cache.link(base_info / \"from\", base_info / \"to\")\n\n assert cache.tree.exists(base_info / \"from\")\n assert cache.tree.exists(base_info / \"to\")\n\n\n@mock_s3\ndef test_makedirs_doesnot_try_on_top_level_paths(tmp_dir, dvc, scm):\n base_info = S3Tree.PATH_CLS(\"s3://bucket/\")\n tree = S3Tree(dvc, {\"url\": str(base_info)})\n tree.makedirs(base_info)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_os_test_init_sub_dir.assert_scm_root_dir_os": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_os_test_init_sub_dir.assert_scm_root_dir_os", "embedding": null, "metadata": {"file_path": "tests/func/test_scm.py", "file_name": "test_scm.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 33, "span_ids": ["test_init_none", "test_init_sub_dir", "imports", "test_init_git", "test_init_no_git"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nimport pytest\nfrom git import Repo\n\nfrom dvc.scm import SCM, Git, NoSCM\nfrom dvc.scm.base import SCMError\nfrom dvc.system import System\nfrom tests.basic_env import TestGit, TestGitSubmodule\nfrom tests.utils import get_gitignore_content\n\n\ndef test_init_none(tmp_dir):\n assert isinstance(SCM(os.fspath(tmp_dir), no_scm=True), NoSCM)\n\n\ndef test_init_git(tmp_dir):\n Repo.init(os.fspath(tmp_dir))\n assert isinstance(SCM(os.fspath(tmp_dir)), Git)\n\n\ndef test_init_no_git(tmp_dir):\n with pytest.raises(SCMError):\n SCM(os.fspath(tmp_dir))\n\n\ndef test_init_sub_dir(tmp_dir):\n Repo.init(os.fspath(tmp_dir))\n subdir = tmp_dir / \"dir\"\n subdir.mkdir()\n\n scm = SCM(os.fspath(subdir))\n assert scm.root_dir == os.fspath(tmp_dir)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_get_gitignore_test_get_gitignore_symlink.assert_gitignore_os_fs": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_get_gitignore_test_get_gitignore_symlink.assert_gitignore_os_fs", "embedding": null, "metadata": {"file_path": "tests/func/test_scm.py", "file_name": "test_scm.py", "file_type": "text/x-python", "category": "test", "start_line": 99, "end_line": 121, "span_ids": ["test_get_gitignore", "test_get_gitignore_symlink"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_gitignore(tmp_dir, scm):\n tmp_dir.gen({\"file1\": \"contents\", \"dir\": {}})\n\n data_dir = os.fspath(tmp_dir / \"file1\")\n entry, gitignore = scm._get_gitignore(data_dir)\n assert entry == \"/file1\"\n assert gitignore == os.fspath(tmp_dir / \".gitignore\")\n\n data_dir = os.fspath(tmp_dir / \"dir\")\n entry, gitignore = scm._get_gitignore(data_dir)\n\n assert entry == \"/dir\"\n assert gitignore == os.fspath(tmp_dir / \".gitignore\")\n\n\ndef test_get_gitignore_symlink(tmp_dir, scm):\n tmp_dir.gen({\"dir\": {\"subdir\": {\"data\": \"contents\"}}})\n link = os.fspath(tmp_dir / \"link\")\n target = os.fspath(tmp_dir / \"dir\" / \"subdir\" / \"data\")\n System.symlink(target, link)\n entry, gitignore = scm._get_gitignore(link)\n assert entry == \"/link\"\n assert gitignore == os.fspath(tmp_dir / \".gitignore\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_parent_repo_collect_stages_test_parent_repo_collect_stages.assert_deep_subrepo_stage": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_parent_repo_collect_stages_test_parent_repo_collect_stages.assert_deep_subrepo_stage", "embedding": null, "metadata": {"file_path": "tests/func/test_stage.py", "file_name": "test_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 203, "end_line": 225, "span_ids": ["test_parent_repo_collect_stages"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_parent_repo_collect_stages(tmp_dir, scm, dvc):\n tmp_dir.gen({\"subdir\": {}})\n tmp_dir.gen({\"deep\": {\"dir\": {}}})\n subrepo_dir = tmp_dir / \"subdir\"\n deep_subrepo_dir = tmp_dir / \"deep\" / \"dir\"\n\n with subrepo_dir.chdir():\n subrepo = Repo.init(subdir=True)\n subrepo_dir.gen(\"subrepo_file\", \"subrepo file content\")\n subrepo.add(\"subrepo_file\")\n\n with deep_subrepo_dir.chdir():\n deep_subrepo = Repo.init(subdir=True)\n deep_subrepo_dir.gen(\"subrepo_file\", \"subrepo file content\")\n deep_subrepo.add(\"subrepo_file\")\n\n stages = dvc.stage.collect(None)\n subrepo_stages = subrepo.stage.collect(None)\n deep_subrepo_stages = deep_subrepo.stage.collect(None)\n\n assert stages == []\n assert subrepo_stages != []\n assert deep_subrepo_stages != []", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_stage_strings_representation_test_stage_strings_representation.with_folder_chdir_.assert_str_stage2_f_s": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_stage_strings_representation_test_stage_strings_representation.with_folder_chdir_.assert_str_stage2_f_s", "embedding": null, "metadata": {"file_path": "tests/func/test_stage.py", "file_name": "test_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 208, "end_line": 235, "span_ids": ["test_stage_strings_representation"], "tokens": 325}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stage_strings_representation(tmp_dir, dvc, run_copy):\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n stage1 = run_copy(\"foo\", \"bar\", single_stage=True)\n assert stage1.addressing == \"bar.dvc\"\n assert repr(stage1) == \"Stage: 'bar.dvc'\"\n assert str(stage1) == \"stage: 'bar.dvc'\"\n\n stage2 = run_copy(\"bar\", \"baz\", name=\"copy-bar-baz\")\n assert stage2.addressing == \"copy-bar-baz\"\n assert repr(stage2) == \"Stage: 'copy-bar-baz'\"\n assert str(stage2) == \"stage: 'copy-bar-baz'\"\n\n folder = tmp_dir / \"dir\"\n folder.mkdir()\n with folder.chdir():\n # `Stage` caches `relpath` results, forcing it to reset\n stage1.path = stage1.path\n stage2.path = stage2.path\n\n rel_path = os.path.relpath(stage1.path)\n assert stage1.addressing == rel_path\n assert repr(stage1) == f\"Stage: '{rel_path}'\"\n assert str(stage1) == f\"stage: '{rel_path}'\"\n\n rel_path = os.path.relpath(stage2.path)\n assert stage2.addressing == f\"{rel_path}:{stage2.name}\"\n assert repr(stage2) == f\"Stage: '{rel_path}:{stage2.name}'\"\n assert str(stage2) == f\"stage: '{rel_path}:{stage2.name}'\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_stage_on_no_path_string_repr_test_stage_on_no_path_string_repr.assert_str_p_stage_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_stage_on_no_path_string_repr_test_stage_on_no_path_string_repr.assert_str_p_stage_", "embedding": null, "metadata": {"file_path": "tests/func/test_stage.py", "file_name": "test_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 238, "end_line": 247, "span_ids": ["test_stage_on_no_path_string_repr"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stage_on_no_path_string_repr(tmp_dir, dvc):\n s = Stage(dvc)\n assert s.addressing == \"No path\"\n assert repr(s) == \"Stage: 'No path'\"\n assert str(s) == \"stage: 'No path'\"\n\n p = PipelineStage(dvc, name=\"stage_name\")\n assert p.addressing == \"No path:stage_name\"\n assert repr(p) == \"Stage: 'No path:stage_name'\"\n assert str(p) == \"stage: 'No path:stage_name'\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_TestWalkInGit.test_branch_TestWalkInGit.test_branch.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_TestWalkInGit.test_branch_TestWalkInGit.test_branch.None_3", "embedding": null, "metadata": {"file_path": "tests/func/test_tree.py", "file_name": "test_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 160, "end_line": 186, "span_ids": ["TestWalkInGit.test_branch"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestWalkInGit(AssertWalkEqualMixin, TestGit):\n\n def test_branch(self):\n scm = SCM(self._root_dir)\n scm.add([self.DATA_SUB_DIR])\n scm.commit(\"add data_dir/data_sub_dir/data_sub\")\n tree = scm.get_tree(\"master\")\n self.assertWalkEqual(\n tree.walk(\".\"),\n [\n (self._root_dir, [\"data_dir\"], [\"code.py\"]),\n (join(self._root_dir, \"data_dir\"), [\"data_sub_dir\"], []),\n (\n join(self._root_dir, \"data_dir\", \"data_sub_dir\"),\n [],\n [\"data_sub\"],\n ),\n ],\n )\n self.assertWalkEqual(\n tree.walk(join(\"data_dir\", \"data_sub_dir\")),\n [\n (\n join(self._root_dir, \"data_dir\", \"data_sub_dir\"),\n [],\n [\"data_sub\"],\n )\n ],\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_test_repotree_cache_save_test_repotree_cache_save.for_hash__in_expected_.assert_os_path_exists_cac": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_test_repotree_cache_save_test_repotree_cache_save.for_hash__in_expected_.assert_os_path_exists_cac", "embedding": null, "metadata": {"file_path": "tests/func/test_tree.py", "file_name": "test_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 206, "end_line": 231, "span_ids": ["test_repotree_cache_save"], "tokens": 279}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_repotree_cache_save(tmp_dir, dvc, scm, erepo_dir, local_cloud):\n with erepo_dir.chdir():\n erepo_dir.gen({\"dir\": {\"subdir\": {\"foo\": \"foo\"}, \"bar\": \"bar\"}})\n erepo_dir.dvc_add(\"dir/subdir\", commit=\"subdir\")\n erepo_dir.scm_add(\"dir\", commit=\"dir\")\n erepo_dir.add_remote(config=local_cloud.config)\n erepo_dir.dvc.push()\n\n # test only cares that either fetch or stream are set so that DVC dirs are\n # walked.\n #\n # for this test, all file objects are being opened() and copied from tree\n # into dvc.cache, not fetched or streamed from a remote\n tree = RepoTree(erepo_dir.dvc, stream=True)\n expected = [\n tree.get_file_hash(PathInfo(erepo_dir / path)).value\n for path in (\"dir/bar\", \"dir/subdir/foo\")\n ]\n\n cache = dvc.cache.local\n path_info = PathInfo(erepo_dir / \"dir\")\n hash_info = cache.tree.get_hash(path_info)\n cache.save(path_info, tree, hash_info)\n\n for hash_ in expected:\n assert os.path.exists(cache.tree.hash_to_path_info(hash_))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_utils.py_from_dvc_import_utils_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_utils.py_from_dvc_import_utils_", "embedding": null, "metadata": {"file_path": "tests/func/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 43, "span_ids": ["test_dict_md5", "imports", "test_file_md5_crlf", "test_boxify"], "tokens": 329}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc import utils\n\n\ndef test_file_md5_crlf(tmp_dir):\n tmp_dir.gen(\"cr\", b\"a\\nb\\nc\")\n tmp_dir.gen(\"crlf\", b\"a\\r\\nb\\r\\nc\")\n assert utils.file_md5(\"cr\")[0] == utils.file_md5(\"crlf\")[0]\n\n\ndef test_dict_md5():\n d = {\n \"cmd\": \"python code.py foo file1\",\n \"locked\": \"true\",\n \"outs\": [\n {\n \"path\": \"file1\",\n \"metric\": {\"type\": \"raw\"},\n \"cache\": False,\n \"md5\": \"acbd18db4cc2f85cedef654fccc4a4d8\",\n }\n ],\n \"deps\": [\n {\"path\": \"foo\", \"md5\": \"acbd18db4cc2f85cedef654fccc4a4d8\"},\n {\"path\": \"code.py\", \"md5\": \"d05447644b89960913c7eee5fd776adb\"},\n ],\n }\n\n md5 = \"8b263fa05ede6c3145c164829be694b4\"\n\n assert md5 == utils.dict_md5(d, exclude=[\"metric\", \"locked\"])\n\n\ndef test_boxify():\n expected = (\n \"+-----------------+\\n\"\n \"| |\\n\"\n \"| message |\\n\"\n \"| |\\n\"\n \"+-----------------+\\n\"\n )\n\n assert expected == utils.boxify(\"message\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/ssh.py_ssh_server_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/ssh.py_ssh_server_", "embedding": null, "metadata": {"file_path": "tests/remotes/ssh.py", "file_name": "ssh.py", "file_type": "text/x-python", "category": "implementation", "start_line": 115, "end_line": 145, "span_ids": ["ssh", "ssh_server", "ssh_connection"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture\ndef ssh_server(test_config):\n import mockssh\n\n test_config.requires(\"ssh\")\n users = {TEST_SSH_USER: TEST_SSH_KEY_PATH}\n with mockssh.Server(users) as s:\n yield s\n\n\n@pytest.fixture\ndef ssh_connection(ssh_server):\n from dvc.tree.ssh.connection import SSHConnection\n\n yield SSHConnection(\n host=ssh_server.host,\n port=ssh_server.port,\n username=TEST_SSH_USER,\n key_filename=TEST_SSH_KEY_PATH,\n )\n\n\n@pytest.fixture\ndef ssh(ssh_server, monkeypatch):\n from dvc.tree.ssh import SSHTree\n\n # NOTE: see http://github.com/iterative/dvc/pull/3501\n monkeypatch.setattr(SSHTree, \"CAN_TRAVERSE\", False)\n\n return SSHMocked(SSHMocked.get_url(TEST_SSH_USER, ssh_server.port))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_dag.py_nx_test_dag.assert_cmd_run_0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_dag.py_nx_test_dag.assert_cmd_run_0", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_dag.py", "file_name": "test_dag.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 22, "span_ids": ["imports", "test_dag"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import networkx as nx\nimport pytest\n\nfrom dvc.cli import parse_args\nfrom dvc.command.dag import CmdDAG, _build, _show_ascii, _show_dot\n\n\n@pytest.mark.parametrize(\"fmt\", [None, \"--dot\"])\ndef test_dag(tmp_dir, dvc, mocker, fmt):\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n\n args = [\"dag\", \"--full\", \"foo.dvc\"]\n if fmt:\n args.append(fmt)\n cli_args = parse_args(args)\n assert cli_args.func == CmdDAG\n\n cmd = cli_args.func(cli_args)\n\n mocker.patch(\"dvc.command.dag._build\", return_value=dvc.graph)\n\n assert cmd.run() == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_dag.py_test_build_test_build_full.assert_nx_is_isomorphic_G": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_dag.py_test_build_test_build_full.assert_nx_is_isomorphic_G", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_dag.py", "file_name": "test_dag.py", "file_type": "text/x-python", "category": "test", "start_line": 48, "end_line": 80, "span_ids": ["test_build_target_with_outs", "test_build", "test_build_granular_target_with_outs", "test_build_target", "test_build_full"], "tokens": 257}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_build(repo):\n assert nx.is_isomorphic(_build(repo), repo.graph)\n\n\ndef test_build_target(repo):\n G = _build(repo, target=\"3\")\n assert set(G.nodes()) == {\"3\", \"b.dvc\", \"a.dvc\"}\n assert set(G.edges()) == {(\"3\", \"a.dvc\"), (\"3\", \"b.dvc\")}\n\n\ndef test_build_target_with_outs(repo):\n G = _build(repo, target=\"3\", outs=True)\n assert set(G.nodes()) == {\"a\", \"b\", \"h\", \"i\"}\n assert set(G.edges()) == {\n (\"i\", \"a\"),\n (\"i\", \"b\"),\n (\"h\", \"a\"),\n (\"h\", \"b\"),\n }\n\n\ndef test_build_granular_target_with_outs(repo):\n G = _build(repo, target=\"h\", outs=True)\n assert set(G.nodes()) == {\"a\", \"b\", \"h\"}\n assert set(G.edges()) == {\n (\"h\", \"a\"),\n (\"h\", \"b\"),\n }\n\n\ndef test_build_full(repo):\n G = _build(repo, target=\"3\", full=True)\n assert nx.is_isomorphic(G, repo.graph)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_dag.py_test_show_dot_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_dag.py_test_show_dot_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_dag.py", "file_name": "test_dag.py", "file_type": "text/x-python", "category": "test", "start_line": 125, "end_line": 142, "span_ids": ["test_show_dot"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_show_dot(repo):\n assert _show_dot(repo.graph) == (\n \"strict digraph {\\n\"\n \"stage;\\n\"\n \"stage;\\n\"\n \"stage;\\n\"\n \"stage;\\n\"\n \"stage;\\n\"\n \"stage;\\n\"\n \"\\\"stage: '1'\\\" -> \\\"stage: 'a.dvc'\\\";\\n\"\n \"\\\"stage: '2'\\\" -> \\\"stage: 'b.dvc'\\\";\\n\"\n \"\\\"stage: '3'\\\" -> \\\"stage: 'a.dvc'\\\";\\n\"\n \"\\\"stage: '3'\\\" -> \\\"stage: 'b.dvc'\\\";\\n\"\n \"\\\"stage: '4'\\\" -> \\\"stage: 'a.dvc'\\\";\\n\"\n \"\\\"stage: '4'\\\" -> \\\"stage: '3'\\\";\\n\"\n \"}\\n\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_show_test_metrics_show.m_assert_called_once_with": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_show_test_metrics_show.m_assert_called_once_with", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_metrics.py", "file_name": "test_metrics.py", "file_type": "text/x-python", "category": "test", "start_line": 98, "end_line": 125, "span_ids": ["test_metrics_show"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_metrics_show(dvc, mocker):\n cli_args = parse_args(\n [\n \"metrics\",\n \"show\",\n \"-R\",\n \"--all-tags\",\n \"--all-branches\",\n \"--all-commits\",\n \"target1\",\n \"target2\",\n ]\n )\n assert cli_args.func == CmdMetricsShow\n\n cmd = cli_args.func(cli_args)\n m = mocker.patch(\"dvc.repo.metrics.show.show\", return_value={})\n\n assert cmd.run() == 0\n\n m.assert_called_once_with(\n cmd.repo,\n [\"target1\", \"target2\"],\n recursive=True,\n all_tags=True,\n all_branches=True,\n all_commits=True,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_diff_precision_test_metrics_diff_precision.assert__show_diff_diff_p": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_diff_precision_test_metrics_diff_precision.assert__show_diff_diff_p", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_metrics.py", "file_name": "test_metrics.py", "file_type": "text/x-python", "category": "test", "start_line": 132, "end_line": 153, "span_ids": ["test_metrics_diff_precision"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_metrics_diff_precision():\n diff = {\n \"other.json\": {\n \"a.b\": {\n \"old\": 0.1234567,\n \"new\": 0.765432101234567,\n \"diff\": 0.641975401234567,\n }\n }\n }\n\n assert _show_diff(diff) == textwrap.dedent(\n \"\"\"\\\n Path Metric Old New Change\n other.json a.b 0.12346 0.76543 0.64198\"\"\"\n )\n\n assert _show_diff(diff, precision=10) == textwrap.dedent(\n \"\"\"\\\n Path Metric Old New Change\n other.json a.b 0.1234567 0.7654321012 0.6419754012\"\"\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_diff_markdown_test_metrics_diff_markdown.assert__show_diff_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_diff_markdown_test_metrics_diff_markdown.assert__show_diff_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_metrics.py", "file_name": "test_metrics.py", "file_type": "text/x-python", "category": "test", "start_line": 183, "end_line": 201, "span_ids": ["test_metrics_diff_markdown"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_metrics_diff_markdown():\n assert _show_diff(\n {\n \"metrics.yaml\": {\n \"x.b\": {\"old\": 5, \"new\": 6},\n \"a.d.e\": {\"old\": 3, \"new\": 4, \"diff\": 1},\n \"a.b.c\": {\"old\": 1, \"new\": 2, \"diff\": 1},\n }\n },\n markdown=True,\n ) == textwrap.dedent(\n \"\"\"\\\n | Path | Metric | Old | New | Change |\n |--------------|----------|-------|-------|----------|\n | metrics.yaml | a.b.c | 1 | 2 | 1 |\n | metrics.yaml | a.d.e | 3 | 4 | 1 |\n | metrics.yaml | x.b | 5 | 6 | \u2014 |\n \"\"\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_diff_no_path_test_metrics_diff_no_path.assert__show_diff_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_metrics.py_test_metrics_diff_no_path_test_metrics_diff_no_path.assert__show_diff_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_metrics.py", "file_name": "test_metrics.py", "file_type": "text/x-python", "category": "test", "start_line": 204, "end_line": 220, "span_ids": ["test_metrics_diff_no_path"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_metrics_diff_no_path():\n assert _show_diff(\n {\n \"metrics.yaml\": {\n \"x.b\": {\"old\": 5, \"new\": 6, \"diff\": 1},\n \"a.d.e\": {\"old\": 3, \"new\": 4, \"diff\": 1},\n \"a.b.c\": {\"old\": 1, \"new\": 2, \"diff\": 1},\n }\n },\n no_path=True,\n ) == textwrap.dedent(\n \"\"\"\\\n Metric Old New Change\n a.b.c 1 2 1\n a.d.e 3 4 1\n x.b 5 6 1\"\"\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_params.py_test_params_diff_markdown_test_params_diff_markdown.assert__show_diff_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_params.py_test_params_diff_markdown_test_params_diff_markdown.assert__show_diff_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_params.py", "file_name": "test_params.py", "file_type": "text/x-python", "category": "test", "start_line": 137, "end_line": 155, "span_ids": ["test_params_diff_markdown"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_params_diff_markdown():\n assert _show_diff(\n {\n \"params.yaml\": {\n \"x.b\": {\"old\": 5, \"new\": 6},\n \"a.d.e\": {\"old\": None, \"new\": 4},\n \"a.b.c\": {\"old\": 1, \"new\": None},\n }\n },\n markdown=True,\n ) == textwrap.dedent(\n \"\"\"\\\n | Path | Param | Old | New |\n |-------------|---------|-------|-------|\n | params.yaml | a.b.c | 1 | \u2014 |\n | params.yaml | a.d.e | \u2014 | 4 |\n | params.yaml | x.b | 5 | 6 |\n \"\"\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_params.py_test_params_diff_no_path_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_params.py_test_params_diff_no_path_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_params.py", "file_name": "test_params.py", "file_type": "text/x-python", "category": "test", "start_line": 156, "end_line": 173, "span_ids": ["test_params_diff_no_path"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_params_diff_no_path():\n assert _show_diff(\n {\n \"params.yaml\": {\n \"x.b\": {\"old\": 5, \"new\": 6},\n \"a.d.e\": {\"old\": 3, \"new\": 4},\n \"a.b.c\": {\"old\": 1, \"new\": 2},\n }\n },\n no_path=True,\n ) == textwrap.dedent(\n \"\"\"\\\n Param Old New\n a.b.c 1 2\n a.d.e 3 4\n x.b 5 6\"\"\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_plots.py_test_plots_show_vega_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_plots.py_test_plots_show_vega_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_plots.py", "file_name": "test_plots.py", "file_type": "text/x-python", "category": "test", "start_line": 86, "end_line": 104, "span_ids": ["test_plots_show_vega"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_plots_show_vega(dvc, mocker, caplog):\n cli_args = parse_args(\n [\n \"plots\",\n \"diff\",\n \"HEAD~10\",\n \"HEAD~1\",\n \"--show-vega\",\n \"--targets\",\n \"plots.csv\",\n ]\n )\n cmd = cli_args.func(cli_args)\n mocker.patch(\n \"dvc.repo.plots.diff.diff\", return_value={\"plots.csv\": \"plothtml\"}\n )\n assert cmd.run() == 0\n assert \"plothtml\" in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_status.py_json_test_cloud_status.m_assert_called_once_with": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_status.py_json_test_cloud_status.m_assert_called_once_with", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_status.py", "file_name": "test_status.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 44, "span_ids": ["imports", "test_cloud_status"], "tokens": 212}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import json\n\nimport pytest\n\nfrom dvc.cli import parse_args\nfrom dvc.command.status import CmdDataStatus\n\n\ndef test_cloud_status(mocker):\n cli_args = parse_args(\n [\n \"status\",\n \"--cloud\",\n \"target1\",\n \"target2\",\n \"--jobs\",\n \"2\",\n \"--remote\",\n \"remote\",\n \"--all-branches\",\n \"--all-tags\",\n \"--all-commits\",\n \"--with-deps\",\n \"--recursive\",\n ]\n )\n assert cli_args.func == CmdDataStatus\n\n cmd = cli_args.func(cli_args)\n m = mocker.patch.object(cmd.repo, \"status\", autospec=True, return_value={})\n\n assert cmd.run() == 0\n\n m.assert_called_once_with(\n cloud=True,\n targets=[\"target1\", \"target2\"],\n jobs=2,\n remote=\"remote\",\n all_branches=True,\n all_tags=True,\n all_commits=True,\n with_deps=True,\n recursive=True,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_status.py_test_status_show_json_test_status_show_json.assert_caplog_messages_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_status.py_test_status_show_json_test_status_show_json.assert_caplog_messages_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_status.py", "file_name": "test_status.py", "file_type": "text/x-python", "category": "test", "start_line": 47, "end_line": 57, "span_ids": ["test_status_show_json"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"status\", [{}, {\"a\": \"b\", \"c\": [1, 2, 3]}, [1, 2, 3]])\ndef test_status_show_json(mocker, caplog, status):\n cli_args = parse_args([\"status\", \"--show-json\"])\n assert cli_args.func == CmdDataStatus\n\n cmd = cli_args.func(cli_args)\n\n mocker.patch.object(cmd.repo, \"status\", autospec=True, return_value=status)\n caplog.clear()\n assert cmd.run() == 0\n assert caplog.messages == [json.dumps(status)]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_status.py_test_status_quiet_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_status.py_test_status_quiet_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_status.py", "file_name": "test_status.py", "file_type": "text/x-python", "category": "test", "start_line": 60, "end_line": 76, "span_ids": ["test_status_quiet"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"status, ret\", [({}, 0), ({\"a\": \"b\", \"c\": [1, 2, 3]}, 1), ([1, 2, 3], 1)]\n)\ndef test_status_quiet(mocker, caplog, capsys, status, ret):\n cli_args = parse_args([\"status\", \"-q\"])\n assert cli_args.func == CmdDataStatus\n\n cmd = cli_args.func(cli_args)\n\n mocker.patch.object(cmd.repo, \"status\", autospec=True, return_value=status)\n caplog.clear()\n assert cmd.run() == ret\n assert not caplog.messages\n captured = capsys.readouterr()\n assert not captured.err\n assert not captured.out", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_azure.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_azure.py__", "embedding": null, "metadata": {"file_path": "tests/unit/dependency/test_azure.py", "file_name": "test_azure.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 8, "span_ids": ["imports", "TestAzureDependency._get_cls", "TestAzureDependency"], "tokens": 41}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.dependency.azure import AzureDependency\nfrom tests.unit.dependency.test_local import TestLocalDependency\n\n\nclass TestAzureDependency(TestLocalDependency):\n def _get_cls(self):\n return AzureDependency", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_load.py_test_load_from_pipeline_accumulates_flag_test_load_from_pipeline_accumulates_flag.assert_not_outs_1_use_ca": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_load.py_test_load_from_pipeline_accumulates_flag_test_load_from_pipeline_accumulates_flag.assert_not_outs_1_use_ca", "embedding": null, "metadata": {"file_path": "tests/unit/output/test_load.py", "file_name": "test_load.py", "file_type": "text/x-python", "category": "test", "start_line": 46, "end_line": 63, "span_ids": ["test_load_from_pipeline_accumulates_flag"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_load_from_pipeline_accumulates_flag(dvc):\n outs = output.load_from_pipeline(\n Stage(dvc),\n [\n \"file1\",\n {\"file2\": {\"cache\": False}},\n {\"file1\": {\"persist\": False}},\n {\"file2\": {\"persist\": True}},\n ],\n \"outs\",\n )\n for out in outs:\n assert isinstance(out, LocalOutput)\n assert not out.plot and not out.metric\n assert not out.hash_info\n\n assert outs[0].use_cache and not outs[0].persist\n assert not outs[1].use_cache and outs[1].persist", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_load.py_test_load_remote_files_from_pipeline_test_load_from_pipeline_illegal_type.None_1.output_load_from_pipeline": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_load.py_test_load_remote_files_from_pipeline_test_load_from_pipeline_illegal_type.None_1.output_load_from_pipeline", "embedding": null, "metadata": {"file_path": "tests/unit/output/test_load.py", "file_name": "test_load.py", "file_type": "text/x-python", "category": "test", "start_line": 66, "end_line": 89, "span_ids": ["test_load_from_pipeline_error_on_typ", "test_load_remote_files_from_pipeline", "test_load_from_pipeline_illegal_type"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_load_remote_files_from_pipeline(dvc):\n stage = Stage(dvc)\n (out,) = output.load_from_pipeline(\n stage, [{\"s3://dvc-test/file.txt\": {\"cache\": False}}], typ=\"metrics\"\n )\n assert isinstance(out, S3Output)\n assert not out.plot and out.metric\n assert not out.persist\n assert not out.hash_info\n\n\n@pytest.mark.parametrize(\"typ\", [None, \"\", \"illegal\"])\ndef test_load_from_pipeline_error_on_typ(dvc, typ):\n with pytest.raises(ValueError):\n output.load_from_pipeline(Stage(dvc), [\"file1\"], typ)\n\n\n@pytest.mark.parametrize(\"key\", [3, \"list\".split()])\ndef test_load_from_pipeline_illegal_type(dvc, key):\n stage = Stage(dvc)\n with pytest.raises(ValueError):\n output.load_from_pipeline(stage, [key], \"outs\")\n with pytest.raises(ValueError):\n output.load_from_pipeline(stage, [{\"key\": key}], \"outs\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_load.py_test_plots_load_from_pipeline_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_load.py_test_plots_load_from_pipeline_", "embedding": null, "metadata": {"file_path": "tests/unit/output/test_load.py", "file_name": "test_load.py", "file_type": "text/x-python", "category": "test", "start_line": 90, "end_line": 115, "span_ids": ["test_plots_load_from_pipeline"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_plots_load_from_pipeline(dvc):\n outs = output.load_from_pipeline(\n Stage(dvc),\n [\n \"file1\",\n {\n \"file2\": {\n \"persist\": True,\n \"cache\": False,\n \"x\": 3,\n \"random\": \"val\",\n }\n },\n ],\n \"plots\",\n )\n assert isinstance(outs[0], LocalOutput)\n assert outs[0].use_cache\n assert outs[0].plot is True and not outs[0].metric\n assert not outs[0].persist\n\n assert isinstance(outs[1], LocalOutput)\n assert not outs[1].use_cache\n assert outs[1].plot == {\"x\": 3} and not outs[1].metric\n assert outs[1].persist", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_pool.py_pytest_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_pool.py_pytest_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/ssh/test_pool.py", "file_name": "test_pool.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 21, "span_ids": ["imports", "test_doesnt_swallow_errors"], "tokens": 115}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.tree.pool import get_connection\nfrom dvc.tree.ssh.connection import SSHConnection\nfrom tests.remotes.ssh import TEST_SSH_KEY_PATH, TEST_SSH_USER\n\n\ndef test_doesnt_swallow_errors(ssh_server):\n class MyError(Exception):\n pass\n\n with pytest.raises(MyError):\n with get_connection(\n SSHConnection,\n host=ssh_server.host,\n port=ssh_server.port,\n username=TEST_SSH_USER,\n key_filename=TEST_SSH_KEY_PATH,\n ):\n raise MyError", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_ssh_host_override_from_config_test_ssh_host_override_from_config.assert_tree_path_info_hos": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_ssh_host_override_from_config_test_ssh_host_override_from_config.assert_tree_path_info_hos", "embedding": null, "metadata": {"file_path": "tests/unit/remote/ssh/test_ssh.py", "file_name": "test_ssh.py", "file_type": "text/x-python", "category": "test", "start_line": 53, "end_line": 73, "span_ids": ["test_ssh_host_override_from_config"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"config,expected_host\",\n [\n ({\"url\": \"ssh://example.com\"}, \"1.2.3.4\"),\n ({\"url\": \"ssh://not_in_ssh_config.com\"}, \"not_in_ssh_config.com\"),\n ],\n)\n@patch(\"os.path.exists\", return_value=True)\n@patch(\n f\"{builtin_module_name}.open\",\n new_callable=mock_open,\n read_data=mock_ssh_config,\n)\ndef test_ssh_host_override_from_config(\n mock_file, mock_exists, dvc, config, expected_host\n):\n tree = SSHTree(dvc, config)\n\n mock_exists.assert_called_with(SSHTree.ssh_config_filename())\n mock_file.assert_called_with(SSHTree.ssh_config_filename())\n assert tree.path_info.host == expected_host", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_ssh_user_test_ssh_user.assert_tree_path_info_use": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_ssh_user_test_ssh_user.assert_tree_path_info_use", "embedding": null, "metadata": {"file_path": "tests/unit/remote/ssh/test_ssh.py", "file_name": "test_ssh.py", "file_type": "text/x-python", "category": "test", "start_line": 76, "end_line": 101, "span_ids": ["test_ssh_user"], "tokens": 246}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"config,expected_user\",\n [\n ({\"url\": \"ssh://test1@example.com\"}, \"test1\"),\n ({\"url\": \"ssh://example.com\", \"user\": \"test2\"}, \"test2\"),\n ({\"url\": \"ssh://example.com\"}, \"ubuntu\"),\n ({\"url\": \"ssh://test1@not_in_ssh_config.com\"}, \"test1\"),\n (\n {\"url\": \"ssh://test1@not_in_ssh_config.com\", \"user\": \"test2\"},\n \"test2\",\n ),\n ({\"url\": \"ssh://not_in_ssh_config.com\"}, getpass.getuser()),\n ],\n)\n@patch(\"os.path.exists\", return_value=True)\n@patch(\n f\"{builtin_module_name}.open\",\n new_callable=mock_open,\n read_data=mock_ssh_config,\n)\ndef test_ssh_user(mock_file, mock_exists, dvc, config, expected_user):\n tree = SSHTree(dvc, config)\n\n mock_exists.assert_called_with(SSHTree.ssh_config_filename())\n mock_file.assert_called_with(SSHTree.ssh_config_filename())\n assert tree.path_info.user == expected_user", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_ssh_port_test_ssh_port.assert_tree_path_info_por": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_ssh_port_test_ssh_port.assert_tree_path_info_por", "embedding": null, "metadata": {"file_path": "tests/unit/remote/ssh/test_ssh.py", "file_name": "test_ssh.py", "file_type": "text/x-python", "category": "test", "start_line": 104, "end_line": 126, "span_ids": ["test_ssh_port"], "tokens": 245}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"config,expected_port\",\n [\n ({\"url\": \"ssh://example.com:2222\"}, 2222),\n ({\"url\": \"ssh://example.com\"}, 1234),\n ({\"url\": \"ssh://example.com\", \"port\": 4321}, 4321),\n ({\"url\": \"ssh://not_in_ssh_config.com\"}, SSHTree.DEFAULT_PORT),\n ({\"url\": \"ssh://not_in_ssh_config.com:2222\"}, 2222),\n ({\"url\": \"ssh://not_in_ssh_config.com:2222\", \"port\": 4321}, 4321),\n ],\n)\n@patch(\"os.path.exists\", return_value=True)\n@patch(\n f\"{builtin_module_name}.open\",\n new_callable=mock_open,\n read_data=mock_ssh_config,\n)\ndef test_ssh_port(mock_file, mock_exists, dvc, config, expected_port):\n tree = SSHTree(dvc, config)\n\n mock_exists.assert_called_with(SSHTree.ssh_config_filename())\n mock_file.assert_called_with(SSHTree.ssh_config_filename())\n assert tree.path_info.port == expected_port", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_ssh_keyfile_test_ssh_keyfile.assert_tree_keyfile_ex": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_ssh_keyfile_test_ssh_keyfile.assert_tree_keyfile_ex", "embedding": null, "metadata": {"file_path": "tests/unit/remote/ssh/test_ssh.py", "file_name": "test_ssh.py", "file_type": "text/x-python", "category": "test", "start_line": 129, "end_line": 161, "span_ids": ["test_ssh_keyfile"], "tokens": 236}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"config,expected_keyfile\",\n [\n (\n {\"url\": \"ssh://example.com\", \"keyfile\": \"dvc_config.key\"},\n \"dvc_config.key\",\n ),\n (\n {\"url\": \"ssh://example.com\"},\n os.path.expanduser(\"~/.ssh/not_default.key\"),\n ),\n (\n {\n \"url\": \"ssh://not_in_ssh_config.com\",\n \"keyfile\": \"dvc_config.key\",\n },\n \"dvc_config.key\",\n ),\n ({\"url\": \"ssh://not_in_ssh_config.com\"}, None),\n ],\n)\n@patch(\"os.path.exists\", return_value=True)\n@patch(\n f\"{builtin_module_name}.open\",\n new_callable=mock_open,\n read_data=mock_ssh_config,\n)\ndef test_ssh_keyfile(mock_file, mock_exists, dvc, config, expected_keyfile):\n tree = SSHTree(dvc, config)\n\n mock_exists.assert_called_with(SSHTree.ssh_config_filename())\n mock_file.assert_called_with(SSHTree.ssh_config_filename())\n assert tree.keyfile == expected_keyfile", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_ssh_gss_auth_test_ssh_gss_auth.assert_tree_gss_auth_e": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_ssh_gss_auth_test_ssh_gss_auth.assert_tree_gss_auth_e", "embedding": null, "metadata": {"file_path": "tests/unit/remote/ssh/test_ssh.py", "file_name": "test_ssh.py", "file_type": "text/x-python", "category": "test", "start_line": 164, "end_line": 183, "span_ids": ["test_ssh_gss_auth"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"config,expected_gss_auth\",\n [\n ({\"url\": \"ssh://example.com\", \"gss_auth\": True}, True),\n ({\"url\": \"ssh://example.com\", \"gss_auth\": False}, False),\n ({\"url\": \"ssh://not_in_ssh_config.com\"}, False),\n ],\n)\n@patch(\"os.path.exists\", return_value=True)\n@patch(\n f\"{builtin_module_name}.open\",\n new_callable=mock_open,\n read_data=mock_ssh_config,\n)\ndef test_ssh_gss_auth(mock_file, mock_exists, dvc, config, expected_gss_auth):\n tree = SSHTree(dvc, config)\n\n mock_exists.assert_called_with(SSHTree.ssh_config_filename())\n mock_file.assert_called_with(SSHTree.ssh_config_filename())\n assert tree.gss_auth == expected_gss_auth", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_base.py_test_hashes_exist_test_hashes_exist.None_2.traverse_assert_called_wi": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_base.py_test_hashes_exist_test_hashes_exist.None_2.traverse_assert_called_wi", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_base.py", "file_name": "test_base.py", "file_type": "text/x-python", "category": "test", "start_line": 42, "end_line": 94, "span_ids": ["test_hashes_exist"], "tokens": 400}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@mock.patch.object(CloudCache, \"list_hashes_traverse\")\n@mock.patch.object(CloudCache, \"list_hashes_exists\")\ndef test_hashes_exist(object_exists, traverse, dvc):\n cache = CloudCache(BaseTree(dvc, {}))\n\n # remote does not support traverse\n cache.tree.CAN_TRAVERSE = False\n with mock.patch.object(\n cache, \"list_hashes\", return_value=list(range(256))\n ):\n hashes = set(range(1000))\n cache.hashes_exist(hashes)\n object_exists.assert_called_with(hashes, None, None)\n traverse.assert_not_called()\n\n cache.tree.CAN_TRAVERSE = True\n\n # large remote, small local\n object_exists.reset_mock()\n traverse.reset_mock()\n with mock.patch.object(\n cache, \"list_hashes\", return_value=list(range(256))\n ):\n hashes = list(range(1000))\n cache.hashes_exist(hashes)\n # verify that _cache_paths_with_max() short circuits\n # before returning all 256 remote hashes\n max_hashes = math.ceil(\n cache._max_estimation_size(hashes)\n / pow(16, cache.tree.TRAVERSE_PREFIX_LEN)\n )\n assert max_hashes < 256\n object_exists.assert_called_with(\n frozenset(range(max_hashes, 1000)), None, None\n )\n traverse.assert_not_called()\n\n # large remote, large local\n object_exists.reset_mock()\n traverse.reset_mock()\n cache.tree.JOBS = 16\n with mock.patch.object(\n cache, \"list_hashes\", return_value=list(range(256))\n ):\n hashes = list(range(1000000))\n cache.hashes_exist(hashes)\n object_exists.assert_not_called()\n traverse.assert_called_with(\n 256 * pow(16, cache.tree.TRAVERSE_PREFIX_LEN),\n set(range(256)),\n None,\n None,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_base.py_test_list_hashes_traverse_test_list_hashes_traverse.list_hashes_assert_called": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_base.py_test_list_hashes_traverse_test_list_hashes_traverse.list_hashes_assert_called", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_base.py", "file_name": "test_base.py", "file_type": "text/x-python", "category": "test", "start_line": 97, "end_line": 125, "span_ids": ["test_list_hashes_traverse"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@mock.patch.object(\n CloudCache, \"list_hashes\", return_value=[],\n)\n@mock.patch.object(\n CloudCache, \"_path_to_hash\", side_effect=lambda x: x,\n)\ndef test_list_hashes_traverse(_path_to_hash, list_hashes, dvc):\n cache = CloudCache(BaseTree(dvc, {}))\n cache.tree.path_info = PathInfo(\"foo\")\n\n # parallel traverse\n size = 256 / cache.tree.JOBS * cache.tree.LIST_OBJECT_PAGE_SIZE\n list(cache.list_hashes_traverse(size, {0}))\n for i in range(1, 16):\n list_hashes.assert_any_call(\n prefix=f\"{i:03x}\", progress_callback=CallableOrNone\n )\n for i in range(1, 256):\n list_hashes.assert_any_call(\n prefix=f\"{i:02x}\", progress_callback=CallableOrNone\n )\n\n # default traverse (small remote)\n size -= 1\n list_hashes.reset_mock()\n list(cache.list_hashes_traverse(size - 1, {0}))\n list_hashes.assert_called_with(\n prefix=None, progress_callback=CallableOrNone\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_base.py_test_list_hashes_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_base.py_test_list_hashes_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_base.py", "file_name": "test_base.py", "file_type": "text/x-python", "category": "test", "start_line": 128, "end_line": 163, "span_ids": ["test_is_dir_hash", "test_list_paths", "test_list_hashes"], "tokens": 246}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_list_hashes(dvc):\n cache = CloudCache(BaseTree(dvc, {}))\n cache.tree.path_info = PathInfo(\"foo\")\n\n with mock.patch.object(\n cache, \"_list_paths\", return_value=[\"12/3456\", \"bar\"]\n ):\n hashes = list(cache.list_hashes())\n assert hashes == [\"123456\"]\n\n\ndef test_list_paths(dvc):\n cache = CloudCache(BaseTree(dvc, {}))\n cache.tree.path_info = PathInfo(\"foo\")\n\n with mock.patch.object(\n cache.tree, \"walk_files\", return_value=[]\n ) as walk_mock:\n for _ in cache._list_paths():\n pass\n walk_mock.assert_called_with(cache.tree.path_info, prefix=False)\n\n for _ in cache._list_paths(prefix=\"000\"):\n pass\n walk_mock.assert_called_with(\n cache.tree.path_info / \"00\" / \"0\", prefix=True\n )\n\n\n@pytest.mark.parametrize(\n \"hash_, result\",\n [(None, False), (\"\", False), (\"3456.dir\", True), (\"3456\", False)],\n)\ndef test_is_dir_hash(hash_, result):\n assert BaseTree.is_dir_hash(hash_) == result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_http.py_pytest_test_public_auth_method.assert_tree__auth_method_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_http.py_pytest_test_public_auth_method.assert_tree__auth_method_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_http.py", "file_name": "test_http.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 24, "span_ids": ["test_download_fails_on_error_code", "imports", "test_public_auth_method"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.exceptions import HTTPError\nfrom dvc.tree.http import HTTPTree\n\n\ndef test_download_fails_on_error_code(dvc, http):\n tree = HTTPTree(dvc, http.config)\n\n with pytest.raises(HTTPError):\n tree._download(http / \"missing.txt\", \"missing.txt\")\n\n\ndef test_public_auth_method(dvc):\n config = {\n \"url\": \"http://example.com/\",\n \"path_info\": \"file.html\",\n \"user\": \"\",\n \"password\": \"\",\n }\n\n tree = HTTPTree(dvc, config)\n\n assert tree._auth_method() is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_http.py_test_basic_auth_method_test_basic_auth_method.assert_isinstance_tree__a": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_http.py_test_basic_auth_method_test_basic_auth_method.assert_isinstance_tree__a", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_http.py", "file_name": "test_http.py", "file_type": "text/x-python", "category": "test", "start_line": 27, "end_line": 44, "span_ids": ["test_basic_auth_method"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_basic_auth_method(dvc):\n from requests.auth import HTTPBasicAuth\n\n user = \"username\"\n password = \"password\"\n auth = HTTPBasicAuth(user, password)\n config = {\n \"url\": \"http://example.com/\",\n \"path_info\": \"file.html\",\n \"auth\": \"basic\",\n \"user\": user,\n \"password\": password,\n }\n\n tree = HTTPTree(dvc, config)\n\n assert tree._auth_method() == auth\n assert isinstance(tree._auth_method(), HTTPBasicAuth)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_local.py_errno_test_status_download_optimization.assert_other_remote_hashe": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_local.py_errno_test_status_download_optimization.assert_other_remote_hashe", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_local.py", "file_name": "test_local.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 34, "span_ids": ["imports", "test_status_download_optimization"], "tokens": 276}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import errno\nimport os\n\nimport pytest\n\nfrom dvc.cache import NamedCache\nfrom dvc.cache.local import LocalCache\nfrom dvc.path_info import PathInfo\nfrom dvc.remote.index import RemoteIndexNoop\nfrom dvc.tree.local import LocalTree\n\n\ndef test_status_download_optimization(mocker, dvc):\n \"\"\"When comparing the status to pull a remote cache,\n And the desired files to fetch are already on the local cache,\n Don't check the existence of the desired files on the remote cache\n \"\"\"\n cache = LocalCache(LocalTree(dvc, {}))\n\n infos = NamedCache()\n infos.add(\"local\", \"acbd18db4cc2f85cedef654fccc4a4d8\", \"foo\")\n infos.add(\"local\", \"37b51d194a7513e45b56f6524f2d51f2\", \"bar\")\n\n local_exists = list(infos[\"local\"])\n mocker.patch.object(cache, \"hashes_exist\", return_value=local_exists)\n\n other_remote = mocker.Mock()\n other_remote.url = \"other_remote\"\n other_remote.hashes_exist.return_value = []\n other_remote.index = RemoteIndexNoop()\n\n other_remote.status(cache, infos, download=True)\n\n assert other_remote.hashes_exist.call_count == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_local.py_test_is_protected_test_is_protected.if_os_name_nt_and_li.else_.assert_tree_is_protected_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_local.py_test_is_protected_test_is_protected.if_os_name_nt_and_li.else_.assert_tree_is_protected_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_local.py", "file_name": "test_local.py", "file_type": "text/x-python", "category": "test", "start_line": 37, "end_line": 65, "span_ids": ["test_is_protected"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"link_name\", [\"hardlink\", \"symlink\"])\ndef test_is_protected(tmp_dir, dvc, link_name):\n tree = LocalTree(dvc, {})\n link_method = getattr(tree, link_name)\n\n (tmp_dir / \"foo\").write_text(\"foo\")\n\n foo = PathInfo(tmp_dir / \"foo\")\n link = PathInfo(tmp_dir / \"link\")\n\n link_method(foo, link)\n\n assert not tree.is_protected(foo)\n assert not tree.is_protected(link)\n\n tree.protect(foo)\n\n assert tree.is_protected(foo)\n assert tree.is_protected(link)\n\n tree.unprotect(link)\n\n assert not tree.is_protected(link)\n if os.name == \"nt\" and link_name == \"hardlink\":\n # NOTE: NTFS doesn't allow deleting read-only files, which forces us to\n # set write perms on the link, which propagates to the source.\n assert not tree.is_protected(foo)\n else:\n assert tree.is_protected(foo)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote.py_pytest_test_remote_without_hash_jobs_default.assert_tree_hash_jobs_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote.py_pytest_test_remote_without_hash_jobs_default.assert_tree_hash_jobs_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 42, "span_ids": ["test_remote_with_jobs", "imports", "test_remote_without_hash_jobs", "test_remote_with_hash_jobs", "test_remote_without_hash_jobs_default"], "tokens": 315}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.tree import get_cloud_tree\nfrom dvc.tree.gs import GSTree\nfrom dvc.tree.s3 import S3Tree\n\n\ndef test_remote_with_hash_jobs(dvc):\n dvc.config[\"remote\"][\"with_hash_jobs\"] = {\n \"url\": \"s3://bucket/name\",\n \"checksum_jobs\": 100,\n }\n dvc.config[\"core\"][\"checksum_jobs\"] = 200\n\n tree = get_cloud_tree(dvc, name=\"with_hash_jobs\")\n assert tree.hash_jobs == 100\n\n\ndef test_remote_with_jobs(dvc):\n dvc.config[\"remote\"][\"with_jobs\"] = {\n \"url\": \"s3://bucket/name\",\n \"jobs\": 100,\n }\n dvc.config[\"core\"][\"jobs\"] = 200\n\n tree = get_cloud_tree(dvc, name=\"with_jobs\")\n assert tree.jobs == 100\n\n\ndef test_remote_without_hash_jobs(dvc):\n dvc.config[\"remote\"][\"without_hash_jobs\"] = {\"url\": \"s3://bucket/name\"}\n dvc.config[\"core\"][\"checksum_jobs\"] = 200\n\n tree = get_cloud_tree(dvc, name=\"without_hash_jobs\")\n assert tree.hash_jobs == 200\n\n\ndef test_remote_without_hash_jobs_default(dvc):\n dvc.config[\"remote\"][\"without_hash_jobs\"] = {\"url\": \"s3://bucket/name\"}\n\n tree = get_cloud_tree(dvc, name=\"without_hash_jobs\")\n assert tree.hash_jobs == tree.HASH_JOBS", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote_tree.py_test_isdir_test_isdir.for_expected_path_in_tes.assert_remote_tree_isdir_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote_tree.py_test_isdir_test_isdir.for_expected_path_in_tes.assert_remote_tree_isdir_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_remote_tree.py", "file_name": "test_remote_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 35, "end_line": 49, "span_ids": ["test_isdir"], "tokens": 115}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"remote\", remotes, indirect=True)\ndef test_isdir(remote):\n test_cases = [\n (True, \"data\"),\n (True, \"data/\"),\n (True, \"data/subdir\"),\n (True, \"empty_dir\"),\n (False, \"foo\"),\n (False, \"data/alice\"),\n (False, \"data/al\"),\n (False, \"data/subdir/1\"),\n ]\n\n for expected, path in test_cases:\n assert remote.tree.isdir(remote.tree.path_info / path) == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote_tree.py_test_exists_test_exists.for_expected_path_in_tes.assert_remote_tree_exists": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote_tree.py_test_exists_test_exists.for_expected_path_in_tes.assert_remote_tree_exists", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_remote_tree.py", "file_name": "test_remote_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 52, "end_line": 69, "span_ids": ["test_exists"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"remote\", remotes, indirect=True)\ndef test_exists(remote):\n test_cases = [\n (True, \"data\"),\n (True, \"data/\"),\n (True, \"data/subdir\"),\n (True, \"empty_dir\"),\n (True, \"empty_file\"),\n (True, \"foo\"),\n (True, \"data/alice\"),\n (True, \"data/subdir/1\"),\n (False, \"data/al\"),\n (False, \"foo/\"),\n (True, \"data1.txt\"),\n ]\n\n for expected, path in test_cases:\n assert remote.tree.exists(remote.tree.path_info / path) == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote_tree.py_test_copy_preserve_etag_across_buckets_test_makedirs.assert_tree_isdir_empty_d": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote_tree.py_test_copy_preserve_etag_across_buckets_test_makedirs.assert_tree_isdir_empty_d", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_remote_tree.py", "file_name": "test_remote_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 89, "end_line": 115, "span_ids": ["test_copy_preserve_etag_across_buckets", "test_makedirs"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"remote\", [pytest.lazy_fixture(\"s3\")], indirect=True)\ndef test_copy_preserve_etag_across_buckets(remote, dvc):\n s3 = remote.tree.s3\n s3.Bucket(\"another\").create()\n\n another = S3Tree(dvc, {\"url\": \"s3://another\", \"region\": \"us-east-1\"})\n\n from_info = remote.tree.path_info / \"foo\"\n to_info = another.path_info / \"foo\"\n\n remote.tree.copy(from_info, to_info)\n\n from_hash = remote.tree.get_hash(from_info)\n to_hash = another.get_hash(to_info)\n\n assert from_hash == to_hash\n\n\n@pytest.mark.parametrize(\"remote\", remotes, indirect=True)\ndef test_makedirs(remote):\n tree = remote.tree\n empty_dir = remote.tree.path_info / \"empty_dir\" / \"\"\n tree.remove(empty_dir)\n assert not tree.exists(empty_dir)\n tree.makedirs(empty_dir)\n assert tree.exists(empty_dir)\n assert tree.isdir(empty_dir)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote_tree.py_test_isfile_test_isfile.for_expected_path_in_tes.assert_remote_tree_isfile": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote_tree.py_test_isfile_test_isfile.for_expected_path_in_tes.assert_remote_tree_isfile", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_remote_tree.py", "file_name": "test_remote_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 118, "end_line": 137, "span_ids": ["test_isfile"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"remote\", remotes, indirect=True)\ndef test_isfile(remote):\n test_cases = [\n (False, \"empty_dir/\"),\n (True, \"empty_file\"),\n (True, \"foo\"),\n (True, \"data/alice\"),\n (True, \"data/alpha\"),\n (True, \"data/subdir/1\"),\n (True, \"data/subdir/2\"),\n (True, \"data/subdir/3\"),\n (False, \"data/subdir/empty_dir/\"),\n (True, \"data/subdir/empty_file\"),\n (False, \"something-that-does-not-exist\"),\n (False, \"data/subdir/empty-file/\"),\n (False, \"empty_dir\"),\n ]\n\n for expected, path in test_cases:\n assert remote.tree.isfile(remote.tree.path_info / path) == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote_tree.py_test_download_dir_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote_tree.py_test_download_dir_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_remote_tree.py", "file_name": "test_remote_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 140, "end_line": 159, "span_ids": ["test_download_dir"], "tokens": 262}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"remote\", remotes, indirect=True)\ndef test_download_dir(remote, tmpdir):\n path = str(tmpdir / \"data\")\n to_info = PathInfo(path)\n remote.tree.download(remote.tree.path_info / \"data\", to_info)\n assert os.path.isdir(path)\n data_dir = tmpdir / \"data\"\n assert len(list(walk_files(path))) == 7\n assert (data_dir / \"alice\").read_text(encoding=\"utf-8\") == \"alice\"\n assert (data_dir / \"alpha\").read_text(encoding=\"utf-8\") == \"alpha\"\n assert (data_dir / \"subdir-file.txt\").read_text(\n encoding=\"utf-8\"\n ) == \"subdir\"\n assert (data_dir / \"subdir\" / \"1\").read_text(encoding=\"utf-8\") == \"1\"\n assert (data_dir / \"subdir\" / \"2\").read_text(encoding=\"utf-8\") == \"2\"\n assert (data_dir / \"subdir\" / \"3\").read_text(encoding=\"utf-8\") == \"3\"\n assert (data_dir / \"subdir\" / \"empty_file\").read_text(\n encoding=\"utf-8\"\n ) == \"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/plots/test_data.py_from_collections_import_O_test_parse_json.assert_result_expected": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/plots/test_data.py_from_collections_import_O_test_parse_json.assert_result_expected", "embedding": null, "metadata": {"file_path": "tests/unit/repo/plots/test_data.py", "file_name": "test_data.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 22, "span_ids": ["test_parse_json", "imports"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from collections import OrderedDict\n\nimport pytest\n\nfrom dvc.repo.plots.data import _apply_path, _find_data, _lists\n\n\n@pytest.mark.parametrize(\n \"path,expected_result\",\n [\n (\"$.some.path[*].a\", [{\"a\": 1}, {\"a\": 4}]),\n (\"$.some.path\", [{\"a\": 1, \"b\": 2, \"c\": 3}, {\"a\": 4, \"b\": 5, \"c\": 6}]),\n ],\n)\ndef test_parse_json(path, expected_result):\n value = {\n \"some\": {\"path\": [{\"a\": 1, \"b\": 2, \"c\": 3}, {\"a\": 4, \"b\": 5, \"c\": 6}]}\n }\n\n result = _apply_path(value, path=path)\n\n assert result == expected_result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/plots/test_data.py_test_finding_lists_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/plots/test_data.py_test_finding_lists_", "embedding": null, "metadata": {"file_path": "tests/unit/repo/plots/test_data.py", "file_name": "test_data.py", "file_type": "text/x-python", "category": "test", "start_line": 25, "end_line": 49, "span_ids": ["test_finding_data", "test_finding_lists"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"dictionary, expected_result\",\n [\n ({}, []),\n ({\"x\": [\"a\", \"b\", \"c\"]}, [[\"a\", \"b\", \"c\"]]),\n (\n OrderedDict([(\"x\", {\"y\": [\"a\", \"b\"]}), (\"z\", {\"w\": [\"c\", \"d\"]})]),\n [[\"a\", \"b\"], [\"c\", \"d\"]],\n ),\n ],\n)\ndef test_finding_lists(dictionary, expected_result):\n result = _lists(dictionary)\n\n assert list(result) == expected_result\n\n\n@pytest.mark.parametrize(\"fields\", [{\"x\"}, set()])\ndef test_finding_data(fields):\n data = {\"a\": {\"b\": [{\"x\": 2, \"y\": 3}, {\"x\": 1, \"y\": 5}]}}\n\n result = _find_data(data, fields=fields)\n\n assert result == [{\"x\": 2, \"y\": 3}, {\"x\": 1, \"y\": 5}]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_walk_onerror_test_walk_onerror.None_3.for___in_tree_walk_foo_.pass": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_walk_onerror_test_walk_onerror.None_3.for___in_tree_walk_foo_.pass", "embedding": null, "metadata": {"file_path": "tests/unit/scm/test_git.py", "file_name": "test_git.py", "file_type": "text/x-python", "category": "test", "start_line": 42, "end_line": 63, "span_ids": ["test_walk_onerror"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_walk_onerror(tmp_dir, scm):\n def onerror(exc):\n raise exc\n\n tmp_dir.scm_gen(\n {\"foo\": \"foo\"}, commit=\"init\",\n )\n tree = scm.get_tree(\"HEAD\")\n\n # path does not exist\n for _ in tree.walk(\"dir\"):\n pass\n with pytest.raises(OSError):\n for _ in tree.walk(\"dir\", onerror=onerror):\n pass\n\n # path is not a directory\n for _ in tree.walk(\"foo\"):\n pass\n with pytest.raises(OSError):\n for _ in tree.walk(\"foo\", onerror=onerror):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_cache.py_os_test_stage_cache.None_11": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_cache.py_os_test_stage_cache.None_11", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_cache.py", "file_name": "test_cache.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 55, "span_ids": ["imports", "test_stage_cache"], "tokens": 453}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nimport pytest\n\n\ndef test_stage_cache(tmp_dir, dvc, mocker):\n tmp_dir.gen(\"dep\", \"dep\")\n tmp_dir.gen(\n \"script.py\",\n (\n 'open(\"out\", \"w+\").write(\"out\"); '\n 'open(\"out_no_cache\", \"w+\").write(\"out_no_cache\")'\n ),\n )\n stage = dvc.run(\n cmd=\"python script.py\",\n deps=[\"script.py\", \"dep\"],\n outs=[\"out\"],\n outs_no_cache=[\"out_no_cache\"],\n single_stage=True,\n )\n\n with dvc.lock, dvc.state:\n stage.remove(remove_outs=True, force=True)\n\n assert not (tmp_dir / \"out\").exists()\n assert not (tmp_dir / \"out_no_cache\").exists()\n assert not (tmp_dir / \"out.dvc\").exists()\n\n cache_dir = os.path.join(\n dvc.stage_cache.cache_dir,\n \"10\",\n \"10b45372fdf4ec14d3f779c5b256378d7a12780e4c7f549a44138e492f098bfe\",\n )\n cache_file = os.path.join(\n cache_dir,\n \"bb32e04c6da96a7192513390acedbe4cd6123f8fe5b0ba5fffe39716fe87f6f4\",\n )\n\n assert os.path.isdir(cache_dir)\n assert os.listdir(cache_dir) == [os.path.basename(cache_file)]\n assert os.path.isfile(cache_file)\n\n run_spy = mocker.patch(\"dvc.stage.run.cmd_run\")\n checkout_spy = mocker.spy(dvc.cache.local, \"checkout\")\n with dvc.lock, dvc.state:\n stage.run()\n\n assert not run_spy.called\n assert checkout_spy.call_count == 2\n\n assert (tmp_dir / \"out\").exists()\n assert (tmp_dir / \"out_no_cache\").exists()\n assert (tmp_dir / \"out\").read_text() == \"out\"\n assert (tmp_dir / \"out_no_cache\").read_text() == \"out_no_cache\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_cache.py_test_stage_cache_params_test_stage_cache_params.None_11": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_cache.py_test_stage_cache_params_test_stage_cache_params.None_11", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_cache.py", "file_name": "test_cache.py", "file_type": "text/x-python", "category": "test", "start_line": 56, "end_line": 106, "span_ids": ["test_stage_cache_params"], "tokens": 487}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stage_cache_params(tmp_dir, dvc, mocker):\n tmp_dir.gen(\"params.yaml\", \"foo: 1\\nbar: 2\")\n tmp_dir.gen(\"myparams.yaml\", \"baz: 3\\nqux: 4\")\n tmp_dir.gen(\n \"script.py\",\n (\n 'open(\"out\", \"w+\").write(\"out\"); '\n 'open(\"out_no_cache\", \"w+\").write(\"out_no_cache\")'\n ),\n )\n stage = dvc.run(\n cmd=\"python script.py\",\n params=[\"foo,bar\", \"myparams.yaml:baz,qux\"],\n outs=[\"out\"],\n outs_no_cache=[\"out_no_cache\"],\n single_stage=True,\n )\n\n with dvc.lock, dvc.state:\n stage.remove(remove_outs=True, force=True)\n\n assert not (tmp_dir / \"out\").exists()\n assert not (tmp_dir / \"out_no_cache\").exists()\n assert not (tmp_dir / \"out.dvc\").exists()\n\n cache_dir = os.path.join(\n dvc.stage_cache.cache_dir,\n \"65\",\n \"651d0a5b82e05e48b03acf44954f6a8599760e652a143d517a17d1065eca61a1\",\n )\n cache_file = os.path.join(\n cache_dir,\n \"2196a5a4dd24c5759437511fcf9d6aa66b259e1dac58e3f212aefd1797a6f114\",\n )\n\n assert os.path.isdir(cache_dir)\n assert os.listdir(cache_dir) == [os.path.basename(cache_file)]\n assert os.path.isfile(cache_file)\n\n run_spy = mocker.patch(\"dvc.stage.run.cmd_run\")\n checkout_spy = mocker.spy(dvc.cache.local, \"checkout\")\n with dvc.lock, dvc.state:\n stage.run()\n\n assert not run_spy.called\n assert checkout_spy.call_count == 2\n\n assert (tmp_dir / \"out\").exists()\n assert (tmp_dir / \"out_no_cache\").exists()\n assert (tmp_dir / \"out\").read_text() == \"out\"\n assert (tmp_dir / \"out_no_cache\").read_text() == \"out_no_cache\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_os_lock_data.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_os_lock_data.return._", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_loader_pipeline_file.py", "file_name": "test_loader_pipeline_file.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 25, "span_ids": ["imports", "lock_data", "stage_data"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nfrom copy import deepcopy\nfrom itertools import chain\n\nimport pytest\n\nfrom dvc.dvcfile import PIPELINE_FILE, Dvcfile\nfrom dvc.hash_info import HashInfo\nfrom dvc.stage import PipelineStage, create_stage\nfrom dvc.stage.loader import StageLoader\nfrom dvc.stage.serialize import split_params_deps\n\n\n@pytest.fixture\ndef stage_data():\n return {\"cmd\": \"command\", \"deps\": [\"foo\"], \"outs\": [\"bar\"]}\n\n\n@pytest.fixture\ndef lock_data():\n return {\n \"cmd\": \"command\",\n \"deps\": [{\"path\": \"foo\", \"md5\": \"foo_checksum\"}],\n \"outs\": [{\"path\": \"bar\", \"md5\": \"bar_checksum\"}],\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_fill_from_lock_missing_params_section_test_fill_from_lock_missing_params_section.assert_not_params_deps_0_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_fill_from_lock_missing_params_section_test_fill_from_lock_missing_params_section.assert_not_params_deps_0_", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_loader_pipeline_file.py", "file_name": "test_loader_pipeline_file.py", "file_type": "text/x-python", "category": "test", "start_line": 78, "end_line": 89, "span_ids": ["test_fill_from_lock_missing_params_section"], "tokens": 108}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_fill_from_lock_missing_params_section(dvc, lock_data):\n stage = create_stage(\n PipelineStage,\n dvc,\n PIPELINE_FILE,\n deps=[\"foo\"],\n outs=[\"bar\"],\n params=[\"lorem\", \"lorem.ipsum\", {\"myparams.yaml\": [\"ipsum\"]}],\n )\n params_deps = split_params_deps(stage)[0]\n StageLoader.fill_from_lock(stage, lock_data)\n assert not params_deps[0].hash_info and not params_deps[1].hash_info", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_fill_from_lock_missing_checksums_test_fill_from_lock_missing_checksums.assert_not_stage_deps_1_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_fill_from_lock_missing_checksums_test_fill_from_lock_missing_checksums.assert_not_stage_deps_1_", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_loader_pipeline_file.py", "file_name": "test_loader_pipeline_file.py", "file_type": "text/x-python", "category": "test", "start_line": 92, "end_line": 105, "span_ids": ["test_fill_from_lock_missing_checksums"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_fill_from_lock_missing_checksums(dvc, lock_data):\n stage = create_stage(\n PipelineStage,\n dvc,\n PIPELINE_FILE,\n deps=[\"foo\", \"foo1\"],\n outs=[\"bar\", \"bar1\"],\n )\n\n StageLoader.fill_from_lock(stage, lock_data)\n\n assert stage.deps[0].hash_info == HashInfo(\"md5\", \"foo_checksum\")\n assert stage.outs[0].hash_info == HashInfo(\"md5\", \"bar_checksum\")\n assert not stage.deps[1].hash_info and not stage.outs[1].hash_info", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_fill_from_lock_with_missing_sections_test_fill_from_lock_empty_data.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_fill_from_lock_with_missing_sections_test_fill_from_lock_empty_data.None_1", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_loader_pipeline_file.py", "file_name": "test_loader_pipeline_file.py", "file_type": "text/x-python", "category": "test", "start_line": 122, "end_line": 146, "span_ids": ["test_fill_from_lock_empty_data", "test_fill_from_lock_with_missing_sections"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_fill_from_lock_with_missing_sections(dvc, lock_data):\n stage = create_stage(\n PipelineStage, dvc, PIPELINE_FILE, deps=[\"foo\"], outs=[\"bar\"]\n )\n lock = deepcopy(lock_data)\n del lock[\"deps\"]\n StageLoader.fill_from_lock(stage, lock)\n assert not stage.deps[0].hash_info\n assert stage.outs[0].hash_info == HashInfo(\"md5\", \"bar_checksum\")\n\n lock = deepcopy(lock_data)\n del lock[\"outs\"]\n StageLoader.fill_from_lock(stage, lock)\n assert stage.deps[0].hash_info == HashInfo(\"md5\", \"foo_checksum\")\n assert not stage.outs[0].hash_info\n\n\ndef test_fill_from_lock_empty_data(dvc):\n stage = create_stage(\n PipelineStage, dvc, PIPELINE_FILE, deps=[\"foo\"], outs=[\"bar\"]\n )\n StageLoader.fill_from_lock(stage, None)\n assert not stage.deps[0].hash_info and not stage.outs[0].hash_info\n StageLoader.fill_from_lock(stage, {})\n assert not stage.deps[0].hash_info and not stage.outs[0].hash_info", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_load_changed_command_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_load_changed_command_", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_loader_pipeline_file.py", "file_name": "test_loader_pipeline_file.py", "file_type": "text/x-python", "category": "test", "start_line": 202, "end_line": 233, "span_ids": ["test_load_stage_mapping", "test_load_changed_command", "test_load_stage_wdir_and_path_correctly"], "tokens": 306}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_load_changed_command(dvc, stage_data, lock_data):\n dvcfile = Dvcfile(dvc, PIPELINE_FILE)\n stage = StageLoader.load_stage(dvcfile, \"stage-1\", stage_data)\n assert not stage.cmd_changed\n assert stage.cmd == \"command\"\n\n lock_data[\"cmd\"] = \"different-command\"\n stage = StageLoader.load_stage(dvcfile, \"stage-1\", stage_data, lock_data)\n assert stage.cmd_changed\n assert stage.cmd == \"command\"\n\n\ndef test_load_stage_wdir_and_path_correctly(dvc, stage_data, lock_data):\n stage_data[\"wdir\"] = \"dir\"\n dvcfile = Dvcfile(dvc, PIPELINE_FILE)\n stage = StageLoader.load_stage(dvcfile, \"stage-1\", stage_data, lock_data)\n\n assert stage.wdir == os.path.abspath(\"dir\")\n assert stage.path == os.path.abspath(PIPELINE_FILE)\n\n\ndef test_load_stage_mapping(dvc, stage_data, lock_data):\n dvcfile = Dvcfile(dvc, PIPELINE_FILE)\n loader = StageLoader(\n dvcfile, {\"stages\": {\"stage\": stage_data}}, {\"stage\": lock_data}\n )\n assert len(loader) == 1\n assert \"stage\" in loader\n assert \"stage1\" not in loader\n assert loader.keys() == {\"stage\"}\n assert isinstance(loader[\"stage\"], PipelineStage)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_file.py_os_test_outs_sorted.assert_to_pipeline_file_s": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_file.py_os_test_outs_sorted.assert_to_pipeline_file_s", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_serialize_pipeline_file.py", "file_name": "test_serialize_pipeline_file.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 64, "span_ids": ["test_outs_sorted", "imports", "test_wdir", "test_cmd", "to_pipeline_file", "test_deps_sorted"], "tokens": 415}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nimport pytest\nfrom voluptuous import Schema as _Schema\n\nfrom dvc import output\nfrom dvc.dvcfile import PIPELINE_FILE\nfrom dvc.schema import SINGLE_PIPELINE_STAGE_SCHEMA\nfrom dvc.stage import PipelineStage, create_stage\nfrom dvc.stage.serialize import to_pipeline_file as _to_pipeline_file\n\nkwargs = {\"name\": \"something\", \"cmd\": \"command\", \"path\": PIPELINE_FILE}\nSchema = _Schema(SINGLE_PIPELINE_STAGE_SCHEMA)\n\n\ndef to_pipeline_file(stage):\n \"\"\"Validate schema on each serialization.\"\"\"\n e = _to_pipeline_file(stage)\n assert len(Schema(e)) == 1\n return e\n\n\ndef test_cmd(dvc):\n stage = create_stage(PipelineStage, dvc, **kwargs)\n entry = to_pipeline_file(stage)\n assert entry == {\"something\": {\"cmd\": \"command\"}}\n\n\ndef test_wdir(dvc):\n stage = create_stage(PipelineStage, dvc, **kwargs)\n assert stage.PARAM_WDIR not in to_pipeline_file(stage)[\"something\"]\n\n stage.wdir = os.curdir\n assert stage.PARAM_WDIR not in to_pipeline_file(stage)[\"something\"]\n\n stage.wdir = \"some-dir\"\n assert to_pipeline_file(stage)[\"something\"][stage.PARAM_WDIR] == \"some-dir\"\n\n\ndef test_deps_sorted(dvc):\n stage = create_stage(\n PipelineStage, dvc, deps=[\"a\", \"quick\", \"lazy\", \"fox\"], **kwargs\n )\n assert to_pipeline_file(stage)[\"something\"][stage.PARAM_DEPS] == [\n \"a\",\n \"fox\",\n \"lazy\",\n \"quick\",\n ]\n\n\ndef test_outs_sorted(dvc):\n stage = create_stage(\n PipelineStage,\n dvc,\n outs=[\"too\", \"many\", \"outs\"],\n deps=[\"foo\"],\n **kwargs,\n )\n assert to_pipeline_file(stage)[\"something\"][stage.PARAM_OUTS] == [\n \"many\",\n \"outs\",\n \"too\",\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_file.py_test_params_sorted_test_params_sorted.assert_to_pipeline_file_s": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_file.py_test_params_sorted_test_params_sorted.assert_to_pipeline_file_s", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_serialize_pipeline_file.py", "file_name": "test_serialize_pipeline_file.py", "file_type": "text/x-python", "category": "test", "start_line": 67, "end_line": 82, "span_ids": ["test_params_sorted"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_params_sorted(dvc):\n params = [\n \"lorem\",\n \"ipsum\",\n {\"custom.yaml\": [\"wxyz\", \"pqrs\", \"baz\"]},\n {\"params.yaml\": [\"barr\"]},\n ]\n stage = create_stage(\n PipelineStage, dvc, outs=[\"bar\"], deps=[\"foo\"], params=params, **kwargs\n )\n assert to_pipeline_file(stage)[\"something\"][stage.PARAM_PARAMS] == [\n \"barr\",\n \"ipsum\",\n \"lorem\",\n {\"custom.yaml\": [\"baz\", \"pqrs\", \"wxyz\"]},\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_file.py_test_params_file_sorted_test_params_file_sorted.assert_to_pipeline_file_s": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_file.py_test_params_file_sorted_test_params_file_sorted.assert_to_pipeline_file_s", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_serialize_pipeline_file.py", "file_name": "test_serialize_pipeline_file.py", "file_type": "text/x-python", "category": "test", "start_line": 85, "end_line": 100, "span_ids": ["test_params_file_sorted"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_params_file_sorted(dvc):\n params = [\n \"lorem\",\n \"ipsum\",\n {\"custom.yaml\": [\"wxyz\", \"pqrs\", \"baz\"]},\n {\"a-file-of-params.yaml\": [\"barr\"]},\n ]\n stage = create_stage(\n PipelineStage, dvc, outs=[\"bar\"], deps=[\"foo\"], params=params, **kwargs\n )\n assert to_pipeline_file(stage)[\"something\"][stage.PARAM_PARAMS] == [\n \"ipsum\",\n \"lorem\",\n {\"a-file-of-params.yaml\": [\"barr\"]},\n {\"custom.yaml\": [\"baz\", \"pqrs\", \"wxyz\"]},\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_file.py_test_outs_and_outs_flags_are_sorted_test_outs_and_outs_flags_are_sorted.assert_list_serialized_ou": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_file.py_test_outs_and_outs_flags_are_sorted_test_outs_and_outs_flags_are_sorted.assert_list_serialized_ou", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_serialize_pipeline_file.py", "file_name": "test_serialize_pipeline_file.py", "file_type": "text/x-python", "category": "test", "start_line": 103, "end_line": 123, "span_ids": ["test_outs_and_outs_flags_are_sorted"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"typ, extra\",\n [(\"plots\", {\"plot\": True}), (\"metrics\", {\"metric\": True}), (\"outs\", {})],\n)\ndef test_outs_and_outs_flags_are_sorted(dvc, typ, extra):\n stage = create_stage(PipelineStage, dvc, deps=[\"input\"], **kwargs)\n stage.outs += output.loads_from(stage, [\"barr\"], use_cache=False, **extra)\n stage.outs += output.loads_from(\n stage, [\"foobar\"], use_cache=False, persist=True, **extra\n )\n stage.outs += output.loads_from(stage, [\"foo\"], persist=True, **extra)\n stage.outs += output.loads_from(stage, [\"bar\"], **extra)\n\n serialized_outs = to_pipeline_file(stage)[\"something\"][typ]\n assert serialized_outs == [\n \"bar\",\n {\"barr\": {\"cache\": False}},\n {\"foo\": {\"persist\": True}},\n {\"foobar\": {\"cache\": False, \"persist\": True}},\n ]\n assert list(serialized_outs[3][\"foobar\"].keys()) == [\"cache\", \"persist\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_file.py_test_plot_props_test_always_changed.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_file.py_test_plot_props_test_always_changed.None_1", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_serialize_pipeline_file.py", "file_name": "test_serialize_pipeline_file.py", "file_type": "text/x-python", "category": "test", "start_line": 126, "end_line": 158, "span_ids": ["test_always_changed", "test_plot_props", "test_frozen"], "tokens": 253}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_plot_props(dvc):\n props = {\"x\": \"1\"}\n stage = create_stage(PipelineStage, dvc, plots=[\"plot_file\"], **kwargs)\n stage.outs[0].plot = props\n\n assert to_pipeline_file(stage)[\"something\"][stage.PARAM_PLOTS] == [\n {\"plot_file\": props}\n ]\n\n\ndef test_frozen(dvc):\n stage = create_stage(\n PipelineStage, dvc, outs=[\"output\"], deps=[\"input\"], **kwargs\n )\n assert stage.PARAM_FROZEN not in to_pipeline_file(stage)[\"something\"]\n\n stage = create_stage(PipelineStage, dvc, **kwargs, frozen=True)\n assert to_pipeline_file(stage)[\"something\"][stage.PARAM_FROZEN] is True\n\n\ndef test_always_changed(dvc):\n stage = create_stage(\n PipelineStage, dvc, outs=[\"output\"], deps=[\"input\"], **kwargs\n )\n assert (\n stage.PARAM_ALWAYS_CHANGED not in to_pipeline_file(stage)[\"something\"]\n )\n\n stage = create_stage(PipelineStage, dvc, **kwargs, always_changed=True)\n assert (\n to_pipeline_file(stage)[\"something\"][stage.PARAM_ALWAYS_CHANGED]\n is True\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_file.py_test_order_test_order.assert_list_to_pipeline_f": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_file.py_test_order_test_order.assert_list_to_pipeline_f", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_serialize_pipeline_file.py", "file_name": "test_serialize_pipeline_file.py", "file_type": "text/x-python", "category": "test", "start_line": 161, "end_line": 180, "span_ids": ["test_order"], "tokens": 111}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_order(dvc):\n stage = create_stage(\n PipelineStage,\n dvc,\n outs=[\"output\"],\n deps=[\"input\"],\n **kwargs,\n always_changed=True,\n frozen=True,\n )\n # `create_stage` checks for existence of `wdir`\n stage.wdir = \"some-dir\"\n assert list(to_pipeline_file(stage)[\"something\"].keys()) == [\n \"cmd\",\n \"wdir\",\n \"deps\",\n \"outs\",\n \"frozen\",\n \"always_changed\",\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_file.py_test_order_deps_outs_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_file.py_test_order_deps_outs_", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_serialize_pipeline_file.py", "file_name": "test_serialize_pipeline_file.py", "file_type": "text/x-python", "category": "test", "start_line": 183, "end_line": 197, "span_ids": ["test_order_deps_outs"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"typ\", [\"outs\", \"metrics\", \"plots\", \"params\", \"deps\", None]\n)\ndef test_order_deps_outs(dvc, typ):\n all_types = [\"deps\", \"params\", \"outs\", \"metrics\", \"plots\"]\n all_types = [item for item in all_types if item != typ]\n extra = {key: [f\"foo-{i}\"] for i, key in enumerate(all_types)}\n\n stage = create_stage(PipelineStage, dvc, **kwargs, **extra)\n assert typ not in to_pipeline_file(stage)[\"something\"]\n assert (\n list(to_pipeline_file(stage)[\"something\"].keys())\n == [\"cmd\"] + all_types\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_from_collections_import_O_test_lock_deps.assert_to_single_stage_lo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_from_collections_import_O_test_lock_deps.assert_to_single_stage_lo", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_serialize_pipeline_lock.py", "file_name": "test_serialize_pipeline_lock.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 40, "span_ids": ["to_single_stage_lockfile", "imports", "test_lock", "test_lock_deps"], "tokens": 308}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from collections import OrderedDict\n\nimport pytest\nfrom voluptuous import Schema as _Schema\n\nfrom dvc.dvcfile import PIPELINE_FILE\nfrom dvc.hash_info import HashInfo\nfrom dvc.schema import LOCK_FILE_STAGE_SCHEMA, LOCKFILE_SCHEMA\nfrom dvc.stage import PipelineStage, create_stage\nfrom dvc.stage.serialize import DEFAULT_PARAMS_FILE, to_lockfile\nfrom dvc.stage.serialize import (\n to_single_stage_lockfile as _to_single_stage_lockfile,\n)\nfrom dvc.stage.utils import split_params_deps\n\nkwargs = {\"name\": \"something\", \"cmd\": \"command\", \"path\": PIPELINE_FILE}\nSchema = _Schema(LOCK_FILE_STAGE_SCHEMA)\n\n\ndef to_single_stage_lockfile(stage):\n \"\"\"Validate schema on each serialization.\"\"\"\n e = _to_single_stage_lockfile(stage)\n assert Schema(e)\n return e\n\n\ndef test_lock(dvc):\n stage = create_stage(PipelineStage, dvc, **kwargs)\n assert to_single_stage_lockfile(stage) == {\"cmd\": \"command\"}\n\n\ndef test_lock_deps(dvc):\n stage = create_stage(PipelineStage, dvc, deps=[\"input\"], **kwargs)\n stage.deps[0].hash_info = HashInfo(\"md5\", \"md-five\")\n assert to_single_stage_lockfile(stage) == OrderedDict(\n [\n (\"cmd\", \"command\"),\n (\"deps\", [OrderedDict([(\"path\", \"input\"), (\"md5\", \"md-five\")])]),\n ]\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_lock_deps_order_test_lock_deps_order.assert_to_single_stage_lo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_lock_deps_order_test_lock_deps_order.assert_to_single_stage_lo", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_serialize_pipeline_lock.py", "file_name": "test_serialize_pipeline_lock.py", "file_type": "text/x-python", "category": "test", "start_line": 43, "end_line": 60, "span_ids": ["test_lock_deps_order"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_lock_deps_order(dvc):\n stage = create_stage(\n PipelineStage, dvc, deps=[\"input1\", \"input0\"], **kwargs\n )\n stage.deps[0].hash_info = HashInfo(\"md5\", \"md-one1\")\n stage.deps[1].hash_info = HashInfo(\"md5\", \"md-zer0\")\n assert to_single_stage_lockfile(stage) == OrderedDict(\n [\n (\"cmd\", \"command\"),\n (\n \"deps\",\n [\n OrderedDict([(\"path\", \"input0\"), (\"md5\", \"md-zer0\")]),\n OrderedDict([(\"path\", \"input1\"), (\"md5\", \"md-one1\")]),\n ],\n ),\n ]\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_lock_params_test_lock_params.assert_to_single_stage_lo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_lock_params_test_lock_params.assert_to_single_stage_lo", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_serialize_pipeline_lock.py", "file_name": "test_serialize_pipeline_lock.py", "file_type": "text/x-python", "category": "test", "start_line": 63, "end_line": 72, "span_ids": ["test_lock_params"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_lock_params(dvc):\n stage = create_stage(\n PipelineStage, dvc, params=[\"lorem.ipsum\", \"abc\"], **kwargs\n )\n stage.deps[0].hash_info = HashInfo(\n \"params\", {\"lorem.ipsum\": {\"lorem1\": 1, \"lorem2\": 2}, \"abc\": 3}\n )\n assert to_single_stage_lockfile(stage)[\"params\"][\n DEFAULT_PARAMS_FILE\n ] == OrderedDict([(\"abc\", 3), (\"lorem.ipsum\", {\"lorem1\": 1, \"lorem2\": 2})])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_lock_params_file_sorted_test_lock_params_file_sorted.assert_to_single_stage_lo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_lock_params_file_sorted_test_lock_params_file_sorted.assert_to_single_stage_lo", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_serialize_pipeline_lock.py", "file_name": "test_serialize_pipeline_lock.py", "file_type": "text/x-python", "category": "test", "start_line": 75, "end_line": 113, "span_ids": ["test_lock_params_file_sorted"], "tokens": 329}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_lock_params_file_sorted(dvc):\n stage = create_stage(\n PipelineStage,\n dvc,\n params=[\n \"lorem.ipsum\",\n \"abc\",\n {\"myparams.yaml\": [\"foo\", \"foobar\"]},\n {\"a-params-file.yaml\": [\"bar\", \"barr\"]},\n ],\n **kwargs\n )\n stage.deps[0].hash_info = HashInfo(\n \"params\", {\"lorem.ipsum\": {\"lorem1\": 1, \"lorem2\": 2}, \"abc\": 3}\n )\n stage.deps[1].hash_info = HashInfo(\n \"params\", {\"foo\": [\"f\", \"o\", \"o\"], \"foobar\": \"foobar\"}\n )\n stage.deps[2].hash_info = HashInfo(\n \"params\", {\"bar\": [\"b\", \"a\", \"r\"], \"barr\": \"barr\"}\n )\n assert to_single_stage_lockfile(stage)[\"params\"] == OrderedDict(\n [\n (\n DEFAULT_PARAMS_FILE,\n OrderedDict(\n [(\"abc\", 3), (\"lorem.ipsum\", {\"lorem1\": 1, \"lorem2\": 2})]\n ),\n ),\n (\n \"a-params-file.yaml\",\n OrderedDict([(\"bar\", [\"b\", \"a\", \"r\"]), (\"barr\", \"barr\")]),\n ),\n (\n \"myparams.yaml\",\n OrderedDict([(\"foo\", [\"f\", \"o\", \"o\"]), (\"foobar\", \"foobar\")]),\n ),\n ]\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_lock_params_no_values_filled_test_lock_outs.assert_to_single_stage_lo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_lock_params_no_values_filled_test_lock_outs.assert_to_single_stage_lo", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_serialize_pipeline_lock.py", "file_name": "test_serialize_pipeline_lock.py", "file_type": "text/x-python", "category": "test", "start_line": 116, "end_line": 132, "span_ids": ["test_lock_outs", "test_lock_params_no_values_filled"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_lock_params_no_values_filled(dvc):\n stage = create_stage(\n PipelineStage, dvc, params=[\"lorem.ipsum\", \"abc\"], **kwargs\n )\n assert to_single_stage_lockfile(stage) == {\"cmd\": \"command\"}\n\n\n@pytest.mark.parametrize(\"typ\", [\"plots\", \"metrics\", \"outs\"])\ndef test_lock_outs(dvc, typ):\n stage = create_stage(PipelineStage, dvc, **{typ: [\"input\"]}, **kwargs)\n stage.outs[0].hash_info = HashInfo(\"md5\", \"md-five\")\n assert to_single_stage_lockfile(stage) == OrderedDict(\n [\n (\"cmd\", \"command\"),\n (\"outs\", [OrderedDict([(\"path\", \"input\"), (\"md5\", \"md-five\")])]),\n ]\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_lock_outs_order_test_lock_outs_order.assert_to_single_stage_lo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_lock_outs_order_test_lock_outs_order.assert_to_single_stage_lo", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_serialize_pipeline_lock.py", "file_name": "test_serialize_pipeline_lock.py", "file_type": "text/x-python", "category": "test", "start_line": 135, "end_line": 153, "span_ids": ["test_lock_outs_order"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"typ\", [\"plots\", \"metrics\", \"outs\"])\ndef test_lock_outs_order(dvc, typ):\n stage = create_stage(\n PipelineStage, dvc, **{typ: [\"input1\", \"input0\"]}, **kwargs\n )\n stage.outs[0].hash_info = HashInfo(\"md5\", \"md-one1\")\n stage.outs[1].hash_info = HashInfo(\"md5\", \"md-zer0\")\n assert to_single_stage_lockfile(stage) == OrderedDict(\n [\n (\"cmd\", \"command\"),\n (\n \"outs\",\n [\n OrderedDict([(\"path\", \"input0\"), (\"md5\", \"md-zer0\")]),\n OrderedDict([(\"path\", \"input1\"), (\"md5\", \"md-one1\")]),\n ],\n ),\n ]\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_order_test_order.assert_to_single_stage_lo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_order_test_order.assert_to_single_stage_lo", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_serialize_pipeline_lock.py", "file_name": "test_serialize_pipeline_lock.py", "file_type": "text/x-python", "category": "test", "start_line": 176, "end_line": 198, "span_ids": ["test_order"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_order(dvc):\n stage = create_stage(\n PipelineStage,\n dvc,\n deps=[\"input\"],\n outs=[\"output\"],\n params=[\"foo-param\"],\n **kwargs\n )\n params, deps = split_params_deps(stage)\n\n deps[0].hash_info = HashInfo(\"md5\", \"md-five\")\n params[0].hash_info = HashInfo(\"params\", {\"foo-param\": \"value\"})\n stage.outs[0].hash_info = HashInfo(\"md5\", \"md5-output\")\n\n assert to_single_stage_lockfile(stage) == OrderedDict(\n [\n (\"cmd\", \"command\"),\n (\"deps\", [{\"path\": \"input\", \"md5\": \"md-five\"}]),\n (\"params\", {\"params.yaml\": {\"foo-param\": \"value\"}}),\n (\"outs\", [{\"path\": \"output\", \"md5\": \"md5-output\"}]),\n ]\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_to_lockfile_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_to_lockfile_", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_serialize_pipeline_lock.py", "file_name": "test_serialize_pipeline_lock.py", "file_type": "text/x-python", "category": "test", "start_line": 201, "end_line": 215, "span_ids": ["test_to_lockfile"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_to_lockfile(dvc):\n stage = create_stage(PipelineStage, dvc, deps=[\"input\"], **kwargs)\n stage.deps[0].hash_info = HashInfo(\"md5\", \"md-five\")\n entry = to_lockfile(stage)\n assert len(entry) == 1\n _Schema(LOCKFILE_SCHEMA)(entry)\n assert entry == {\n \"something\": OrderedDict(\n [\n (\"cmd\", \"command\"),\n (\"deps\", [{\"path\": \"input\", \"md5\": \"md-five\"}]),\n ]\n )\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_stage.py_os_test_path_conversion.assert_stage_dumpd_wdi": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_stage.py_os_test_path_conversion.assert_stage_dumpd_wdi", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_stage.py", "file_name": "test_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 56, "span_ids": ["imports", "test_path_conversion", "test_wdir_default_ignored", "test_meta_ignored", "test_wdir_non_default_is_not_ignored", "test_stage_checksum"], "tokens": 454}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport signal\nimport subprocess\nimport threading\n\nimport mock\nimport pytest\n\nfrom dvc.dependency.repo import RepoDependency\nfrom dvc.stage import Stage\nfrom dvc.stage.exceptions import StageUpdateError\n\nTEST_STAGE_DICT = {\n \"md5\": \"123456\",\n \"cmd\": \"mycmd\",\n \"outs\": [{\"path\": \"a\", \"md5\": \"123456789\"}],\n \"deps\": [{\"path\": \"b\", \"md5\": \"987654321\"}],\n}\n\n\ndef test_stage_checksum():\n stage = Stage(None, \"path\", cmd=\"mycmd\")\n\n with mock.patch.object(stage, \"dumpd\", return_value=TEST_STAGE_DICT):\n assert stage.compute_md5() == \"e9521a22111493406ea64a88cda63e0b\"\n\n\ndef test_wdir_default_ignored():\n stage = Stage(None, \"path\", cmd=\"mycmd\")\n d = dict(TEST_STAGE_DICT, wdir=\".\")\n\n with mock.patch.object(stage, \"dumpd\", return_value=d):\n assert stage.compute_md5() == \"e9521a22111493406ea64a88cda63e0b\"\n\n\ndef test_wdir_non_default_is_not_ignored():\n stage = Stage(None, \"path\", cmd=\"mycmd\")\n d = dict(TEST_STAGE_DICT, wdir=\"..\")\n\n with mock.patch.object(stage, \"dumpd\", return_value=d):\n assert stage.compute_md5() == \"2ceba15e87f6848aa756502c1e6d24e9\"\n\n\ndef test_meta_ignored():\n stage = Stage(None, \"path\", cmd=\"mycmd\")\n d = dict(TEST_STAGE_DICT, meta={\"author\": \"Suor\"})\n\n with mock.patch.object(stage, \"dumpd\", return_value=d):\n assert stage.compute_md5() == \"e9521a22111493406ea64a88cda63e0b\"\n\n\ndef test_path_conversion(dvc):\n stage = Stage(dvc, \"path\")\n\n stage.wdir = os.path.join(\"..\", \"..\")\n assert stage.dumpd()[\"wdir\"] == \"../..\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_stage.py_test_stage_update_test_stage_update.with_pytest_raises_StageU.stage_update_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_stage.py_test_stage_update_test_stage_update.with_pytest_raises_StageU.stage_update_", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_stage.py", "file_name": "test_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 59, "end_line": 75, "span_ids": ["test_stage_update"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stage_update(mocker):\n dep = RepoDependency({\"url\": \"example.com\"}, None, \"dep_path\")\n mocker.patch.object(dep, \"update\", return_value=None)\n\n stage = Stage(None, \"path\", deps=[dep])\n reproduce = mocker.patch.object(stage, \"reproduce\")\n is_repo_import = mocker.patch(\n __name__ + \".Stage.is_repo_import\", new_callable=mocker.PropertyMock\n )\n\n is_repo_import.return_value = True\n stage.update()\n assert reproduce.called_once_with()\n\n is_repo_import.return_value = False\n with pytest.raises(StageUpdateError):\n stage.update()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_utils.py_os_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_utils.py_os_", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 21, "span_ids": ["imports", "test_resolve_paths"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nfrom dvc.stage.utils import resolve_paths\n\n\ndef test_resolve_paths():\n p = os.path.join(\"dir\", \"subdir\")\n file_path = os.path.join(p, \"dvc.yaml\")\n\n path, wdir = resolve_paths(path=file_path, wdir=\"dir\")\n assert path == os.path.abspath(file_path)\n assert wdir == os.path.abspath(os.path.join(p, \"dir\"))\n\n path, wdir = resolve_paths(path=file_path)\n assert path == os.path.abspath(file_path)\n assert wdir == os.path.abspath(p)\n\n path, wdir = resolve_paths(path=file_path, wdir=\"../../some-dir\")\n assert path == os.path.abspath(file_path)\n assert wdir == os.path.abspath(\"some-dir\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dvcfile.py_pytest_test_stage_load_on_invalid_data.None_1.assert_dvcfile_validate_d": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dvcfile.py_pytest_test_stage_load_on_invalid_data.None_1.assert_dvcfile_validate_d", "embedding": null, "metadata": {"file_path": "tests/unit/test_dvcfile.py", "file_name": "test_dvcfile.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 62, "span_ids": ["test_pipelines_file", "imports", "test_pipelines_single_stage_file", "test_stage_load_on_invalid_data", "test_stage_load_on_not_existing_file"], "tokens": 429}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.dvcfile import (\n PIPELINE_FILE,\n PIPELINE_LOCK,\n Dvcfile,\n PipelineFile,\n SingleStageFile,\n)\nfrom dvc.stage import PipelineStage\nfrom dvc.stage.exceptions import (\n StageFileDoesNotExistError,\n StageFileFormatError,\n StageFileIsNotDvcFileError,\n)\nfrom dvc.utils.fs import remove\nfrom dvc.utils.serialize import dump_yaml\n\n\n@pytest.mark.parametrize(\n \"path\",\n [\n \"pipelines.yaml\",\n \"pipelines.yml\",\n \"custom-pipelines.yml\",\n \"custom-pipelines.yaml\",\n \"../models/pipelines.yml\",\n ],\n)\ndef test_pipelines_file(path):\n file_obj = Dvcfile(object(), path)\n assert isinstance(file_obj, PipelineFile)\n\n\n@pytest.mark.parametrize(\n \"path\", [\"Dvcfile\", \"stage.dvc\", \"../models/stage.dvc\"]\n)\ndef test_pipelines_single_stage_file(path):\n file_obj = Dvcfile(object(), path)\n assert isinstance(file_obj, SingleStageFile)\n\n\n@pytest.mark.parametrize(\"file\", [\"stage.dvc\", \"dvc.yaml\"])\ndef test_stage_load_on_not_existing_file(tmp_dir, dvc, file):\n dvcfile = Dvcfile(dvc, file)\n assert not dvcfile.exists()\n with pytest.raises(StageFileDoesNotExistError):\n assert dvcfile.stages.values()\n (tmp_dir / file).mkdir()\n with pytest.raises(StageFileIsNotDvcFileError):\n assert dvcfile.stages.values()\n\n\n@pytest.mark.parametrize(\"file\", [\"stage.dvc\", \"dvc.yaml\"])\ndef test_stage_load_on_invalid_data(tmp_dir, dvc, file):\n data = {\"is_this_a_valid_dvcfile\": False}\n dump_yaml(file, data)\n dvcfile = Dvcfile(dvc, file)\n with pytest.raises(StageFileFormatError):\n assert dvcfile.stages\n with pytest.raises(StageFileFormatError):\n assert dvcfile.validate(data, file)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dvcfile.py_test_dump_stage_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dvcfile.py_test_dump_stage_", "embedding": null, "metadata": {"file_path": "tests/unit/test_dvcfile.py", "file_name": "test_dvcfile.py", "file_type": "text/x-python", "category": "test", "start_line": 65, "end_line": 86, "span_ids": ["test_dump_stage"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_dump_stage(tmp_dir, dvc):\n stage = PipelineStage(\n dvc, cmd=\"command\", name=\"stage_name\", path=\"dvc.yaml\"\n )\n dvcfile = Dvcfile(dvc, \"dvc.yaml\")\n\n dvcfile.dump(stage, update_lock=False, update_pipeline=False)\n assert not (tmp_dir / PIPELINE_FILE).exists()\n assert not (tmp_dir / PIPELINE_LOCK).exists()\n\n dvcfile.dump(stage, update_pipeline=False)\n assert not (tmp_dir / PIPELINE_FILE).exists()\n assert (tmp_dir / PIPELINE_LOCK).exists()\n assert dvcfile._lockfile.load()\n\n remove(tmp_dir / PIPELINE_LOCK)\n\n dvcfile.dump(stage)\n assert (tmp_dir / PIPELINE_FILE).exists()\n assert (tmp_dir / PIPELINE_LOCK).exists()\n assert list(dvcfile.stages.values()) == [stage]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_run.py_pytest_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_run.py_pytest_", "embedding": null, "metadata": {"file_path": "tests/unit/test_run.py", "file_name": "test_run.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 37, "span_ids": ["imports", "test_parse_params", "test_valid_stage_names", "test_invalid_stage_names"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.repo.run import is_valid_name, parse_params\n\n\ndef test_parse_params():\n assert parse_params(\n [\n \"param1\",\n \"file1:param1,param2\",\n \"file2:param2\",\n \"file1:param2,param3,\",\n \"param1,param2\",\n \"param3,\",\n \"file3:\",\n ]\n ) == [\n \"param1\",\n {\"file1\": [\"param1\", \"param2\"]},\n {\"file2\": [\"param2\"]},\n {\"file1\": [\"param2\", \"param3\"]},\n \"param1\",\n \"param2\",\n \"param3\",\n {\"file3\": []},\n ]\n\n\n@pytest.mark.parametrize(\"name\", [\"copy_name\", \"copy-name\", \"copyName\", \"12\"])\ndef test_valid_stage_names(name):\n assert is_valid_name(name)\n\n\n@pytest.mark.parametrize(\"name\", [\"copy$name\", \"copy-name?\", \"copy-name@v1\"])\ndef test_invalid_stage_names(name):\n assert not is_valid_name(name)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cli.py_get_main_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cli.py_get_main_parser_", "embedding": null, "metadata": {"file_path": "dvc/cli.py", "file_name": "cli.py", "file_type": "text/x-python", "category": "implementation", "start_line": 160, "end_line": 231, "span_ids": ["get_main_parser", "parse_args"], "tokens": 413}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_main_parser():\n parent_parser = get_parent_parser()\n\n # Main parser\n desc = \"Data Version Control\"\n parser = DvcParser(\n prog=\"dvc\",\n description=desc,\n parents=[parent_parser],\n formatter_class=argparse.RawTextHelpFormatter,\n add_help=False,\n )\n\n # NOTE: We are doing this to capitalize help message.\n # Unfortunately, there is no easier and clearer way to do it,\n # as adding this argument in get_parent_parser() either in\n # log_level_group or on parent_parser itself will cause unexpected error.\n parser.add_argument(\n \"-h\",\n \"--help\",\n action=\"help\",\n default=argparse.SUPPRESS,\n help=\"Show this help message and exit.\",\n )\n\n # NOTE: On some python versions action='version' prints to stderr\n # instead of stdout https://bugs.python.org/issue18920\n parser.add_argument(\n \"-V\",\n \"--version\",\n action=VersionAction,\n nargs=0,\n help=\"Show program's version.\",\n )\n\n parser.add_argument(\n \"--cd\",\n default=os.path.curdir,\n metavar=\"\",\n help=\"Change to directory before executing.\",\n type=str,\n )\n\n # Sub commands\n subparsers = parser.add_subparsers(\n title=\"Available Commands\",\n metavar=\"COMMAND\",\n dest=\"cmd\",\n help=\"Use `dvc COMMAND --help` for command-specific help.\",\n )\n\n fix_subparsers(subparsers)\n\n for cmd in COMMANDS:\n cmd.add_parser(subparsers, parent_parser)\n\n return parser\n\n\ndef parse_args(argv=None):\n \"\"\"Parses CLI arguments.\n\n Args:\n argv: optional list of arguments to parse. sys.argv is used by default.\n\n Raises:\n dvc.exceptions.DvcParserError: raised for argument parsing errors.\n \"\"\"\n parser = get_main_parser()\n args = parser.parse_args(argv)\n return args", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/completion.py_argparse_CmdCompletion.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/completion.py_argparse_CmdCompletion.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/completion.py", "file_name": "completion.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 37, "span_ids": ["imports", "CmdCompletion.run", "CmdCompletion"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nimport shtab\n\nfrom dvc.command.base import CmdBaseNoRepo, append_doc_link\n\nlogger = logging.getLogger(__name__)\nFILE = shtab.FILE\nDIR = shtab.DIRECTORY\nDVC_FILE = {\n \"bash\": \"_dvc_compgen_DVCFiles\",\n \"zsh\": \"_files -g '(*?.dvc|Dvcfile|dvc.yaml)'\",\n}\nPREAMBLE = {\n \"bash\": \"\"\"\n# $1=COMP_WORDS[1]\n_dvc_compgen_DVCFiles() {\n compgen -d -S '/' -- $1 # recurse into subdirs\n compgen -f -X '!*?.dvc' -- $1\n compgen -f -X '!*Dvcfile' -- $1\n compgen -f -X '!*dvc.yaml' -- $1\n}\n\"\"\",\n \"zsh\": \"\",\n}\n\n\nclass CmdCompletion(CmdBaseNoRepo):\n def run(self):\n from dvc.cli import get_main_parser\n\n parser = get_main_parser()\n shell = self.args.shell\n script = shtab.complete(parser, shell=shell, preamble=PREAMBLE)\n print(script)\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/completion.py_add_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/completion.py_add_parser_", "embedding": null, "metadata": {"file_path": "dvc/command/completion.py", "file_name": "completion.py", "file_type": "text/x-python", "category": "implementation", "start_line": 51, "end_line": 69, "span_ids": ["add_parser"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n COMPLETION_HELP = \"Generate shell tab completion.\"\n COMPLETION_DESCRIPTION = \"Prints out shell tab completion scripts.\"\n completion_parser = subparsers.add_parser(\n \"completion\",\n parents=[parent_parser],\n description=append_doc_link(COMPLETION_DESCRIPTION, \"completion\"),\n help=COMPLETION_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n completion_parser.add_argument(\n \"-s\",\n \"--shell\",\n help=\"Shell syntax for completions.\",\n default=\"bash\",\n choices=[\"bash\", \"zsh\"],\n )\n completion_parser.set_defaults(func=CmdCompletion)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/daemon.py_from_dvc_command_import_c_CmdDaemonAnalytics.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/daemon.py_from_dvc_command_import_c_CmdDaemonAnalytics.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/daemon.py", "file_name": "daemon.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 34, "span_ids": ["CmdDaemonAnalytics.run", "CmdDaemonBase", "imports", "CmdDaemonUpdater.run", "CmdDaemonAnalytics", "CmdDaemonUpdater"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.command import completion\nfrom dvc.command.base import CmdBaseNoRepo, fix_subparsers\n\n\nclass CmdDaemonBase(CmdBaseNoRepo):\n pass\n\n\nclass CmdDaemonUpdater(CmdDaemonBase):\n def run(self):\n import os\n\n from dvc.config import Config\n from dvc.repo import Repo\n from dvc.updater import Updater\n\n root_dir = Repo.find_root()\n dvc_dir = os.path.join(root_dir, Repo.DVC_DIR)\n tmp_dir = os.path.join(dvc_dir, \"tmp\")\n config = Config(dvc_dir, validate=False)\n hardlink_lock = config.get(\"core\", {}).get(\"hardlink_lock\", False)\n updater = Updater(tmp_dir, hardlink_lock=hardlink_lock)\n updater.fetch(detach=False)\n\n return 0\n\n\nclass CmdDaemonAnalytics(CmdDaemonBase):\n def run(self):\n from dvc import analytics\n\n analytics.send(self.args.target)\n\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/ls/__init__.py_argparse__prettify.return._fmt_entry_for_entry_in_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/ls/__init__.py_argparse__prettify.return._fmt_entry_for_entry_in_", "embedding": null, "metadata": {"file_path": "dvc/command/ls/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 22, "span_ids": ["imports", "_prettify"], "tokens": 115}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\nimport sys\n\nfrom dvc.command import completion\nfrom dvc.command.base import CmdBaseNoRepo, append_doc_link\nfrom dvc.command.ls.ls_colors import LsColors\nfrom dvc.exceptions import DvcException\n\nlogger = logging.getLogger(__name__)\n\n\ndef _prettify(entries, with_color=False):\n if with_color:\n ls_colors = LsColors()\n fmt = ls_colors.format\n else:\n\n def fmt(entry):\n return entry[\"path\"]\n\n return [fmt(entry) for entry in entries]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/ls/__init__.py_CmdList_CmdList.run.try_.except_DvcException_.return.1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/ls/__init__.py_CmdList_CmdList.run.try_.except_DvcException_.return.1", "embedding": null, "metadata": {"file_path": "dvc/command/ls/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 25, "end_line": 43, "span_ids": ["CmdList.run", "CmdList"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdList(CmdBaseNoRepo):\n def run(self):\n from dvc.repo import Repo\n\n try:\n entries = Repo.ls(\n self.args.url,\n self.args.path,\n rev=self.args.rev,\n recursive=self.args.recursive,\n dvc_only=self.args.dvc_only,\n )\n if entries:\n entries = _prettify(entries, sys.stdout.isatty())\n logger.info(\"\\n\".join(entries))\n return 0\n except DvcException:\n logger.exception(f\"failed to list '{self.args.url}'\")\n return 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/__init__.py__get_loads_from.return.__get_stage_s_info_copy": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/__init__.py__get_loads_from.return.__get_stage_s_info_copy", "embedding": null, "metadata": {"file_path": "dvc/dependency/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 60, "end_line": 91, "span_ids": ["loadd_from", "loads_from", "_get"], "tokens": 266}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _get(stage, p, info):\n parsed = urlparse(p) if p else None\n if parsed and parsed.scheme == \"remote\":\n tree = get_cloud_tree(stage.repo, name=parsed.netloc)\n return DEP_MAP[tree.scheme](stage, p, info, tree=tree)\n\n if info and info.get(RepoDependency.PARAM_REPO):\n repo = info.pop(RepoDependency.PARAM_REPO)\n return RepoDependency(repo, stage, p, info)\n\n if info and info.get(ParamsDependency.PARAM_PARAMS):\n params = info.pop(ParamsDependency.PARAM_PARAMS)\n return ParamsDependency(stage, p, params)\n\n for d in DEPS:\n if d.supported(p):\n return d(stage, p, info)\n return LocalDependency(stage, p, info)\n\n\ndef loadd_from(stage, d_list):\n ret = []\n for d in d_list:\n p = d.pop(BaseOutput.PARAM_PATH, None)\n ret.append(_get(stage, p, d))\n return ret\n\n\ndef loads_from(stage, s_list, erepo=None):\n assert isinstance(s_list, list)\n info = {RepoDependency.PARAM_REPO: erepo} if erepo else {}\n return [_get(stage, s, info.copy()) for s in s_list]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_collections_check_dvc_filename.if_not_is_valid_filename_.raise_StageFileBadNameErr": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_collections_check_dvc_filename.if_not_is_valid_filename_.raise_StageFileBadNameErr", "embedding": null, "metadata": {"file_path": "dvc/dvcfile.py", "file_name": "dvcfile.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 67, "span_ids": ["imports", "is_dvc_file", "ParametrizedDumpError", "check_dvc_filename", "is_lock_file", "is_valid_filename", "LockfileCorruptedError"], "tokens": 365}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import collections\nimport contextlib\nimport logging\nimport os\n\nfrom voluptuous import MultipleInvalid\n\nfrom dvc.exceptions import DvcException\nfrom dvc.stage import serialize\nfrom dvc.stage.exceptions import (\n StageFileBadNameError,\n StageFileDoesNotExistError,\n StageFileFormatError,\n StageFileIsNotDvcFileError,\n)\nfrom dvc.stage.loader import SingleStageLoader, StageLoader\nfrom dvc.utils import relpath\nfrom dvc.utils.collections import apply_diff\nfrom dvc.utils.serialize import (\n dump_yaml,\n load_yaml,\n modify_yaml,\n parse_yaml,\n parse_yaml_for_update,\n)\n\nlogger = logging.getLogger(__name__)\n\nDVC_FILE = \"Dvcfile\"\nDVC_FILE_SUFFIX = \".dvc\"\nPIPELINE_FILE = \"dvc.yaml\"\nPIPELINE_LOCK = \"dvc.lock\"\n\n\nclass LockfileCorruptedError(DvcException):\n pass\n\n\nclass ParametrizedDumpError(DvcException):\n pass\n\n\ndef is_valid_filename(path):\n return path.endswith(DVC_FILE_SUFFIX) or os.path.basename(path) in [\n DVC_FILE,\n PIPELINE_FILE,\n ]\n\n\ndef is_dvc_file(path):\n return os.path.isfile(path) and (\n is_valid_filename(path) or is_lock_file(path)\n )\n\n\ndef is_lock_file(path):\n return os.path.basename(path) == PIPELINE_LOCK\n\n\ndef check_dvc_filename(path):\n if not is_valid_filename(path):\n raise StageFileBadNameError(\n \"bad DVC-file name '{}'. DVC-files should be named \"\n \"'Dvcfile' or have a '.dvc' suffix (e.g. '{}.dvc').\".format(\n relpath(path), os.path.basename(path)\n )\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/logger.py_LoggerHandler_LoggerHandler.emit.try_.except_Exception_noqa.self_handleError_record_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/logger.py_LoggerHandler_LoggerHandler.emit.try_.except_Exception_noqa.self_handleError_record_", "embedding": null, "metadata": {"file_path": "dvc/logger.py", "file_name": "logger.py", "file_type": "text/x-python", "category": "implementation", "start_line": 125, "end_line": 141, "span_ids": ["LoggerHandler.handleError", "LoggerHandler", "LoggerHandler.emit"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LoggerHandler(logging.StreamHandler):\n def handleError(self, record):\n super().handleError(record)\n raise LoggingException(record)\n\n def emit(self, record):\n \"\"\"Write to Tqdm's stream so as to not break progress-bars\"\"\"\n try:\n msg = self.format(record)\n Tqdm.write(\n msg, file=self.stream, end=getattr(self, \"terminator\", \"\\n\")\n )\n self.flush()\n except RecursionError:\n raise\n except Exception: # noqa, pylint: disable=broad-except\n self.handleError(record)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/logger.py__is_verbose_disable_other_loggers.for_logger_name_logger_.if_logger_name_dvc_a.logger.disabled.True": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/logger.py__is_verbose_disable_other_loggers.for_logger_name_logger_.if_logger_name_dvc_a.logger.disabled.True", "embedding": null, "metadata": {"file_path": "dvc/logger.py", "file_name": "logger.py", "file_type": "text/x-python", "category": "implementation", "start_line": 144, "end_line": 179, "span_ids": ["_stack_trace", "_is_verbose", "disable_other_loggers", "_iter_causes"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _is_verbose():\n return (\n logging.NOTSET\n < logging.getLogger(\"dvc\").getEffectiveLevel()\n <= logging.DEBUG\n )\n\n\ndef _iter_causes(exc):\n while exc:\n yield str(exc)\n exc = exc.__cause__\n\n\ndef _stack_trace(exc_info):\n import traceback\n\n return (\n \"\\n\"\n \"{red}{line}{nc}\\n\"\n \"{trace}\"\n \"{red}{line}{nc}\".format(\n red=colorama.Fore.RED,\n line=\"-\" * 60,\n trace=\"\".join(traceback.format_exception(*exc_info)),\n nc=colorama.Fore.RESET,\n )\n )\n\n\ndef disable_other_loggers():\n logging.captureWarnings(True)\n root = logging.root\n for (logger_name, logger) in root.manager.loggerDict.items():\n if logger_name != \"dvc\" and not logger_name.startswith(\"dvc.\"):\n logger.disabled = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/updater.py_logging_Updater.check.self__with_lock_self__che": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/updater.py_logging_Updater.check.self__with_lock_self__che", "embedding": null, "metadata": {"file_path": "dvc/updater.py", "file_name": "updater.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 58, "span_ids": ["Updater._with_lock", "Updater.__init__", "imports", "Updater", "Updater.check", "Updater._is_outdated_file"], "tokens": 384}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nimport sys\nimport time\n\nimport colorama\nfrom packaging import version\n\nfrom dvc import __version__\nfrom dvc.config import Config, to_bool\nfrom dvc.lock import LockError, make_lock\nfrom dvc.utils import boxify, env2bool\nfrom dvc.utils.pkg import PKG\n\nlogger = logging.getLogger(__name__)\n\n\nclass Updater: # pragma: no cover\n URL = \"https://updater.dvc.org\"\n UPDATER_FILE = \"updater\"\n TIMEOUT = 24 * 60 * 60 # every day\n TIMEOUT_GET = 10\n\n def __init__(self, tmp_dir, friendly=False, hardlink_lock=False):\n self.updater_file = os.path.join(tmp_dir, self.UPDATER_FILE)\n self.lock = make_lock(\n self.updater_file + \".lock\",\n tmp_dir=tmp_dir,\n friendly=friendly,\n hardlink_lock=hardlink_lock,\n )\n self.current = version.parse(__version__).base_version\n\n def _is_outdated_file(self):\n ctime = os.path.getmtime(self.updater_file)\n outdated = time.time() - ctime >= self.TIMEOUT\n if outdated:\n logger.debug(f\"'{self.updater_file}' is outdated\")\n return outdated\n\n def _with_lock(self, func, action):\n try:\n with self.lock:\n func()\n except LockError:\n msg = \"Failed to acquire '{}' before {} updates\"\n logger.debug(msg.format(self.lock.lockfile, action))\n\n def check(self):\n if (\n os.getenv(\"CI\")\n or env2bool(\"DVC_TEST\")\n or PKG == \"snap\"\n or not self.is_enabled()\n ):\n return\n\n self._with_lock(self._check, \"checking\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/updater.py_Updater._check_Updater._check.if_version_parse_self_cur.self__notify_latest_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/updater.py_Updater._check_Updater._check.if_version_parse_self_cur.self__notify_latest_", "embedding": null, "metadata": {"file_path": "dvc/updater.py", "file_name": "updater.py", "file_type": "text/x-python", "category": "implementation", "start_line": 54, "end_line": 72, "span_ids": ["Updater._check"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Updater:\n\n def _check(self):\n if not os.path.exists(self.updater_file) or self._is_outdated_file():\n self.fetch()\n return\n\n with open(self.updater_file) as fobj:\n import json\n\n try:\n info = json.load(fobj)\n latest = info[\"version\"]\n except Exception as exc: # pylint: disable=broad-except\n msg = \"'{}' is not a valid json: {}\"\n logger.debug(msg.format(self.updater_file, exc))\n self.fetch()\n return\n\n if version.parse(self.current) < version.parse(latest):\n self._notify(latest)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/updater.py_Updater.fetch_Updater._get_latest_version.with_open_self_updater_fi.json_dump_info_fobj_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/updater.py_Updater.fetch_Updater._get_latest_version.with_open_self_updater_fi.json_dump_info_fobj_", "embedding": null, "metadata": {"file_path": "dvc/updater.py", "file_name": "updater.py", "file_type": "text/x-python", "category": "implementation", "start_line": 80, "end_line": 103, "span_ids": ["Updater.fetch", "Updater._get_latest_version"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Updater:\n\n def fetch(self, detach=True):\n from dvc.daemon import daemon\n\n if detach:\n daemon([\"updater\"])\n return\n\n self._with_lock(self._get_latest_version, \"fetching\")\n\n def _get_latest_version(self):\n import json\n\n import requests\n\n try:\n resp = requests.get(self.URL, timeout=self.TIMEOUT_GET)\n info = resp.json()\n except requests.exceptions.RequestException as exc:\n msg = \"Failed to retrieve latest version: {}\"\n logger.debug(msg.format(exc))\n return\n\n with open(self.updater_file, \"w+\") as fobj:\n json.dump(info, fobj)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/__main__.py__Needs_investigation_py_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/__main__.py__Needs_investigation_py_", "embedding": null, "metadata": {"file_path": "tests/__main__.py", "file_name": "__main__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 21, "span_ids": ["docstring"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Needs investigation, pylint was running tests\n# Could be `pylint_pytest` plugin, skipping check for this file for now\n# pylint: skip-file\n\nimport os\nimport sys\nfrom subprocess import check_call\n\nREPO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nos.chdir(REPO_ROOT)\n\nos.putenv(\n \"PATH\", \":\".join([os.path.join(REPO_ROOT, \"bin\"), os.getenv(\"PATH\")])\n)\nos.putenv(\"DVC_HOME\", REPO_ROOT)\n\nparams = \" \".join(sys.argv[1:])\n\ncmd = \"pytest -v -n=4 --cov=dvc --durations=0 {params}\".format(params=params)\ncheck_call(cmd, shell=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_data_cloud_error_cli_test_warn_on_outdated_stage.with_caplog_at_level_logg.assert_expected_warning_i": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_data_cloud_error_cli_test_warn_on_outdated_stage.with_caplog_at_level_logg.assert_expected_warning_i", "embedding": null, "metadata": {"file_path": "tests/func/test_data_cloud.py", "file_name": "test_data_cloud.py", "file_type": "text/x-python", "category": "test", "start_line": 161, "end_line": 187, "span_ids": ["test_warn_on_outdated_stage", "test_data_cloud_error_cli"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_data_cloud_error_cli(dvc):\n f = \"non-existing-file\"\n assert main([\"status\", \"-c\", f])\n assert main([\"push\", f])\n assert main([\"pull\", f])\n assert main([\"fetch\", f])\n\n\ndef test_warn_on_outdated_stage(tmp_dir, dvc, local_remote, caplog):\n stage = dvc.run(outs=[\"bar\"], cmd=\"echo bar > bar\", single_stage=True)\n assert main([\"push\"]) == 0\n\n stage_file_path = stage.relpath\n content = load_yaml(stage_file_path)\n del content[\"outs\"][0][\"md5\"]\n dump_yaml(stage_file_path, content)\n\n with caplog.at_level(logging.WARNING, logger=\"dvc\"):\n caplog.clear()\n assert main([\"status\", \"-c\"]) == 0\n expected_warning = (\n \"Output 'bar'(stage: 'bar.dvc') is missing version info. \"\n \"Cache for it will not be collected. \"\n \"Use `dvc repro` to get your pipeline up to date.\"\n )\n\n assert expected_warning in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_stage_collection_test_stage_collection.assert_set_dvc_stages_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_stage_collection_test_stage_collection.assert_set_dvc_stages_", "embedding": null, "metadata": {"file_path": "tests/func/test_dvcfile.py", "file_name": "test_dvcfile.py", "file_type": "text/x-python", "category": "test", "start_line": 137, "end_line": 160, "span_ids": ["test_stage_collection"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stage_collection(tmp_dir, dvc):\n tmp_dir.gen(\n {\n \"dir\": {\"file1\": \"file1\", \"file2\": \"file2\"},\n \"foo\": \"foo\",\n \"bar\": \"bar\",\n }\n )\n (stage1,) = dvc.add(\"dir\")\n stage2 = dvc.run(\n cmd=\"cp foo foo2\",\n deps=[\"foo\"],\n name=\"copy-foo-foo2\",\n metrics=[\"foo2\"],\n always_changed=True,\n )\n stage3 = dvc.run(\n cmd=\"cp bar bar2\",\n deps=[\"bar\"],\n metrics=[\"bar2\"],\n always_changed=True,\n single_stage=True,\n )\n assert set(dvc.stages) == {stage1, stage3, stage2}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_test_import_stage_accompanies_target_test_import_stage_accompanies_target.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_test_import_stage_accompanies_target_test_import_stage_accompanies_target.None_1", "embedding": null, "metadata": {"file_path": "tests/func/test_import_url.py", "file_name": "test_import_url.py", "file_type": "text/x-python", "category": "test", "start_line": 91, "end_line": 100, "span_ids": ["test_import_stage_accompanies_target"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_import_stage_accompanies_target(tmp_dir, dvc, erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\"file1\", \"file1 content\", commit=\"commit file\")\n\n tmp_dir.gen({\"dir\": {}})\n erepo = {\"url\": os.fspath(erepo_dir)}\n dvc.imp_url(\"file1\", out=os.path.join(\"dir\", \"imported_file\"), erepo=erepo)\n\n assert (tmp_dir / \"dir\" / \"imported_file\").exists()\n assert (tmp_dir / \"dir\" / \"imported_file.dvc\").exists()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_not_existed_url_test_ls_shows_pipeline_tracked_outs.match_files_files_ba": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_not_existed_url_test_ls_shows_pipeline_tracked_outs.match_files_files_ba", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 430, "end_line": 447, "span_ids": ["test_ls_not_existed_url", "test_ls_shows_pipeline_tracked_outs"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ls_not_existed_url():\n from time import time\n\n dirname = \"__{}_{}\".format(\"not_existed\", time())\n with pytest.raises(CloneError):\n Repo.ls(dirname, recursive=True)\n\n\ndef test_ls_shows_pipeline_tracked_outs(tmp_dir, dvc, scm, run_copy):\n from dvc.dvcfile import PIPELINE_FILE, PIPELINE_LOCK\n\n tmp_dir.gen(\"foo\", \"foo\")\n run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n dvc.scm.add([PIPELINE_FILE, PIPELINE_LOCK])\n dvc.scm.commit(\"add pipeline stage\")\n\n files = Repo.ls(os.curdir, dvc_only=True)\n match_files(files, (((\"bar\",), True),))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproDepUnderDir_TestReproDepUnderDir.test.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproDepUnderDir_TestReproDepUnderDir.test.None_5", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 231, "end_line": 252, "span_ids": ["TestReproDepUnderDir.test", "TestReproDepUnderDir"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproDepUnderDir(SingleStageRun, TestDvc):\n def test(self):\n stages = self.dvc.add(self.DATA_DIR)\n self.assertTrue(stages and stages[0] is not None)\n\n file1 = \"file1\"\n stage = self._run(\n fname=file1 + \".dvc\",\n outs=[file1],\n deps=[self.DATA, self.CODE],\n cmd=f\"python {self.CODE} {self.DATA} {file1}\",\n name=\"copy-data-file1\",\n )\n\n self.assertTrue(filecmp.cmp(file1, self.DATA, shallow=False))\n\n os.unlink(self.DATA)\n shutil.copyfile(self.FOO, self.DATA)\n\n stages = self.dvc.reproduce(self._get_stage_target(stage))\n self.assertEqual(len(stages), 2)\n self.assertTrue(filecmp.cmp(file1, self.FOO, shallow=False))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_git_hook.py_pytest_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_git_hook.py_pytest_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_git_hook.py", "file_name": "test_git_hook.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 22, "span_ids": ["imports", "test_out_of_repo"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.cli import parse_args\nfrom dvc.command.git_hook import CmdPostCheckout, CmdPreCommit, CmdPrePush\n\n\n@pytest.mark.parametrize(\n \"hook, cls\",\n [\n (\"pre-commit\", CmdPreCommit),\n (\"post-checkout\", CmdPostCheckout),\n (\"pre-push\", CmdPrePush),\n ],\n)\ndef test_out_of_repo(tmp_dir, hook, cls, mocker):\n cli_args = parse_args([\"git-hook\", hook])\n assert cli_args.func == cls\n cmd = cli_args.func(cli_args)\n mock_main = mocker.patch(\"dvc.main.main\")\n assert cmd.run() == 0\n assert not mock_main.called", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_load.py__pylint_disable_unsubsc_test_load_from_pipeline.for_i_out_in_enumerate_o.assert_type_test_func_out": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/output/test_load.py__pylint_disable_unsubsc_test_load_from_pipeline.for_i_out_in_enumerate_o.assert_type_test_func_out", "embedding": null, "metadata": {"file_path": "tests/unit/output/test_load.py", "file_name": "test_load.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 43, "span_ids": ["test_load_from_pipeline", "docstring"], "tokens": 321}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# pylint: disable=unsubscriptable-object\n\nimport pytest\n\nfrom dvc import output\nfrom dvc.output import LocalOutput, S3Output\nfrom dvc.stage import Stage\n\n\n@pytest.mark.parametrize(\n \"out_type,type_test_func\",\n [\n (\"outs\", lambda o: not (o.metric or o.plot)),\n (\"metrics\", lambda o: o.metric and not o.plot),\n (\"plots\", lambda o: o.plot and not o.metric),\n ],\n ids=(\"outs\", \"metrics\", \"plots\"),\n)\ndef test_load_from_pipeline(dvc, out_type, type_test_func):\n outs = output.load_from_pipeline(\n Stage(dvc),\n [\n \"file1\",\n \"file2\",\n {\"file3\": {\"cache\": True}},\n {},\n {\"file4\": {\"cache\": False}},\n {\"file5\": {\"persist\": False}},\n {\"file6\": {\"persist\": True, \"cache\": False}},\n ],\n out_type,\n )\n cached_outs = {\"file1\", \"file2\", \"file3\", \"file5\"}\n persisted_outs = {\"file6\"}\n assert len(outs) == 6\n\n for i, out in enumerate(outs, start=1):\n assert isinstance(out, LocalOutput)\n assert out.def_path == f\"file{i}\"\n assert out.use_cache == (out.def_path in cached_outs)\n assert out.persist == (out.def_path in persisted_outs)\n assert not out.hash_info\n assert type_test_func(out)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/test_run.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/test_run.py__", "embedding": null, "metadata": {"file_path": "tests/unit/repo/test_run.py", "file_name": "test_run.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 13, "span_ids": ["imports", "test_file"], "tokens": 84}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.exceptions import InvalidArgumentError\n\n\ndef test_file(tmp_dir, dvc):\n msg = (\n \"`--file` is currently incompatible with `-n|--name` \"\n \"and requires `--single-stage`\"\n )\n with pytest.raises(InvalidArgumentError, match=msg):\n dvc.run(fname=\"path/dvc.yaml\", name=\"my\", cmd=\"mycmd\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_stage.py_test_stage_run_ignore_sigint_test_stage_run_ignore_sigint.assert_signal_getsignal_s": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_stage.py_test_stage_run_ignore_sigint_test_stage_run_ignore_sigint.assert_signal_getsignal_s", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_stage.py", "file_name": "test_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 78, "end_line": 98, "span_ids": ["test_stage_run_ignore_sigint"], "tokens": 176}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(\n not isinstance(\n threading.current_thread(),\n threading._MainThread, # noqa, pylint: disable=protected-access\n ),\n reason=\"Not running in the main thread.\",\n)\ndef test_stage_run_ignore_sigint(dvc, mocker):\n proc = mocker.Mock()\n communicate = mocker.Mock()\n proc.configure_mock(returncode=0, communicate=communicate)\n popen = mocker.patch.object(subprocess, \"Popen\", return_value=proc)\n signal_mock = mocker.patch(\"signal.signal\")\n\n dvc.run(cmd=\"path\", single_stage=True)\n\n assert popen.called_once()\n assert communicate.called_once_with()\n signal_mock.assert_any_call(signal.SIGINT, signal.SIG_IGN)\n # pylint: disable=comparison-with-callable\n assert signal.getsignal(signal.SIGINT) == signal.default_int_handler", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_stage.py_test_always_changed_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_stage.py_test_always_changed_", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_stage.py", "file_name": "test_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 98, "end_line": 122, "span_ids": ["test_always_changed", "test_external_outs"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_always_changed(dvc):\n stage = Stage(dvc, \"path\", always_changed=True)\n stage.save()\n with dvc.lock:\n assert stage.changed()\n assert stage.status()[\"path\"] == [\"always changed\"]\n\n\ndef test_external_outs(tmp_path_factory, dvc):\n from dvc.stage import create_stage\n from dvc.stage.exceptions import StageExternalOutputsError\n\n tmp_path = tmp_path_factory.mktemp(\"external-outs\")\n foo = tmp_path / \"foo\"\n foo.write_text(\"foo\")\n\n with pytest.raises(StageExternalOutputsError):\n create_stage(Stage, dvc, \"path.dvc\", outs=[os.fspath(foo)])\n\n with dvc.config.edit() as conf:\n conf[\"remote\"][\"myremote\"] = {\"url\": os.fspath(tmp_path)}\n\n create_stage(Stage, dvc, \"path.dvc\", outs=[\"remote://myremote/foo\"])\n create_stage(Stage, dvc, \"path.dvc\", outs=[os.fspath(foo)], external=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_updater.py_test_check_updates_test_check_updates.if_notify_.else_.assert_not_caplog_text": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_updater.py_test_check_updates_test_check_updates.if_notify_.else_.assert_not_caplog_text", "embedding": null, "metadata": {"file_path": "tests/unit/test_updater.py", "file_name": "test_updater.py", "file_type": "text/x-python", "category": "test", "start_line": 47, "end_line": 68, "span_ids": ["test_check_updates"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"current,latest,notify\",\n [\n (\"0.0.2\", \"0.0.2\", False),\n (\"0.0.2\", \"0.0.3\", True),\n (\"0.0.2\", \"0.0.1\", False),\n ],\n ids=[\"uptodate\", \"behind\", \"ahead\"],\n)\ndef test_check_updates(mock_tty, updater, caplog, current, latest, notify):\n updater.current = current\n with open(updater.updater_file, \"w+\") as f:\n json.dump({\"version\": latest}, f)\n\n caplog.clear()\n with caplog.at_level(logging.INFO, logger=\"dvc.updater\"):\n updater.check()\n\n if notify:\n assert f\"Update available {current} -> {latest}\" in caplog.text\n else:\n assert not caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_updater.py_test_check_refetches_each_day_test_check_refetches_each_day.mock_time_assert_called_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_updater.py_test_check_refetches_each_day_test_check_refetches_each_day.mock_time_assert_called_", "embedding": null, "metadata": {"file_path": "tests/unit/test_updater.py", "file_name": "test_updater.py", "file_type": "text/x-python", "category": "test", "start_line": 71, "end_line": 85, "span_ids": ["test_check_refetches_each_day"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_check_refetches_each_day(mock_tty, updater, caplog, mocker):\n updater.current = \"0.0.8\"\n with open(updater.updater_file, \"w+\") as f:\n json.dump({\"version\": \"0.0.9\"}, f)\n fetch = mocker.patch.object(updater, \"fetch\")\n\n time_value = time.time() + 24 * 60 * 60 + 10\n mock_time = mocker.patch(\"time.time\", return_value=time_value)\n\n caplog.clear()\n with caplog.at_level(logging.INFO, logger=\"dvc.updater\"):\n updater.check()\n assert not caplog.text\n fetch.assert_called_once()\n mock_time.assert_called()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_updater.py_test_check_fetches_on_invalid_data_format_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_updater.py_test_check_fetches_on_invalid_data_format_", "embedding": null, "metadata": {"file_path": "tests/unit/test_updater.py", "file_name": "test_updater.py", "file_type": "text/x-python", "category": "test", "start_line": 88, "end_line": 109, "span_ids": ["test_check", "test_check_fetches_on_invalid_data_format"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_check_fetches_on_invalid_data_format(\n mock_tty, updater, caplog, mocker\n):\n updater.current = \"0.0.5\"\n with open(updater.updater_file, \"w+\") as f:\n f.write('\"{\"version: \"0.0.6\"')\n fetch = mocker.patch.object(updater, \"fetch\")\n caplog.clear()\n with caplog.at_level(logging.INFO, logger=\"dvc.updater\"):\n updater.check()\n assert not caplog.text\n fetch.assert_called_once()\n\n\n@mock.patch(\"dvc.updater.Updater._check\")\ndef test_check(mock_check, updater):\n updater.check()\n updater.check()\n updater.check()\n\n assert mock_check.call_count == 3", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_collections.py__pylint_disable_unidiom_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_collections.py__pylint_disable_unidiom_", "embedding": null, "metadata": {"file_path": "tests/unit/utils/test_collections.py", "file_name": "test_collections.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 51, "span_ids": ["test_apply_diff_seq", "MyDict", "test_apply_diff_mapping", "docstring", "test_apply_diff_is_inplace", "MyInt"], "tokens": 321}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# pylint: disable=unidiomatic-typecheck\nfrom dvc.utils.collections import apply_diff\n\n\nclass MyDict(dict):\n pass\n\n\nclass MyInt(int):\n pass\n\n\ndef test_apply_diff_is_inplace():\n dest = MyDict()\n dest.attr = 42 # pylint: disable=attribute-defined-outside-init\n apply_diff({}, dest)\n\n assert type(dest) is MyDict, \"Preserves class\"\n assert dest.attr == 42, \"Preserves custom attrs\"\n\n\ndef test_apply_diff_mapping():\n src = {\"a\": 1}\n dest = {\"b\": 2}\n apply_diff(src, dest)\n assert dest == src, \"Adds and removes keys\"\n\n src = {\"a\": 1}\n dest = {\"a\": MyInt(1)}\n apply_diff(src, dest)\n assert type(dest[\"a\"]) is MyInt, \"Does not replace equals\"\n\n src = {\"d\": {\"a\": 1}}\n inner = {}\n dest = {\"d\": inner}\n apply_diff(src, dest)\n assert dest[\"d\"] is inner, \"Updates inner dicts\"\n\n\ndef test_apply_diff_seq():\n src = [1]\n dest = [MyInt(1)]\n apply_diff(src, dest)\n assert type(dest[0]) is MyInt, \"Does not replace equals\"\n\n src = {\"l\": [1]}\n inner = []\n dest = {\"l\": inner}\n apply_diff(src, dest)\n assert dest[\"l\"] is inner, \"Updates inner lists\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_FileMixin._load_FileMixin._load.return.d_stage_text": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_FileMixin._load_FileMixin._load.return.d_stage_text", "embedding": null, "metadata": {"file_path": "dvc/dvcfile.py", "file_name": "dvcfile.py", "file_type": "text/x-python", "category": "implementation", "start_line": 95, "end_line": 111, "span_ids": ["FileMixin._load"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FileMixin:\n\n def _load(self):\n # it raises the proper exceptions by priority:\n # 1. when the file doesn't exists\n # 2. filename is not a DVC-file\n # 3. path doesn't represent a regular file\n if not self.exists():\n raise StageFileDoesNotExistError(self.path)\n if self.verify:\n check_dvc_filename(self.path)\n if not self.repo.tree.isfile(self.path):\n raise StageFileIsNotDvcFileError(self.path)\n\n with self.repo.tree.open(self.path) as fd:\n stage_text = fd.read()\n d = parse_yaml(stage_text, self.path)\n self.validate(d, self.relpath)\n return d, stage_text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py__pylint_disable_protect__BasePath.isin_or_eq._pylint_disable_no_memb": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py__pylint_disable_protect__BasePath.isin_or_eq._pylint_disable_no_memb", "embedding": null, "metadata": {"file_path": "dvc/path_info.py", "file_name": "path_info.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 22, "span_ids": ["_BasePath.overlaps", "_BasePath", "_BasePath.isin_or_eq", "docstring"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# pylint: disable=protected-access\nimport os\nimport pathlib\nimport posixpath\nfrom typing import Callable\nfrom urllib.parse import urlparse\n\nfrom funcy import cached_property\n\nfrom dvc.utils import relpath\n\n\nclass _BasePath:\n def overlaps(self, other):\n if isinstance(other, (str, bytes)):\n other = self.__class__(other)\n elif self.__class__ != other.__class__:\n return False\n return self.isin_or_eq(other) or other.isin(self)\n\n def isin_or_eq(self, other):\n return self == other or self.isin(other) # pylint: disable=no-member", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_PathInfo_PathInfo.as_posix.return.self_fspath_replace_f_sep": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_PathInfo_PathInfo.as_posix.return.self_fspath_replace_f_sep", "embedding": null, "metadata": {"file_path": "dvc/path_info.py", "file_name": "path_info.py", "file_type": "text/x-python", "category": "implementation", "start_line": 24, "end_line": 47, "span_ids": ["PathInfo.__new__", "PathInfo", "PathInfo.as_posix"], "tokens": 250}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PathInfo(pathlib.PurePath, _BasePath):\n # Use __slots__ in PathInfo objects following PurePath implementation.\n # This makes objects smaller and speeds up attribute access.\n # We don't add any fields so it's empty.\n __slots__ = ()\n scheme = \"local\"\n\n def __new__(cls, *args):\n # Construct a proper subclass depending on current os\n if cls is PathInfo:\n cls = ( # pylint: disable=self-cls-assignment\n WindowsPathInfo if os.name == \"nt\" else PosixPathInfo\n )\n\n return cls._from_parts(args)\n\n def as_posix(self):\n f = self._flavour # pylint: disable=no-member\n # Unlike original implementation [1] that uses `str()` we actually need\n # to use `fspath`, because we've overridden `__str__` method to return\n # relative paths, which will break original `as_posix`.\n #\n # [1] https://github.com/python/cpython/blob/v3.7.0/Lib/pathlib.py#L692\n return self.fspath.replace(f.sep, \"/\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_external_file_test_add_external_file.assert_dvc_status_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_external_file_test_add_external_file.assert_dvc_status_", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 264, "end_line": 319, "span_ids": ["test_add_external_file"], "tokens": 466}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"workspace, hash_name, hash_value\",\n [\n (\n pytest.lazy_fixture(\"local_cloud\"),\n \"md5\",\n \"8c7dd922ad47494fc02c388e12c00eac\",\n ),\n pytest.param(\n pytest.lazy_fixture(\"ssh\"),\n \"md5\",\n \"8c7dd922ad47494fc02c388e12c00eac\",\n marks=pytest.mark.skipif(\n os.name == \"nt\", reason=\"disabled on windows\"\n ),\n ),\n (\n pytest.lazy_fixture(\"s3\"),\n \"etag\",\n \"8c7dd922ad47494fc02c388e12c00eac\",\n ),\n (pytest.lazy_fixture(\"gs\"), \"md5\", \"8c7dd922ad47494fc02c388e12c00eac\"),\n (\n pytest.lazy_fixture(\"hdfs\"),\n \"checksum\",\n \"000002000000000000000000a86fe4d846edc1bf4c355cb6112f141e\",\n ),\n (\n pytest.lazy_fixture(\"webhdfs\"),\n \"checksum\",\n \"000002000000000000000000a86fe4d846edc1bf4c355cb6112f141e00000000\",\n ),\n ],\n indirect=[\"workspace\"],\n)\ndef test_add_external_file(tmp_dir, dvc, workspace, hash_name, hash_value):\n from dvc.stage.exceptions import StageExternalOutputsError\n\n workspace.gen(\"file\", \"file\")\n\n with pytest.raises(StageExternalOutputsError):\n dvc.add(workspace.url)\n\n dvc.add(\"remote://workspace/file\")\n assert (tmp_dir / \"file.dvc\").read_text() == (\n \"outs:\\n\"\n f\"- {hash_name}: {hash_value}\\n\"\n \" size: 4\\n\"\n \" path: remote://workspace/file\\n\"\n )\n assert (workspace / \"file\").read_text() == \"file\"\n assert (\n workspace / \"cache\" / hash_value[:2] / hash_value[2:]\n ).read_text() == \"file\"\n\n assert dvc.status() == {}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_external_dir_test_add_external_dir.assert_workspace_cach": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_external_dir_test_add_external_dir.assert_workspace_cach", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 322, "end_line": 362, "span_ids": ["test_add_external_dir"], "tokens": 354}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"workspace, hash_name, hash_value\",\n [\n (\n pytest.lazy_fixture(\"local_cloud\"),\n \"md5\",\n \"b6dcab6ccd17ca0a8bf4a215a37d14cc.dir\",\n ),\n pytest.param(\n pytest.lazy_fixture(\"ssh\"),\n \"md5\",\n \"b6dcab6ccd17ca0a8bf4a215a37d14cc.dir\",\n marks=pytest.mark.skipif(\n os.name == \"nt\", reason=\"disabled on windows\"\n ),\n ),\n (\n pytest.lazy_fixture(\"s3\"),\n \"etag\",\n \"ec602a6ba97b2dd07bd6d2cd89674a60.dir\",\n ),\n (\n pytest.lazy_fixture(\"gs\"),\n \"md5\",\n \"b6dcab6ccd17ca0a8bf4a215a37d14cc.dir\",\n ),\n ],\n indirect=[\"workspace\"],\n)\ndef test_add_external_dir(tmp_dir, dvc, workspace, hash_name, hash_value):\n workspace.gen({\"dir\": {\"file\": \"file\", \"subdir\": {\"subfile\": \"subfile\"}}})\n\n dvc.add(\"remote://workspace/dir\")\n assert (tmp_dir / \"dir.dvc\").read_text() == (\n \"outs:\\n\"\n f\"- {hash_name}: {hash_value}\\n\"\n \" size: 11\\n\"\n \" nfiles: 2\\n\"\n \" path: remote://workspace/dir\\n\"\n )\n assert (workspace / \"cache\" / hash_value[:2] / hash_value[2:]).is_file()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_open_granular_test_missing.with_pytest_raises_FileMi.api_read_foo_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_open_granular_test_missing.with_pytest_raises_FileMi.api_read_foo_", "embedding": null, "metadata": {"file_path": "tests/func/test_api.py", "file_name": "test_api.py", "file_type": "text/x-python", "category": "test", "start_line": 113, "end_line": 155, "span_ids": ["test_open_granular", "test_missing"], "tokens": 239}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@flaky(max_runs=3, min_passes=1)\n@pytest.mark.parametrize(\"remote\", all_clouds, indirect=True)\ndef test_open_granular(tmp_dir, dvc, remote):\n tmp_dir.dvc_gen({\"dir\": {\"foo\": \"foo-text\"}})\n dvc.push()\n\n # Remove cache to force download\n remove(dvc.cache.local.cache_dir)\n\n with api.open(\"dir/foo\") as fd:\n assert fd.read() == \"foo-text\"\n\n\n@pytest.mark.parametrize(\n \"remote\",\n [\n pytest.lazy_fixture(cloud)\n for cloud in [\n \"s3\",\n \"gs\",\n \"azure\",\n \"gdrive\",\n \"oss\",\n \"ssh\",\n \"http\",\n \"hdfs\",\n \"webdav\",\n ]\n ],\n indirect=True,\n)\ndef test_missing(tmp_dir, dvc, remote):\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n\n # Remove cache to make foo missing\n remove(dvc.cache.local.cache_dir)\n\n api.read(\"foo\")\n\n remove(\"foo\")\n\n with pytest.raises(FileMissingError):\n api.read(\"foo\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py__pylint_disable_no_memb_test_run_load_one_for_multistage.assert_dvc_reproduce_co": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py__pylint_disable_no_memb_test_run_load_one_for_multistage.assert_dvc_reproduce_co", "embedding": null, "metadata": {"file_path": "tests/func/test_dvcfile.py", "file_name": "test_dvcfile.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 39, "span_ids": ["test_run_load_one_for_multistage", "docstring"], "tokens": 285}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# pylint: disable=no-member\nimport textwrap\n\nimport pytest\n\nfrom dvc.dvcfile import (\n PIPELINE_FILE,\n PIPELINE_LOCK,\n Dvcfile,\n ParametrizedDumpError,\n SingleStageFile,\n)\nfrom dvc.stage.exceptions import (\n StageFileDoesNotExistError,\n StageFileFormatError,\n)\nfrom dvc.stage.loader import StageNotFound\nfrom dvc.utils.serialize import dump_yaml\n\n\ndef test_run_load_one_for_multistage(tmp_dir, dvc):\n tmp_dir.gen(\"foo\", \"foo\")\n stage1 = dvc.run(\n cmd=\"cp foo foo2\",\n deps=[\"foo\"],\n name=\"copy-foo-foo2\",\n outs_persist_no_cache=[\"foo2\"],\n always_changed=True,\n )\n stage2 = Dvcfile(dvc, PIPELINE_FILE).stages[\"copy-foo-foo2\"]\n assert stage1 == stage2\n foo_out = stage2.outs[0]\n assert stage2.cmd == \"cp foo foo2\"\n assert stage2.name == \"copy-foo-foo2\"\n assert foo_out.def_path == \"foo2\"\n assert foo_out.persist\n assert not foo_out.use_cache\n assert stage2.deps[0].def_path == \"foo\"\n assert dvc.reproduce(\":copy-foo-foo2\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_gc_not_collect_pipeline_tracked_files_test_gc_not_collect_pipeline_tracked_files.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_gc.py_test_gc_not_collect_pipeline_tracked_files_test_gc_not_collect_pipeline_tracked_files.None_2", "embedding": null, "metadata": {"file_path": "tests/func/test_gc.py", "file_name": "test_gc.py", "file_type": "text/x-python", "category": "test", "start_line": 335, "end_line": 350, "span_ids": ["test_gc_not_collect_pipeline_tracked_files"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_gc_not_collect_pipeline_tracked_files(tmp_dir, dvc, run_copy):\n from dvc.dvcfile import PIPELINE_FILE, Dvcfile\n\n tmp_dir.gen(\"foo\", \"foo\")\n tmp_dir.gen(\"bar\", \"bar\")\n\n run_copy(\"foo\", \"foo2\", name=\"copy\")\n shutil.rmtree(dvc.stage_cache.cache_dir)\n assert _count_files(dvc.cache.local.cache_dir) == 1\n dvc.gc(workspace=True, force=True)\n assert _count_files(dvc.cache.local.cache_dir) == 1\n\n # remove pipeline file and lockfile and check\n Dvcfile(dvc, PIPELINE_FILE).remove(force=True)\n dvc.gc(workspace=True, force=True)\n assert _count_files(dvc.cache.local.cache_dir) == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_git_dir_test_get_git_dir.assert_tmp_dir_dst_re": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_git_dir_test_get_git_dir.assert_tmp_dir_dst_re", "embedding": null, "metadata": {"file_path": "tests/func/test_get.py", "file_name": "test_get.py", "file_type": "text/x-python", "category": "test", "start_line": 48, "end_line": 61, "span_ids": ["test_get_git_dir"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"erepo\", [pytest.lazy_fixture(\"git_dir\"), pytest.lazy_fixture(\"erepo_dir\")]\n)\ndef test_get_git_dir(tmp_dir, erepo):\n src = \"some_directory\"\n dst = \"some_directory_imported\"\n\n erepo.scm_gen(\n {src: {\"dir\": {\"file.txt\": \"hello\"}}}, commit=\"add a regular dir\"\n )\n\n Repo.get(os.fspath(erepo), src, dst)\n\n assert (tmp_dir / dst).read_text() == {\"dir\": {\"file.txt\": \"hello\"}}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_pull_imported_directory_stage_test_pull_imported_directory_stage.assert_tmp_dir_dir_im": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_pull_imported_directory_stage_test_pull_imported_directory_stage.assert_tmp_dir_dir_im", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 211, "end_line": 222, "span_ids": ["test_pull_imported_directory_stage"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pull_imported_directory_stage(tmp_dir, dvc, erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen({\"dir\": {\"foo\": \"foo content\"}}, commit=\"create dir\")\n\n dvc.imp(os.fspath(erepo_dir), \"dir\", \"dir_imported\")\n\n remove(\"dir_imported\")\n remove(dvc.cache.local.cache_dir)\n\n dvc.pull([\"dir_imported.dvc\"])\n\n assert (tmp_dir / \"dir_imported\").read_text() == {\"foo\": \"foo content\"}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_test_import_url_nonexistent_test_import_url_with_no_exec.assert_not_dst_exists_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_test_import_url_nonexistent_test_import_url_with_no_exec.assert_not_dst_exists_", "embedding": null, "metadata": {"file_path": "tests/func/test_import_url.py", "file_name": "test_import_url.py", "file_type": "text/x-python", "category": "test", "start_line": 103, "end_line": 114, "span_ids": ["test_import_url_with_no_exec", "test_import_url_nonexistent"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_import_url_nonexistent(dvc, erepo_dir):\n with pytest.raises(DependencyDoesNotExistError):\n dvc.imp_url(os.fspath(erepo_dir / \"non-existent\"))\n\n\ndef test_import_url_with_no_exec(tmp_dir, dvc, erepo_dir):\n tmp_dir.gen({\"data_dir\": {\"file\": \"file content\"}})\n src = os.path.join(\"data_dir\", \"file\")\n\n dvc.imp_url(src, \".\", no_exec=True)\n dst = tmp_dir / \"file\"\n assert not dst.exists()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_test_import_url_test_import_url.assert_dvc_status_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_test_import_url_test_import_url.assert_dvc_status_", "embedding": null, "metadata": {"file_path": "tests/func/test_import_url.py", "file_name": "test_import_url.py", "file_type": "text/x-python", "category": "test", "start_line": 118, "end_line": 142, "span_ids": ["test_import_url"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"workspace\",\n [\n pytest.lazy_fixture(\"local_cloud\"),\n pytest.lazy_fixture(\"s3\"),\n pytest.lazy_fixture(\"gs\"),\n pytest.lazy_fixture(\"hdfs\"),\n pytest.lazy_fixture(\"webhdfs\"),\n pytest.param(\n pytest.lazy_fixture(\"ssh\"),\n marks=pytest.mark.skipif(\n os.name == \"nt\", reason=\"disabled on windows\"\n ),\n ),\n pytest.lazy_fixture(\"http\"),\n ],\n indirect=True,\n)\ndef test_import_url(tmp_dir, dvc, workspace):\n workspace.gen(\"file\", \"file\")\n assert not (tmp_dir / \"file\").exists() # sanity check\n dvc.imp_url(\"remote://workspace/file\")\n assert (tmp_dir / \"file\").read_text() == \"file\"\n\n assert dvc.status() == {}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_overwrite_preserves_meta_and_comment_test_run_overwrite_preserves_meta_and_comment.assert_tmp_dir_PIPELIN": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_overwrite_preserves_meta_and_comment_test_run_overwrite_preserves_meta_and_comment.assert_tmp_dir_PIPELIN", "embedding": null, "metadata": {"file_path": "tests/func/test_run_multistage.py", "file_name": "test_run_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 337, "end_line": 363, "span_ids": ["test_run_overwrite_preserves_meta_and_comment"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_run_overwrite_preserves_meta_and_comment(tmp_dir, dvc, run_copy):\n from dvc.dvcfile import PIPELINE_FILE\n\n tmp_dir.gen({\"foo\": \"foo\", \"foo1\": \"foo1\"})\n text = textwrap.dedent(\n \"\"\"\\\n stages:\n copy-foo-bar:\n cmd: python copy.py {src} {dest}\n deps:\n - copy.py\n - {src}\n outs:\n # comments are preserved\n - {dest}\n meta:\n name: meta is preserved too\n \"\"\"\n )\n (tmp_dir / PIPELINE_FILE).write_text(text.format(src=\"foo\", dest=\"bar\"))\n assert dvc.reproduce(PIPELINE_FILE)\n\n assert run_copy(\"foo1\", \"bar1\", name=\"copy-foo-bar\", force=True)\n\n assert (tmp_dir / PIPELINE_FILE).read_text() == text.format(\n src=\"foo1\", dest=\"bar1\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_external_outputs_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_external_outputs_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_multistage.py", "file_name": "test_run_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 358, "end_line": 444, "span_ids": ["test_run_external_outputs"], "tokens": 771}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"workspace, hash_name, foo_hash, bar_hash\",\n [\n (\n pytest.lazy_fixture(\"local_cloud\"),\n \"md5\",\n \"acbd18db4cc2f85cedef654fccc4a4d8\",\n \"37b51d194a7513e45b56f6524f2d51f2\",\n ),\n pytest.param(\n pytest.lazy_fixture(\"ssh\"),\n \"md5\",\n \"acbd18db4cc2f85cedef654fccc4a4d8\",\n \"37b51d194a7513e45b56f6524f2d51f2\",\n marks=pytest.mark.skipif(\n os.name == \"nt\", reason=\"disabled on windows\"\n ),\n ),\n (\n pytest.lazy_fixture(\"s3\"),\n \"etag\",\n \"acbd18db4cc2f85cedef654fccc4a4d8\",\n \"37b51d194a7513e45b56f6524f2d51f2\",\n ),\n (\n pytest.lazy_fixture(\"gs\"),\n \"md5\",\n \"acbd18db4cc2f85cedef654fccc4a4d8\",\n \"37b51d194a7513e45b56f6524f2d51f2\",\n ),\n (\n pytest.lazy_fixture(\"hdfs\"),\n \"checksum\",\n \"0000020000000000000000003dba826b9be9c6a8e2f8310a770555c4\",\n \"00000200000000000000000075433c81259d3c38e364b348af52e84d\",\n ),\n ],\n indirect=[\"workspace\"],\n)\ndef test_run_external_outputs(\n tmp_dir, dvc, workspace, hash_name, foo_hash, bar_hash\n):\n workspace.gen(\"foo\", \"foo\")\n dvc.run(\n name=\"mystage\",\n cmd=\"mycmd\",\n deps=[\"remote://workspace/foo\"],\n outs=[\"remote://workspace/bar\"],\n no_exec=True,\n )\n\n dvc_yaml = (\n \"stages:\\n\"\n \" mystage:\\n\"\n \" cmd: mycmd\\n\"\n \" deps:\\n\"\n \" - remote://workspace/foo\\n\"\n \" outs:\\n\"\n \" - remote://workspace/bar\\n\"\n )\n\n assert (tmp_dir / \"dvc.yaml\").read_text() == dvc_yaml\n assert not (tmp_dir / \"dvc.lock\").exists()\n\n workspace.gen(\"bar\", \"bar\")\n dvc.commit(\"dvc.yaml\", force=True)\n\n assert (tmp_dir / \"dvc.yaml\").read_text() == dvc_yaml\n assert (tmp_dir / \"dvc.lock\").read_text() == (\n \"mystage:\\n\"\n \" cmd: mycmd\\n\"\n \" deps:\\n\"\n \" - path: remote://workspace/foo\\n\"\n f\" {hash_name}: {foo_hash}\\n\"\n \" size: 3\\n\"\n \" outs:\\n\"\n \" - path: remote://workspace/bar\\n\"\n f\" {hash_name}: {bar_hash}\\n\"\n \" size: 3\\n\"\n )\n\n assert (workspace / \"foo\").read_text() == \"foo\"\n assert (workspace / \"bar\").read_text() == \"bar\"\n assert (\n workspace / \"cache\" / bar_hash[:2] / bar_hash[2:]\n ).read_text() == \"bar\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_update.py_os_test_update_import.None_13": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_update.py_os_test_update_import.None_13", "embedding": null, "metadata": {"file_path": "tests/func/test_update.py", "file_name": "test_update.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 78, "span_ids": ["imports", "test_update_import"], "tokens": 585}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nimport pytest\n\nfrom dvc.dvcfile import Dvcfile\nfrom tests.unit.tree.test_repo import make_subrepo\n\n\n@pytest.mark.parametrize(\n \"cached\", [True, False],\n)\ndef test_update_import(tmp_dir, dvc, erepo_dir, cached):\n gen = erepo_dir.dvc_gen if cached else erepo_dir.scm_gen\n\n with erepo_dir.branch(\"branch\", new=True), erepo_dir.chdir():\n gen(\n {\n \"version\": \"branch\",\n \"dir\": {\"version\": \"branch\", \"subdir\": {\"file\": \"file\"}},\n },\n commit=\"add version file\",\n )\n old_rev = erepo_dir.scm.get_rev()\n\n stage = dvc.imp(os.fspath(erepo_dir), \"version\", \"version\", rev=\"branch\")\n dir_stage = dvc.imp(os.fspath(erepo_dir), \"dir\", \"dir\", rev=\"branch\")\n assert dvc.status() == {}\n\n assert (tmp_dir / \"version\").read_text() == \"branch\"\n assert (tmp_dir / \"dir\").read_text() == {\n \"version\": \"branch\",\n \"subdir\": {\"file\": \"file\"},\n }\n assert stage.deps[0].def_repo[\"rev_lock\"] == old_rev\n assert dir_stage.deps[0].def_repo[\"rev_lock\"] == old_rev\n\n # Update version file\n with erepo_dir.branch(\"branch\", new=False), erepo_dir.chdir():\n gen(\n {\n \"version\": \"updated\",\n \"dir\": {\"version\": \"updated\", \"subdir\": {\"file\": \"file\"}},\n },\n commit=\"update version content\",\n )\n new_rev = erepo_dir.scm.get_rev()\n\n assert old_rev != new_rev\n\n assert dvc.status() == {\n \"dir.dvc\": [\n {\n \"changed deps\": {\n f\"dir ({os.fspath(erepo_dir)})\": \"update available\"\n }\n }\n ],\n \"version.dvc\": [\n {\n \"changed deps\": {\n f\"version ({os.fspath(erepo_dir)})\": \"update available\"\n }\n }\n ],\n }\n\n (stage,) = dvc.update(stage.path)\n (dir_stage,) = dvc.update(dir_stage.path)\n assert dvc.status() == {}\n\n assert (tmp_dir / \"version\").read_text() == \"updated\"\n assert (tmp_dir / \"dir\").read_text() == {\n \"version\": \"updated\",\n \"subdir\": {\"file\": \"file\"},\n }\n\n assert stage.deps[0].def_repo[\"rev_lock\"] == new_rev\n assert dir_stage.deps[0].def_repo[\"rev_lock\"] == new_rev", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/pylint_plugin_disable.py___": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/pylint_plugin_disable.py___", "embedding": null, "metadata": {"file_path": "tests/pylint_plugin_disable.py", "file_name": "pylint_plugin_disable.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 48, "span_ids": ["register", "is_node_in_tests", "docstring"], "tokens": 309}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"\nDisable certain checks for the tests.\n\nTo disable new checks, add to the `SUPPRESS_CHECKS` dictionary,\nwith `message_id` of the check to disable as a key and a list of\nmethods that check for that particular message.\n\"\"\"\nimport os.path\nfrom typing import TYPE_CHECKING\n\nfrom pylint.checkers.base import NameChecker\nfrom pylint.checkers.classes import ClassChecker\n\nif TYPE_CHECKING:\n from astroid import node_classes, scoped_nodes # noqa\n from pylint.lint import PyLinter\n\n\nTESTS_FOLDER = os.path.join(os.path.abspath(os.path.dirname(__file__)), \"\")\nSUPPRESS_CHECKS = {\n \"protected-access\": [\n ClassChecker.visit_assign,\n ClassChecker.visit_attribute,\n ],\n \"blacklisted-name\": [\n NameChecker.visit_global,\n NameChecker.visit_assignname,\n ],\n}\n\n\ndef is_node_in_tests(node: \"node_classes.NodeNG\"):\n module: \"scoped_nodes.Module\" = node.root()\n return module.file.startswith(TESTS_FOLDER)\n\n\ndef register(linter: \"PyLinter\"): # noqa\n try:\n from pylint_plugin_utils import suppress_message\n except ImportError:\n print(\"Cannot suppress message. 'pylint_plugin_utils' not installed.\")\n return\n\n print(\"Registered custom plugin. Some checks will be disabled for tests.\")\n for msg, checks in SUPPRESS_CHECKS.items():\n for checker_method in checks:\n suppress_message(linter, checker_method, msg, is_node_in_tests)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/base.py_pathlib_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/base.py_pathlib_", "embedding": null, "metadata": {"file_path": "tests/remotes/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 70, "span_ids": ["Base.gen", "Base.write_text", "Base.config", "Base.exists", "imports", "Base", "Base.read_text", "Base.read_bytes", "Base.get_url", "Base.is_dir", "Base._gen", "Base.close", "Base.mkdir", "Base.is_file", "Base.write_bytes", "Base.should_test"], "tokens": 328}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pathlib\n\nfrom funcy import cached_property\n\nfrom dvc.path_info import URLInfo\n\n\nclass Base(URLInfo):\n def is_file(self):\n raise NotImplementedError\n\n def is_dir(self):\n raise NotImplementedError\n\n def exists(self):\n raise NotImplementedError\n\n def mkdir(self, mode=0o777, parents=False, exist_ok=False):\n raise NotImplementedError\n\n def write_text(self, contents, encoding=None, errors=None):\n raise NotImplementedError\n\n def write_bytes(self, contents):\n raise NotImplementedError\n\n def read_text(self, encoding=None, errors=None):\n raise NotImplementedError\n\n def read_bytes(self):\n raise NotImplementedError\n\n def _gen(self, struct, prefix=None):\n for name, contents in struct.items():\n path = (prefix or self) / name\n\n if isinstance(contents, dict):\n if not contents:\n path.mkdir(parents=True)\n else:\n self._gen(contents, prefix=path)\n else:\n path.parent.mkdir(parents=True)\n if isinstance(contents, bytes):\n path.write_bytes(contents)\n else:\n path.write_text(contents, encoding=\"utf-8\")\n\n def gen(self, struct, text=\"\"):\n if isinstance(struct, (str, bytes, pathlib.PurePath)):\n struct = {struct: text}\n\n self._gen(struct)\n return struct.keys()\n\n def close(self):\n pass\n\n @staticmethod\n def should_test():\n return True\n\n @staticmethod\n def get_url():\n raise NotImplementedError\n\n @cached_property\n def config(self):\n return {\"url\": self.url}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/gdrive.py__pylint_disable_abstract_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/gdrive.py__pylint_disable_abstract_", "embedding": null, "metadata": {"file_path": "tests/remotes/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 53, "span_ids": ["gdrive", "GDrive", "docstring", "GDrive.should_test", "GDrive._get_storagepath", "GDrive.get_url", "GDrive.config"], "tokens": 319}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# pylint:disable=abstract-method\nimport os\nimport uuid\n\nimport pytest\nfrom funcy import cached_property\n\nfrom dvc.path_info import CloudURLInfo\nfrom dvc.tree.gdrive import GDriveTree\n\nfrom .base import Base\n\nTEST_GDRIVE_REPO_BUCKET = \"root\"\n\n\nclass GDrive(Base, CloudURLInfo):\n @staticmethod\n def should_test():\n return bool(os.getenv(GDriveTree.GDRIVE_CREDENTIALS_DATA))\n\n @cached_property\n def config(self):\n return {\n \"url\": self.url,\n \"gdrive_service_account_email\": \"test\",\n \"gdrive_service_account_p12_file_path\": \"test.p12\",\n \"gdrive_use_service_account\": True,\n }\n\n @staticmethod\n def _get_storagepath():\n return TEST_GDRIVE_REPO_BUCKET + \"/\" + str(uuid.uuid4())\n\n @staticmethod\n def get_url():\n # NOTE: `get_url` should always return new random url\n return \"gdrive://\" + GDrive._get_storagepath()\n\n\n@pytest.fixture\ndef gdrive(test_config, make_tmp_dir):\n test_config.requires(\"gdrive\")\n if not GDrive.should_test():\n pytest.skip(\"no gdrive\")\n\n # NOTE: temporary workaround\n tmp_dir = make_tmp_dir(\"gdrive\", dvc=True)\n\n ret = GDrive(GDrive.get_url())\n tree = GDriveTree(tmp_dir.dvc, ret.config)\n tree._gdrive_create_dir(\"root\", tree.path_info.path)\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/gs.py_locale_os_environ_GOOGLE_APPLIC": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/gs.py_locale_os_environ_GOOGLE_APPLIC", "embedding": null, "metadata": {"file_path": "tests/remotes/gs.py", "file_name": "gs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 22, "span_ids": ["imports"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import locale\nimport os\nimport uuid\n\nimport pytest\nfrom funcy import cached_property\n\nfrom dvc.path_info import CloudURLInfo\nfrom dvc.utils import env2bool\n\nfrom .base import Base\n\nTEST_GCP_REPO_BUCKET = os.environ.get(\"DVC_TEST_GCP_REPO_BUCKET\", \"dvc-test\")\n\nTEST_GCP_CREDS_FILE = os.path.abspath(\n os.environ.get(\n \"GOOGLE_APPLICATION_CREDENTIALS\",\n os.path.join(\"scripts\", \"ci\", \"gcp-creds.json\"),\n )\n)\n# Ensure that absolute path is used\nos.environ[\"GOOGLE_APPLICATION_CREDENTIALS\"] = TEST_GCP_CREDS_FILE", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/http.py__pylint_disable_abstract_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/http.py__pylint_disable_abstract_", "embedding": null, "metadata": {"file_path": "tests/remotes/http.py", "file_name": "http.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 50, "span_ids": ["HTTP.write_text", "HTTP.get_url", "http", "http_server", "HTTP", "HTTP.write_bytes", "HTTP.mkdir", "docstring"], "tokens": 293}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# pylint:disable=abstract-method\nimport locale\nimport os\nimport uuid\n\nimport pytest\nimport requests\n\nfrom dvc.path_info import HTTPURLInfo\n\nfrom .base import Base\n\n\nclass HTTP(Base, HTTPURLInfo):\n @staticmethod\n def get_url(port): # pylint: disable=arguments-differ\n dname = str(uuid.uuid4())\n return f\"http://127.0.0.1:{port}/{dname}\"\n\n def mkdir(self, mode=0o777, parents=False, exist_ok=False):\n assert mode == 0o777\n assert parents\n assert not exist_ok\n\n def write_bytes(self, contents):\n assert isinstance(contents, bytes)\n response = requests.post(self.url, data=contents)\n assert response.status_code == 200\n\n def write_text(self, contents, encoding=None, errors=None):\n if not encoding:\n encoding = locale.getpreferredencoding(False)\n assert errors is None\n self.write_bytes(contents.encode(encoding))\n\n\n@pytest.fixture(scope=\"session\")\ndef http_server(test_config, tmp_path_factory):\n from tests.utils.httpd import StaticFileServer\n\n test_config.requires(\"http\")\n directory = os.fspath(tmp_path_factory.mktemp(\"http\"))\n with StaticFileServer(directory=directory) as httpd:\n yield httpd\n\n\n@pytest.fixture\ndef http(http_server):\n yield HTTP(HTTP.get_url(http_server.server_port))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/local.py__pylint_disable_cyclic__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/local.py__pylint_disable_cyclic__", "embedding": null, "metadata": {"file_path": "tests/remotes/local.py", "file_name": "local.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 31, "span_ids": ["Local", "local_cloud", "local_remote", "Local.get_url", "Local.get_storagepath", "docstring"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# pylint: disable=cyclic-import,disable=abstract-method\nimport pytest\n\nfrom tests.basic_env import TestDvc\n\nfrom .base import Base\n\n\nclass Local(Base):\n @staticmethod\n def get_storagepath():\n return TestDvc.mkdtemp()\n\n @staticmethod\n def get_url():\n return Local.get_storagepath()\n\n\n@pytest.fixture\ndef local_cloud(make_tmp_dir):\n ret = make_tmp_dir(\"local-cloud\")\n ret.url = str(ret)\n ret.config = {\"url\": ret.url}\n return ret\n\n\n@pytest.fixture\ndef local_remote(tmp_dir, dvc, local_cloud):\n tmp_dir.add_remote(config=local_cloud.config)\n yield local_cloud", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/s3.py_locale_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/s3.py_locale_", "embedding": null, "metadata": {"file_path": "tests/remotes/s3.py", "file_name": "s3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 118, "span_ids": ["S3.is_file", "real_s3", "S3._s3", "imports", "S3._get_storagepath", "S3.is_dir", "S3.write_text", "S3.read_text", "S3.read_bytes", "S3.should_test", "S3.exists", "S3.mkdir", "S3", "S3.write_bytes", "S3.get_url", "s3"], "tokens": 663}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import locale\nimport os\nimport uuid\n\nimport pytest\nfrom funcy import cached_property\nfrom moto import mock_s3\n\nfrom dvc.path_info import CloudURLInfo\nfrom dvc.utils import env2bool\n\nfrom .base import Base\n\nTEST_AWS_REPO_BUCKET = os.environ.get(\"DVC_TEST_AWS_REPO_BUCKET\", \"dvc-temp\")\n\n\nclass S3(Base, CloudURLInfo):\n @staticmethod\n def should_test():\n do_test = env2bool(\"DVC_TEST_AWS\", undefined=None)\n if do_test is not None:\n return do_test\n\n if os.getenv(\"AWS_ACCESS_KEY_ID\") and os.getenv(\n \"AWS_SECRET_ACCESS_KEY\"\n ):\n return True\n\n return False\n\n @staticmethod\n def _get_storagepath():\n return (\n TEST_AWS_REPO_BUCKET\n + \"/\"\n + \"dvc_test_caches\"\n + \"/\"\n + str(uuid.uuid4())\n )\n\n @staticmethod\n def get_url():\n return \"s3://\" + S3._get_storagepath()\n\n @cached_property\n def _s3(self):\n import boto3\n\n return boto3.client(\"s3\")\n\n def is_file(self):\n from botocore.exceptions import ClientError\n\n if self.path.endswith(\"/\"):\n return False\n\n try:\n self._s3.head_object(Bucket=self.bucket, Key=self.path)\n except ClientError as exc:\n if exc.response[\"Error\"][\"Code\"] != \"404\":\n raise\n return False\n\n return True\n\n def is_dir(self):\n path = (self / \"\").path\n resp = self._s3.list_objects(Bucket=self.bucket, Prefix=path)\n return bool(resp.get(\"Contents\"))\n\n def exists(self):\n return self.is_file() or self.is_dir()\n\n def mkdir(self, mode=0o777, parents=False, exist_ok=False):\n assert mode == 0o777\n assert parents\n assert not exist_ok\n\n def write_bytes(self, contents):\n self._s3.put_object(\n Bucket=self.bucket, Key=self.path, Body=contents,\n )\n\n def write_text(self, contents, encoding=None, errors=None):\n if not encoding:\n encoding = locale.getpreferredencoding(False)\n assert errors is None\n self.write_bytes(contents.encode(encoding))\n\n def read_bytes(self):\n data = self._s3.get_object(Bucket=self.bucket, Key=self.path)\n return data[\"Body\"].read()\n\n def read_text(self, encoding=None, errors=None):\n if not encoding:\n encoding = locale.getpreferredencoding(False)\n assert errors is None\n return self.read_bytes().decode(encoding)\n\n\n@pytest.fixture\ndef s3(test_config):\n test_config.requires(\"s3\")\n with mock_s3():\n import boto3\n\n boto3.client(\"s3\").create_bucket(Bucket=TEST_AWS_REPO_BUCKET)\n\n yield S3(S3.get_url())\n\n\n@pytest.fixture\ndef real_s3(test_config):\n test_config.requires(\"s3\")\n if not S3.should_test():\n pytest.skip(\"no real s3\")\n yield S3(S3.get_url())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/ssh.py_SSHMocked.config_SSHMocked.read_text.return.self_read_bytes_decode_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/ssh.py_SSHMocked.config_SSHMocked.read_text.return.self_read_bytes_decode_", "embedding": null, "metadata": {"file_path": "tests/remotes/ssh.py", "file_name": "ssh.py", "file_type": "text/x-python", "category": "implementation", "start_line": 41, "end_line": 106, "span_ids": ["SSHMocked.write_bytes", "SSHMocked.exists", "SSHMocked.mkdir", "SSHMocked.is_file", "SSHMocked._ssh", "SSHMocked.config", "SSHMocked.is_dir", "SSHMocked.write_text", "SSHMocked.read_text", "SSHMocked.read_bytes"], "tokens": 428}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SSHMocked(Base, URLInfo):\n\n @cached_property\n def config(self):\n return {\n \"url\": self.url,\n \"keyfile\": TEST_SSH_KEY_PATH,\n }\n\n @contextmanager\n def _ssh(self):\n from dvc.tree.ssh.connection import SSHConnection\n\n conn = SSHConnection(\n host=self.host,\n port=self.port,\n username=TEST_SSH_USER,\n key_filename=TEST_SSH_KEY_PATH,\n )\n try:\n yield conn\n finally:\n conn.close()\n\n def is_file(self):\n with self._ssh() as _ssh:\n return _ssh.isfile(self.path)\n\n def is_dir(self):\n with self._ssh() as _ssh:\n return _ssh.isdir(self.path)\n\n def exists(self):\n with self._ssh() as _ssh:\n return _ssh.exists(self.path)\n\n def mkdir(self, mode=0o777, parents=False, exist_ok=False):\n assert mode == 0o777\n assert parents\n assert not exist_ok\n\n with self._ssh() as _ssh:\n _ssh.makedirs(self.path)\n\n def write_bytes(self, contents):\n assert isinstance(contents, bytes)\n with self._ssh() as _ssh:\n with _ssh.open(self.path, \"w+\") as fobj:\n # NOTE: accepts both str and bytes\n fobj.write(contents)\n\n def write_text(self, contents, encoding=None, errors=None):\n if not encoding:\n encoding = locale.getpreferredencoding(False)\n assert errors is None\n self.write_bytes(contents.encode(encoding))\n\n def read_bytes(self):\n with self._ssh() as _ssh:\n # NOTE: sftp always reads in binary format\n with _ssh.open(self.path, \"r\") as fobj:\n return fobj.read()\n\n def read_text(self, encoding=None, errors=None):\n if not encoding:\n encoding = locale.getpreferredencoding(False)\n assert errors is None\n return self.read_bytes().decode(encoding)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote_tree.py_os_remote.return.get_remote_dvc_cloud_c": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote_tree.py_os_remote.return.get_remote_dvc_cloud_c", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_remote_tree.py", "file_name": "test_remote_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 32, "span_ids": ["imports", "remote"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nimport pytest\n\nfrom dvc.path_info import PathInfo\nfrom dvc.remote import get_remote\nfrom dvc.tree.s3 import S3Tree\nfrom dvc.utils.fs import walk_files\n\nremotes = [pytest.lazy_fixture(fix) for fix in [\"gs\", \"s3\"]]\n\nFILE_WITH_CONTENTS = {\n \"data1.txt\": \"\",\n \"empty_dir/\": \"\",\n \"empty_file\": \"\",\n \"foo\": \"foo\",\n \"data/alice\": \"alice\",\n \"data/alpha\": \"alpha\",\n \"data/subdir-file.txt\": \"subdir\",\n \"data/subdir/1\": \"1\",\n \"data/subdir/2\": \"2\",\n \"data/subdir/3\": \"3\",\n \"data/subdir/empty_dir/\": \"\",\n \"data/subdir/empty_file\": \"\",\n}\n\n\n@pytest.fixture\ndef remote(request, dvc):\n cloud = request.param\n cloud.gen(FILE_WITH_CONTENTS)\n return get_remote(dvc, **cloud.config)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/utils/__init__.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/utils/__init__.py__", "embedding": null, "metadata": {"file_path": "tests/utils/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 24, "span_ids": ["imports", "get_gitignore_content", "to_posixpath", "cd"], "tokens": 102}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nfrom contextlib import contextmanager\n\nfrom dvc.scm import Git\n\n\ndef get_gitignore_content():\n with open(Git.GITIGNORE) as gitignore:\n return gitignore.read().splitlines()\n\n\n@contextmanager\ndef cd(newdir):\n prevdir = os.getcwd()\n os.chdir(os.path.expanduser(newdir))\n try:\n yield\n finally:\n os.chdir(prevdir)\n\n\ndef to_posixpath(path):\n return path.replace(\"\\\\\", \"/\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/utils/httpd.py_hashlib_TestRequestHandler.translate_path.return.path": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/utils/httpd.py_hashlib_TestRequestHandler.translate_path.return.path", "embedding": null, "metadata": {"file_path": "tests/utils/httpd.py", "file_name": "httpd.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 46, "span_ids": ["imports", "TestRequestHandler.translate_path", "TestRequestHandler.__init__", "TestRequestHandler"], "tokens": 346}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import hashlib\nimport os\nimport sys\nimport threading\nfrom contextlib import contextmanager\nfrom http import HTTPStatus\nfrom http.server import HTTPServer\n\nfrom RangeHTTPServer import RangeRequestHandler\n\n\nclass TestRequestHandler(RangeRequestHandler):\n def __init__(self, *args, **kwargs):\n # NOTE: `directory` was introduced in 3.7\n if sys.version_info < (3, 7):\n self.directory = kwargs.pop(\"directory\", None) or os.getcwd()\n super().__init__(*args, **kwargs)\n\n def translate_path(self, path):\n import posixpath\n import urllib\n\n # NOTE: `directory` was introduced in 3.7\n if sys.version_info >= (3, 7):\n return super().translate_path(path)\n\n path = path.split(\"?\", 1)[0]\n path = path.split(\"#\", 1)[0]\n # Don't forget explicit trailing slash when normalizing. Issue17324\n trailing_slash = path.rstrip().endswith(\"/\")\n try:\n path = urllib.parse.unquote(path, errors=\"surrogatepass\")\n except UnicodeDecodeError:\n path = urllib.parse.unquote(path)\n path = posixpath.normpath(path)\n words = path.split(\"/\")\n words = filter(None, words)\n path = self.directory\n for word in words:\n if os.path.dirname(word) or word in (os.curdir, os.pardir):\n # Ignore components that are not a simple file/directory name\n continue\n path = os.path.join(path, word)\n if trailing_slash:\n path += \"/\"\n return path", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/utils/httpd.py_TestRequestHandler.end_headers_TestRequestHandler.end_headers.RangeRequestHandler_end_h": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/utils/httpd.py_TestRequestHandler.end_headers_TestRequestHandler.end_headers.RangeRequestHandler_end_h", "embedding": null, "metadata": {"file_path": "tests/utils/httpd.py", "file_name": "httpd.py", "file_type": "text/x-python", "category": "implementation", "start_line": 47, "end_line": 62, "span_ids": ["TestRequestHandler.end_headers"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRequestHandler(RangeRequestHandler):\n\n def end_headers(self):\n # RangeRequestHandler only sends Accept-Ranges header if Range header\n # is present, see https://github.com/danvk/RangeHTTPServer/issues/23\n if not self.headers.get(\"Range\"):\n self.send_header(\"Accept-Ranges\", \"bytes\")\n\n # Add a checksum header\n file = self.translate_path(self.path)\n\n if not os.path.isdir(file) and os.path.exists(file):\n with open(file) as fd:\n encoded_text = fd.read().encode(\"utf8\")\n checksum = hashlib.md5(encoded_text).hexdigest()\n self.send_header(\"Content-MD5\", checksum)\n\n RangeRequestHandler.end_headers(self)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/utils/httpd.py_TestRequestHandler._chunks_TestRequestHandler.do_POST.self_end_headers_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/utils/httpd.py_TestRequestHandler._chunks_TestRequestHandler.do_POST.self_end_headers_", "embedding": null, "metadata": {"file_path": "tests/utils/httpd.py", "file_name": "httpd.py", "file_type": "text/x-python", "category": "implementation", "start_line": 64, "end_line": 89, "span_ids": ["TestRequestHandler.do_POST", "TestRequestHandler._chunks"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestRequestHandler(RangeRequestHandler):\n\n def _chunks(self):\n while True:\n data = self.rfile.readline(65537)\n chunk_size = int(data[:-2], 16)\n if chunk_size == 0:\n return\n data = self.rfile.read(chunk_size)\n yield data\n self.rfile.read(2)\n\n def do_POST(self):\n chunked = self.headers.get(\"Transfer-Encoding\", \"\") == \"chunked\"\n path = self.translate_path(self.path)\n try:\n os.makedirs(os.path.dirname(path), exist_ok=True)\n with open(path, \"wb\") as fd:\n if chunked:\n for chunk in self._chunks():\n fd.write(chunk)\n else:\n size = int(self.headers.get(\"Content-Length\", 0))\n fd.write(self.rfile.read(size))\n except OSError as e:\n self.send_error(HTTPStatus.INTERNAL_SERVER_ERROR, str(e))\n self.send_response(HTTPStatus.OK)\n self.end_headers()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cli.py__DVC_command_line_inter__find_parser.for_action_in_actions_.for_subparser_in_action_c._find_parser_subparser_c": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cli.py__DVC_command_line_inter__find_parser.for_action_in_actions_.for_subparser_in_action_c._find_parser_subparser_c", "embedding": null, "metadata": {"file_path": "dvc/cli.py", "file_name": "cli.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 100, "span_ids": ["_find_parser", "docstring"], "tokens": 391}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"DVC command line interface\"\"\"\nimport argparse\nimport logging\nimport os\nimport sys\n\nfrom .command import (\n add,\n cache,\n check_ignore,\n checkout,\n commit,\n completion,\n config,\n daemon,\n dag,\n data_sync,\n destroy,\n diff,\n experiments,\n freeze,\n gc,\n get,\n get_url,\n git_hook,\n imp,\n imp_url,\n init,\n install,\n ls,\n metrics,\n move,\n params,\n plots,\n remote,\n remove,\n repro,\n root,\n run,\n unprotect,\n update,\n version,\n)\nfrom .command.base import fix_subparsers\nfrom .exceptions import DvcParserError\n\nlogger = logging.getLogger(__name__)\n\nCOMMANDS = [\n init,\n get,\n get_url,\n destroy,\n add,\n remove,\n move,\n unprotect,\n run,\n repro,\n data_sync,\n gc,\n imp,\n imp_url,\n config,\n checkout,\n remote,\n cache,\n metrics,\n params,\n install,\n root,\n ls,\n freeze,\n dag,\n daemon,\n commit,\n completion,\n diff,\n version,\n update,\n git_hook,\n plots,\n experiments,\n check_ignore,\n]\n\n\ndef _find_parser(parser, cmd_cls):\n defaults = parser._defaults # pylint: disable=protected-access\n if not cmd_cls or cmd_cls == defaults.get(\"func\"):\n parser.print_help()\n raise DvcParserError()\n\n actions = parser._actions # pylint: disable=protected-access\n for action in actions:\n if not isinstance(action.choices, dict):\n # NOTE: we are only interested in subparsers\n continue\n for subparser in action.choices.values():\n _find_parser(subparser, cmd_cls)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/azure.py__pylint_disable_abstract_Azure.pass": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/azure.py__pylint_disable_abstract_Azure.pass", "embedding": null, "metadata": {"file_path": "tests/remotes/azure.py", "file_name": "azure.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 22, "span_ids": ["Azure", "docstring"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# pylint:disable=abstract-method\n\nimport uuid\n\nimport pytest\n\nfrom dvc.path_info import CloudURLInfo\n\nfrom .base import Base\n\nTEST_AZURE_CONTAINER = \"tests\"\nTEST_AZURE_CONNECTION_STRING = (\n \"DefaultEndpointsProtocol=http;\"\n \"AccountName=devstoreaccount1;\"\n \"AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSR\"\n \"Z6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;\"\n \"BlobEndpoint=http://127.0.0.1:{port}/devstoreaccount1;\"\n)\n\n\nclass Azure(Base, CloudURLInfo):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/azure.py_azure_server_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/azure.py_azure_server_", "embedding": null, "metadata": {"file_path": "tests/remotes/azure.py", "file_name": "azure.py", "file_type": "text/x-python", "category": "implementation", "start_line": 25, "end_line": 64, "span_ids": ["azure", "azure_server"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture(scope=\"session\")\ndef azure_server(test_config, docker_compose, docker_services):\n test_config.requires(\"azure\")\n\n from azure.core.exceptions import ( # pylint: disable=no-name-in-module\n AzureError,\n )\n from azure.storage.blob import ( # pylint: disable=no-name-in-module\n BlobServiceClient,\n )\n\n port = docker_services.port_for(\"azurite\", 10000)\n connection_string = TEST_AZURE_CONNECTION_STRING.format(port=port)\n\n def _check():\n try:\n BlobServiceClient.from_connection_string(\n connection_string\n ).list_containers()\n return True\n except AzureError:\n return False\n\n docker_services.wait_until_responsive(\n timeout=60.0, pause=0.1, check=_check\n )\n\n return connection_string\n\n\n@pytest.fixture\ndef azure(azure_server):\n url = f\"azure://{TEST_AZURE_CONTAINER}/{uuid.uuid4()}\"\n ret = Azure(url)\n ret.config = {\n \"url\": url,\n \"connection_string\": azure_server,\n }\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_azure.py_from_dvc_path_info_import_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_azure.py_from_dvc_path_info_import_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_azure.py", "file_name": "test_azure.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 45, "span_ids": ["test_init", "imports", "test_get_file_hash", "test_init_env_var"], "tokens": 395}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.path_info import PathInfo\nfrom dvc.tree.azure import AzureTree\n\ncontainer_name = \"container-name\"\nconnection_string = (\n \"DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;\"\n \"AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsu\"\n \"Fq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;\"\n \"BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;\"\n)\n\n\ndef test_init_env_var(monkeypatch, dvc):\n monkeypatch.setenv(\"AZURE_STORAGE_CONTAINER_NAME\", container_name)\n monkeypatch.setenv(\"AZURE_STORAGE_CONNECTION_STRING\", connection_string)\n\n config = {\"url\": \"azure://\"}\n tree = AzureTree(dvc, config)\n assert tree.path_info == \"azure://\" + container_name\n assert tree._conn_str == connection_string\n\n\ndef test_init(dvc):\n prefix = \"some/prefix\"\n url = f\"azure://{container_name}/{prefix}\"\n config = {\"url\": url, \"connection_string\": connection_string}\n tree = AzureTree(dvc, config)\n assert tree.path_info == url\n assert tree._conn_str == connection_string\n\n\ndef test_get_file_hash(tmp_dir, azure):\n tmp_dir.gen(\"foo\", \"foo\")\n\n tree = AzureTree(None, azure.config)\n to_info = azure\n tree.upload(PathInfo(\"foo\"), to_info)\n assert tree.exists(to_info)\n hash_info = tree.get_file_hash(to_info)\n assert hash_info.name == \"etag\"\n hash_ = hash_info.value\n assert hash_\n assert isinstance(hash_, str)\n assert hash_.strip(\"'\").strip('\"') == hash_", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_ignore.py_os_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_ignore.py_os_", "embedding": null, "metadata": {"file_path": "tests/unit/test_ignore.py", "file_name": "test_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 210, "span_ids": ["imports", "mock_dvcignore", "test_should_ignore_dir"], "tokens": 268}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nimport pytest\nfrom mock import MagicMock, mock_open, patch\n\nfrom dvc.ignore import DvcIgnorePatterns\n\n\ndef mock_dvcignore(dvcignore_path, patterns):\n tree = MagicMock()\n with patch.object(tree, \"open\", mock_open(read_data=\"\\n\".join(patterns))):\n ignore_patterns = DvcIgnorePatterns.from_files(dvcignore_path, tree)\n\n return ignore_patterns\n\n\n@pytest.mark.parametrize(\"sub_dir\", [\"\", \"dir\"])\n@pytest.mark.parametrize(\"omit_dir\", [\".git\", \".hg\", \".dvc\"])\ndef test_should_ignore_dir(omit_dir, sub_dir):\n root = os.path.join(os.path.sep, \"walk\", \"dir\", \"root\")\n ignore = DvcIgnorePatterns([\".git/\", \".hg/\", \".dvc/\"], root)\n\n dirs = [omit_dir, \"dir1\", \"dir2\"]\n files = [omit_dir, \"file1\", \"file2\"]\n\n if sub_dir:\n current = os.path.join(root, sub_dir)\n else:\n current = root\n\n new_dirs, new_files = ignore(current, dirs, files)\n\n assert set(new_dirs) == {\"dir1\", \"dir2\"}\n assert set(new_files) == {\"file1\", \"file2\", omit_dir}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/api.py_os_get_url.with__make_repo_repo_rev.return.cloud_get_url_for_remote_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/api.py_os_get_url.with__make_repo_repo_rev.return.cloud_get_url_for_remote_", "embedding": null, "metadata": {"file_path": "dvc/api.py", "file_name": "api.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 38, "span_ids": ["imports", "get_url"], "tokens": 290}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nfrom contextlib import _GeneratorContextManager as GCM\nfrom contextlib import contextmanager\n\nfrom funcy import reraise\n\nfrom dvc.exceptions import (\n NotDvcRepoError,\n OutputNotFoundError,\n PathMissingError,\n)\nfrom dvc.external_repo import external_repo\nfrom dvc.path_info import PathInfo\nfrom dvc.repo import Repo\n\n\ndef get_url(path, repo=None, rev=None, remote=None):\n \"\"\"\n Returns the URL to the storage location of a data file or directory tracked\n in a DVC repo. For Git repos, HEAD is used unless a rev argument is\n supplied. The default remote is tried unless a remote argument is supplied.\n\n Raises OutputNotFoundError if the file is not tracked by DVC.\n\n NOTE: This function does not check for the actual existence of the file or\n directory in the remote storage.\n \"\"\"\n with _make_repo(repo, rev=rev) as _repo:\n path_info = PathInfo(_repo.root_dir) / path\n with reraise(FileNotFoundError, PathMissingError(path, repo)):\n metadata = _repo.repo_tree.metadata(path_info)\n\n if not metadata.is_dvc:\n raise OutputNotFoundError(path, repo)\n\n cloud = metadata.repo.cloud\n hash_info = _repo.repo_tree.get_hash(path_info)\n return cloud.get_url_for(remote, checksum=hash_info.value)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/api.py_read__make_repo.with_external_repo_url_re.yield_repo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/api.py_read__make_repo.with_external_repo_url_re.yield_repo", "embedding": null, "metadata": {"file_path": "dvc/api.py", "file_name": "api.py", "file_type": "text/x-python", "category": "implementation", "start_line": 88, "end_line": 110, "span_ids": ["read", "_make_repo"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def read(path, repo=None, rev=None, remote=None, mode=\"r\", encoding=None):\n \"\"\"\n Returns the contents of a tracked file (by DVC or Git). For Git repos, HEAD\n is used unless a rev argument is supplied. The default remote is tried\n unless a remote argument is supplied.\n \"\"\"\n with open(\n path, repo=repo, rev=rev, remote=remote, mode=mode, encoding=encoding\n ) as fd:\n return fd.read()\n\n\n@contextmanager\ndef _make_repo(repo_url=None, rev=None):\n repo_url = repo_url or os.getcwd()\n if rev is None and os.path.exists(repo_url):\n try:\n yield Repo(repo_url, subrepos=True)\n return\n except NotDvcRepoError:\n pass # fallthrough to external_repo\n with external_repo(url=repo_url, rev=rev) as repo:\n yield repo", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/api.py_make_checkpoint_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/api.py_make_checkpoint_", "embedding": null, "metadata": {"file_path": "dvc/api.py", "file_name": "api.py", "file_type": "text/x-python", "category": "implementation", "start_line": 113, "end_line": 143, "span_ids": ["make_checkpoint"], "tokens": 228}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def make_checkpoint():\n \"\"\"\n Signal DVC to create a checkpoint experiment.\n\n If the current process is being run from DVC, this function will block\n until DVC has finished creating the checkpoint. Otherwise, this function\n will return immediately.\n \"\"\"\n import builtins\n from time import sleep\n\n from dvc.env import DVC_CHECKPOINT, DVC_ROOT\n from dvc.stage.run import CHECKPOINT_SIGNAL_FILE\n\n if os.getenv(DVC_CHECKPOINT) is None:\n return\n\n root_dir = os.getenv(DVC_ROOT, Repo.find_root())\n signal_file = os.path.join(\n root_dir, Repo.DVC_DIR, \"tmp\", CHECKPOINT_SIGNAL_FILE\n )\n\n with builtins.open(signal_file, \"w\") as fobj:\n # NOTE: force flushing/writing empty file to disk, otherwise when\n # run in certain contexts (pytest) file may not actually be written\n fobj.write(\"\")\n fobj.flush()\n os.fsync(fobj.fileno())\n while os.path.exists(signal_file):\n sleep(1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/__init__.py_NamedCacheItem_NamedCacheItem.update.for_checksum_child_item_.self_children_checksum_u": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/__init__.py_NamedCacheItem_NamedCacheItem.update.for_checksum_child_item_.self_children_checksum_u", "embedding": null, "metadata": {"file_path": "dvc/cache/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 86, "end_line": 113, "span_ids": ["NamedCacheItem.child_keys", "NamedCacheItem", "NamedCacheItem.update", "NamedCacheItem.__eq__", "NamedCacheItem.__init__", "NamedCacheItem.child_names", "NamedCacheItem.add"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NamedCacheItem:\n def __init__(self):\n self.names = set()\n self.children = defaultdict(NamedCacheItem)\n\n def __eq__(self, other):\n return self.names == other.names and self.children == other.children\n\n def child_keys(self):\n for key, child in self.children.items():\n yield key\n yield from child.child_keys()\n\n def child_names(self):\n for key, child in self.children.items():\n yield key, child.names\n yield from child.child_names()\n\n def add(self, checksum, item):\n self.children[checksum].update(item)\n\n def update(self, item, suffix=\"\"):\n if suffix:\n self.names.update(n + suffix for n in item.names)\n else:\n self.names.update(item.names)\n for checksum, child_item in item.children.items():\n self.children[checksum].update(child_item)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/__init__.py_NamedCache_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/__init__.py_NamedCache_", "embedding": null, "metadata": {"file_path": "dvc/cache/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 116, "end_line": 180, "span_ids": ["NamedCache.add_child_cache", "NamedCache.scheme_keys", "NamedCache.update", "NamedCache.child_keys", "NamedCache", "NamedCache.dir_keys", "NamedCache.__getitem__", "NamedCache.add", "NamedCache.__init__", "NamedCache.add_external", "NamedCache.make", "NamedCache.scheme_names"], "tokens": 483}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NamedCache:\n # pylint: disable=protected-access\n def __init__(self):\n self._items = defaultdict(lambda: defaultdict(NamedCacheItem))\n self.external = defaultdict(set)\n\n @classmethod\n def make(cls, scheme, checksum, name):\n cache = cls()\n cache.add(scheme, checksum, name)\n return cache\n\n def __getitem__(self, key):\n return self._items[key]\n\n def add(self, scheme, checksum, name):\n \"\"\"Add a mapped name for the specified checksum.\"\"\"\n self._items[scheme][checksum].names.add(name)\n\n def add_child_cache(self, checksum, cache, suffix=\"\"):\n \"\"\"Add/update child cache for the specified checksum.\"\"\"\n for scheme, src in cache._items.items():\n dst = self._items[scheme][checksum].children\n for child_checksum, item in src.items():\n dst[child_checksum].update(item, suffix=suffix)\n\n for repo_pair, files in cache.external.items():\n self.external[repo_pair].update(files)\n\n def add_external(self, url, rev, path):\n self.external[url, rev].add(path)\n\n def update(self, cache, suffix=\"\"):\n for scheme, src in cache._items.items():\n dst = self._items[scheme]\n for checksum, item in src.items():\n dst[checksum].update(item, suffix=suffix)\n\n for repo_pair, files in cache.external.items():\n self.external[repo_pair].update(files)\n\n def scheme_keys(self, scheme):\n \"\"\"Iterate over a flat list of all keys for the specified scheme,\n including children.\n \"\"\"\n for key, item in self._items[scheme].items():\n yield key\n yield from item.child_keys()\n\n def scheme_names(self, scheme):\n \"\"\"Iterate over a flat list of checksum, names items for the specified\n scheme, including children.\n \"\"\"\n for key, item in self._items[scheme].items():\n yield key, item.names\n yield from item.child_names()\n\n def dir_keys(self, scheme):\n return (\n key for key, item in self._items[scheme].items() if item.children\n )\n\n def child_keys(self, scheme, checksum):\n return self._items[scheme][checksum].child_keys()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache_CloudCache.get_dir_cache.return.dir_info": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache_CloudCache.get_dir_cache.return.dir_info", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 43, "end_line": 72, "span_ids": ["CloudCache", "CloudCache.__init__", "CloudCache.get_dir_cache"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n \"\"\"Cloud cache class.\"\"\"\n\n DEFAULT_CACHE_TYPES = [\"copy\"]\n CACHE_MODE: Optional[int] = None\n\n def __init__(self, tree):\n self.tree = tree\n self.repo = tree.repo\n\n self.cache_types = tree.config.get(\"type\") or copy(\n self.DEFAULT_CACHE_TYPES\n )\n self.cache_type_confirmed = False\n self._dir_info = {}\n\n def get_dir_cache(self, hash_info):\n assert hash_info\n\n dir_info = self._dir_info.get(hash_info.value)\n if dir_info:\n return dir_info\n\n try:\n dir_info = self.load_dir_cache(hash_info)\n except DirCacheError:\n dir_info = DirInfo()\n\n self._dir_info[hash_info.value] = dir_info\n return dir_info", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.changed_CloudCache.changed.return.False": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.changed_CloudCache.changed.return.False", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 92, "end_line": 138, "span_ids": ["CloudCache.changed"], "tokens": 310}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n def changed(self, path_info, hash_info):\n \"\"\"Checks if data has changed.\n\n A file is considered changed if:\n - It doesn't exist on the working directory (was unlinked)\n - Hash value is not computed (saving a new file)\n - The hash value stored is different from the given one\n - There's no file in the cache\n\n Args:\n path_info: dict with path information.\n hash: expected hash value for this data.\n\n Returns:\n bool: True if data has changed, False otherwise.\n \"\"\"\n\n logger.trace(\n \"checking if '%s'('%s') has changed.\", path_info, hash_info\n )\n\n if not self.tree.exists(path_info):\n logger.debug(\"'%s' doesn't exist.\", path_info)\n return True\n\n if not hash_info:\n logger.debug(\"hash value for '%s' is missing.\", path_info)\n return True\n\n if self.changed_cache(hash_info):\n logger.debug(\n \"cache for '%s'('%s') has changed.\", path_info, hash_info\n )\n return True\n\n actual = self.tree.get_hash(path_info)\n if hash_info != actual:\n logger.debug(\n \"hash value '%s' for '%s' has changed (actual '%s').\",\n hash_info,\n actual,\n path_info,\n )\n return True\n\n logger.trace(\"'%s' hasn't changed.\", path_info)\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.link_CloudCache._verify_link.self.cache_type_confirmed.True": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.link_CloudCache._verify_link.self.cache_type_confirmed.True", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 159, "end_line": 178, "span_ids": ["CloudCache.link", "CloudCache._verify_link", "CloudCache._link"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n def link(self, from_info, to_info):\n self._link(from_info, to_info, self.cache_types)\n\n def _link(self, from_info, to_info, link_types):\n assert self.tree.isfile(from_info)\n\n self.tree.makedirs(to_info.parent)\n\n self._try_links(from_info, to_info, link_types)\n\n def _verify_link(self, path_info, link_type):\n if self.cache_type_confirmed:\n return\n\n is_link = getattr(self.tree, f\"is_{link_type}\", None)\n if is_link and not is_link(path_info):\n self.tree.remove(path_info)\n raise DvcException(f\"failed to verify {link_type}\")\n\n self.cache_type_confirmed = True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._try_links_CloudCache._do_link.logger_debug_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._try_links_CloudCache._do_link.logger_debug_", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 181, "end_line": 206, "span_ids": ["CloudCache._try_links", "CloudCache._do_link"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n @slow_link_guard\n def _try_links(self, from_info, to_info, link_types):\n while link_types:\n link_method = getattr(self.tree, link_types[0])\n try:\n self._do_link(from_info, to_info, link_method)\n self._verify_link(to_info, link_types[0])\n return\n\n except DvcException as exc:\n logger.debug(\n \"Cache type '%s' is not supported: %s\", link_types[0], exc\n )\n del link_types[0]\n\n raise CacheLinkError([to_info])\n\n def _do_link(self, from_info, to_info, link_method):\n if self.tree.exists(to_info):\n raise DvcException(f\"Link '{to_info}' already exists!\")\n\n link_method(from_info, to_info)\n\n logger.debug(\n \"Created '%s': %s -> %s\", self.cache_types[0], from_info, to_info,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._save_file_CloudCache._save_file.self_tree_state_save_cach": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._save_file_CloudCache._save_file.self_tree_state_save_cach", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 188, "end_line": 224, "span_ids": ["CloudCache._save_file"], "tokens": 334}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n def _save_file(self, path_info, tree, hash_info, save_link=True, **kwargs):\n assert hash_info\n\n cache_info = self.tree.hash_to_path_info(hash_info.value)\n if tree == self.tree:\n if self.changed_cache(hash_info):\n self.tree.move(path_info, cache_info, mode=self.CACHE_MODE)\n self.link(cache_info, path_info)\n elif self.tree.iscopy(path_info) and self._cache_is_copy(\n path_info\n ):\n # Default relink procedure involves unneeded copy\n self.tree.unprotect(path_info)\n else:\n self.tree.remove(path_info)\n self.link(cache_info, path_info)\n\n if save_link:\n self.tree.state.save_link(path_info)\n # we need to update path and cache, since in case of reflink,\n # or copy cache type moving original file results in updates on\n # next executed command, which causes md5 recalculation\n self.tree.state.save(path_info, hash_info)\n else:\n if self.changed_cache(hash_info):\n with tree.open(path_info, mode=\"rb\") as fobj:\n # if tree has fetch enabled, DVC out will be fetched on\n # open and we do not need to read/copy any data\n if not (\n tree.isdvc(path_info, strict=False) and tree.fetch\n ):\n self.tree.copy_fobj(fobj, cache_info)\n callback = kwargs.get(\"download_callback\")\n if callback:\n callback(1)\n\n self.tree.state.save(cache_info, hash_info)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._cache_is_copy_CloudCache._cache_is_copy.return.self_cache_types_0_c": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._cache_is_copy_CloudCache._cache_is_copy.return.self_cache_types_0_c", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 245, "end_line": 265, "span_ids": ["CloudCache._cache_is_copy"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n def _cache_is_copy(self, path_info):\n \"\"\"Checks whether cache uses copies.\"\"\"\n if self.cache_type_confirmed:\n return self.cache_types[0] == \"copy\"\n\n if set(self.cache_types) <= {\"copy\"}:\n return True\n\n workspace_file = path_info.with_name(\".\" + uuid())\n test_cache_file = self.tree.path_info / \".cache_type_test_file\"\n if not self.tree.exists(test_cache_file):\n with self.tree.open(test_cache_file, \"wb\") as fobj:\n fobj.write(bytes(1))\n try:\n self.link(test_cache_file, workspace_file)\n finally:\n self.tree.remove(workspace_file)\n self.tree.remove(test_cache_file)\n\n self.cache_type_confirmed = True\n return self.cache_types[0] == \"copy\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._get_dir_info_hash_CloudCache._get_dir_info_hash.return.hash_info_to_info": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._get_dir_info_hash_CloudCache._get_dir_info_hash.return.hash_info_to_info", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 248, "end_line": 267, "span_ids": ["CloudCache._get_dir_info_hash"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n def _get_dir_info_hash(self, dir_info):\n import tempfile\n\n from dvc.path_info import PathInfo\n from dvc.utils import tmp_fname\n\n tmp = tempfile.NamedTemporaryFile(delete=False).name\n with open(tmp, \"w+\") as fobj:\n json.dump(dir_info.to_list(), fobj, sort_keys=True)\n\n from_info = PathInfo(tmp)\n to_info = self.tree.path_info / tmp_fname(\"\")\n self.tree.upload(from_info, to_info, no_progress_bar=True)\n\n hash_info = self.tree.get_file_hash(to_info)\n hash_info.value += self.tree.CHECKSUM_DIR_SUFFIX\n hash_info.dir_info = dir_info\n hash_info.nfiles = dir_info.nfiles\n\n return hash_info, to_info", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.save_dir_info_CloudCache.save_dir_info.return.hi": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.save_dir_info_CloudCache.save_dir_info.return.hi", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 269, "end_line": 286, "span_ids": ["CloudCache.save_dir_info"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n @use_state\n def save_dir_info(self, dir_info, hash_info=None):\n if (\n hash_info\n and hash_info.name == self.tree.PARAM_CHECKSUM\n and not self.changed_cache_file(hash_info)\n ):\n return hash_info\n\n hi, tmp_info = self._get_dir_info_hash(dir_info)\n new_info = self.tree.hash_to_path_info(hi.value)\n if self.changed_cache_file(hi):\n self.tree.makedirs(new_info.parent)\n self.tree.move(tmp_info, new_info, mode=self.CACHE_MODE)\n\n self.tree.state.save(new_info, hi)\n\n return hi", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._save_dir_CloudCache._save_dir.self_tree_state_save_cach": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._save_dir_CloudCache._save_dir.self_tree_state_save_cach", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 288, "end_line": 307, "span_ids": ["CloudCache._save_dir"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n def _save_dir(self, path_info, tree, hash_info, save_link=True, **kwargs):\n if not hash_info.dir_info:\n hash_info.dir_info = tree.cache.get_dir_cache(hash_info)\n hi = self.save_dir_info(hash_info.dir_info, hash_info)\n for entry_info, entry_hash in Tqdm(\n hi.dir_info.items(path_info),\n desc=\"Saving \" + path_info.name,\n unit=\"file\",\n ):\n self._save_file(\n entry_info, tree, entry_hash, save_link=False, **kwargs\n )\n\n if save_link:\n self.tree.state.save_link(path_info)\n if self.tree.exists(path_info):\n self.tree.state.save(path_info, hi)\n\n cache_info = self.tree.hash_to_path_info(hi.value)\n self.tree.state.save(cache_info, hi)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.save_CloudCache.hash_to_path.return.self_tree_hash_to_path_in": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.save_CloudCache.hash_to_path.return.self_tree_hash_to_path_in", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 333, "end_line": 355, "span_ids": ["CloudCache._save", "CloudCache.save", "CloudCache.hash_to_path"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n @use_state\n def save(self, path_info, tree, hash_info, save_link=True, **kwargs):\n if path_info.scheme != self.tree.scheme:\n raise RemoteActionNotImplemented(\n f\"save {path_info.scheme} -> {self.tree.scheme}\",\n self.tree.scheme,\n )\n\n self._save(path_info, tree, hash_info, save_link, **kwargs)\n\n def _save(self, path_info, tree, hash_info, save_link=True, **kwargs):\n to_info = self.tree.hash_to_path_info(hash_info.value)\n logger.debug(\"Saving '%s' to '%s'.\", path_info, to_info)\n\n if tree.isdir(path_info):\n self._save_dir(path_info, tree, hash_info, save_link, **kwargs)\n else:\n self._save_file(path_info, tree, hash_info, save_link, **kwargs)\n\n # Override to return path as a string instead of PathInfo for clouds\n # which support string paths (see local)\n def hash_to_path(self, hash_):\n return self.tree.hash_to_path_info(hash_)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.changed_cache_file_CloudCache.changed_cache_file.return.True": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.changed_cache_file_CloudCache.changed_cache_file.return.True", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 333, "end_line": 375, "span_ids": ["CloudCache.changed_cache_file"], "tokens": 293}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n def changed_cache_file(self, hash_info):\n \"\"\"Compare the given hash with the (corresponding) actual one.\n\n - Use `State` as a cache for computed hashes\n + The entries are invalidated by taking into account the following:\n * mtime\n * inode\n * size\n * hash\n\n - Remove the file from cache if it doesn't match the actual hash\n \"\"\"\n # Prefer string path over PathInfo when possible due to performance\n cache_info = self.hash_to_path(hash_info.value)\n if self.tree.is_protected(cache_info):\n logger.trace(\n \"Assuming '%s' is unchanged since it is read-only\", cache_info\n )\n return False\n\n actual = self.tree.get_hash(cache_info)\n\n logger.trace(\n \"cache '%s' expected '%s' actual '%s'\",\n cache_info,\n hash_info,\n actual,\n )\n\n if not hash_info or not actual:\n return True\n\n if actual.value.split(\".\")[0] == hash_info.value.split(\".\")[0]:\n # making cache file read-only so we don't need to check it\n # next time\n self.tree.protect(cache_info)\n return False\n\n if self.tree.exists(cache_info):\n logger.warning(\"corrupted cache file '%s'.\", cache_info)\n self.tree.remove(cache_info)\n\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._checkout_file_CloudCache._checkout_file.return.added_modified_and_not_r": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._checkout_file_CloudCache._checkout_file.return.added_modified_and_not_r", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 422, "end_line": 439, "span_ids": ["CloudCache._checkout_file"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n def _checkout_file(\n self, path_info, hash_info, force, progress_callback=None, relink=False\n ):\n \"\"\"The file is changed we need to checkout a new copy\"\"\"\n added, modified = True, False\n cache_info = self.tree.hash_to_path_info(hash_info.value)\n if self.tree.exists(path_info):\n logger.debug(\"data '%s' will be replaced.\", path_info)\n self.safe_remove(path_info, force=force)\n added, modified = False, True\n\n self.link(cache_info, path_info)\n self.tree.state.save_link(path_info)\n self.tree.state.save(path_info, hash_info)\n if progress_callback:\n progress_callback(str(path_info))\n\n return added, modified and not relink", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._checkout_dir_CloudCache._remove_redundant_files.return.bool_redundant_files_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._checkout_dir_CloudCache._remove_redundant_files.return.bool_redundant_files_", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 441, "end_line": 496, "span_ids": ["CloudCache._remove_redundant_files", "CloudCache._checkout_dir"], "tokens": 391}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n def _checkout_dir(\n self,\n path_info,\n hash_info,\n force,\n progress_callback=None,\n relink=False,\n filter_info=None,\n ):\n added, modified = False, False\n # Create dir separately so that dir is created\n # even if there are no files in it\n if not self.tree.exists(path_info):\n added = True\n self.tree.makedirs(path_info)\n\n dir_info = self.get_dir_cache(hash_info)\n\n logger.debug(\"Linking directory '%s'.\", path_info)\n\n for entry_info, entry_hash_info in dir_info.items(path_info):\n entry_cache_info = self.tree.hash_to_path_info(\n entry_hash_info.value\n )\n\n if filter_info and not entry_info.isin_or_eq(filter_info):\n continue\n\n if relink or self.changed(entry_info, entry_hash_info):\n modified = True\n self.safe_remove(entry_info, force=force)\n self.link(entry_cache_info, entry_info)\n self.tree.state.save(entry_info, entry_hash_info)\n if progress_callback:\n progress_callback(str(entry_info))\n\n modified = (\n self._remove_redundant_files(path_info, dir_info, force)\n or modified\n )\n\n self.tree.state.save_link(path_info)\n self.tree.state.save(path_info, hash_info)\n\n # relink is not modified, assume it as nochange\n return added, not added and modified and not relink\n\n def _remove_redundant_files(self, path_info, dir_info, force):\n existing_files = set(self.tree.walk_files(path_info))\n\n needed_files = {info for info, _ in dir_info.items(path_info)}\n redundant_files = existing_files - needed_files\n for path in redundant_files:\n self.safe_remove(path, force)\n\n return bool(redundant_files)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.checkout_CloudCache.checkout.return.self__checkout_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.checkout_CloudCache.checkout.return.self__checkout_", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 498, "end_line": 562, "span_ids": ["CloudCache.checkout"], "tokens": 356}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n @use_state\n def checkout(\n self,\n path_info,\n hash_info,\n force=False,\n progress_callback=None,\n relink=False,\n filter_info=None,\n quiet=False,\n ):\n if path_info.scheme not in [\"local\", self.tree.scheme]:\n raise NotImplementedError\n\n failed = None\n skip = False\n if not hash_info:\n if not quiet:\n logger.warning(\n \"No file hash info found for '%s'. It won't be created.\",\n path_info,\n )\n self.safe_remove(path_info, force=force)\n failed = path_info\n\n elif not relink and not self.changed(path_info, hash_info):\n logger.trace(\"Data '%s' didn't change.\", path_info)\n skip = True\n\n elif self.changed_cache(\n hash_info, path_info=path_info, filter_info=filter_info\n ):\n if not quiet:\n logger.warning(\n \"Cache '%s' not found. File '%s' won't be created.\",\n hash_info,\n path_info,\n )\n self.safe_remove(path_info, force=force)\n failed = path_info\n\n if failed or skip:\n if progress_callback:\n progress_callback(\n str(path_info),\n self.get_files_number(\n self.tree.path_info, hash_info, filter_info\n ),\n )\n if failed:\n raise CheckoutError([failed])\n return\n\n logger.debug(\n \"Checking out '%s' with cache '%s'.\", path_info, hash_info\n )\n\n return self._checkout(\n path_info,\n hash_info,\n force,\n progress_callback,\n relink,\n filter_info,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cli.py_DvcParser_VersionAction.__call__.sys_exit_0_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cli.py_DvcParser_VersionAction.__call__.sys_exit_0_", "embedding": null, "metadata": {"file_path": "dvc/cli.py", "file_name": "cli.py", "file_type": "text/x-python", "category": "implementation", "start_line": 103, "end_line": 129, "span_ids": ["VersionAction.__call__", "DvcParser.parse_args", "DvcParser", "DvcParser.error", "VersionAction"], "tokens": 238}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DvcParser(argparse.ArgumentParser):\n \"\"\"Custom parser class for dvc CLI.\"\"\"\n\n def error(self, message, cmd_cls=None): # pylint: disable=arguments-differ\n logger.error(message)\n _find_parser(self, cmd_cls)\n\n def parse_args(self, args=None, namespace=None):\n # NOTE: overriding to provide a more granular help message.\n # E.g. `dvc plots diff --bad-flag` would result in a `dvc plots diff`\n # help message instead of generic `dvc` usage.\n args, argv = self.parse_known_args(args, namespace)\n if argv:\n msg = \"unrecognized arguments: %s\"\n self.error(msg % \" \".join(argv), getattr(args, \"func\", None))\n return args\n\n\nclass VersionAction(argparse.Action): # pragma: no cover\n # pylint: disable=too-few-public-methods\n \"\"\"Shows DVC version and exits.\"\"\"\n\n def __call__(self, parser, namespace, values, option_string=None):\n from dvc import __version__\n\n print(__version__)\n sys.exit(0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cli.py_get_parent_parser_get_parent_parser.return.parent_parser": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cli.py_get_parent_parser_get_parent_parser.return.parent_parser", "embedding": null, "metadata": {"file_path": "dvc/cli.py", "file_name": "cli.py", "file_type": "text/x-python", "category": "implementation", "start_line": 132, "end_line": 161, "span_ids": ["get_parent_parser"], "tokens": 218}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_parent_parser():\n \"\"\"Create instances of a parser containing common arguments shared among\n all the commands.\n\n When overwriting `-q` or `-v`, you need to instantiate a new object\n in order to prevent some weird behavior.\n \"\"\"\n parent_parser = argparse.ArgumentParser(add_help=False)\n\n parent_parser.add_argument(\n \"--cprofile\",\n action=\"store_true\",\n default=False,\n help=argparse.SUPPRESS,\n )\n parent_parser.add_argument(\"--cprofile-dump\", help=argparse.SUPPRESS)\n\n parent_parser.add_argument(\n \"--pdb\", action=\"store_true\", default=False, help=argparse.SUPPRESS,\n )\n\n log_level_group = parent_parser.add_mutually_exclusive_group()\n log_level_group.add_argument(\n \"-q\", \"--quiet\", action=\"count\", default=0, help=\"Be quiet.\"\n )\n log_level_group.add_argument(\n \"-v\", \"--verbose\", action=\"count\", default=0, help=\"Be verbose.\"\n )\n\n return parent_parser", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/check_ignore.py_argparse_CmdCheckIgnore._normal_mode.return.ret": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/check_ignore.py_argparse_CmdCheckIgnore._normal_mode.return.ret", "embedding": null, "metadata": {"file_path": "dvc/command/check_ignore.py", "file_name": "check_ignore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 55, "span_ids": ["CmdCheckIgnore._check_one_file", "imports", "CmdCheckIgnore._normal_mode", "CmdCheckIgnore._interactive_mode", "CmdCheckIgnore.__init__", "CmdCheckIgnore", "CmdCheckIgnore._show_results"], "tokens": 304}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nfrom dvc.command import completion\nfrom dvc.command.base import CmdBase, append_doc_link\nfrom dvc.exceptions import DvcException\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdCheckIgnore(CmdBase):\n def __init__(self, args):\n super().__init__(args)\n self.ignore_filter = self.repo.tree.dvcignore\n\n def _show_results(self, result):\n if not result.match and not self.args.non_matching:\n return\n\n if self.args.details:\n patterns = result.patterns\n if not self.args.all:\n patterns = patterns[-1:]\n\n for pattern in patterns:\n logger.info(\"{}\\t{}\".format(pattern, result.file))\n else:\n logger.info(result.file)\n\n def _check_one_file(self, target):\n result = self.ignore_filter.check_ignore(target)\n self._show_results(result)\n if result.match:\n return 0\n return 1\n\n def _interactive_mode(self):\n ret = 1\n while True:\n try:\n target = input()\n except (KeyboardInterrupt, EOFError):\n break\n if target == \"\":\n break\n if not self._check_one_file(target):\n ret = 0\n return ret\n\n def _normal_mode(self):\n ret = 1\n for target in self.args.targets:\n if not self._check_one_file(target):\n ret = 0\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/check_ignore.py_CmdCheckIgnore._check_args_CmdCheckIgnore.run.return.self__normal_mode_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/check_ignore.py_CmdCheckIgnore._check_args_CmdCheckIgnore.run.return.self__normal_mode_", "embedding": null, "metadata": {"file_path": "dvc/command/check_ignore.py", "file_name": "check_ignore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 57, "end_line": 79, "span_ids": ["CmdCheckIgnore.run", "CmdCheckIgnore._check_args"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdCheckIgnore(CmdBase):\n\n def _check_args(self):\n if not self.args.stdin and not self.args.targets:\n raise DvcException(\"`targets` or `--stdin` needed\")\n\n if self.args.stdin and self.args.targets:\n raise DvcException(\"cannot have both `targets` and `--stdin`\")\n\n if self.args.non_matching and not self.args.details:\n raise DvcException(\n \"`--non-matching` is only valid with `--details`\"\n )\n\n if self.args.all and not self.args.details:\n raise DvcException(\"`--all` is only valid with `--details`\")\n\n if self.args.quiet and self.args.details:\n raise DvcException(\"cannot use both `--details` and `--quiet`\")\n\n def run(self):\n self._check_args()\n if self.args.stdin:\n return self._interactive_mode()\n return self._normal_mode()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/check_ignore.py_add_parser_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/check_ignore.py_add_parser_", "embedding": null, "metadata": {"file_path": "dvc/command/check_ignore.py", "file_name": "check_ignore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 82, "end_line": 127, "span_ids": ["add_parser"], "tokens": 297}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n ADD_HELP = (\n \"Check whether files or directories are excluded due to `.dvcignore`.\"\n )\n\n parser = subparsers.add_parser(\n \"check-ignore\",\n parents=[parent_parser],\n description=append_doc_link(ADD_HELP, \"check-ignore\"),\n help=ADD_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n parser.add_argument(\n \"-d\",\n \"--details\",\n action=\"store_true\",\n default=False,\n help=\"Show the exclude patterns along with each target path.\",\n )\n parser.add_argument(\n \"-a\",\n \"--all\",\n action=\"store_true\",\n default=False,\n help=\"Include the target paths which don\u2019t match any pattern \"\n \"in the `--details` list.\",\n )\n parser.add_argument(\n \"-n\",\n \"--non-matching\",\n action=\"store_true\",\n default=False,\n help=\"Include the target paths which don\u2019t match any pattern \"\n \"in the `--details` list.\",\n )\n parser.add_argument(\n \"--stdin\",\n action=\"store_true\",\n default=False,\n help=\"Read paths from standard input instead of providing `targets`.\",\n )\n parser.add_argument(\n \"targets\", nargs=\"*\", help=\"File or directory paths to check\",\n ).complete = completion.FILE\n parser.set_defaults(func=CmdCheckIgnore)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/diff.py_argparse__show_md.return.table_header_rows_True_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/diff.py_argparse__show_md.return.table_header_rows_True_", "embedding": null, "metadata": {"file_path": "dvc/command/diff.py", "file_name": "diff.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 41, "span_ids": ["imports", "_digest", "_show_md"], "tokens": 255}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport json\nimport logging\nimport os\n\nimport colorama\n\nfrom dvc.command import completion\nfrom dvc.command.base import CmdBase, append_doc_link\nfrom dvc.exceptions import DvcException\n\nlogger = logging.getLogger(__name__)\n\n\ndef _digest(checksum):\n if isinstance(checksum, str):\n return checksum[0:8]\n return \"{}..{}\".format(checksum[\"old\"][0:8], checksum[\"new\"][0:8])\n\n\ndef _show_md(diff, show_hash=False, hide_missing=False):\n from dvc.utils.diff import table\n\n header = [\"Status\", \"Hash\", \"Path\"] if show_hash else [\"Status\", \"Path\"]\n rows = []\n statuses = [\"added\", \"deleted\", \"modified\"]\n if not hide_missing:\n statuses.append(\"not in cache\")\n for status in statuses:\n entries = diff.get(status, [])\n if not entries:\n continue\n for entry in entries:\n path = entry[\"path\"]\n if show_hash:\n check_sum = _digest(entry.get(\"hash\", \"\"))\n rows.append([status, check_sum, path])\n else:\n rows.append([status, path])\n\n return table(header, rows, True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/diff.py_CmdDiff_CmdDiff._format.return._n_n_join_groups_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/diff.py_CmdDiff_CmdDiff._format.return._n_n_join_groups_", "embedding": null, "metadata": {"file_path": "dvc/command/diff.py", "file_name": "diff.py", "file_type": "text/x-python", "category": "implementation", "start_line": 43, "end_line": 126, "span_ids": ["CmdDiff._format", "CmdDiff"], "tokens": 482}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdDiff(CmdBase):\n @staticmethod\n def _format(diff, hide_missing=False):\n \"\"\"\n Given a diff structure, generate a string of paths separated\n by new lines and grouped together by their state.\n\n A group's header is colored to enhance readability, for example:\n\n Added:\n another_file.txt\n backup.tar\n dir/\n dir/1\n\n An example of a diff formatted when entries contain hash:\n\n Added:\n d3b07384 foo\n\n Modified:\n c157a790..f98bf6f1 bar\n\n If a group has no entries, it won't be included in the result.\n\n At the bottom, include a summary with the number of files per state.\n \"\"\"\n\n colors = {\n \"added\": colorama.Fore.GREEN,\n \"modified\": colorama.Fore.YELLOW,\n \"deleted\": colorama.Fore.RED,\n \"not in cache\": colorama.Fore.YELLOW,\n }\n\n summary = {}\n groups = []\n\n states = [\"added\", \"deleted\", \"modified\"]\n if not hide_missing:\n states.append(\"not in cache\")\n for state in states:\n summary[state] = 0\n entries = diff[state]\n\n if not entries:\n continue\n\n content = []\n\n for entry in entries:\n path = entry[\"path\"]\n checksum = entry.get(\"hash\")\n summary[state] += 1 if not path.endswith(os.sep) else 0\n content.append(\n \"{space}{checksum}{separator}{path}\".format(\n space=\" \",\n checksum=_digest(checksum) if checksum else \"\",\n separator=\" \" if checksum else \"\",\n path=entry[\"path\"],\n )\n )\n\n groups.append(\n \"{color}{header}{nc}:\\n{content}\".format(\n color=colors[state],\n header=state.capitalize(),\n nc=colorama.Fore.RESET,\n content=\"\\n\".join(content),\n )\n )\n\n if not sum(summary.values()):\n return None\n\n fmt = (\n \"files summary: {added} added, {deleted} deleted,\"\n \" {modified} modified\"\n )\n if not hide_missing:\n fmt += \", {not in cache} not in cache\"\n groups.append(fmt.format_map(summary))\n\n return \"\\n\\n\".join(groups)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/diff.py_CmdDiff.run_CmdDiff.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/diff.py_CmdDiff.run_CmdDiff.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/diff.py", "file_name": "diff.py", "file_type": "text/x-python", "category": "implementation", "start_line": 129, "end_line": 158, "span_ids": ["CmdDiff.run"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdDiff(CmdBase):\n\n def run(self):\n try:\n diff = self.repo.diff(\n self.args.a_rev, self.args.b_rev, self.args.targets\n )\n show_hash = self.args.show_hash\n hide_missing = self.args.b_rev or self.args.hide_missing\n if hide_missing:\n del diff[\"not in cache\"]\n\n for key, entries in diff.items():\n entries = sorted(entries, key=lambda entry: entry[\"path\"])\n if not show_hash:\n for entry in entries:\n del entry[\"hash\"]\n diff[key] = entries\n\n if self.args.show_json:\n logger.info(json.dumps(diff))\n elif self.args.show_md:\n logger.info(_show_md(diff, show_hash, hide_missing))\n elif diff:\n output = self._format(diff, hide_missing)\n if output:\n logger.info(output)\n\n except DvcException:\n logger.exception(\"failed to get diff\")\n return 1\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_argparse_logger.logging_getLogger___name_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_argparse_logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "dvc/command/experiments.py", "file_name": "experiments.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 20, "span_ids": ["imports"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport io\nimport logging\nfrom collections import OrderedDict\nfrom collections.abc import Mapping\nfrom datetime import date, datetime\nfrom itertools import groupby\nfrom typing import Dict, Iterable, Optional\n\nimport dvc.prompt as prompt\nfrom dvc.command.base import CmdBase, append_doc_link, fix_subparsers\nfrom dvc.command.metrics import DEFAULT_PRECISION\nfrom dvc.command.repro import CmdRepro\nfrom dvc.command.repro import add_arguments as add_repro_arguments\nfrom dvc.exceptions import DvcException, InvalidArgumentError\nfrom dvc.repo.experiments import Experiments\nfrom dvc.scm.git import Git\nfrom dvc.utils.flatten import flatten\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__filter_names__filter_names.return._join_name_for_name_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__filter_names__filter_names.return._join_name_for_name_", "embedding": null, "metadata": {"file_path": "dvc/command/experiments.py", "file_name": "experiments.py", "file_type": "text/x-python", "category": "implementation", "start_line": 23, "end_line": 65, "span_ids": ["_filter_names"], "tokens": 302}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _filter_names(\n names: Iterable,\n label: str,\n include: Optional[Iterable],\n exclude: Optional[Iterable],\n):\n if include and exclude:\n intersection = set(include) & set(exclude)\n if intersection:\n values = \", \".join(intersection)\n raise InvalidArgumentError(\n f\"'{values}' specified in both --include-{label} and\"\n f\" --exclude-{label}\"\n )\n\n names = [tuple(name.split(\".\")) for name in names]\n\n def _filter(filters, update_func):\n filters = [tuple(name.split(\".\")) for name in filters]\n for length, groups in groupby(filters, len):\n for group in groups:\n matches = [name for name in names if name[:length] == group]\n if not matches:\n name = \".\".join(group)\n raise InvalidArgumentError(\n f\"'{name}' does not match any known {label}\"\n )\n update_func({match: None for match in matches})\n\n if include:\n ret: OrderedDict = OrderedDict()\n _filter(include, ret.update)\n else:\n ret = OrderedDict({name: None for name in names})\n\n if exclude:\n to_remove: Dict[str, Optional[str]] = {}\n _filter(exclude, to_remove.update)\n for key in to_remove:\n if key in ret:\n del ret[key]\n\n return [\".\".join(name) for name in ret]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__update_names__collect_names.return.metric_names_param_names": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__update_names__collect_names.return.metric_names_param_names", "embedding": null, "metadata": {"file_path": "dvc/command/experiments.py", "file_name": "experiments.py", "file_type": "text/x-python", "category": "implementation", "start_line": 61, "end_line": 92, "span_ids": ["_update_names", "_collect_names"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _update_names(names, items):\n for name, item in items:\n if isinstance(item, dict):\n item = flatten(item)\n names.update(item.keys())\n else:\n names[name] = None\n\n\ndef _collect_names(all_experiments, **kwargs):\n metric_names = set()\n param_names = set()\n\n for _, experiments in all_experiments.items():\n for exp in experiments.values():\n _update_names(metric_names, exp.get(\"metrics\", {}).items())\n _update_names(param_names, exp.get(\"params\", {}).items())\n\n metric_names = _filter_names(\n sorted(metric_names),\n \"metrics\",\n kwargs.get(\"include_metrics\"),\n kwargs.get(\"exclude_metrics\"),\n )\n param_names = _filter_names(\n sorted(param_names),\n \"params\",\n kwargs.get(\"include_params\"),\n kwargs.get(\"exclude_params\"),\n )\n\n return metric_names, param_names", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__collect_rows__collect_rows.for_i_rev_exp_in_enum.yield_row_style": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__collect_rows__collect_rows.for_i_rev_exp_in_enum.yield_row_style", "embedding": null, "metadata": {"file_path": "dvc/command/experiments.py", "file_name": "experiments.py", "file_type": "text/x-python", "category": "implementation", "start_line": 102, "end_line": 173, "span_ids": ["_collect_rows"], "tokens": 494}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _collect_rows(\n base_rev,\n experiments,\n metric_names,\n param_names,\n precision=DEFAULT_PRECISION,\n no_timestamp=False,\n sort_by=None,\n sort_order=None,\n):\n if sort_by:\n if sort_by in metric_names:\n sort_type = \"metrics\"\n elif sort_by in param_names:\n sort_type = \"params\"\n else:\n raise InvalidArgumentError(f\"Unknown sort column '{sort_by}'\")\n reverse = sort_order == \"desc\"\n experiments = _sort_exp(experiments, sort_by, sort_type, reverse)\n\n new_checkpoint = True\n for i, (rev, exp) in enumerate(experiments.items()):\n row = []\n style = None\n queued = \"*\" if exp.get(\"queued\", False) else \"\"\n\n tip = exp.get(\"checkpoint_tip\")\n parent = \"\"\n if rev == \"baseline\":\n if Git.is_sha(base_rev):\n name_rev = base_rev[:7]\n else:\n name_rev = base_rev\n name = exp.get(\"name\", name_rev)\n row.append(f\"{name}\")\n style = \"bold\"\n else:\n if tip:\n parent_rev = exp.get(\"checkpoint_parent\", \"\")\n parent_exp = experiments.get(parent_rev, {})\n parent_tip = parent_exp.get(\"checkpoint_tip\")\n if tip == parent_tip:\n if new_checkpoint:\n tree = \"\u2502 \u2553\"\n else:\n tree = \"\u2502 \u255f\"\n new_checkpoint = False\n else:\n if parent_rev == base_rev:\n tree = \"\u251c\u2500\u2568\"\n else:\n tree = \"\u2502 \u255f\"\n parent = f\" ({parent_rev[:7]})\"\n new_checkpoint = True\n else:\n if i < len(experiments) - 1:\n tree = \"\u251c\u2500\u2500\"\n else:\n tree = \"\u2514\u2500\u2500\"\n new_checkpoint = True\n name = exp.get(\"name\", rev[:7])\n row.append(f\"{tree} {queued}{name}{parent}\")\n\n if not no_timestamp:\n row.append(_format_time(exp.get(\"timestamp\")))\n\n _extend_row(\n row, metric_names, exp.get(\"metrics\", {}).items(), precision\n )\n _extend_row(row, param_names, exp.get(\"params\", {}).items(), precision)\n\n yield row, style", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__sort_exp__sort_exp.return.ret": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__sort_exp__sort_exp.return.ret", "embedding": null, "metadata": {"file_path": "dvc/command/experiments.py", "file_name": "experiments.py", "file_type": "text/x-python", "category": "implementation", "start_line": 172, "end_line": 194, "span_ids": ["_sort_exp"], "tokens": 175}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _sort_exp(experiments, sort_by, typ, reverse):\n def _sort(item):\n rev, exp = item\n tip = exp.get(\"checkpoint_tip\")\n if tip and tip != rev:\n # Sort checkpoint experiments by tip commit\n return _sort((tip, experiments[tip]))\n for fname, item in exp.get(typ, {}).items():\n if isinstance(item, dict):\n item = flatten(item)\n else:\n item = {fname: item}\n if sort_by in item:\n val = item[sort_by]\n return (val is None, val)\n return (True, None)\n\n ret = OrderedDict()\n if \"baseline\" in experiments:\n ret[\"baseline\"] = experiments.pop(\"baseline\")\n\n ret.update(sorted(experiments.items(), key=_sort, reverse=reverse))\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__show_experiments__format_json.raise_TypeError": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__show_experiments__format_json.raise_TypeError", "embedding": null, "metadata": {"file_path": "dvc/command/experiments.py", "file_name": "experiments.py", "file_type": "text/x-python", "category": "implementation", "start_line": 256, "end_line": 293, "span_ids": ["_show_experiments", "_format_json"], "tokens": 275}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _show_experiments(all_experiments, console, **kwargs):\n from rich.table import Table\n\n include_metrics = _parse_list(kwargs.pop(\"include_metrics\", []))\n exclude_metrics = _parse_list(kwargs.pop(\"exclude_metrics\", []))\n include_params = _parse_list(kwargs.pop(\"include_params\", []))\n exclude_params = _parse_list(kwargs.pop(\"exclude_params\", []))\n\n metric_names, param_names = _collect_names(\n all_experiments,\n include_metrics=include_metrics,\n exclude_metrics=exclude_metrics,\n include_params=include_params,\n exclude_params=exclude_params,\n )\n\n table = Table()\n table.add_column(\"Experiment\", no_wrap=True)\n if not kwargs.get(\"no_timestamp\", False):\n table.add_column(\"Created\")\n for name in metric_names:\n table.add_column(name, justify=\"right\", no_wrap=True)\n for name in param_names:\n table.add_column(name, justify=\"left\")\n\n for base_rev, experiments in all_experiments.items():\n for row, _, in _collect_rows(\n base_rev, experiments, metric_names, param_names, **kwargs,\n ):\n table.add_row(*row)\n\n console.print(table)\n\n\ndef _format_json(item):\n if isinstance(item, (date, datetime)):\n return item.isoformat()\n raise TypeError", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_CmdExperimentsShow_CmdExperimentsShow.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_CmdExperimentsShow_CmdExperimentsShow.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/experiments.py", "file_name": "experiments.py", "file_type": "text/x-python", "category": "implementation", "start_line": 300, "end_line": 353, "span_ids": ["CmdExperimentsShow.run", "CmdExperimentsShow"], "tokens": 317}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdExperimentsShow(CmdBase):\n def run(self):\n from rich.console import Console\n\n from dvc.utils.pager import pager\n\n try:\n all_experiments = self.repo.experiments.show(\n all_branches=self.args.all_branches,\n all_tags=self.args.all_tags,\n all_commits=self.args.all_commits,\n sha_only=self.args.sha,\n )\n\n if self.args.show_json:\n import json\n\n logger.info(json.dumps(all_experiments, default=_format_json))\n return 0\n\n if self.args.no_pager:\n console = Console()\n else:\n # Note: rich does not currently include a native way to force\n # infinite width for use with a pager\n console = Console(\n file=io.StringIO(), force_terminal=True, width=9999\n )\n\n if self.args.precision is None:\n precision = DEFAULT_PRECISION\n else:\n precision = self.args.precision\n\n _show_experiments(\n all_experiments,\n console,\n include_metrics=self.args.include_metrics,\n exclude_metrics=self.args.exclude_metrics,\n include_params=self.args.include_params,\n exclude_params=self.args.exclude_params,\n no_timestamp=self.args.no_timestamp,\n sort_by=self.args.sort_by,\n sort_order=self.args.sort_order,\n precision=precision,\n )\n\n if not self.args.no_pager:\n pager(console.file.getvalue())\n except DvcException:\n logger.exception(\"failed to show experiments\")\n return 1\n\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_CmdExperimentsDiff_CmdExperimentsDiff.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_CmdExperimentsDiff_CmdExperimentsDiff.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/experiments.py", "file_name": "experiments.py", "file_type": "text/x-python", "category": "implementation", "start_line": 403, "end_line": 441, "span_ids": ["CmdExperimentsDiff", "CmdExperimentsDiff.run"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdExperimentsDiff(CmdBase):\n def run(self):\n\n try:\n diff = self.repo.experiments.diff(\n a_rev=self.args.a_rev,\n b_rev=self.args.b_rev,\n all=self.args.all,\n )\n\n if self.args.show_json:\n import json\n\n logger.info(json.dumps(diff))\n else:\n if self.args.precision is None:\n precision = DEFAULT_PRECISION\n else:\n precision = self.args.precision\n\n diffs = [(\"metrics\", \"Metric\"), (\"params\", \"Param\")]\n for key, title in diffs:\n table = _show_diff(\n diff[key],\n title=title,\n markdown=self.args.show_md,\n no_path=self.args.no_path,\n old=self.args.old,\n precision=precision,\n )\n if table:\n logger.info(table)\n logger.info(\"\")\n\n except DvcException:\n logger.exception(\"failed to show experiments diff\")\n return 1\n\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/git_hook.py_CmdPostCheckout_CmdPostCheckout._run.return.main_checkout_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/git_hook.py_CmdPostCheckout_CmdPostCheckout._run.return.main_checkout_", "embedding": null, "metadata": {"file_path": "dvc/command/git_hook.py", "file_name": "git_hook.py", "file_type": "text/x-python", "category": "implementation", "start_line": 33, "end_line": 54, "span_ids": ["CmdPostCheckout", "CmdPostCheckout._run"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdPostCheckout(CmdHookBase):\n def _run(self):\n # when we are running from pre-commit tool, it doesn't provide CLI\n # flags, but instead provides respective env vars that we could use.\n flag = os.environ.get(\"PRE_COMMIT_CHECKOUT_TYPE\")\n if flag is None and len(self.args.args) >= 3:\n # see https://git-scm.com/docs/githooks#_post_checkout\n flag = self.args.args[2]\n\n # checking out some reference and not specific file.\n if flag != \"1\":\n return 0\n\n # make sure we are not in the middle of a rebase/merge, so we\n # don't accidentally break it with an unsuccessful checkout.\n # Note that git hooks are always running in repo root.\n if os.path.isdir(os.path.join(\".git\", \"rebase-merge\")):\n return 0\n\n from dvc.main import main\n\n return main([\"checkout\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/git_hook.py_CmdPrePush_CmdMergeDriver._run.try_.finally_.dvc_close_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/git_hook.py_CmdPrePush_CmdMergeDriver._run.try_.finally_.dvc_close_", "embedding": null, "metadata": {"file_path": "dvc/command/git_hook.py", "file_name": "git_hook.py", "file_type": "text/x-python", "category": "implementation", "start_line": 57, "end_line": 81, "span_ids": ["CmdPrePush", "CmdPrePush._run", "CmdMergeDriver", "CmdMergeDriver._run"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdPrePush(CmdHookBase):\n def _run(self):\n from dvc.main import main\n\n return main([\"push\"])\n\n\nclass CmdMergeDriver(CmdHookBase):\n def _run(self):\n from dvc.dvcfile import Dvcfile\n from dvc.repo import Repo\n\n dvc = Repo()\n\n try:\n with dvc.state:\n ancestor = Dvcfile(dvc, self.args.ancestor, verify=False)\n our = Dvcfile(dvc, self.args.our, verify=False)\n their = Dvcfile(dvc, self.args.their, verify=False)\n\n our.merge(ancestor, their)\n\n return 0\n finally:\n dvc.close()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/metrics.py_CmdMetricsBase_CmdMetricsShow.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/metrics.py_CmdMetricsBase_CmdMetricsShow.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/metrics.py", "file_name": "metrics.py", "file_type": "text/x-python", "category": "implementation", "start_line": 72, "end_line": 105, "span_ids": ["CmdMetricsShow", "CmdMetricsBase", "CmdMetricsShow.run"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdMetricsBase(CmdBase):\n UNINITIALIZED = True\n\n\nclass CmdMetricsShow(CmdMetricsBase):\n def run(self):\n try:\n metrics = self.repo.metrics.show(\n self.args.targets,\n all_branches=self.args.all_branches,\n all_tags=self.args.all_tags,\n all_commits=self.args.all_commits,\n recursive=self.args.recursive,\n )\n\n if self.args.show_json:\n import json\n\n logger.info(json.dumps(metrics))\n else:\n table = _show_metrics(\n metrics,\n self.args.show_md,\n self.args.all_branches,\n self.args.all_tags,\n self.args.all_commits,\n )\n if table:\n logger.info(table)\n except DvcException:\n logger.exception(\"\")\n return 1\n\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_CmdRemoteRemove_CmdRemoteRemove.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_CmdRemoteRemove_CmdRemoteRemove.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/remote.py", "file_name": "remote.py", "file_type": "text/x-python", "category": "implementation", "start_line": 43, "end_line": 59, "span_ids": ["CmdRemoteRemove", "CmdRemoteRemove.run"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdRemoteRemove(CmdRemote):\n def run(self):\n with self.config.edit(self.args.level) as conf:\n self._check_exists(conf)\n del conf[\"remote\"][self.args.name]\n\n up_to_level = self.args.level or \"repo\"\n # Remove core.remote refs to this remote in any shadowing configs\n for level in reversed(self.config.LEVELS):\n with self.config.edit(level) as conf:\n if conf[\"core\"].get(\"remote\") == self.args.name:\n del conf[\"core\"][\"remote\"]\n\n if level == up_to_level:\n break\n\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_CmdRemoteModify_CmdRemoteModify.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/remote.py_CmdRemoteModify_CmdRemoteModify.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/remote.py", "file_name": "remote.py", "file_type": "text/x-python", "category": "implementation", "start_line": 61, "end_line": 75, "span_ids": ["CmdRemoteModify.run", "CmdRemoteModify"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdRemoteModify(CmdRemote):\n def run(self):\n with self.config.edit(self.args.level) as conf:\n merged = self.config.load_config_to_level(self.args.level)\n merge(merged, conf)\n self._check_exists(merged)\n\n if self.args.name not in conf[\"remote\"]:\n conf[\"remote\"][self.args.name] = {}\n section = conf[\"remote\"][self.args.name]\n if self.args.unset:\n section.pop(self.args.option, None)\n else:\n section[self.args.option] = self.args.value\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/run.py_add_parser_add_parser.None_11": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/run.py_add_parser_add_parser.None_11", "embedding": null, "metadata": {"file_path": "dvc/command/run.py", "file_name": "run.py", "file_type": "text/x-python", "category": "implementation", "start_line": 87, "end_line": 206, "span_ids": ["add_parser"], "tokens": 732}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n RUN_HELP = \"Generate a stage file from a command and execute the command.\"\n run_parser = subparsers.add_parser(\n \"run\",\n parents=[parent_parser],\n description=append_doc_link(RUN_HELP, \"run\"),\n help=RUN_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n run_parser.add_argument(\n \"-d\",\n \"--deps\",\n action=\"append\",\n default=[],\n help=\"Declare dependencies for reproducible cmd.\",\n metavar=\"\",\n ).complete = completion.FILE\n run_parser.add_argument(\n \"-n\", \"--name\", help=\"Stage name.\",\n )\n run_parser.add_argument(\n \"-o\",\n \"--outs\",\n action=\"append\",\n default=[],\n help=\"Declare output file or directory.\",\n metavar=\"\",\n ).complete = completion.FILE\n run_parser.add_argument(\n \"-O\",\n \"--outs-no-cache\",\n action=\"append\",\n default=[],\n help=\"Declare output file or directory \"\n \"(do not put into DVC cache).\",\n metavar=\"\",\n ).complete = completion.FILE\n run_parser.add_argument(\n \"-p\",\n \"--params\",\n action=\"append\",\n default=[],\n help=\"Declare parameter to use as additional dependency.\",\n metavar=\"[:]\",\n ).complete = completion.FILE\n run_parser.add_argument(\n \"-m\",\n \"--metrics\",\n action=\"append\",\n default=[],\n help=\"Declare output metrics file.\",\n metavar=\"\",\n )\n run_parser.add_argument(\n \"-M\",\n \"--metrics-no-cache\",\n action=\"append\",\n default=[],\n help=\"Declare output metrics file (do not put into DVC cache).\",\n metavar=\"\",\n )\n run_parser.add_argument(\n \"--plots\",\n action=\"append\",\n default=[],\n help=\"Declare output plot file.\",\n metavar=\"\",\n )\n run_parser.add_argument(\n \"--plots-no-cache\",\n action=\"append\",\n default=[],\n help=\"Declare output plot file (do not put into DVC cache).\",\n metavar=\"\",\n )\n run_parser.add_argument(\n \"--file\", metavar=\"\", help=argparse.SUPPRESS,\n )\n run_parser.add_argument(\n \"-w\",\n \"--wdir\",\n help=\"Directory within your repo to run your command in.\",\n metavar=\"\",\n )\n run_parser.add_argument(\n \"--no-exec\",\n action=\"store_true\",\n default=False,\n help=\"Only create stage file without actually running it.\",\n )\n run_parser.add_argument(\n \"-f\",\n \"--force\",\n action=\"store_true\",\n default=False,\n help=\"Overwrite existing stage\",\n )\n run_parser.add_argument(\n \"--no-run-cache\",\n action=\"store_true\",\n default=False,\n help=(\n \"Execute the command even if this stage has already been run \"\n \"with the same command/dependencies/outputs/etc before.\"\n ),\n )\n run_parser.add_argument(\n \"--no-commit\",\n action=\"store_true\",\n default=False,\n help=\"Don't put files/directories into cache.\",\n )\n run_parser.add_argument(\n \"--outs-persist\",\n action=\"append\",\n default=[],\n help=\"Declare output file or directory that will not be \"\n \"removed upon repro.\",\n metavar=\"\",\n )\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/run.py_add_parser.None_12_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/run.py_add_parser.None_12_", "embedding": null, "metadata": {"file_path": "dvc/command/run.py", "file_name": "run.py", "file_type": "text/x-python", "category": "implementation", "start_line": 210, "end_line": 257, "span_ids": ["add_parser"], "tokens": 306}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n # ... other code\n run_parser.add_argument(\n \"--outs-persist-no-cache\",\n action=\"append\",\n default=[],\n help=\"Declare output file or directory that will not be \"\n \"removed upon repro (do not put into DVC cache).\",\n metavar=\"\",\n )\n run_parser.add_argument(\n \"-c\",\n \"--checkpoints\",\n action=\"append\",\n default=[],\n help=argparse.SUPPRESS,\n metavar=\"\",\n ).complete = completion.FILE\n run_parser.add_argument(\n \"--always-changed\",\n action=\"store_true\",\n default=False,\n help=\"Always consider this DVC-file as changed.\",\n )\n run_parser.add_argument(\n \"--single-stage\",\n action=\"store_true\",\n default=False,\n help=argparse.SUPPRESS,\n )\n run_parser.add_argument(\n \"--external\",\n action=\"store_true\",\n default=False,\n help=\"Allow outputs that are outside of the DVC repository.\",\n )\n run_parser.add_argument(\n \"--desc\",\n type=str,\n metavar=\"\",\n help=(\n \"User description of the stage (optional). \"\n \"This doesn't affect any DVC operations.\"\n ),\n )\n run_parser.add_argument(\n \"command\", nargs=argparse.REMAINDER, help=\"Command to execute.\"\n )\n run_parser.set_defaults(func=CmdRun)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/status.py_logging_CmdDataStatus._normalize.return.s_self_STATUS_LEN_le": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/status.py_logging_CmdDataStatus._normalize.return.s_self_STATUS_LEN_le", "embedding": null, "metadata": {"file_path": "dvc/command/status.py", "file_name": "status.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 23, "span_ids": ["imports", "CmdDataStatus._normalize", "CmdDataStatus"], "tokens": 176}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\n\nfrom dvc.command.data_sync import CmdDataBase\nfrom dvc.exceptions import DvcException\nfrom dvc.utils import format_link\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdDataStatus(CmdDataBase):\n STATUS_LEN = 20\n STATUS_INDENT = \"\\t\"\n UP_TO_DATE_MSG = \"Data and pipelines are up to date.\"\n IN_SYNC_MSG = \"Cache and remote '{remote}' are in sync.\"\n EMPTY_PROJECT_MSG = (\n \"There are no data or pipelines tracked in this project yet.\\n\"\n \"See {link} to get started!\"\n ).format(link=format_link(\"https://dvc.org/doc/start\"))\n\n def _normalize(self, s):\n s += \":\"\n assert len(s) < self.STATUS_LEN\n return s + (self.STATUS_LEN - len(s)) * \" \"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/status.py_CmdDataStatus._show_CmdDataStatus._show.for_key_value_in_status_.if_isinstance_value_str_.elif_value_.self__show_value_indent_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/status.py_CmdDataStatus._show_CmdDataStatus._show.for_key_value_in_status_.if_isinstance_value_str_.elif_value_.self__show_value_indent_", "embedding": null, "metadata": {"file_path": "dvc/command/status.py", "file_name": "status.py", "file_type": "text/x-python", "category": "implementation", "start_line": 24, "end_line": 43, "span_ids": ["CmdDataStatus._show"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdDataStatus(CmdDataBase):\n\n def _show(self, status, indent=0):\n ind = indent * self.STATUS_INDENT\n\n if isinstance(status, str):\n logger.info(f\"{ind}{status}\")\n return\n\n if isinstance(status, list):\n for entry in status:\n self._show(entry, indent)\n return\n\n assert isinstance(status, dict)\n\n for key, value in status.items():\n if isinstance(value, str):\n logger.info(\"{}{}{}\".format(ind, self._normalize(value), key))\n elif value:\n logger.info(f\"{ind}{key}:\")\n self._show(value, indent + 1)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/version.py_argparse_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/version.py_argparse_", "embedding": null, "metadata": {"file_path": "dvc/command/version.py", "file_name": "version.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 30, "span_ids": ["imports", "add_parser", "CmdVersion.run", "CmdVersion"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nfrom dvc.command.base import CmdBaseNoRepo, append_doc_link\nfrom dvc.info import get_dvc_info\n\nlogger = logging.getLogger(__name__)\n\n\nclass CmdVersion(CmdBaseNoRepo):\n def run(self):\n dvc_info = get_dvc_info()\n logger.info(dvc_info)\n return 0\n\n\ndef add_parser(subparsers, parent_parser):\n VERSION_HELP = (\n \"Display the DVC version and system/environment information.\"\n )\n version_parser = subparsers.add_parser(\n \"version\",\n parents=[parent_parser],\n description=append_doc_link(VERSION_HELP, \"version\"),\n help=VERSION_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n aliases=[\"doctor\"],\n )\n version_parser.set_defaults(func=CmdVersion)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_RelPath_WEBDAV_COMMON._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_RelPath_WEBDAV_COMMON._", "embedding": null, "metadata": {"file_path": "dvc/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 99, "end_line": 133, "span_ids": ["RelPath", "impl:6"], "tokens": 239}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RelPath(str):\n pass\n\n\nREMOTE_COMMON = {\n \"url\": str,\n \"checksum_jobs\": All(Coerce(int), Range(1)),\n \"jobs\": All(Coerce(int), Range(1)),\n Optional(\"no_traverse\"): Bool, # obsoleted\n \"verify\": Bool,\n}\nLOCAL_COMMON = {\n \"type\": supported_cache_type,\n Optional(\"protected\", default=False): Bool, # obsoleted\n \"shared\": All(Lower, Choices(\"group\")),\n Optional(\"slow_link_warning\", default=True): Bool,\n}\nHTTP_COMMON = {\n \"auth\": All(Lower, Choices(\"basic\", \"digest\", \"custom\")),\n \"custom_auth_header\": str,\n \"user\": str,\n \"password\": str,\n \"ask_password\": Bool,\n \"ssl_verify\": Bool,\n \"method\": str,\n}\nWEBDAV_COMMON = {\n \"user\": str,\n \"password\": str,\n \"ask_password\": Bool,\n \"token\": str,\n \"cert_path\": str,\n \"key_path\": str,\n \"timeout\": Coerce(int),\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_SCHEMA_SCHEMA._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_SCHEMA_SCHEMA._", "embedding": null, "metadata": {"file_path": "dvc/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 135, "end_line": 241, "span_ids": ["impl:6"], "tokens": 831}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "SCHEMA = {\n \"core\": {\n \"remote\": Lower,\n \"checksum_jobs\": All(Coerce(int), Range(1)),\n Optional(\"interactive\", default=False): Bool,\n Optional(\"analytics\", default=True): Bool,\n Optional(\"hardlink_lock\", default=False): Bool,\n Optional(\"no_scm\", default=False): Bool,\n Optional(\"autostage\", default=False): Bool,\n Optional(\"experiments\"): Bool, # obsoleted\n Optional(\"check_update\", default=True): Bool,\n },\n \"cache\": {\n \"local\": str,\n \"s3\": str,\n \"gs\": str,\n \"hdfs\": str,\n \"webhdfs\": str,\n \"ssh\": str,\n \"azure\": str,\n # This is for default local cache\n \"dir\": str,\n **LOCAL_COMMON,\n },\n \"remote\": {\n str: ByUrl(\n {\n \"\": {**LOCAL_COMMON, **REMOTE_COMMON},\n \"s3\": {\n \"region\": str,\n \"profile\": str,\n \"credentialpath\": str,\n \"endpointurl\": str,\n \"access_key_id\": str,\n \"secret_access_key\": str,\n Optional(\"listobjects\", default=False): Bool, # obsoleted\n Optional(\"use_ssl\", default=True): Bool,\n \"sse\": str,\n \"sse_kms_key_id\": str,\n \"acl\": str,\n \"grant_read\": str,\n \"grant_read_acp\": str,\n \"grant_write_acp\": str,\n \"grant_full_control\": str,\n **REMOTE_COMMON,\n },\n \"gs\": {\n \"projectname\": str,\n \"credentialpath\": str,\n **REMOTE_COMMON,\n },\n \"ssh\": {\n \"type\": supported_cache_type,\n \"port\": Coerce(int),\n \"user\": str,\n \"password\": str,\n \"ask_password\": Bool,\n \"keyfile\": str,\n \"timeout\": Coerce(int),\n \"gss_auth\": Bool,\n \"allow_agent\": Bool,\n **REMOTE_COMMON,\n },\n \"hdfs\": {\"user\": str, **REMOTE_COMMON},\n \"webhdfs\": {\n \"hdfscli_config\": str,\n \"webhdfs_token\": str,\n \"user\": str,\n \"webhdfs_alias\": str,\n **REMOTE_COMMON,\n },\n \"azure\": {\"connection_string\": str, **REMOTE_COMMON},\n \"oss\": {\n \"oss_key_id\": str,\n \"oss_key_secret\": str,\n \"oss_endpoint\": str,\n **REMOTE_COMMON,\n },\n \"gdrive\": {\n \"gdrive_use_service_account\": Bool,\n \"gdrive_client_id\": str,\n \"gdrive_client_secret\": str,\n \"gdrive_user_credentials_file\": str,\n \"gdrive_service_account_email\": str,\n \"gdrive_service_account_user_email\": str,\n \"gdrive_service_account_p12_file_path\": str,\n Optional(\"gdrive_trash_only\", default=False): Bool,\n **REMOTE_COMMON,\n },\n \"http\": {**HTTP_COMMON, **REMOTE_COMMON},\n \"https\": {**HTTP_COMMON, **REMOTE_COMMON},\n \"webdav\": {**WEBDAV_COMMON, **REMOTE_COMMON},\n \"webdavs\": {**WEBDAV_COMMON, **REMOTE_COMMON},\n \"remote\": {str: object}, # Any of the above options are valid\n }\n )\n },\n \"state\": {\n \"row_limit\": All(Coerce(int), Range(1)),\n \"row_cleanup_quota\": All(Coerce(int), Range(0, 100)),\n },\n # section for experimental features\n \"feature\": {\n # enabled by default. It's of no use, kept for backward compatibility.\n Optional(\"parametrization\", default=True): Bool\n },\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py__parse_remotes_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py__parse_remotes_", "embedding": null, "metadata": {"file_path": "dvc/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 445, "end_line": 484, "span_ids": ["_parse_remotes", "_lower_keys", "_pack_remotes", "merge"], "tokens": 239}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _parse_remotes(conf):\n result = {\"remote\": {}}\n\n for section, val in conf.items():\n name = re_find(r'^\\s*remote\\s*\"(.*)\"\\s*$', section)\n if name:\n result[\"remote\"][name] = val\n else:\n result[section] = val\n\n return result\n\n\ndef _pack_remotes(conf):\n # Drop empty sections\n result = compact(conf)\n\n # Transform remote.name -> 'remote \"name\"'\n for name, val in conf[\"remote\"].items():\n result[f'remote \"{name}\"'] = val\n result.pop(\"remote\", None)\n\n return result\n\n\ndef merge(into, update):\n \"\"\"Merges second dict into first recursively\"\"\"\n for key, val in update.items():\n if isinstance(into.get(key), dict) and isinstance(val, dict):\n merge(into[key], val)\n else:\n into[key] = val\n\n\ndef _lower_keys(data):\n return {\n k.lower(): _lower_keys(v) if isinstance(v, dict) else v\n for k, v in data.items()\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/daemon.py__Launch_dvc_daemon_co__spawn_windows._popen_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/daemon.py__Launch_dvc_daemon_co__spawn_windows._popen_", "embedding": null, "metadata": {"file_path": "dvc/daemon.py", "file_name": "daemon.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 37, "span_ids": ["_spawn_windows", "_popen", "docstring"], "tokens": 220}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Launch `dvc daemon` command in a separate detached process.\"\"\"\n\nimport inspect\nimport logging\nimport os\nimport platform\nimport sys\nfrom subprocess import Popen\n\nfrom dvc.env import DVC_DAEMON\nfrom dvc.utils import fix_env, is_binary\n\nlogger = logging.getLogger(__name__)\n\nCREATE_NEW_PROCESS_GROUP = 0x00000200\nDETACHED_PROCESS = 0x00000008\n\n\ndef _popen(cmd, **kwargs):\n prefix = [sys.executable]\n if not is_binary():\n prefix += [sys.argv[0]]\n\n return Popen(prefix + cmd, close_fds=True, shell=False, **kwargs)\n\n\ndef _spawn_windows(cmd, env):\n from subprocess import STARTF_USESHOWWINDOW, STARTUPINFO\n\n creationflags = CREATE_NEW_PROCESS_GROUP | DETACHED_PROCESS\n\n startupinfo = STARTUPINFO()\n startupinfo.dwFlags |= STARTF_USESHOWWINDOW\n\n _popen(\n cmd, env=env, creationflags=creationflags, startupinfo=startupinfo,\n ).communicate()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/param.py_os_ParamsDependency.fill_values.self.hash_info.HashInfo_self_PARAM_PARAM": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/param.py_os_ParamsDependency.fill_values.self.hash_info.HashInfo_self_PARAM_PARAM", "embedding": null, "metadata": {"file_path": "dvc/dependency/param.py", "file_name": "param.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 58, "span_ids": ["ParamsDependency", "ParamsDependency.__init__", "ParamsDependency.dumpd", "BadParamFileError", "imports", "MissingParamsError", "ParamsDependency.fill_values"], "tokens": 316}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nfrom collections import defaultdict\n\nimport dpath.util\nfrom voluptuous import Any\n\nfrom dvc.dependency.local import LocalDependency\nfrom dvc.exceptions import DvcException\nfrom dvc.hash_info import HashInfo\nfrom dvc.utils.serialize import LOADERS, ParseError\n\n\nclass MissingParamsError(DvcException):\n pass\n\n\nclass BadParamFileError(DvcException):\n pass\n\n\nclass ParamsDependency(LocalDependency):\n PARAM_PARAMS = \"params\"\n PARAM_SCHEMA = {PARAM_PARAMS: Any(dict, list, None)}\n DEFAULT_PARAMS_FILE = \"params.yaml\"\n\n def __init__(self, stage, path, params):\n info = {}\n self.params = []\n if params:\n if isinstance(params, list):\n self.params = params\n else:\n assert isinstance(params, dict)\n self.params = list(params.keys())\n info = {self.PARAM_PARAMS: params}\n\n super().__init__(\n stage,\n path\n or os.path.join(stage.repo.root_dir, self.DEFAULT_PARAMS_FILE),\n info=info,\n )\n\n def dumpd(self):\n ret = super().dumpd()\n if not self.hash_info:\n ret[self.PARAM_PARAMS] = self.params\n return ret\n\n def fill_values(self, values=None):\n \"\"\"Load params values dynamically.\"\"\"\n if not values:\n return\n info = {}\n for param in self.params:\n if param in values:\n info[param] = values[param]\n self.hash_info = HashInfo(self.PARAM_PARAMS, info)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/param.py_ParamsDependency.workspace_status_ParamsDependency.status.return.self_workspace_status_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/param.py_ParamsDependency.workspace_status_ParamsDependency.status.return.self_workspace_status_", "embedding": null, "metadata": {"file_path": "dvc/dependency/param.py", "file_name": "param.py", "file_type": "text/x-python", "category": "implementation", "start_line": 60, "end_line": 85, "span_ids": ["ParamsDependency.workspace_status", "ParamsDependency.status"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ParamsDependency(LocalDependency):\n\n def workspace_status(self):\n status = super().workspace_status()\n\n if status.get(str(self)) == \"deleted\":\n return status\n\n status = defaultdict(dict)\n info = self.hash_info.value if self.hash_info else {}\n actual = self.read_params()\n for param in self.params:\n if param not in actual.keys():\n st = \"deleted\"\n elif param not in info:\n st = \"new\"\n elif actual[param] != info[param]:\n st = \"modified\"\n else:\n assert actual[param] == info[param]\n continue\n\n status[str(self)][param] = st\n\n return status\n\n def status(self):\n return self.workspace_status()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/param.py_ParamsDependency.read_params_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/param.py_ParamsDependency.read_params_", "embedding": null, "metadata": {"file_path": "dvc/dependency/param.py", "file_name": "param.py", "file_type": "text/x-python", "category": "implementation", "start_line": 87, "end_line": 120, "span_ids": ["ParamsDependency.get_hash", "ParamsDependency.read_params"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ParamsDependency(LocalDependency):\n\n def read_params(self):\n if not self.exists:\n return {}\n\n suffix = self.path_info.suffix.lower()\n loader = LOADERS[suffix]\n try:\n config = loader(self.path_info, tree=self.repo.tree)\n except ParseError as exc:\n raise BadParamFileError(\n f\"Unable to read parameters from '{self}'\"\n ) from exc\n\n ret = {}\n for param in self.params:\n try:\n ret[param] = dpath.util.get(config, param, separator=\".\")\n except KeyError:\n pass\n return ret\n\n def get_hash(self):\n info = self.read_params()\n\n missing_params = set(self.params) - set(info.keys())\n if missing_params:\n raise MissingParamsError(\n \"Parameters '{}' are missing from '{}'.\".format(\n \", \".join(missing_params), self,\n )\n )\n\n return HashInfo(self.PARAM_PARAMS, info)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/repo.py_from_voluptuous_import_Re_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/repo.py_from_voluptuous_import_Re_", "embedding": null, "metadata": {"file_path": "dvc/dependency/repo.py", "file_name": "repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 97, "span_ids": ["RepoDependency.save", "RepoDependency.__init__", "RepoDependency.repo_pair", "RepoDependency.dumpd", "imports", "RepoDependency._make_repo", "RepoDependency.status", "RepoDependency.download", "RepoDependency.__str__", "RepoDependency.update", "RepoDependency.changed_checksum", "RepoDependency._parse_path", "RepoDependency.workspace_status", "RepoDependency._get_hash", "RepoDependency", "RepoDependency.is_in_repo"], "tokens": 669}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from voluptuous import Required\n\nfrom dvc.path_info import PathInfo\n\nfrom .local import LocalDependency\n\n\nclass RepoDependency(LocalDependency):\n PARAM_REPO = \"repo\"\n PARAM_URL = \"url\"\n PARAM_REV = \"rev\"\n PARAM_REV_LOCK = \"rev_lock\"\n\n REPO_SCHEMA = {\n PARAM_REPO: {\n Required(PARAM_URL): str,\n PARAM_REV: str,\n PARAM_REV_LOCK: str,\n }\n }\n\n def __init__(self, def_repo, stage, *args, **kwargs):\n self.def_repo = def_repo\n super().__init__(stage, *args, **kwargs)\n\n def _parse_path(self, tree, path):\n return None\n\n @property\n def is_in_repo(self):\n return False\n\n @property\n def repo_pair(self):\n d = self.def_repo\n rev = d.get(self.PARAM_REV_LOCK) or d.get(self.PARAM_REV)\n return d[self.PARAM_URL], rev\n\n def __str__(self):\n return \"{} ({})\".format(self.def_path, self.def_repo[self.PARAM_URL])\n\n def _make_repo(self, *, locked=True, **kwargs):\n from dvc.external_repo import external_repo\n\n d = self.def_repo\n rev = (d.get(\"rev_lock\") if locked else None) or d.get(\"rev\")\n return external_repo(d[\"url\"], rev=rev, **kwargs)\n\n def _get_hash(self, locked=True):\n # we want stream but not fetch, so DVC out directories are\n # walked, but dir contents is not fetched\n with self._make_repo(locked=locked, fetch=False, stream=True) as repo:\n path_info = PathInfo(repo.root_dir) / self.def_path\n return repo.repo_tree.get_hash(path_info, follow_subrepos=False)\n\n def workspace_status(self):\n current = self._get_hash(locked=True)\n updated = self._get_hash(locked=False)\n\n if current != updated:\n return {str(self): \"update available\"}\n\n return {}\n\n def status(self):\n return self.workspace_status()\n\n def save(self):\n pass\n\n def dumpd(self):\n return {self.PARAM_PATH: self.def_path, self.PARAM_REPO: self.def_repo}\n\n def download(self, to, jobs=None):\n cache = self.repo.cache.local\n\n with self._make_repo(cache_dir=cache.cache_dir) as repo:\n if self.def_repo.get(self.PARAM_REV_LOCK) is None:\n self.def_repo[self.PARAM_REV_LOCK] = repo.get_rev()\n\n _, _, cache_infos = repo.fetch_external([self.def_path], jobs=jobs)\n\n cache.checkout(to.path_info, cache_infos[0])\n\n def update(self, rev=None):\n if rev:\n self.def_repo[self.PARAM_REV] = rev\n\n with self._make_repo(locked=False) as repo:\n self.def_repo[self.PARAM_REV_LOCK] = repo.get_rev()\n\n def changed_checksum(self):\n # From current repo point of view what describes RepoDependency is its\n # origin project url and rev_lock, and it makes RepoDependency\n # immutable, hence its impossible for checksum to change.\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/webdav.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/webdav.py__", "embedding": null, "metadata": {"file_path": "dvc/dependency/webdav.py", "file_name": "webdav.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 9, "span_ids": ["imports", "WebDAVDependency"], "tokens": 51}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.dependency.base import BaseDependency\nfrom dvc.output.base import BaseOutput\n\nfrom ..tree.webdav import WebDAVTree\n\n\nclass WebDAVDependency(BaseDependency, BaseOutput):\n TREE_CLS = WebDAVTree", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/webdavs.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/webdavs.py__", "embedding": null, "metadata": {"file_path": "dvc/dependency/webdavs.py", "file_name": "webdavs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["imports", "WebDAVSDependency"], "tokens": 45}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from ..tree.webdavs import WebDAVSTree\nfrom .webdav import WebDAVDependency\n\n\nclass WebDAVSDependency(WebDAVDependency):\n TREE_CLS = WebDAVSTree", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_FileMixin.validate_FileMixin.merge.raise_NotImplementedError": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_FileMixin.validate_FileMixin.merge.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "dvc/dvcfile.py", "file_name": "dvcfile.py", "file_type": "text/x-python", "category": "implementation", "start_line": 113, "end_line": 129, "span_ids": ["FileMixin.dump", "FileMixin.validate", "FileMixin.remove", "FileMixin.merge"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class FileMixin:\n\n @classmethod\n def validate(cls, d, fname=None):\n assert isinstance(cls.SCHEMA, collections.abc.Callable)\n try:\n cls.SCHEMA(d) # pylint: disable=not-callable\n except MultipleInvalid as exc:\n raise StageFileFormatError(f\"'{fname}' format error: {exc}\")\n\n def remove(self, force=False): # pylint: disable=unused-argument\n with contextlib.suppress(FileNotFoundError):\n os.unlink(self.path)\n\n def dump(self, stage, **kwargs):\n raise NotImplementedError\n\n def merge(self, ancestor, other):\n raise NotImplementedError", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_SingleStageFile_SingleStageFile.merge.self_dump_stage_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_SingleStageFile_SingleStageFile.merge.self_dump_stage_", "embedding": null, "metadata": {"file_path": "dvc/dvcfile.py", "file_name": "dvcfile.py", "file_type": "text/x-python", "category": "implementation", "start_line": 132, "end_line": 167, "span_ids": ["SingleStageFile.merge", "SingleStageFile", "SingleStageFile.stage", "SingleStageFile.stages", "SingleStageFile.dump", "SingleStageFile.remove_stage"], "tokens": 255}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SingleStageFile(FileMixin):\n from dvc.schema import COMPILED_SINGLE_STAGE_SCHEMA as SCHEMA\n\n @property\n def stage(self):\n data, raw = self._load()\n return SingleStageLoader.load_stage(self, data, raw)\n\n @property\n def stages(self):\n data, raw = self._load()\n return SingleStageLoader(self, data, raw)\n\n def dump(self, stage, **kwargs):\n \"\"\"Dumps given stage appropriately in the dvcfile.\"\"\"\n from dvc.stage import PipelineStage\n\n assert not isinstance(stage, PipelineStage)\n if self.verify:\n check_dvc_filename(self.path)\n logger.debug(\n \"Saving information to '{file}'.\".format(file=relpath(self.path))\n )\n dump_yaml(self.path, serialize.to_single_stage_file(stage))\n self.repo.scm.track_file(self.relpath)\n\n def remove_stage(self, stage): # pylint: disable=unused-argument\n self.remove()\n\n def merge(self, ancestor, other):\n assert isinstance(ancestor, SingleStageFile)\n assert isinstance(other, SingleStageFile)\n\n stage = self.stage\n stage.merge(ancestor.stage, other.stage)\n self.dump(stage)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py_logging_IsADVCRepoError._Raised_when_it_is_not_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py_logging_IsADVCRepoError._Raised_when_it_is_not_", "embedding": null, "metadata": {"file_path": "dvc/external_repo.py", "file_name": "external_repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 33, "span_ids": ["imports", "IsADVCRepoError"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nimport tempfile\nimport threading\nfrom contextlib import contextmanager\nfrom distutils.dir_util import copy_tree\nfrom typing import Dict, Iterable\n\nfrom funcy import cached_property, reraise, retry, wrap_with\n\nfrom dvc.config import NoRemoteError, NotDvcRepoError\nfrom dvc.exceptions import (\n DvcException,\n FileMissingError,\n NoOutputInExternalRepoError,\n NoRemoteInExternalRepoError,\n OutputNotFoundError,\n PathMissingError,\n)\nfrom dvc.path_info import PathInfo\nfrom dvc.repo import Repo\nfrom dvc.scm.base import CloneError\nfrom dvc.scm.git import Git\nfrom dvc.tree.local import LocalTree\nfrom dvc.tree.repo import RepoTree\nfrom dvc.utils import relpath\nfrom dvc.utils.fs import remove\n\nlogger = logging.getLogger(__name__)\n\n\nclass IsADVCRepoError(DvcException):\n \"\"\"Raised when it is not expected to be a dvc repo.\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py_ExternalRepo_ExternalRepo._fetch_to_cache.return.hash_info": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py_ExternalRepo_ExternalRepo._fetch_to_cache.return.hash_info", "embedding": null, "metadata": {"file_path": "dvc/external_repo.py", "file_name": "external_repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 113, "end_line": 182, "span_ids": ["ExternalRepo", "ExternalRepo.repo_tree", "ExternalRepo.__str__", "ExternalRepo.get_rev", "ExternalRepo._fetch_to_cache", "ExternalRepo.__init__"], "tokens": 372}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ExternalRepo(Repo):\n # pylint: disable=no-member\n\n def __init__(\n self,\n root_dir,\n url,\n scm=None,\n rev=None,\n for_write=False,\n cache_dir=None,\n cache_types=None,\n uninitialized=False,\n **kwargs,\n ):\n self.url = url\n self.for_write = for_write\n self.tree_confs = kwargs\n\n self._cache_config = {\n \"cache\": {\n \"dir\": cache_dir or self._get_cache_dir(),\n \"type\": cache_types,\n }\n }\n\n config = self._cache_config.copy()\n if os.path.isdir(url):\n config.update(_get_remote_config(url))\n\n super().__init__(\n root_dir,\n scm=scm,\n rev=rev,\n uninitialized=uninitialized,\n config=config,\n )\n\n def __str__(self):\n return self.url\n\n @cached_property\n def repo_tree(self):\n return self._get_tree_for(\n self, subrepos=not self.for_write, repo_factory=self.make_repo\n )\n\n def get_rev(self):\n assert self.scm\n if isinstance(self.tree, LocalTree):\n return self.scm.get_rev()\n return self.tree.rev\n\n def _fetch_to_cache(self, path_info, repo, callback, **kwargs):\n # don't support subrepo traversal as it might fail due to difference\n # in remotes\n tree = self._get_tree_for(repo)\n cache = repo.cache.local\n\n hash_info = tree.get_hash(\n path_info, download_callback=callback, **kwargs\n )\n cache.save(\n path_info,\n tree,\n hash_info,\n save_link=False,\n download_callback=callback,\n )\n return hash_info", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py_ExternalRepo.fetch_external_ExternalRepo.fetch_external.return.sum_download_results_fa": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py_ExternalRepo.fetch_external_ExternalRepo.fetch_external.return.sum_download_results_fa", "embedding": null, "metadata": {"file_path": "dvc/external_repo.py", "file_name": "external_repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 151, "end_line": 180, "span_ids": ["ExternalRepo.fetch_external"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ExternalRepo(Repo):\n\n def fetch_external(self, paths: Iterable, **kwargs):\n \"\"\"Fetch specified external repo paths into cache.\n\n Returns 3-tuple in the form\n (downloaded, failed, list(cache_infos))\n where cache_infos can be used as checkout targets for the\n fetched paths.\n \"\"\"\n download_results = []\n failed = 0\n root = PathInfo(self.root_dir)\n\n paths = [root / path for path in paths]\n\n def download_update(result):\n download_results.append(result)\n\n hash_infos = []\n for path in paths:\n with reraise(FileNotFoundError, PathMissingError(path, self.url)):\n metadata = self.repo_tree.metadata(path)\n\n self._check_repo(path, metadata.repo)\n repo = metadata.repo\n hash_info = self._fetch_to_cache(\n path, repo, download_update, **kwargs\n )\n hash_infos.append(hash_info)\n\n return sum(download_results), failed, hash_infos", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py_ExternalRepo._check_repo_ExternalRepo.get_external.if_metadata_output_exists.else_.tree_copytree_path_info_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py_ExternalRepo._check_repo_ExternalRepo.get_external.if_metadata_output_exists.else_.tree_copytree_path_info_", "embedding": null, "metadata": {"file_path": "dvc/external_repo.py", "file_name": "external_repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 178, "end_line": 206, "span_ids": ["ExternalRepo.get_external", "ExternalRepo._check_repo"], "tokens": 277}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class ExternalRepo(Repo):\n\n def _check_repo(self, path_info, repo):\n if not repo:\n return\n\n repo_path = PathInfo(repo.root_dir)\n if path_info == repo_path and isinstance(repo, Repo):\n message = \"Cannot fetch a complete DVC repository\"\n if repo.root_dir != self.root_dir:\n rel = relpath(repo.root_dir, self.root_dir)\n message += f\" '{rel}'\"\n raise IsADVCRepoError(message)\n\n def get_external(self, path, dest):\n \"\"\"Convenience wrapper for fetch_external and checkout.\"\"\"\n path_info = PathInfo(self.root_dir) / path\n with reraise(FileNotFoundError, PathMissingError(path, self.url)):\n metadata = self.repo_tree.metadata(path_info)\n\n self._check_repo(path_info, metadata.repo)\n if metadata.output_exists:\n repo = metadata.repo\n cache = repo.cache.local\n # fetch DVC and git files to tmpdir cache, then checkout\n save_info = self._fetch_to_cache(path_info, repo, None)\n cache.checkout(PathInfo(dest), save_info)\n else:\n # git-only folder, just copy files directly to dest\n tree = self._get_tree_for(metadata.repo) # ignore subrepos\n tree.copytree(path_info, dest)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py__clone_default_branch__clone_default_branch.return.clone_path_shallow": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/external_repo.py__clone_default_branch__clone_default_branch.return.clone_path_shallow", "embedding": null, "metadata": {"file_path": "dvc/external_repo.py", "file_name": "external_repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 315, "end_line": 364, "span_ids": ["_clone_default_branch"], "tokens": 440}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@wrap_with(threading.Lock())\ndef _clone_default_branch(url, rev, for_write=False):\n \"\"\"Get or create a clean clone of the url.\n\n The cloned is reactualized with git pull unless rev is a known sha.\n \"\"\"\n clone_path, shallow = CLONES.get(url, (None, False))\n\n git = None\n try:\n if clone_path:\n git = Git(clone_path)\n # Do not pull for known shas, branches and tags might move\n if not Git.is_sha(rev) or not git.has_rev(rev):\n if shallow:\n # If we are missing a rev in a shallow clone, fallback to\n # a full (unshallowed) clone. Since fetching specific rev\n # SHAs is only available in certain git versions, if we\n # have need to reference multiple specific revs for a\n # given repo URL it is easier/safer for us to work with\n # full clones in this case.\n logger.debug(\"erepo: unshallowing clone for '%s'\", url)\n _unshallow(git)\n shallow = False\n CLONES[url] = (clone_path, shallow)\n else:\n logger.debug(\"erepo: git pull '%s'\", url)\n git.pull()\n else:\n logger.debug(\"erepo: git clone '%s' to a temporary dir\", url)\n clone_path = tempfile.mkdtemp(\"dvc-clone\")\n if not for_write and rev and not Git.is_sha(rev):\n # If rev is a tag or branch name try shallow clone first\n try:\n git = Git.clone(url, clone_path, shallow_branch=rev)\n shallow = True\n logger.debug(\n \"erepo: using shallow clone for branch '%s'\", rev\n )\n except CloneError:\n pass\n if not git:\n git = Git.clone(url, clone_path)\n shallow = False\n CLONES[url] = (clone_path, shallow)\n finally:\n if git:\n git.close()\n\n return clone_path, shallow", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnorePatterns_DvcIgnorePatterns.__init__.self.ignore_spec._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnorePatterns_DvcIgnorePatterns.__init__.self.ignore_spec._", "embedding": null, "metadata": {"file_path": "dvc/ignore.py", "file_name": "ignore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 26, "end_line": 49, "span_ids": ["DvcIgnorePatterns.__init__", "DvcIgnorePatterns"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DvcIgnorePatterns(DvcIgnore):\n def __init__(self, pattern_list, dirname):\n if pattern_list:\n if isinstance(pattern_list[0], str):\n pattern_list = [\n PatternInfo(pattern, \"\") for pattern in pattern_list\n ]\n\n self.pattern_list = pattern_list\n self.dirname = dirname\n self.prefix = self.dirname + os.sep\n\n self.regex_pattern_list = [\n GitWildMatchPattern.pattern_to_regex(pattern_info.patterns)\n for pattern_info in pattern_list\n ]\n\n self.ignore_spec = [\n (ignore, re.compile(\"|\".join(item[0] for item in group)))\n for ignore, group in groupby(\n self.regex_pattern_list, lambda x: x[1]\n )\n if ignore is not None\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnorePatterns.from_files_DvcIgnorePatterns.from_files.return.cls_path_spec_lines_dirn": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnorePatterns.from_files_DvcIgnorePatterns.from_files.return.cls_path_spec_lines_dirn", "embedding": null, "metadata": {"file_path": "dvc/ignore.py", "file_name": "ignore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 51, "end_line": 70, "span_ids": ["DvcIgnorePatterns.from_files"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DvcIgnorePatterns(DvcIgnore):\n\n @classmethod\n def from_files(cls, ignore_file_path, tree):\n assert os.path.isabs(ignore_file_path)\n dirname = os.path.normpath(os.path.dirname(ignore_file_path))\n ignore_file_rel_path = os.path.relpath(\n ignore_file_path, tree.tree_root\n )\n with tree.open(ignore_file_path, encoding=\"utf-8\") as fobj:\n path_spec_lines = [\n PatternInfo(\n line,\n \"{}:{}:{}\".format(ignore_file_rel_path, line_no + 1, line),\n )\n for line_no, line in enumerate(\n map(str.strip, fobj.readlines())\n )\n if line and not (line.strip().startswith(\"#\"))\n ]\n\n return cls(path_spec_lines, dirname)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnorePatterns.__call___DvcIgnorePatterns._get_normalize_path.return.path": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnorePatterns.__call___DvcIgnorePatterns._get_normalize_path.return.path", "embedding": null, "metadata": {"file_path": "dvc/ignore.py", "file_name": "ignore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 72, "end_line": 92, "span_ids": ["DvcIgnorePatterns._get_normalize_path", "DvcIgnorePatterns.__call__"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DvcIgnorePatterns(DvcIgnore):\n\n def __call__(self, root, dirs, files):\n files = [f for f in files if not self.matches(root, f)]\n dirs = [d for d in dirs if not self.matches(root, d, True)]\n\n return dirs, files\n\n def _get_normalize_path(self, dirname, basename):\n # NOTE: `relpath` is too slow, so we have to assume that both\n # `dirname` and `self.dirname` are relative or absolute together.\n if dirname == self.dirname:\n path = basename\n elif dirname.startswith(self.prefix):\n rel = dirname[len(self.prefix) :]\n # NOTE: `os.path.join` is ~x5.5 slower\n path = f\"{rel}{os.sep}{basename}\"\n else:\n return False\n\n if not System.is_unix():\n path = normalize_file(path)\n return path", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnorePatterns.matches_DvcIgnorePatterns.__bool__.return.bool_self_pattern_list_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnorePatterns.matches_DvcIgnorePatterns.__bool__.return.bool_self_pattern_list_", "embedding": null, "metadata": {"file_path": "dvc/ignore.py", "file_name": "ignore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 94, "end_line": 147, "span_ids": ["DvcIgnorePatterns.matches", "DvcIgnorePatterns.__eq__", "DvcIgnorePatterns.__bool__", "DvcIgnorePatterns.match_details", "DvcIgnorePatterns.ignore", "DvcIgnorePatterns.__hash__", "DvcIgnorePatterns._ignore_details"], "tokens": 388}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DvcIgnorePatterns(DvcIgnore):\n\n def matches(self, dirname, basename, is_dir=False):\n path = self._get_normalize_path(dirname, basename)\n if not path:\n return False\n return self.ignore(path, is_dir)\n\n def ignore(self, path, is_dir):\n result = False\n if is_dir:\n path_dir = f\"{path}/\"\n for ignore, pattern in self.ignore_spec:\n if pattern.match(path) or pattern.match(path_dir):\n result = ignore\n else:\n for ignore, pattern in self.ignore_spec:\n if pattern.match(path):\n result = ignore\n return result\n\n def match_details(self, dirname, basename, is_dir=False):\n path = self._get_normalize_path(dirname, basename)\n if not path:\n return False\n return self._ignore_details(path, is_dir)\n\n def _ignore_details(self, path, is_dir):\n result = []\n for ignore, pattern in zip(self.regex_pattern_list, self.pattern_list):\n regex = re.compile(ignore[0])\n # skip system pattern\n if not pattern.file_info:\n continue\n if is_dir:\n path_dir = f\"{path}/\"\n if regex.match(path) or regex.match(path_dir):\n result.append(pattern.file_info)\n else:\n if regex.match(path):\n result.append(pattern.file_info)\n return result\n\n def __hash__(self):\n return hash(self.dirname + \":\" + str(self.pattern_list))\n\n def __eq__(self, other):\n if not isinstance(other, DvcIgnorePatterns):\n return NotImplemented\n return (self.dirname == other.dirname) & (\n [pattern.patterns for pattern in self.pattern_list]\n == [pattern.patterns for pattern in other.pattern_list]\n )\n\n def __bool__(self):\n return bool(self.pattern_list)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_CheckIgnoreResult_DvcIgnoreFilterNoop.is_ignored.return.False": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_CheckIgnoreResult_DvcIgnoreFilterNoop.is_ignored.return.False", "embedding": null, "metadata": {"file_path": "dvc/ignore.py", "file_name": "ignore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 150, "end_line": 176, "span_ids": ["impl:3", "DvcIgnoreFilterNoop.is_ignored", "DvcIgnoreFilterNoop.check_ignore", "_no_match", "DvcIgnoreFilterNoop", "DvcIgnoreFilterNoop.is_ignored_dir", "DvcIgnoreFilterNoop.__init__", "DvcIgnoreFilterNoop.__call__", "DvcIgnoreFilterNoop.is_ignored_file"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "CheckIgnoreResult = namedtuple(\n \"CheckIgnoreResult\", [\"file\", \"match\", \"patterns\"]\n)\n\n\ndef _no_match(path):\n return CheckIgnoreResult(path, False, [\"::\"])\n\n\nclass DvcIgnoreFilterNoop:\n def __init__(self, tree, root_dir):\n pass\n\n def __call__(self, root, dirs, files, **kwargs):\n return dirs, files\n\n def is_ignored_dir(self, _):\n return False\n\n def is_ignored_file(self, _):\n return False\n\n def check_ignore(self, path):\n return _no_match(path)\n\n def is_ignored(self, _):\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnoreFilter_DvcIgnoreFilter.__init__.self__update_self_root_di": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnoreFilter_DvcIgnoreFilter.__init__.self__update_self_root_di", "embedding": null, "metadata": {"file_path": "dvc/ignore.py", "file_name": "ignore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 179, "end_line": 192, "span_ids": ["DvcIgnoreFilter", "DvcIgnoreFilter.__init__"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DvcIgnoreFilter:\n def __init__(self, tree, root_dir):\n from dvc.repo import Repo\n\n default_ignore_patterns = [\".hg/\", \".git/\", \"{}/\".format(Repo.DVC_DIR)]\n\n self.tree = tree\n self.root_dir = root_dir\n self.ignores_trie_tree = PathStringTrie()\n self.ignores_trie_tree[root_dir] = DvcIgnorePatterns(\n default_ignore_patterns, root_dir\n )\n self._ignored_subrepos = PathStringTrie()\n self._update(self.root_dir)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnoreFilter.__call___DvcIgnoreFilter._get_trie_pattern.return.self_ignores_trie_tree_ge": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnoreFilter.__call___DvcIgnoreFilter._get_trie_pattern.return.self_ignores_trie_tree_ge", "embedding": null, "metadata": {"file_path": "dvc/ignore.py", "file_name": "ignore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 250, "end_line": 283, "span_ids": ["DvcIgnoreFilter._get_trie_pattern", "DvcIgnoreFilter.__call__"], "tokens": 239}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DvcIgnoreFilter:\n\n def __call__(self, root, dirs, files, ignore_subrepos=True):\n for dname in dirs:\n self._update_sub_repo(os.path.join(root, dname))\n\n ignore_pattern = self._get_trie_pattern(root)\n if ignore_pattern:\n dirs, files = ignore_pattern(root, dirs, files)\n if not ignore_subrepos:\n dirs.extend(self._ignored_subrepos.get(root, []))\n return dirs, files\n\n def _get_trie_pattern(self, dirname):\n ignore_pattern = self.ignores_trie_tree.get(dirname)\n if ignore_pattern:\n return ignore_pattern\n\n prefix = self.ignores_trie_tree.longest_prefix(dirname).key\n if not prefix:\n # outside of the repo\n return None\n\n dirs = list(\n takewhile(\n lambda path: path != prefix,\n (parent.fspath for parent in PathInfo(dirname).parents),\n )\n )\n dirs.reverse()\n dirs.append(dirname)\n\n for parent in dirs:\n self._update(parent)\n\n return self.ignores_trie_tree.get(dirname)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnoreFilter._is_ignored_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/ignore.py_DvcIgnoreFilter._is_ignored_", "embedding": null, "metadata": {"file_path": "dvc/ignore.py", "file_name": "ignore.py", "file_type": "text/x-python", "category": "implementation", "start_line": 285, "end_line": 359, "span_ids": ["DvcIgnoreFilter._outside_repo", "DvcIgnoreFilter.check_ignore", "DvcIgnoreFilter.is_ignored", "DvcIgnoreFilter._is_ignored", "DvcIgnoreFilter.is_ignored_file", "DvcIgnoreFilter._is_subrepo", "init", "DvcIgnoreFilter.is_ignored_dir"], "tokens": 559}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DvcIgnoreFilter:\n\n def _is_ignored(self, path, is_dir=False):\n if self._outside_repo(path):\n return False\n dirname, basename = os.path.split(os.path.normpath(path))\n ignore_pattern = self._get_trie_pattern(dirname)\n if ignore_pattern:\n return ignore_pattern.matches(dirname, basename, is_dir)\n else:\n return False\n\n def _is_subrepo(self, path):\n dirname, basename = os.path.split(os.path.normpath(path))\n return basename in self._ignored_subrepos.get(dirname, set())\n\n def is_ignored_dir(self, path, ignore_subrepos=True):\n path = os.path.abspath(path)\n if not ignore_subrepos:\n return not self._is_subrepo(path)\n if path == self.root_dir:\n return False\n\n return self._is_ignored(path, True)\n\n def is_ignored_file(self, path):\n path = os.path.abspath(path)\n return self._is_ignored(path, False)\n\n def _outside_repo(self, path):\n path = PathInfo(path)\n\n # paths outside of the repo should be ignored\n path = relpath(path, self.root_dir)\n if path.startswith(\"..\") or (\n os.name == \"nt\"\n and not os.path.commonprefix(\n [os.path.abspath(path), self.root_dir]\n )\n ):\n return True\n return False\n\n def check_ignore(self, target):\n full_target = os.path.abspath(target)\n if not self._outside_repo(full_target):\n dirname, basename = os.path.split(os.path.normpath(full_target))\n pattern = self._get_trie_pattern(dirname)\n if pattern:\n matches = pattern.match_details(\n dirname, basename, os.path.isdir(full_target)\n )\n\n if matches:\n return CheckIgnoreResult(target, True, matches)\n return _no_match(target)\n\n def is_ignored(self, path):\n # NOTE: can't use self.check_ignore(path).match for now, see\n # https://github.com/iterative/dvc/issues/4555\n return self.is_ignored_dir(path) or self.is_ignored_file(path)\n\n\ndef init(path):\n dvcignore = os.path.join(path, DvcIgnore.DVCIGNORE_FILE)\n if os.path.exists(dvcignore):\n return dvcignore\n\n with open(dvcignore, \"w\") as fobj:\n fobj.write(\n \"# Add patterns of files dvc should ignore, which could improve\\n\"\n \"# the performance. Learn more at\\n\"\n \"# https://dvc.org/doc/user-guide/dvcignore\\n\"\n )\n\n return dvcignore", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/info.py_itertools_if_PKG_is_None_.else_.package.f_PKG_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/info.py_itertools_if_PKG_is_None_.else_.package.f_PKG_", "embedding": null, "metadata": {"file_path": "dvc/info.py", "file_name": "info.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 24, "span_ids": ["imports"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import itertools\nimport os\nimport pathlib\nimport platform\nimport uuid\n\nfrom dvc.exceptions import DvcException, NotDvcRepoError\nfrom dvc.repo import Repo\nfrom dvc.scm.base import SCMError\nfrom dvc.system import System\nfrom dvc.tree import TREES, get_tree_cls, get_tree_config\nfrom dvc.utils import error_link\nfrom dvc.utils.pkg import PKG\nfrom dvc.version import __version__\n\ntry:\n import psutil\nexcept ImportError:\n psutil = None\n\nif PKG is None:\n package = \"\"\nelse:\n package = f\"({PKG})\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/info.py_get_dvc_info_get_dvc_info.return._n_join_info_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/info.py_get_dvc_info_get_dvc_info.return._n_join_info_", "embedding": null, "metadata": {"file_path": "dvc/info.py", "file_name": "info.py", "file_type": "text/x-python", "category": "implementation", "start_line": 27, "end_line": 67, "span_ids": ["get_dvc_info"], "tokens": 339}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def get_dvc_info():\n info = [\n f\"DVC version: {__version__} {package}\",\n \"---------------------------------\",\n f\"Platform: Python {platform.python_version()} on \"\n f\"{platform.platform()}\",\n f\"Supports: {_get_supported_remotes()}\",\n ]\n\n try:\n repo = Repo()\n\n # cache_dir might not exist yet (e.g. after `dvc init`), and we\n # can't auto-create it, as it might cause issues if the user\n # later decides to enable shared cache mode with\n # `dvc config cache.shared group`.\n if os.path.exists(repo.cache.local.cache_dir):\n info.append(\n \"Cache types: {}\".format(_get_linktype_support_info(repo))\n )\n if psutil:\n fs_type = get_fs_type(repo.cache.local.cache_dir)\n info.append(f\"Cache directory: {fs_type}\")\n else:\n info.append(\"Cache types: \" + error_link(\"no-dvc-cache\"))\n\n info.append(f\"Caches: {_get_caches(repo.cache)}\")\n\n info.append(f\"Remotes: {_get_remotes(repo.config)}\")\n\n except NotDvcRepoError:\n pass\n except SCMError:\n info.append(\"Repo: dvc, git (broken)\")\n else:\n root_directory = repo.root_dir\n if psutil:\n fs_root = get_fs_type(os.path.abspath(root_directory))\n info.append(f\"Workspace directory: {fs_root}\")\n info.append(\"Repo: {}\".format(_get_dvc_repo_info(repo)))\n return \"\\n\".join(info)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/info.py__get_linktype_support_info__get_linktype_support_info.return._join_cache_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/info.py__get_linktype_support_info__get_linktype_support_info.return._join_cache_", "embedding": null, "metadata": {"file_path": "dvc/info.py", "file_name": "info.py", "file_type": "text/x-python", "category": "implementation", "start_line": 66, "end_line": 95, "span_ids": ["_get_linktype_support_info"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _get_linktype_support_info(repo):\n\n links = {\n \"reflink\": (System.reflink, None),\n \"hardlink\": (System.hardlink, System.is_hardlink),\n \"symlink\": (System.symlink, System.is_symlink),\n }\n\n fname = \".\" + str(uuid.uuid4())\n src = os.path.join(repo.cache.local.cache_dir, fname)\n open(src, \"w\").close()\n dst = os.path.join(repo.root_dir, fname)\n\n cache = []\n\n for name, (link, is_link) in links.items():\n try:\n link(src, dst)\n status = \"supported\"\n if is_link and not is_link(dst):\n status = \"broken\"\n os.unlink(dst)\n except DvcException:\n status = \"not supported\"\n\n if status == \"supported\":\n cache.append(name)\n os.remove(src)\n\n return \", \".join(cache)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/info.py__get_supported_remotes_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/info.py__get_supported_remotes_", "embedding": null, "metadata": {"file_path": "dvc/info.py", "file_name": "info.py", "file_type": "text/x-python", "category": "implementation", "start_line": 122, "end_line": 162, "span_ids": ["get_fs_type", "_get_supported_remotes", "_get_dvc_repo_info"], "tokens": 259}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _get_supported_remotes():\n\n supported_remotes = []\n for tree_cls in TREES:\n if not tree_cls.get_missing_deps():\n supported_remotes.append(tree_cls.scheme)\n\n if len(supported_remotes) == len(TREES):\n return \"All remotes\"\n\n if len(supported_remotes) == 1:\n return supported_remotes\n\n return \", \".join(supported_remotes)\n\n\ndef get_fs_type(path):\n\n partition = {\n pathlib.Path(part.mountpoint): (part.fstype + \" on \" + part.device)\n for part in psutil.disk_partitions(all=True)\n }\n\n # need to follow the symlink: https://github.com/iterative/dvc/issues/5065\n path = pathlib.Path(path).resolve()\n\n for parent in itertools.chain([path], path.parents):\n if parent in partition:\n return partition[parent]\n return (\"unknown\", \"none\")\n\n\ndef _get_dvc_repo_info(self):\n if self.config.get(\"core\", {}).get(\"no_scm\", False):\n return \"dvc (no_scm)\"\n\n if self.root_dir != self.scm.root_dir:\n return \"dvc (subdir), git\"\n\n return \"dvc, git\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/lock.py__Manages_dvc_lock_file__LockNoop.__exit__.self_unlock_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/lock.py__Manages_dvc_lock_file__LockNoop.__exit__.self_unlock_", "embedding": null, "metadata": {"file_path": "dvc/lock.py", "file_name": "lock.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 83, "span_ids": ["LockNoop.lock", "LockBase.lock", "LockBase.__exit__", "LockNoop.__enter__", "LockNoop.__exit__", "LockNoop", "LockNoop.unlock", "LockBase.unlock", "LockNoop.is_locked", "LockBase.__init__", "LockError", "LockBase.__enter__", "LockBase.is_locked", "docstring", "LockNoop.__init__", "LockBase.lockfile", "LockBase"], "tokens": 402}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Manages dvc lock file.\"\"\"\n\nimport hashlib\nimport os\nfrom abc import ABC, abstractmethod\nfrom datetime import timedelta\n\nimport flufl.lock\nimport zc.lockfile\nfrom funcy import retry\n\nfrom dvc.exceptions import DvcException\nfrom dvc.progress import Tqdm\nfrom dvc.utils import format_link\n\nDEFAULT_TIMEOUT = 3\n\n\nFAILED_TO_LOCK_MESSAGE = (\n \"Unable to acquire lock. Most likely another DVC process is running or \"\n \"was terminated abruptly. Check the page {} for other possible reasons \"\n \"and to learn how to resolve this.\"\n).format(\n format_link(\"https://dvc.org/doc/user-guide/troubleshooting#lock-issue\")\n)\n\n\nclass LockError(DvcException):\n \"\"\"Thrown when unable to acquire the lock for DVC repo.\"\"\"\n\n\nclass LockBase(ABC):\n @abstractmethod\n def __init__(self, lockfile):\n self._lockfile = lockfile\n\n @property\n def lockfile(self):\n return self._lockfile\n\n @abstractmethod\n def lock(self):\n pass\n\n @abstractmethod\n def unlock(self):\n pass\n\n @property\n @abstractmethod\n def is_locked(self):\n pass\n\n @abstractmethod\n def __enter__(self):\n pass\n\n @abstractmethod\n def __exit__(self, typ, value, tbck):\n pass\n\n\nclass LockNoop(LockBase):\n def __init__(\n self, *args, **kwargs\n ): # pylint: disable=super-init-not-called\n self._lock = False\n\n def lock(self):\n self._lock = True\n\n def unlock(self):\n self._lock = False\n\n @property\n def is_locked(self):\n return self._lock\n\n def __enter__(self):\n self.lock()\n\n def __exit__(self, typ, value, tbck):\n self.unlock()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_logging_OutputIsIgnoredError.__init__.super___init___f_Path_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_logging_OutputIsIgnoredError.__init__.super___init___f_Path_", "embedding": null, "metadata": {"file_path": "dvc/output/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 55, "span_ids": ["OutputIsNotFileOrDirError.__init__", "OutputIsStageFileError", "OutputIsIgnoredError", "imports", "OutputDoesNotExistError.__init__", "OutputIsNotFileOrDirError", "OutputDoesNotExistError", "OutputIsIgnoredError.__init__", "OutputAlreadyTrackedError.__init__", "OutputAlreadyTrackedError", "OutputIsStageFileError.__init__"], "tokens": 355}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nfrom copy import copy\nfrom typing import Type\nfrom urllib.parse import urlparse\n\nfrom voluptuous import Any\n\nimport dvc.prompt as prompt\nfrom dvc.cache import NamedCache\nfrom dvc.exceptions import (\n CheckoutError,\n CollectCacheError,\n DvcException,\n MergeError,\n RemoteCacheRequiredError,\n)\nfrom dvc.hash_info import HashInfo\n\nfrom ..tree.base import BaseTree\n\nlogger = logging.getLogger(__name__)\n\n\nclass OutputDoesNotExistError(DvcException):\n def __init__(self, path):\n msg = f\"output '{path}' does not exist\"\n super().__init__(msg)\n\n\nclass OutputIsNotFileOrDirError(DvcException):\n def __init__(self, path):\n msg = f\"output '{path}' is not a file or directory\"\n super().__init__(msg)\n\n\nclass OutputAlreadyTrackedError(DvcException):\n def __init__(self, path):\n msg = f\"\"\" output '{path}' is already tracked by SCM (e.g. Git).\n You can remove it from Git, then add to DVC.\n To stop tracking from Git:\n git rm -r --cached '{path}'\n git commit -m \"stop tracking {path}\" \"\"\"\n super().__init__(msg)\n\n\nclass OutputIsStageFileError(DvcException):\n def __init__(self, path):\n super().__init__(f\"Stage file '{path}' cannot be an output.\")\n\n\nclass OutputIsIgnoredError(DvcException):\n def __init__(self, match):\n lines = \"\\n\".join(match.patterns)\n super().__init__(f\"Path '{match.file}' is ignored by\\n{lines}\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_BaseOutput.remove_BaseOutput.get_dir_cache.return.self_dir_cache": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_BaseOutput.remove_BaseOutput.get_dir_cache.return.self_dir_cache", "embedding": null, "metadata": {"file_path": "dvc/output/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 352, "end_line": 398, "span_ids": ["BaseOutput.get_dir_cache", "BaseOutput.move", "BaseOutput.get_files_number", "BaseOutput.unprotect", "BaseOutput.remove"], "tokens": 320}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseOutput:\n\n def remove(self, ignore_remove=False):\n self.tree.remove(self.path_info)\n if self.scheme != \"local\":\n return\n\n if ignore_remove:\n self.ignore_remove()\n\n def move(self, out):\n # pylint: disable=no-member\n if self.scheme == \"local\" and self.use_scm_ignore:\n self.repo.scm.ignore_remove(self.fspath)\n\n self.tree.move(self.path_info, out.path_info)\n self.def_path = out.def_path\n self.path_info = out.path_info\n self.save()\n self.commit()\n\n if self.scheme == \"local\" and self.use_scm_ignore:\n self.repo.scm.ignore(self.fspath)\n\n def get_files_number(self, filter_info=None):\n if not self.use_cache:\n return 0\n\n return self.cache.get_files_number(\n self.path_info, self.hash_info, filter_info\n )\n\n def unprotect(self):\n if self.exists:\n self.tree.unprotect(self.path_info)\n\n def get_dir_cache(self, **kwargs):\n if not self.is_dir_checksum:\n raise DvcException(\"cannot get dir cache for file checksum\")\n if self.cache.changed_cache_file(self.hash_info):\n self.repo.cloud.pull(\n NamedCache.make(\"local\", self.hash_info.value, str(self)),\n show_checksums=False,\n **kwargs,\n )\n self.hash_info.dir_info = None\n if not self.hash_info.dir_info:\n self.cache.set_dir_info(self.hash_info)\n return self.dir_cache", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_BaseOutput.get_used_cache_BaseOutput.get_used_cache.return.ret": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_BaseOutput.get_used_cache_BaseOutput.get_used_cache.return.ret", "embedding": null, "metadata": {"file_path": "dvc/output/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 461, "end_line": 507, "span_ids": ["BaseOutput.get_used_cache"], "tokens": 312}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseOutput:\n\n def get_used_cache(self, **kwargs):\n \"\"\"Get a dumpd of the given `out`, with an entry including the branch.\n\n The `used_cache` of an output is no more than its `info`.\n\n In case that the given output is a directory, it will also\n include the `info` of its files.\n \"\"\"\n\n if not self.use_cache:\n return NamedCache()\n\n if self.stage.is_repo_import:\n cache = NamedCache()\n (dep,) = self.stage.deps\n cache.external[dep.repo_pair].add(dep.def_path)\n return cache\n\n if not self.hash_info:\n msg = (\n \"Output '{}'({}) is missing version info. \"\n \"Cache for it will not be collected. \"\n \"Use `dvc repro` to get your pipeline up to date.\".format(\n self, self.stage\n )\n )\n if self.exists:\n msg += (\n \"\\n\"\n \"You can also use `dvc commit {stage.addressing}` \"\n \"to associate existing '{out}' with {stage}.\".format(\n out=self, stage=self.stage\n )\n )\n logger.warning(msg)\n return NamedCache()\n\n ret = NamedCache.make(self.scheme, self.hash_info.value, str(self))\n\n if not self.is_dir_checksum:\n return ret\n\n ret.add_child_cache(\n self.hash_info.value, self.collect_used_dir_cache(**kwargs),\n )\n\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_BaseOutput._validate_output_path_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_BaseOutput._validate_output_path_", "embedding": null, "metadata": {"file_path": "dvc/output/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 525, "end_line": 579, "span_ids": ["BaseOutput._validate_output_path", "BaseOutput.merge", "BaseOutput._check_can_merge"], "tokens": 308}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseOutput:\n\n @classmethod\n def _validate_output_path(cls, path, stage=None):\n from dvc.dvcfile import is_valid_filename\n\n if is_valid_filename(path):\n raise cls.IsStageFileError(path)\n\n if stage:\n check = stage.repo.tree.dvcignore.check_ignore(path)\n if check.match:\n raise cls.IsIgnoredError(check)\n\n def _check_can_merge(self, out):\n if self.scheme != out.scheme:\n raise MergeError(\"unable to auto-merge outputs of different types\")\n\n my = self.dumpd()\n other = out.dumpd()\n\n ignored = [\n self.tree.PARAM_CHECKSUM,\n HashInfo.PARAM_SIZE,\n HashInfo.PARAM_NFILES,\n ]\n\n for opt in ignored:\n my.pop(opt, None)\n other.pop(opt, None)\n\n if my != other:\n raise MergeError(\n \"unable to auto-merge outputs with different options\"\n )\n\n if not out.is_dir_checksum:\n raise MergeError(\n \"unable to auto-merge outputs that are not directories\"\n )\n\n def merge(self, ancestor, other):\n assert other\n\n if ancestor:\n self._check_can_merge(ancestor)\n ancestor_info = ancestor.hash_info\n else:\n ancestor_info = None\n\n self._check_can_merge(self)\n self._check_can_merge(other)\n\n self.hash_info = self.cache.merge(\n ancestor_info, self.hash_info, other.hash_info\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_CloudURLInfo_HTTPURLInfo.replace.return.self_from_parts_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_CloudURLInfo_HTTPURLInfo.replace.return.self_from_parts_", "embedding": null, "metadata": {"file_path": "dvc/path_info.py", "file_name": "path_info.py", "file_type": "text/x-python", "category": "implementation", "start_line": 250, "end_line": 274, "span_ids": ["HTTPURLInfo", "HTTPURLInfo.replace", "CloudURLInfo.path", "HTTPURLInfo.__init__", "CloudURLInfo"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudURLInfo(URLInfo):\n @property\n def path(self):\n return self._spath.lstrip(\"/\")\n\n\nclass HTTPURLInfo(URLInfo):\n __hash__: Callable[[\"HTTPURLInfo\"], int] = URLInfo.__hash__\n\n def __init__(self, url):\n p = urlparse(url)\n stripped = p._replace(params=None, query=None, fragment=None)\n super().__init__(stripped.geturl())\n self.params = p.params\n self.query = p.query\n self.fragment = p.fragment\n\n def replace(self, path=None):\n return self.from_parts(\n *self._base_parts,\n params=self.params,\n query=self.query,\n fragment=self.fragment,\n path=path,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_HTTPURLInfo.from_parts_HTTPURLInfo.from_parts.return.obj": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_HTTPURLInfo.from_parts_HTTPURLInfo.from_parts.return.obj", "embedding": null, "metadata": {"file_path": "dvc/path_info.py", "file_name": "path_info.py", "file_type": "text/x-python", "category": "implementation", "start_line": 265, "end_line": 297, "span_ids": ["HTTPURLInfo.from_parts"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTTPURLInfo(URLInfo):\n\n @classmethod\n def from_parts(\n cls,\n scheme=None,\n host=None,\n user=None,\n port=None,\n path=\"\",\n netloc=None,\n params=None,\n query=None,\n fragment=None,\n ): # pylint: disable=arguments-differ\n assert bool(host) ^ bool(netloc)\n\n if netloc is not None:\n return cls(\n \"{}://{}{}{}{}{}\".format(\n scheme,\n netloc,\n path,\n (\";\" + params) if params else \"\",\n (\"?\" + query) if query else \"\",\n (\"#\" + fragment) if fragment else \"\",\n )\n )\n\n obj = cls.__new__(cls)\n obj._fill_parts(scheme, host, user, port, path)\n obj.params = params\n obj.query = query\n obj.fragment = fragment\n return obj", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/pathspec_math.py__Path_Specification_Patt__match_all_level.return.True_rule": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/pathspec_math.py__Path_Specification_Patt__match_all_level.return.True_rule", "embedding": null, "metadata": {"file_path": "dvc/pathspec_math.py", "file_name": "pathspec_math.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 36, "span_ids": ["_match_all_level", "_is_comment", "_remove_slash", "_not_ignore", "docstring"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# Path Specification Pattern Math\n# Including changing base dir of path specification patterns and merging\n# of two path specification patterns with different base\n# All the operations follow the documents of `gitignore`\nimport os\nfrom collections import namedtuple\n\nfrom pathspec.util import normalize_file\n\nfrom dvc.utils import relpath\n\nPatternInfo = namedtuple(\"PatternInfo\", [\"patterns\", \"file_info\"])\n\n\ndef _not_ignore(rule):\n return (True, rule[1:]) if rule.startswith(\"!\") else (False, rule)\n\n\ndef _is_comment(rule):\n return rule.startswith(\"#\")\n\n\ndef _remove_slash(rule):\n if rule.startswith(\"\\\\\"):\n return rule[1:]\n return rule\n\n\ndef _match_all_level(rule):\n if rule[:-1].find(\"/\") >= 0 and not rule.startswith(\"**/\"):\n if rule.startswith(\"/\"):\n rule = rule[1:]\n return False, rule\n if rule.startswith(\"**/\"):\n rule = rule[3:]\n return True, rule", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/pathspec_math.py_change_rule__change_dirname.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/pathspec_math.py_change_rule__change_dirname.return._", "embedding": null, "metadata": {"file_path": "dvc/pathspec_math.py", "file_name": "pathspec_math.py", "file_type": "text/x-python", "category": "implementation", "start_line": 39, "end_line": 68, "span_ids": ["change_rule", "_change_dirname"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def change_rule(rule, rel):\n rule = rule.strip()\n if _is_comment(rule):\n return rule\n not_ignore, rule = _not_ignore(rule)\n match_all, rule = _match_all_level(rule)\n rule = _remove_slash(rule)\n if not match_all:\n rule = f\"/{rule}\"\n else:\n rule = f\"/**/{rule}\"\n if not_ignore:\n rule = f\"!/{rel}{rule}\"\n else:\n rule = f\"/{rel}{rule}\"\n rule = normalize_file(rule)\n return rule\n\n\ndef _change_dirname(dirname, pattern_list, new_dirname):\n if new_dirname == dirname:\n return pattern_list\n rel = relpath(dirname, new_dirname)\n if rel.startswith(\"..\"):\n raise ValueError(\"change dirname can only change to parent path\")\n\n return [\n PatternInfo(change_rule(rule.patterns, rel), rule.file_info)\n for rule in pattern_list\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/pathspec_math.py_merge_patterns_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/pathspec_math.py_merge_patterns_", "embedding": null, "metadata": {"file_path": "dvc/pathspec_math.py", "file_name": "pathspec_math.py", "file_type": "text/x-python", "category": "implementation", "start_line": 71, "end_line": 94, "span_ids": ["merge_patterns"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def merge_patterns(pattern_a, prefix_a, pattern_b, prefix_b):\n \"\"\"\n Merge two path specification patterns.\n\n This implementation merge two path specification patterns on different\n bases. It returns the longest common parent directory, and the patterns\n based on this new base directory.\n \"\"\"\n if not pattern_a:\n return pattern_b, prefix_b\n elif not pattern_b:\n return pattern_a, prefix_a\n\n longest_common_dir = os.path.commonpath([prefix_a, prefix_b])\n new_pattern_a = _change_dirname(prefix_a, pattern_a, longest_common_dir)\n new_pattern_b = _change_dirname(prefix_b, pattern_b, longest_common_dir)\n\n if len(prefix_a) <= len(prefix_b):\n merged_pattern = new_pattern_a + new_pattern_b\n else:\n merged_pattern = new_pattern_b + new_pattern_a\n\n return merged_pattern, longest_common_dir", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/__init__.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/__init__.py__", "embedding": null, "metadata": {"file_path": "dvc/remote/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 11, "span_ids": ["imports", "get_remote"], "tokens": 59}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from ..tree import get_cloud_tree\nfrom .base import Remote\nfrom .local import LocalRemote\n\n\ndef get_remote(repo, **kwargs):\n tree = get_cloud_tree(repo, **kwargs)\n if tree.scheme == \"local\":\n return LocalRemote(tree)\n return Remote(tree)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/local.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/local.py__", "embedding": null, "metadata": {"file_path": "dvc/remote/local.py", "file_name": "local.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["LocalRemote", "imports"], "tokens": 39}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from .base import Remote\nfrom .index import RemoteIndexNoop\n\n\nclass LocalRemote(Remote):\n INDEX_CLS = RemoteIndexNoop # type: ignore[assignment]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.find_outs_by_path_Repo.repo_tree.return.RepoTree_self_subrepos_s": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.find_outs_by_path_Repo.repo_tree.return.RepoTree_self_subrepos_s", "embedding": null, "metadata": {"file_path": "dvc/repo/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 382, "end_line": 416, "span_ids": ["Repo.repo_tree", "Repo.is_dvc_internal", "Repo.find_outs_by_path", "Repo.find_out_by_relpath"], "tokens": 255}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Repo:\n\n def find_outs_by_path(self, path, outs=None, recursive=False, strict=True):\n # using `outs_graph` to ensure graph checks are run\n outs = outs or self.outs_graph\n\n abs_path = os.path.abspath(path)\n path_info = PathInfo(abs_path)\n match = path_info.__eq__ if strict else path_info.isin_or_eq\n\n def func(out):\n if out.scheme == \"local\" and match(out.path_info):\n return True\n\n if recursive and out.path_info.isin(path_info):\n return True\n\n return False\n\n matched = list(filter(func, outs))\n if not matched:\n raise OutputNotFoundError(path, self)\n\n return matched\n\n def find_out_by_relpath(self, relpath):\n path = os.path.join(self.root_dir, relpath)\n (out,) = self.find_outs_by_path(path)\n return out\n\n def is_dvc_internal(self, path):\n path_parts = os.path.normpath(path).split(os.path.sep)\n return self.DVC_DIR in path_parts\n\n @cached_property\n def repo_tree(self):\n return RepoTree(self, subrepos=self.subrepos, fetch=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.open_by_relpath_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.open_by_relpath_", "embedding": null, "metadata": {"file_path": "dvc/repo/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 548, "end_line": 574, "span_ids": ["Repo._reset", "Repo.open_by_relpath", "Repo.close"], "tokens": 226}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Repo:\n\n @contextmanager\n def open_by_relpath(self, path, remote=None, mode=\"r\", encoding=None):\n \"\"\"Opens a specified resource as a file descriptor\"\"\"\n\n tree = RepoTree(self, stream=True, subrepos=True)\n path = PathInfo(self.root_dir) / path\n try:\n with self.state:\n with tree.open(\n path, mode=mode, encoding=encoding, remote=remote,\n ) as fobj:\n yield fobj\n except FileNotFoundError as exc:\n raise FileMissingError(path) from exc\n except IsADirectoryError as exc:\n raise DvcIsADirectoryError(f\"'{path}' is a directory\") from exc\n\n def close(self):\n self.scm.close()\n\n def _reset(self):\n self.__dict__.pop(\"outs_trie\", None)\n self.__dict__.pop(\"outs_graph\", None)\n self.__dict__.pop(\"graph\", None)\n self.__dict__.pop(\"stages\", None)\n self.__dict__.pop(\"pipelines\", None)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/checkout.py_checkout_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/checkout.py_checkout_", "embedding": null, "metadata": {"file_path": "dvc/repo/checkout.py", "file_name": "checkout.py", "file_type": "text/x-python", "category": "implementation", "start_line": 74, "end_line": 125, "span_ids": ["checkout"], "tokens": 292}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@locked\ndef checkout(\n self,\n targets=None,\n with_deps=False,\n force=False,\n relink=False,\n recursive=False,\n allow_missing=False,\n **kwargs,\n):\n\n unused = []\n stats = {\n \"added\": [],\n \"deleted\": [],\n \"modified\": [],\n \"failed\": [],\n }\n if not targets:\n targets = [None]\n unused = _get_unused_links(self)\n\n stats[\"deleted\"] = [_fspath_dir(u) for u in unused]\n self.state.remove_links(unused)\n\n if isinstance(targets, str):\n targets = [targets]\n\n pairs = _collect_pairs(self, targets, with_deps, recursive)\n total = get_all_files_numbers(pairs)\n with Tqdm(\n total=total, unit=\"file\", desc=\"Checkout\", disable=total == 0\n ) as pbar:\n for stage, filter_info in pairs:\n result = stage.checkout(\n force=force,\n progress_callback=pbar.update_msg,\n relink=relink,\n filter_info=filter_info,\n allow_missing=allow_missing,\n **kwargs,\n )\n for key, items in result.items():\n stats[key].extend(_fspath_dir(path) for path in items)\n\n if stats.get(\"failed\"):\n raise CheckoutError(stats[\"failed\"], stats)\n\n del stats[\"failed\"]\n return stats", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/collect.py_logging__collect_outs.return.set_filter_output_filter_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/collect.py_logging__collect_outs.return.set_filter_output_filter_", "embedding": null, "metadata": {"file_path": "dvc/repo/collect.py", "file_name": "collect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 27, "span_ids": ["imports", "_collect_outs"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nfrom typing import Callable, Iterable, Set, Tuple\n\nfrom dvc.output.base import BaseOutput\nfrom dvc.path_info import PathInfo\nfrom dvc.repo import Repo\nfrom dvc.tree.repo import RepoTree\nfrom dvc.types import DvcPath\n\nlogger = logging.getLogger(__name__)\n\n\nFilterFn = Callable[[BaseOutput], bool]\nOutputs = Set[BaseOutput]\nDvcPaths = Set[DvcPath]\n\n\ndef _collect_outs(\n repo: Repo, output_filter: FilterFn = None, deps: bool = False,\n) -> Outputs:\n outs = {\n out\n for stage in repo.graph # using `graph` to ensure graph checks run\n for out in (stage.deps if deps else stage.outs)\n }\n return set(filter(output_filter, outs)) if output_filter else outs", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/collect.py__collect_paths__collect_paths.return.target_infos": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/collect.py__collect_paths__collect_paths.return.target_infos", "embedding": null, "metadata": {"file_path": "dvc/repo/collect.py", "file_name": "collect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 30, "end_line": 52, "span_ids": ["_collect_paths"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _collect_paths(\n repo: Repo,\n targets: Iterable[str],\n recursive: bool = False,\n rev: str = None,\n):\n path_infos = {PathInfo(os.path.abspath(target)) for target in targets}\n tree = RepoTree(repo)\n\n target_infos = set()\n for path_info in path_infos:\n\n if recursive and tree.isdir(path_info):\n target_infos.update(set(tree.walk_files(path_info)))\n\n if not tree.isfile(path_info):\n if not recursive:\n logger.warning(\n \"'%s' was not found at: '%s'.\", path_info, rev,\n )\n continue\n target_infos.add(path_info)\n return target_infos", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/collect.py__filter_duplicates_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/collect.py__filter_duplicates_", "embedding": null, "metadata": {"file_path": "dvc/repo/collect.py", "file_name": "collect.py", "file_type": "text/x-python", "category": "implementation", "start_line": 55, "end_line": 88, "span_ids": ["collect", "_filter_duplicates"], "tokens": 219}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _filter_duplicates(\n outs: Outputs, path_infos: DvcPaths\n) -> Tuple[Outputs, DvcPaths]:\n res_outs: Outputs = set()\n res_infos = set(path_infos)\n\n for out in outs:\n if out.path_info in path_infos:\n res_outs.add(out)\n res_infos.remove(out.path_info)\n\n return res_outs, res_infos\n\n\ndef collect(\n repo: Repo,\n deps: bool = False,\n targets: Iterable[str] = None,\n output_filter: FilterFn = None,\n rev: str = None,\n recursive: bool = False,\n) -> Tuple[Outputs, DvcPaths]:\n assert targets or output_filter\n\n outs: Outputs = _collect_outs(repo, output_filter=output_filter, deps=deps)\n\n if not targets:\n path_infos: DvcPaths = set()\n return outs, path_infos\n\n target_infos = _collect_paths(repo, targets, recursive=recursive, rev=rev)\n\n return _filter_duplicates(outs, target_infos)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/diff.py_logging_diff.return.ret_if_any_ret_values_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/diff.py_logging_diff.return.ret_if_any_ret_values_", "embedding": null, "metadata": {"file_path": "dvc/repo/diff.py", "file_name": "diff.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 79, "span_ids": ["imports", "diff"], "tokens": 605}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\n\nfrom dvc.exceptions import PathMissingError\nfrom dvc.repo import locked\nfrom dvc.tree.local import LocalTree\nfrom dvc.tree.repo import RepoTree\n\nlogger = logging.getLogger(__name__)\n\n\n@locked\ndef diff(self, a_rev=\"HEAD\", b_rev=None, targets=None):\n \"\"\"\n By default, it compares the workspace with the last commit's tree.\n\n This implementation differs from `git diff` since DVC doesn't have\n the concept of `index`, but it keeps the same interface, thus,\n `dvc diff` would be the same as `dvc diff HEAD`.\n \"\"\"\n\n if self.scm.no_commits:\n return {}\n\n b_rev = b_rev if b_rev else \"workspace\"\n results = {}\n missing_targets = {}\n for rev in self.brancher(revs=[a_rev, b_rev]):\n if rev == \"workspace\" and rev != b_rev:\n # brancher always returns workspace, but we only need to compute\n # workspace paths/checksums if b_rev was None\n continue\n\n targets_path_infos = None\n if targets is not None:\n # convert targets to path_infos, and capture any missing targets\n targets_path_infos, missing_targets[rev] = _targets_to_path_infos(\n self, targets\n )\n\n results[rev] = _paths_checksums(self, targets_path_infos)\n\n if targets is not None:\n # check for overlapping missing targets between a_rev and b_rev\n for target in set(missing_targets[a_rev]) & set(\n missing_targets[b_rev]\n ):\n raise PathMissingError(target, self)\n\n old = results[a_rev]\n new = results[b_rev]\n\n # Compare paths between the old and new tree.\n # set() efficiently converts dict keys to a set\n added = sorted(set(new) - set(old))\n deleted_or_missing = set(old) - set(new)\n if b_rev == \"workspace\":\n # missing status is only applicable when diffing local workspace\n # against a commit\n missing = sorted(_filter_missing(self, deleted_or_missing))\n else:\n missing = []\n deleted = sorted(deleted_or_missing - set(missing))\n modified = sorted(set(old) & set(new))\n\n ret = {\n \"added\": [{\"path\": path, \"hash\": new[path]} for path in added],\n \"deleted\": [{\"path\": path, \"hash\": old[path]} for path in deleted],\n \"modified\": [\n {\"path\": path, \"hash\": {\"old\": old[path], \"new\": new[path]}}\n for path in modified\n if old[path] != new[path]\n ],\n \"not in cache\": [\n {\"path\": path, \"hash\": old[path]} for path in missing\n ],\n }\n\n return ret if any(ret.values()) else {}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/diff.py__paths_checksums__output_paths.for_stage_in_repo_stages_.for_output_in_stage_outs_.if__exists_output_.if_output_is_dir_checksum.yield_from__dir_output_pa": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/diff.py__paths_checksums__output_paths.for_stage_in_repo_stages_.for_output_in_stage_outs_.if__exists_output_.if_output_is_dir_checksum.yield_from__dir_output_pa", "embedding": null, "metadata": {"file_path": "dvc/repo/diff.py", "file_name": "diff.py", "file_type": "text/x-python", "category": "implementation", "start_line": 82, "end_line": 132, "span_ids": ["_paths_checksums", "_output_paths"], "tokens": 309}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _paths_checksums(repo, targets):\n \"\"\"\n A dictionary of checksums addressed by relpaths collected from\n the current tree outputs.\n\n To help distinguish between a directory and a file output,\n the former one will come with a trailing slash in the path:\n\n directory: \"data/\"\n file: \"data\"\n \"\"\"\n\n return dict(_output_paths(repo, targets))\n\n\ndef _output_paths(repo, targets):\n repo_tree = RepoTree(repo, stream=True)\n on_working_tree = isinstance(repo.tree, LocalTree)\n\n def _exists(output):\n if on_working_tree:\n return output.exists\n return True\n\n def _to_path(output):\n return (\n str(output)\n if not output.is_dir_checksum\n else os.path.join(str(output), \"\")\n )\n\n def _to_checksum(output):\n if on_working_tree:\n return repo.cache.local.tree.get_hash(output.path_info).value\n return output.hash_info.value\n\n for stage in repo.stages:\n for output in stage.outs:\n if _exists(output):\n yield_output = targets is None or any(\n output.path_info.isin_or_eq(target) for target in targets\n )\n\n if yield_output:\n yield _to_path(output), _to_checksum(output)\n\n if output.is_dir_checksum and (\n yield_output\n or any(target.isin(output.path_info) for target in targets)\n ):\n yield from _dir_output_paths(repo_tree, output, targets)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/diff.py__dir_output_paths_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/diff.py__dir_output_paths_", "embedding": null, "metadata": {"file_path": "dvc/repo/diff.py", "file_name": "diff.py", "file_type": "text/x-python", "category": "implementation", "start_line": 135, "end_line": 171, "span_ids": ["_filter_missing", "_targets_to_path_infos", "_dir_output_paths"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _dir_output_paths(repo_tree, output, targets=None):\n from dvc.config import NoRemoteError\n\n try:\n for fname in repo_tree.walk_files(output.path_info):\n if targets is None or any(\n fname.isin_or_eq(target) for target in targets\n ):\n yield str(fname), repo_tree.get_file_hash(fname).value\n except NoRemoteError:\n logger.warning(\"dir cache entry for '%s' is missing\", output)\n\n\ndef _filter_missing(repo, paths):\n repo_tree = RepoTree(repo, stream=True)\n for path in paths:\n metadata = repo_tree.metadata(path)\n if metadata.is_dvc:\n out = metadata.outs[0]\n if out.status().get(str(out)) == \"not in cache\":\n yield path\n\n\ndef _targets_to_path_infos(repo, targets):\n path_infos = []\n missing = []\n\n repo_tree = RepoTree(repo, stream=True)\n\n for target in targets:\n if repo_tree.exists(target):\n path_infos.append(repo_tree.metadata(target).path_info)\n else:\n missing.append(target)\n\n return path_infos, missing", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/diff.py_logging_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/diff.py_logging_", "embedding": null, "metadata": {"file_path": "dvc/repo/experiments/diff.py", "file_name": "diff.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 35, "span_ids": ["imports", "diff"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\n\nfrom dvc.utils.diff import diff as _diff\nfrom dvc.utils.diff import format_dict\n\nlogger = logging.getLogger(__name__)\n\n\ndef diff(repo, *args, a_rev=None, b_rev=None, **kwargs):\n from dvc.repo.experiments.show import _collect_experiment_commit\n\n if repo.scm.no_commits:\n return {}\n\n if a_rev:\n old = _collect_experiment_commit(repo, a_rev)\n else:\n old = _collect_experiment_commit(repo, \"HEAD\")\n\n if b_rev:\n new = _collect_experiment_commit(repo, b_rev)\n else:\n new = _collect_experiment_commit(repo, \"workspace\")\n\n with_unchanged = kwargs.pop(\"all\", False)\n\n return {\n key: _diff(\n format_dict(old[key]),\n format_dict(new[key]),\n with_unchanged=with_unchanged,\n )\n for key in [\"metrics\", \"params\"]\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/run.py_logging__parse_params.return.ret": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/run.py_logging__parse_params.return.ret", "embedding": null, "metadata": {"file_path": "dvc/repo/experiments/run.py", "file_name": "run.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 33, "span_ids": ["imports", "_parse_params"], "tokens": 219}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nfrom typing import Iterable, Optional\n\nfrom dvc.exceptions import InvalidArgumentError\nfrom dvc.repo import locked\n\nlogger = logging.getLogger(__name__)\n\n\ndef _parse_params(path_params: Iterable):\n from ruamel.yaml import YAMLError\n\n from dvc.dependency.param import ParamsDependency\n from dvc.utils.serialize import loads_yaml\n\n ret = {}\n for path_param in path_params:\n path, _, params_str = path_param.rpartition(\":\")\n # remove empty strings from params, on condition such as `-p \"file1:\"`\n params = {}\n for param_str in filter(bool, params_str.split(\",\")):\n try:\n # interpret value strings using YAML rules\n key, value = param_str.split(\"=\")\n params[key] = loads_yaml(value)\n except (ValueError, YAMLError):\n raise InvalidArgumentError(\n f\"Invalid param/value pair '{param_str}'\"\n )\n if not path:\n path = ParamsDependency.DEFAULT_PARAMS_FILE\n ret[path] = params\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/run.py_run_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/run.py_run_", "embedding": null, "metadata": {"file_path": "dvc/repo/experiments/run.py", "file_name": "run.py", "file_type": "text/x-python", "category": "implementation", "start_line": 36, "end_line": 63, "span_ids": ["run"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@locked\ndef run(\n repo,\n targets: Optional[Iterable] = None,\n params: Optional[Iterable] = None,\n run_all: Optional[bool] = False,\n jobs: Optional[int] = 1,\n tmp_dir: Optional[bool] = False,\n **kwargs,\n) -> dict:\n \"\"\"Reproduce the specified targets as an experiment.\n\n Accepts the same additional kwargs as Repo.reproduce.\n\n Returns a dict mapping new experiment SHAs to the results\n of `repro` for that experiment.\n \"\"\"\n if run_all:\n return repo.experiments.reproduce_queued(jobs=jobs)\n\n if params:\n params = _parse_params(params)\n else:\n params = []\n return repo.experiments.reproduce_one(\n targets=targets, params=params, tmp_dir=tmp_dir, **kwargs\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/show.py_show_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/show.py_show_", "embedding": null, "metadata": {"file_path": "dvc/repo/experiments/show.py", "file_name": "show.py", "file_type": "text/x-python", "category": "implementation", "start_line": 74, "end_line": 130, "span_ids": ["show"], "tokens": 357}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@locked\ndef show(\n repo,\n all_branches=False,\n all_tags=False,\n revs=None,\n all_commits=False,\n sha_only=False,\n):\n res = defaultdict(OrderedDict)\n\n if revs is None:\n revs = [repo.scm.get_rev()]\n\n revs = OrderedDict(\n (rev, None)\n for rev in repo.brancher(\n revs=revs,\n all_branches=all_branches,\n all_tags=all_tags,\n all_commits=all_commits,\n sha_only=True,\n )\n )\n\n for rev in revs:\n res[rev][\"baseline\"] = _collect_experiment_commit(\n repo, rev, sha_only=sha_only\n )\n\n if rev == \"workspace\":\n continue\n\n ref_info = ExpRefInfo(baseline_sha=rev)\n commits = [\n (ref, repo.scm.resolve_commit(ref))\n for ref in repo.scm.iter_refs(base=str(ref_info))\n ]\n for exp_ref, _ in sorted(\n commits, key=lambda x: x[1].committed_date, reverse=True,\n ):\n ref_info = ExpRefInfo.from_ref(exp_ref)\n assert ref_info.baseline_sha == rev\n _collect_experiment_branch(\n res[rev], repo, exp_ref, rev, sha_only=sha_only\n )\n\n # collect queued (not yet reproduced) experiments\n for stash_rev, entry in repo.experiments.stash_revs.items():\n if entry.baseline_rev in revs:\n experiment = _collect_experiment_commit(\n repo, stash_rev, stash=True\n )\n res[entry.baseline_rev][stash_rev] = experiment\n\n return res", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/fetch.py_logging_fetch.return.downloaded": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/fetch.py_logging_fetch.return.downloaded", "embedding": null, "metadata": {"file_path": "dvc/repo/fetch.py", "file_name": "fetch.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 79, "span_ids": ["fetch", "imports"], "tokens": 405}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\n\nfrom dvc.config import NoRemoteError\nfrom dvc.exceptions import DownloadError\nfrom dvc.scm.base import CloneError\n\nfrom . import locked\n\nlogger = logging.getLogger(__name__)\n\n\n@locked\ndef fetch(\n self,\n targets=None,\n jobs=None,\n remote=None,\n all_branches=False,\n show_checksums=False,\n with_deps=False,\n all_tags=False,\n recursive=False,\n all_commits=False,\n run_cache=False,\n revs=None,\n):\n \"\"\"Download data items from a cloud and imported repositories\n\n Returns:\n int: number of successfully downloaded files\n\n Raises:\n DownloadError: thrown when there are failed downloads, either\n during `cloud.pull` or trying to fetch imported files\n\n config.NoRemoteError: thrown when downloading only local files and no\n remote is configured\n \"\"\"\n\n if isinstance(targets, str):\n targets = [targets]\n\n used = self.used_cache(\n targets,\n all_branches=all_branches,\n all_tags=all_tags,\n all_commits=all_commits,\n with_deps=with_deps,\n force=True,\n remote=remote,\n jobs=jobs,\n recursive=recursive,\n revs=revs,\n )\n\n downloaded = 0\n failed = 0\n\n try:\n if run_cache:\n self.stage_cache.pull(remote)\n downloaded += self.cloud.pull(\n used, jobs, remote=remote, show_checksums=show_checksums,\n )\n except NoRemoteError:\n if not used.external and used[\"local\"]:\n raise\n except DownloadError as exc:\n failed += exc.amount\n\n for (repo_url, repo_rev), files in used.external.items():\n d, f = _fetch_external(self, repo_url, repo_rev, files, jobs)\n downloaded += d\n failed += f\n\n if failed:\n raise DownloadError(failed)\n\n return downloaded", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/ls.py_from_itertools_import_cha_ls.with_external_repo_url_r.return.ret_list": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/ls.py_from_itertools_import_cha_ls.with_external_repo_url_r.return.ret_list", "embedding": null, "metadata": {"file_path": "dvc/repo/ls.py", "file_name": "ls.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 50, "span_ids": ["imports", "ls"], "tokens": 344}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from itertools import chain\n\nfrom dvc.exceptions import PathMissingError\nfrom dvc.path_info import PathInfo\n\n\ndef ls(\n url, path=None, rev=None, recursive=None, dvc_only=False,\n):\n \"\"\"Methods for getting files and outputs for the repo.\n\n Args:\n url (str): the repo url\n path (str, optional): relative path into the repo\n rev (str, optional): SHA commit, branch or tag name\n recursive (bool, optional): recursively walk the repo\n dvc_only (bool, optional): show only DVC-artifacts\n\n Returns:\n list of `entry`\n\n Notes:\n `entry` is a dictionary with structure\n {\n \"path\": str,\n \"isout\": bool,\n \"isdir\": bool,\n \"isexec\": bool,\n }\n \"\"\"\n from dvc.external_repo import external_repo\n\n # use our own RepoTree instance instead of repo.repo_tree since we want to\n # fetch directory listings, but don't want to fetch file contents.\n with external_repo(url, rev, fetch=False, stream=True) as repo:\n path_info = PathInfo(repo.root_dir)\n if path:\n path_info /= path\n\n ret = _ls(repo.repo_tree, path_info, recursive, dvc_only)\n\n if path and not ret:\n raise PathMissingError(path, repo, dvc_only=dvc_only)\n\n ret_list = []\n for path, info in ret.items():\n info[\"path\"] = path\n ret_list.append(info)\n ret_list.sort(key=lambda f: f[\"path\"])\n return ret_list", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/metrics/show.py_logging__collect_metrics.return._m_path_info_for_m_in_met": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/metrics/show.py_logging__collect_metrics.return._m_path_info_for_m_in_met", "embedding": null, "metadata": {"file_path": "dvc/repo/metrics/show.py", "file_name": "show.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 29, "span_ids": ["imports", "_is_metric", "_collect_metrics"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\n\nfrom dvc.exceptions import (\n MetricDoesNotExistError,\n NoMetricsFoundError,\n NoMetricsParsedError,\n)\nfrom dvc.repo import locked\nfrom dvc.repo.collect import collect\nfrom dvc.scm.base import SCMError\nfrom dvc.tree.repo import RepoTree\nfrom dvc.utils.serialize import YAMLFileCorruptedError, load_yaml\n\nlogger = logging.getLogger(__name__)\n\n\ndef _is_metric(out):\n return bool(out.metric)\n\n\ndef _collect_metrics(repo, targets, revision, recursive):\n metrics, path_infos = collect(\n repo,\n targets=targets,\n output_filter=_is_metric,\n recursive=recursive,\n rev=revision,\n )\n return [m.path_info for m in metrics] + list(path_infos)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/metrics/show.py__extract_metrics__extract_metrics.return.ret": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/metrics/show.py__extract_metrics__extract_metrics.return.ret", "embedding": null, "metadata": {"file_path": "dvc/repo/metrics/show.py", "file_name": "show.py", "file_type": "text/x-python", "category": "implementation", "start_line": 23, "end_line": 45, "span_ids": ["_extract_metrics"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _extract_metrics(metrics, path, rev):\n if isinstance(metrics, (int, float)):\n return metrics\n\n if not isinstance(metrics, dict):\n return None\n\n ret = {}\n for key, val in metrics.items():\n m = _extract_metrics(val, path, rev)\n if m not in (None, {}):\n ret[key] = m\n else:\n logger.debug(\n \"Could not parse '%s' metric from '%s' at '%s' \"\n \"due to its unsupported type: '%s'\",\n key,\n path,\n rev,\n type(val).__name__,\n )\n\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/metrics/show.py__read_metrics__read_metrics.return.res": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/metrics/show.py__read_metrics__read_metrics.return.res", "embedding": null, "metadata": {"file_path": "dvc/repo/metrics/show.py", "file_name": "show.py", "file_type": "text/x-python", "category": "implementation", "start_line": 48, "end_line": 68, "span_ids": ["_read_metrics"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _read_metrics(repo, metrics, rev):\n tree = RepoTree(repo)\n\n res = {}\n for metric in metrics:\n if not tree.exists(metric):\n continue\n\n try:\n val = load_yaml(metric, tree=tree)\n except (FileNotFoundError, YAMLFileCorruptedError):\n logger.debug(\n \"failed to read '%s' on '%s'\", metric, rev, exc_info=True\n )\n continue\n\n val = _extract_metrics(val, metric, rev)\n if val not in (None, {}):\n res[str(metric)] = val\n\n return res", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py__is_plot__plot_props.return.project_out_plot_PLOT_PR": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py__is_plot__plot_props.return.project_out_plot_PLOT_PR", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 151, "end_line": 172, "span_ids": ["_plot_props", "_is_plot", "_collect_plots"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _is_plot(out):\n return bool(out.plot)\n\n\ndef _collect_plots(repo, targets=None, rev=None):\n plots, path_infos = collect(\n repo, output_filter=_is_plot, targets=targets, rev=rev\n )\n result = {plot.path_info: _plot_props(plot) for plot in plots}\n result.update({path_info: {} for path_info in path_infos})\n return result\n\n\ndef _plot_props(out):\n if not out.plot:\n raise NotAPlotError(out)\n if isinstance(out.plot, list):\n raise DvcException(\"Multiple plots per data file not supported.\")\n if isinstance(out.plot, bool):\n return {}\n\n return project(out.plot, PLOT_PROPS)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/diff.py__revisions_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/diff.py__revisions_", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/diff.py", "file_name": "diff.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 18, "span_ids": ["_revisions", "diff"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _revisions(repo, revs, experiment):\n revisions = revs or []\n if experiment and len(revisions) == 1:\n baseline = repo.experiments.get_baseline(revisions[0])\n if baseline:\n revisions.append(baseline[:7])\n if len(revisions) <= 1:\n if len(revisions) == 0 and repo.scm.is_dirty():\n revisions.append(\"HEAD\")\n revisions.append(\"workspace\")\n return revisions\n\n\ndef diff(repo, *args, revs=None, experiment=False, **kwargs):\n return repo.plots.show(\n *args, revs=_revisions(repo, revs, experiment), **kwargs\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_Template_Template.__init__.self.filename.self_name_self_EXTENSIO": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_Template_Template.__init__.self.filename.self_name_self_EXTENSIO", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/template.py", "file_name": "template.py", "file_type": "text/x-python", "category": "implementation", "start_line": 27, "end_line": 51, "span_ids": ["Template", "Template.__init__"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Template:\n INDENT = 4\n SEPARATORS = (\",\", \": \")\n EXTENSION = \".json\"\n ANCHOR = \"\"\n\n DEFAULT_CONTENT: Optional[Dict[str, Any]] = None\n DEFAULT_NAME: Optional[str] = None\n\n def __init__(self, content=None, name=None):\n if content:\n self.content = content\n else:\n self.content = (\n json.dumps(\n self.DEFAULT_CONTENT,\n indent=self.INDENT,\n separators=self.SEPARATORS,\n )\n + \"\\n\"\n )\n\n self.name = name or self.DEFAULT_NAME\n assert self.content and self.name\n self.filename = self.name + self.EXTENSION", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_Template.render_Template.render.return.content": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_Template.render_Template.render.return.content", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/template.py", "file_name": "template.py", "file_type": "text/x-python", "category": "implementation", "start_line": 52, "end_line": 69, "span_ids": ["Template.render"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Template:\n\n def render(self, data, props=None):\n props = props or {}\n\n if self._anchor_str(\"data\") not in self.content:\n anchor = self.anchor(\"data\")\n raise BadTemplateError(\n f\"Template '{self.filename}' is not using '{anchor}' anchor\"\n )\n\n if props.get(\"x\"):\n Template._check_field_exists(data, props.get(\"x\"))\n if props.get(\"y\"):\n Template._check_field_exists(data, props.get(\"y\"))\n\n content = self._fill_anchor(self.content, \"data\", data)\n content = self._fill_metadata(content, props)\n\n return content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_PlotTemplates_PlotTemplates.get_template.raise_TemplateNotFoundErr": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_PlotTemplates_PlotTemplates.get_template.raise_TemplateNotFoundErr", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/template.py", "file_name": "template.py", "file_type": "text/x-python", "category": "implementation", "start_line": 531, "end_line": 569, "span_ids": ["PlotTemplates.get_template", "PlotTemplates.templates_dir", "PlotTemplates"], "tokens": 225}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PlotTemplates:\n TEMPLATES_DIR = \"plots\"\n TEMPLATES = [\n DefaultTemplate,\n LinearTemplate,\n ConfusionTemplate,\n NormalizedConfusionTemplate,\n ScatterTemplate,\n SmoothLinearTemplate,\n ]\n\n @cached_property\n def templates_dir(self):\n return os.path.join(self.dvc_dir, self.TEMPLATES_DIR)\n\n def get_template(self, path):\n if os.path.exists(path):\n return path\n\n if self.dvc_dir and os.path.exists(self.dvc_dir):\n t_path = os.path.join(self.templates_dir, path)\n if os.path.exists(t_path):\n return t_path\n\n all_templates = [\n os.path.join(root, file)\n for root, _, files in os.walk(self.templates_dir)\n for file in files\n ]\n matches = [\n template\n for template in all_templates\n if os.path.splitext(template)[0] == t_path\n ]\n if matches:\n assert len(matches) == 1\n return matches[0]\n\n raise TemplateNotFoundError(path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/scm_context.py_scm_context_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/scm_context.py_scm_context_", "embedding": null, "metadata": {"file_path": "dvc/repo/scm_context.py", "file_name": "scm_context.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 18, "span_ids": ["scm_context"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def scm_context(method):\n def run(repo, *args, **kw):\n try:\n result = method(repo, *args, **kw)\n repo.scm.reset_ignores()\n autostage = repo.config.get(\"core\", {}).get(\"autostage\", False)\n if autostage:\n repo.scm.track_changed_files()\n else:\n repo.scm.remind_to_track()\n repo.scm.reset_tracked_files()\n return result\n except Exception:\n repo.scm.cleanup_ignores()\n raise\n\n return run", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/status.py_logging__local_status.return._joint_status_pairs_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/status.py_logging__local_status.return._joint_status_pairs_", "embedding": null, "metadata": {"file_path": "dvc/repo/status.py", "file_name": "status.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 38, "span_ids": ["imports", "_local_status", "_joint_status"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nfrom itertools import compress\n\nfrom funcy.py3 import cat\n\nfrom dvc.exceptions import InvalidArgumentError\n\nfrom . import locked\n\nlogger = logging.getLogger(__name__)\n\n\ndef _joint_status(pairs):\n status_info = {}\n\n for stage, filter_info in pairs:\n if stage.frozen and not stage.is_repo_import:\n logger.warning(\n \"{} is frozen. Its dependencies are\"\n \" not going to be shown in the status output.\".format(stage)\n )\n status_info.update(\n stage.status(check_updates=True, filter_info=filter_info)\n )\n\n return status_info\n\n\ndef _local_status(self, targets=None, with_deps=False, recursive=False):\n targets = targets or [None]\n pairs = cat(\n self.stage.collect_granular(\n t, with_deps=with_deps, recursive=recursive\n )\n for t in targets\n )\n\n return _joint_status(pairs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.reproduce_Stage.reproduce.return.self": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.reproduce_Stage.reproduce.return.self", "embedding": null, "metadata": {"file_path": "dvc/stage/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 306, "end_line": 329, "span_ids": ["Stage.reproduce"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Stage(params.StageParams):\n # pylint:disable=no-value-for-parameter\n\n @rwlocked(read=[\"deps\"], write=[\"outs\"])\n def reproduce(self, interactive=False, **kwargs):\n if not (kwargs.get(\"force\", False) or self.changed()):\n if not isinstance(self, PipelineStage) and self.is_data_source:\n logger.info(\"'%s' didn't change, skipping\", self.addressing)\n else:\n logger.info(\n \"Stage '%s' didn't change, skipping\", self.addressing\n )\n return None\n\n msg = (\n \"Going to reproduce {stage}. \"\n \"Are you sure you want to continue?\".format(stage=self)\n )\n\n if interactive and not prompt.confirm(msg):\n raise DvcException(\"reproduction aborted by the user\")\n\n self.run(**kwargs)\n\n logger.debug(f\"{self} was reproduced\")\n\n return self", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.filter_outs_Stage.get_used_cache.return.cache": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.filter_outs_Stage.get_used_cache.return.cache", "embedding": null, "metadata": {"file_path": "dvc/stage/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 516, "end_line": 615, "span_ids": ["Stage.status", "Stage._status_always_changed", "Stage.checkout", "Stage._checkout", "Stage._status_stage", "Stage._status_deps", "Stage._status_outs", "Stage.already_cached", "Stage.get_all_files_number", "Stage.get_used_cache", "Stage._status", "Stage.outs_cached", "Stage.deps_cached", "Stage.filter_outs"], "tokens": 682}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Stage(params.StageParams):\n # pylint:disable=no-value-for-parameter\n\n def filter_outs(self, path_info):\n def _func(o):\n return path_info.isin_or_eq(o.path_info)\n\n return filter(_func, self.outs) if path_info else self.outs\n\n @rwlocked(write=[\"outs\"])\n def checkout(self, allow_missing=False, **kwargs):\n stats = defaultdict(list)\n for out in self.filter_outs(kwargs.get(\"filter_info\")):\n key, outs = self._checkout(\n out,\n allow_missing=allow_missing or self.is_checkpoint,\n **kwargs,\n )\n if key:\n stats[key].extend(outs)\n return stats\n\n @staticmethod\n def _checkout(out, **kwargs):\n try:\n result = out.checkout(**kwargs)\n added, modified = result or (None, None)\n if not (added or modified):\n return None, []\n return \"modified\" if modified else \"added\", [out.path_info]\n except CheckoutError as exc:\n return \"failed\", exc.target_infos\n\n @rwlocked(read=[\"deps\", \"outs\"])\n def status(self, check_updates=False, filter_info=None):\n ret = []\n show_import = self.is_repo_import and check_updates\n\n if not self.frozen or show_import:\n self._status_deps(ret)\n self._status_outs(ret, filter_info=filter_info)\n self._status_always_changed(ret)\n self._status_stage(ret)\n return {self.addressing: ret} if ret else {}\n\n @staticmethod\n def _status(entries):\n ret = {}\n\n for entry in entries:\n ret.update(entry.status())\n\n return ret\n\n def _status_deps(self, ret):\n deps_status = self._status(self.deps)\n if deps_status:\n ret.append({\"changed deps\": deps_status})\n\n def _status_outs(self, ret, filter_info):\n filter_outs = self.filter_outs(filter_info)\n outs_status = self._status(filter_outs)\n if outs_status:\n ret.append({\"changed outs\": outs_status})\n\n def _status_always_changed(self, ret):\n if self.is_callback or self.always_changed or self.is_checkpoint:\n ret.append(\"always changed\")\n\n def _status_stage(self, ret):\n if self.changed_stage():\n ret.append(\"changed checksum\")\n\n def already_cached(self):\n return (\n not self.changed_stage()\n and self.deps_cached()\n and self.outs_cached()\n )\n\n def deps_cached(self):\n return all(not dep.changed() for dep in self.deps)\n\n def outs_cached(self):\n return all(\n not out.changed_cache() if out.use_cache else not out.changed()\n for out in self.outs\n )\n\n def get_all_files_number(self, filter_info=None):\n return sum(\n out.get_files_number(filter_info)\n for out in self.filter_outs(filter_info)\n )\n\n def get_used_cache(self, *args, **kwargs):\n from dvc.cache import NamedCache\n\n cache = NamedCache()\n for out in self.filter_outs(kwargs.get(\"filter_info\")):\n cache.update(out.get_used_cache(*args, **kwargs))\n\n return cache", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage._check_can_merge_Stage._check_can_merge.if_ancestor_out_and_not_s.raise_MergeError_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage._check_can_merge_Stage._check_can_merge.if_ancestor_out_and_not_s.raise_MergeError_", "embedding": null, "metadata": {"file_path": "dvc/stage/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 542, "end_line": 556, "span_ids": ["Stage._check_can_merge"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Stage(params.StageParams):\n # pylint:disable=no-value-for-parameter\n\n @staticmethod\n def _check_can_merge(stage, ancestor_out=None):\n if isinstance(stage, PipelineStage):\n raise MergeError(\"unable to auto-merge pipeline stages\")\n\n if not stage.is_data_source or stage.deps or len(stage.outs) > 1:\n raise MergeError(\n \"unable to auto-merge DVC-files that weren't \"\n \"created by `dvc add`\"\n )\n\n if ancestor_out and not stage.outs:\n raise MergeError(\n \"unable to auto-merge DVC-files with deleted outputs\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.merge_Stage.merge.self_outs_0_merge_ancest": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.merge_Stage.merge.self_outs_0_merge_ancest", "embedding": null, "metadata": {"file_path": "dvc/stage/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 558, "end_line": 578, "span_ids": ["Stage.merge"], "tokens": 139}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Stage(params.StageParams):\n # pylint:disable=no-value-for-parameter\n\n def merge(self, ancestor, other):\n assert other\n\n if not other.outs:\n return\n\n if not self.outs:\n self.outs = other.outs\n return\n\n if ancestor:\n self._check_can_merge(ancestor)\n outs = ancestor.outs\n ancestor_out = outs[0] if outs else None\n else:\n ancestor_out = None\n\n self._check_can_merge(self, ancestor_out)\n self._check_can_merge(other, ancestor_out)\n\n self.outs[0].merge(ancestor_out, other.outs[0])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/cache.py_StageCache.save_StageCache.save.self_tree_move_PathInfo_t": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/cache.py_StageCache.save_StageCache.save.self_tree_move_PathInfo_t", "embedding": null, "metadata": {"file_path": "dvc/stage/cache.py", "file_name": "cache.py", "file_type": "text/x-python", "category": "implementation", "start_line": 146, "end_line": 172, "span_ids": ["StageCache.save"], "tokens": 187}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StageCache:\n\n def save(self, stage):\n if not _can_hash(stage):\n return\n\n cache_key = _get_stage_hash(stage)\n cache = to_single_stage_lockfile(stage)\n cache_value = _get_cache_hash(cache)\n\n existing_cache = self._load_cache(cache_key, cache_value)\n cache = existing_cache or cache\n\n for out in self._uncached_outs(stage, cache):\n out.commit()\n\n if existing_cache:\n return\n\n # sanity check\n COMPILED_LOCK_FILE_STAGE_SCHEMA(cache)\n\n path = PathInfo(self._get_cache_path(cache_key, cache_value))\n self.tree.makedirs(path.parent)\n tmp = tempfile.NamedTemporaryFile(delete=False, dir=path.parent).name\n assert os.path.exists(path.parent)\n assert os.path.isdir(path.parent)\n dump_yaml(tmp, cache)\n self.tree.move(PathInfo(tmp), path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/cache.py_StageCache.restore_StageCache.restore.cached_stage_checkout_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/cache.py_StageCache.restore_StageCache.restore.cached_stage_checkout_", "embedding": null, "metadata": {"file_path": "dvc/stage/cache.py", "file_name": "cache.py", "file_type": "text/x-python", "category": "implementation", "start_line": 174, "end_line": 204, "span_ids": ["StageCache.restore"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StageCache:\n\n def restore(self, stage, run_cache=True, pull=False):\n if not _can_hash(stage):\n raise RunCacheNotFoundError(stage)\n\n if (\n not stage.changed_stage()\n and stage.deps_cached()\n and all(bool(out.hash_info) for out in stage.outs)\n ):\n cache = to_single_stage_lockfile(stage)\n else:\n if not run_cache: # backward compatibility\n raise RunCacheNotFoundError(stage)\n stage.save_deps()\n cache = self._load(stage)\n if not cache:\n raise RunCacheNotFoundError(stage)\n\n cached_stage = self._create_stage(cache, wdir=stage.wdir)\n\n if pull:\n self.repo.cloud.pull(cached_stage.get_used_cache())\n\n if not cached_stage.outs_cached():\n raise RunCacheNotFoundError(stage)\n\n logger.info(\n \"Stage '%s' is cached - skipping run, checking out outputs\",\n stage.addressing,\n )\n cached_stage.checkout()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/cache.py_StageCache._transfer_StageCache._transfer.return.ret": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/cache.py_StageCache._transfer_StageCache._transfer.return.ret", "embedding": null, "metadata": {"file_path": "dvc/stage/cache.py", "file_name": "cache.py", "file_type": "text/x-python", "category": "implementation", "start_line": 191, "end_line": 209, "span_ids": ["StageCache._transfer"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StageCache:\n\n @staticmethod\n def _transfer(func, from_remote, to_remote):\n ret = []\n\n runs = from_remote.path_info / \"runs\"\n if not from_remote.exists(runs):\n return []\n\n for src in from_remote.walk_files(runs):\n rel = src.relative_to(from_remote.path_info)\n dst = to_remote.path_info / rel\n key = dst.parent\n # check if any build cache already exists for this key\n if to_remote.exists(key) and first(to_remote.walk_files(key)):\n continue\n func(src, dst)\n ret.append((src.parent.name, src.name))\n\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/decorators.py_from_functools_import_wra_rwlocked.with_rwlock_stage_repo_tm.return.call_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/decorators.py_from_functools_import_wra_rwlocked.with_rwlock_stage_repo_tm.return.call_", "embedding": null, "metadata": {"file_path": "dvc/stage/decorators.py", "file_name": "decorators.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 36, "span_ids": ["imports", "rwlocked"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from functools import wraps\n\nfrom funcy import decorator\n\n\n@decorator\ndef rwlocked(call, read=None, write=None):\n import sys\n\n from dvc.dependency.repo import RepoDependency\n from dvc.rwlock import rwlock\n\n if read is None:\n read = []\n\n if write is None:\n write = []\n\n stage = call._args[0] # pylint: disable=protected-access\n\n assert stage.repo.lock.is_locked\n\n def _chain(names):\n return [\n item.path_info\n for attr in names\n for item in getattr(stage, attr)\n # There is no need to lock RepoDependency deps, as there is no\n # corresponding OutputREPO, so we can't even write it.\n if not isinstance(item, RepoDependency)\n ]\n\n cmd = \" \".join(sys.argv)\n\n with rwlock(stage.repo.tmp_dir, cmd, _chain(read), _chain(write)):\n return call()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/decorators.py_unlocked_repo_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/decorators.py_unlocked_repo_", "embedding": null, "metadata": {"file_path": "dvc/stage/decorators.py", "file_name": "decorators.py", "file_type": "text/x-python", "category": "implementation", "start_line": 39, "end_line": 69, "span_ids": ["relock_repo", "unlocked_repo"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def unlocked_repo(f):\n @wraps(f)\n def wrapper(stage, *args, **kwargs):\n stage.repo.state.dump()\n stage.repo.lock.unlock()\n stage.repo._reset() # pylint: disable=protected-access\n try:\n ret = f(stage, *args, **kwargs)\n finally:\n stage.repo.lock.lock()\n stage.repo.state.load()\n return ret\n\n return wrapper\n\n\ndef relock_repo(f):\n @wraps(f)\n def wrapper(stage, *args, **kwargs):\n stage.repo.lock.lock()\n stage.repo.state.load()\n try:\n ret = f(stage, *args, **kwargs)\n finally:\n stage.repo.state.dump()\n stage.repo.lock.unlock()\n stage.repo._reset() # pylint: disable=protected-access\n return ret\n\n return wrapper", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py__Manages_state_database_StateVersionTooNewError.__init__.super___init___": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py__Manages_state_database_StateVersionTooNewError.__init__.super___init___", "embedding": null, "metadata": {"file_path": "dvc/state.py", "file_name": "state.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 31, "span_ids": ["StateVersionTooNewError", "StateVersionTooNewError.__init__", "docstring"], "tokens": 231}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Manages state database used for checksum caching.\"\"\"\n\nimport logging\nimport os\nimport re\nimport sqlite3\nfrom abc import ABC, abstractmethod\nfrom urllib.parse import urlencode, urlunparse\n\nfrom dvc.exceptions import DvcException\nfrom dvc.hash_info import HashInfo\nfrom dvc.utils import current_timestamp, relpath, to_chunks\nfrom dvc.utils.fs import get_inode, get_mtime_and_size, remove\n\nSQLITE_MAX_VARIABLES_NUMBER = 999\n\nlogger = logging.getLogger(__name__)\n\n\nclass StateVersionTooNewError(DvcException):\n \"\"\"Thrown when DVC version is older than the state database version.\"\"\"\n\n def __init__(self, dvc_version, expected, actual):\n super().__init__(\n \"you are using an old version '{dvc_version}' of DVC that is \"\n \"using state file version '{expected}', which is not compatible \"\n \"with the state file version '{actual}', that is used in this \"\n \"repo. Please upgrade right now!\".format(\n dvc_version=dvc_version, expected=expected, actual=actual\n )\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_StateBase_StateNoop.dump.pass": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_StateBase_StateNoop.dump.pass", "embedding": null, "metadata": {"file_path": "dvc/state.py", "file_name": "state.py", "file_type": "text/x-python", "category": "implementation", "start_line": 34, "end_line": 93, "span_ids": ["StateBase.__enter__", "StateBase.files", "StateBase.save_link", "StateNoop.get", "StateNoop.load", "StateBase.__init__", "StateBase.dump", "StateBase.save", "StateNoop.dump", "StateBase.__exit__", "StateNoop.save", "StateBase.get", "StateBase.load", "StateBase", "StateNoop", "StateNoop.files", "StateNoop.save_link"], "tokens": 253}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StateBase(ABC):\n def __init__(self):\n self.count = 0\n\n @property\n @abstractmethod\n def files(self):\n pass\n\n @abstractmethod\n def save(self, path_info, hash_info):\n pass\n\n @abstractmethod\n def get(self, path_info):\n pass\n\n @abstractmethod\n def save_link(self, path_info):\n pass\n\n @abstractmethod\n def load(self):\n pass\n\n @abstractmethod\n def dump(self):\n pass\n\n def __enter__(self):\n if self.count <= 0:\n self.load()\n self.count += 1\n\n def __exit__(self, typ, value, tbck):\n self.count -= 1\n if self.count > 0:\n return\n self.dump()\n\n\nclass StateNoop(StateBase):\n @property\n def files(self):\n return []\n\n def save(self, path_info, hash_info):\n pass\n\n def get(self, path_info): # pylint: disable=unused-argument\n return None\n\n def save_link(self, path_info):\n pass\n\n def load(self):\n pass\n\n def dump(self):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/__init__.py__resolve_remote_refs_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/__init__.py__resolve_remote_refs_", "embedding": null, "metadata": {"file_path": "dvc/tree/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 51, "end_line": 91, "span_ids": ["get_cloud_tree", "_resolve_remote_refs"], "tokens": 346}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _resolve_remote_refs(config, remote_conf):\n # Support for cross referenced remotes.\n # This will merge the settings, shadowing base ref with remote_conf.\n # For example, having:\n #\n # dvc remote add server ssh://localhost\n # dvc remote modify server user root\n # dvc remote modify server ask_password true\n #\n # dvc remote add images remote://server/tmp/pictures\n # dvc remote modify images user alice\n # dvc remote modify images ask_password false\n # dvc remote modify images password asdf1234\n #\n # Results on a config dictionary like:\n #\n # {\n # \"url\": \"ssh://localhost/tmp/pictures\",\n # \"user\": \"alice\",\n # \"password\": \"asdf1234\",\n # \"ask_password\": False,\n # }\n parsed = urlparse(remote_conf[\"url\"])\n if parsed.scheme != \"remote\":\n return remote_conf\n\n base = get_tree_config(config, name=parsed.netloc)\n url = posixpath.join(base[\"url\"], parsed.path.lstrip(\"/\"))\n return {**base, **remote_conf, \"url\": url}\n\n\ndef get_cloud_tree(repo, **kwargs):\n from dvc.config import SCHEMA, ConfigError, Invalid\n\n remote_conf = get_tree_config(repo.config, **kwargs)\n try:\n remote_conf = SCHEMA[\"remote\"][str](remote_conf)\n except Invalid as exc:\n raise ConfigError(str(exc)) from None\n return get_tree_cls(remote_conf)(repo, remote_conf)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/_metadata.py_from_dataclasses_import_d_Metadata._list_of_outputs": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/_metadata.py_from_dataclasses_import_d_Metadata._list_of_outputs", "embedding": null, "metadata": {"file_path": "dvc/tree/_metadata.py", "file_name": "_metadata.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 36, "span_ids": ["imports", "Metadata"], "tokens": 286}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dataclasses import dataclass, field\nfrom typing import TYPE_CHECKING, List\n\nfrom dvc.output import BaseOutput\nfrom dvc.path_info import PathInfo\n\nif TYPE_CHECKING:\n from dvc.repo import Repo\n\n\n@dataclass\nclass Metadata:\n \"\"\"\n Container for storing metadata for a given path, similar in spirit to\n `os.stat_result`.\n \"\"\"\n\n # required field\n path_info: PathInfo\n repo: \"Repo\"\n\n # computed fields\n is_output: bool = field(init=False, default=False) # is it an output?\n # is the path part of an output?\n part_of_output: bool = field(init=False, default=False)\n # does the path contain outputs?\n contains_outputs: bool = field(init=False, default=False)\n # is the path tracked by dvc? equivalent to (is_output or part_of_output)\n is_dvc: bool = field(init=False, default=False)\n # does dvc has any output in that path or inside it? equiv. to bool(outs)\n output_exists: bool = field(init=False)\n\n # optional fields\n isdir: bool = False # is it a directory?\n is_exec: bool = False # is it an executable?\n outs: List[BaseOutput] = field(default_factory=list) # list of outputs", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/_metadata.py_Metadata.__post_init___": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/_metadata.py_Metadata.__post_init___", "embedding": null, "metadata": {"file_path": "dvc/tree/_metadata.py", "file_name": "_metadata.py", "file_type": "text/x-python", "category": "implementation", "start_line": 38, "end_line": 73, "span_ids": ["Metadata.isfile", "Metadata.__str__", "Metadata.__post_init__"], "tokens": 310}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Metadata:\n\n def __post_init__(self):\n self.output_exists = bool(self.outs)\n\n if not self.output_exists:\n return\n\n # it can contain multiple outputs\n if len(self.outs) > 1:\n self.contains_outputs = True\n else:\n out = self.outs[0]\n # or, the path itself could be an output\n self.is_output = self.path_info == out.path_info\n\n # or, a directory must have an output somewhere deep inside it\n if not self.is_output:\n self.contains_outputs = out.path_info.isin(self.path_info)\n\n # or, the path could be a part of an output, i.e. inside of an output\n self.part_of_output = not self.is_output and not self.contains_outputs\n\n self.is_dvc = self.is_output or self.part_of_output\n # if it contains outputs, it must be a dir\n self.isdir = self.contains_outputs\n\n @property\n def isfile(self):\n # self.isdir might require additional computation, especially if it's\n # a dir that's inside a dvc-tracked dir\n # since, `Metadata()` does not support being used as null (i.e. when\n # path does not exist), `isfile` becomes `isdir`'s complement.\n return not self.isdir\n\n def __str__(self):\n return f\"Metadata: {self.path_info}\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/azure.py_logging_AzureTree.__init__.if_not_self__credential_.self._credential.self__az_config_get_stor": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/azure.py_logging_AzureTree.__init__.if_not_self__credential_.self._credential.self__az_config_get_stor", "embedding": null, "metadata": {"file_path": "dvc/tree/azure.py", "file_name": "azure.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 52, "span_ids": ["imports", "AzureTree", "AzureTree.__init__"], "tokens": 375}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nimport threading\nfrom datetime import datetime, timedelta\n\nfrom funcy import cached_property, wrap_prop\n\nfrom dvc.hash_info import HashInfo\nfrom dvc.path_info import CloudURLInfo\nfrom dvc.progress import Tqdm\nfrom dvc.scheme import Schemes\n\nfrom .base import BaseTree\n\nlogger = logging.getLogger(__name__)\n\n\nclass AzureTree(BaseTree):\n scheme = Schemes.AZURE\n PATH_CLS = CloudURLInfo\n REQUIRES = {\n \"azure-storage-blob\": \"azure.storage.blob\",\n \"knack\": \"knack\",\n }\n PARAM_CHECKSUM = \"etag\"\n COPY_POLL_SECONDS = 5\n LIST_OBJECT_PAGE_SIZE = 5000\n\n def __init__(self, repo, config):\n super().__init__(repo, config)\n\n url = config.get(\"url\", \"azure://\")\n self.path_info = self.PATH_CLS(url)\n\n if not self.path_info.bucket:\n container = self._az_config.get(\"storage\", \"container_name\", None)\n self.path_info = self.PATH_CLS(f\"azure://{container}\")\n\n self._conn_str = config.get(\n \"connection_string\"\n ) or self._az_config.get(\"storage\", \"connection_string\", None)\n\n self._account_url = None\n if not self._conn_str:\n name = self._az_config.get(\"storage\", \"account\", None)\n self._account_url = f\"https://{name}.blob.core.windows.net\"\n\n self._credential = config.get(\"sas_token\") or self._az_config.get(\n \"storage\", \"sas_token\", None\n )\n if not self._credential:\n self._credential = self._az_config.get(\"storage\", \"key\", None)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/azure.py_AzureTree._az_config_AzureTree._az_config.return.CLIConfig_config_dir_conf": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/azure.py_AzureTree._az_config_AzureTree._az_config.return.CLIConfig_config_dir_conf", "embedding": null, "metadata": {"file_path": "dvc/tree/azure.py", "file_name": "azure.py", "file_type": "text/x-python", "category": "implementation", "start_line": 54, "end_line": 64, "span_ids": ["AzureTree._az_config"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AzureTree(BaseTree):\n\n @cached_property\n def _az_config(self):\n # NOTE: ideally we would've used get_default_cli().config from\n # azure.cli.core, but azure-cli-core has a lot of conflicts with other\n # dependencies. So instead we are just use knack directly\n from knack.config import CLIConfig\n\n config_dir = os.getenv(\n \"AZURE_CONFIG_DIR\", os.path.expanduser(os.path.join(\"~\", \".azure\"))\n )\n return CLIConfig(config_dir=config_dir, config_env_var_prefix=\"AZURE\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/azure.py_AzureTree.blob_service_AzureTree.blob_service.return.blob_service": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/azure.py_AzureTree.blob_service_AzureTree.blob_service.return.blob_service", "embedding": null, "metadata": {"file_path": "dvc/tree/azure.py", "file_name": "azure.py", "file_type": "text/x-python", "category": "implementation", "start_line": 66, "end_line": 103, "span_ids": ["AzureTree.blob_service"], "tokens": 250}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AzureTree(BaseTree):\n\n @wrap_prop(threading.Lock())\n @cached_property\n def blob_service(self):\n # pylint: disable=no-name-in-module\n from azure.core.exceptions import (\n HttpResponseError,\n ResourceNotFoundError,\n )\n from azure.storage.blob import BlobServiceClient\n\n logger.debug(f\"URL {self.path_info}\")\n\n if self._conn_str:\n logger.debug(f\"Using connection string '{self._conn_str}'\")\n blob_service = BlobServiceClient.from_connection_string(\n self._conn_str, credential=self._credential\n )\n else:\n logger.debug(f\"Using account url '{self._account_url}'\")\n blob_service = BlobServiceClient(\n self._account_url, credential=self._credential\n )\n\n logger.debug(f\"Container name {self.path_info.bucket}\")\n container_client = blob_service.get_container_client(\n self.path_info.bucket\n )\n\n try: # verify that container exists\n container_client.get_container_properties()\n except ResourceNotFoundError:\n container_client.create_container()\n except HttpResponseError as exc:\n # client may not have account-level privileges\n if exc.status_code != 403:\n raise\n\n return blob_service", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/azure.py_AzureTree.get_etag_AzureTree._generate_download_url.return.blob_client_url_s": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/azure.py_AzureTree.get_etag_AzureTree._generate_download_url.return.blob_client_url_s", "embedding": null, "metadata": {"file_path": "dvc/tree/azure.py", "file_name": "azure.py", "file_type": "text/x-python", "category": "implementation", "start_line": 105, "end_line": 132, "span_ids": ["AzureTree.get_etag", "AzureTree._generate_download_url"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AzureTree(BaseTree):\n\n def get_etag(self, path_info):\n blob_client = self.blob_service.get_blob_client(\n path_info.bucket, path_info.path\n )\n etag = blob_client.get_blob_properties().etag\n return etag.strip('\"')\n\n def _generate_download_url(self, path_info, expires=3600):\n from azure.storage.blob import ( # pylint:disable=no-name-in-module\n BlobSasPermissions,\n generate_blob_sas,\n )\n\n expires_at = datetime.utcnow() + timedelta(seconds=expires)\n\n blob_client = self.blob_service.get_blob_client(\n path_info.bucket, path_info.path\n )\n\n sas_token = generate_blob_sas(\n blob_client.account_name,\n blob_client.container_name,\n blob_client.blob_name,\n account_key=blob_client.credential.account_key,\n permission=BlobSasPermissions(read=True),\n expiry=expires_at,\n )\n return blob_client.url + \"?\" + sas_token", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/azure.py_AzureTree.exists_AzureTree.get_file_hash.return.HashInfo_self_PARAM_CHECK": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/azure.py_AzureTree.exists_AzureTree.get_file_hash.return.HashInfo_self_PARAM_CHECK", "embedding": null, "metadata": {"file_path": "dvc/tree/azure.py", "file_name": "azure.py", "file_type": "text/x-python", "category": "implementation", "start_line": 134, "end_line": 164, "span_ids": ["AzureTree.get_file_hash", "AzureTree.exists", "AzureTree.walk_files", "AzureTree.remove", "AzureTree._list_paths"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AzureTree(BaseTree):\n\n def exists(self, path_info, use_dvcignore=True):\n paths = self._list_paths(path_info.bucket, path_info.path)\n return any(path_info.path == path for path in paths)\n\n def _list_paths(self, bucket, prefix):\n container_client = self.blob_service.get_container_client(bucket)\n for blob in container_client.list_blobs(name_starts_with=prefix):\n yield blob.name\n\n def walk_files(self, path_info, **kwargs):\n if not kwargs.pop(\"prefix\", False):\n path_info = path_info / \"\"\n for fname in self._list_paths(\n path_info.bucket, path_info.path, **kwargs\n ):\n if fname.endswith(\"/\"):\n continue\n\n yield path_info.replace(path=fname)\n\n def remove(self, path_info):\n if path_info.scheme != self.scheme:\n raise NotImplementedError\n\n logger.debug(f\"Removing {path_info}\")\n self.blob_service.get_blob_client(\n path_info.bucket, path_info.path\n ).delete_blob()\n\n def get_file_hash(self, path_info):\n return HashInfo(self.PARAM_CHECKSUM, self.get_etag(path_info))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/azure.py_AzureTree._upload_AzureTree._upload.with_open_from_file_rb_.with_Tqdm_wrapattr_.blob_client_upload_blob_w": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/azure.py_AzureTree._upload_AzureTree._upload.with_open_from_file_rb_.with_Tqdm_wrapattr_.blob_client_upload_blob_w", "embedding": null, "metadata": {"file_path": "dvc/tree/azure.py", "file_name": "azure.py", "file_type": "text/x-python", "category": "implementation", "start_line": 166, "end_line": 178, "span_ids": ["AzureTree._upload"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AzureTree(BaseTree):\n\n def _upload(\n self, from_file, to_info, name=None, no_progress_bar=False, **_kwargs\n ):\n\n blob_client = self.blob_service.get_blob_client(\n to_info.bucket, to_info.path\n )\n total = os.path.getsize(from_file)\n with open(from_file, \"rb\") as fobj:\n with Tqdm.wrapattr(\n fobj, \"read\", desc=name, total=total, disable=no_progress_bar\n ) as wrapped:\n blob_client.upload_blob(wrapped, overwrite=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/azure.py_AzureTree._download_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/azure.py_AzureTree._download_", "embedding": null, "metadata": {"file_path": "dvc/tree/azure.py", "file_name": "azure.py", "file_type": "text/x-python", "category": "implementation", "start_line": 180, "end_line": 193, "span_ids": ["AzureTree._download"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class AzureTree(BaseTree):\n\n def _download(\n self, from_info, to_file, name=None, no_progress_bar=False, **_kwargs\n ):\n blob_client = self.blob_service.get_blob_client(\n from_info.bucket, from_info.path\n )\n total = blob_client.get_blob_properties().size\n stream = blob_client.download_blob()\n with open(to_file, \"wb\") as fobj:\n with Tqdm.wrapattr(\n fobj, \"write\", desc=name, total=total, disable=no_progress_bar\n ) as wrapped:\n stream.readinto(wrapped)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree_BaseTree.get_missing_deps.return.missing": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree_BaseTree.get_missing_deps.return.missing", "embedding": null, "metadata": {"file_path": "dvc/tree/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 48, "end_line": 108, "span_ids": ["BaseTree.__init__", "BaseTree.get_missing_deps", "BaseTree.hash_jobs", "BaseTree.jobs", "BaseTree"], "tokens": 407}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseTree:\n scheme = \"base\"\n REQUIRES: ClassVar[Dict[str, str]] = {}\n PATH_CLS = URLInfo # type: Any\n JOBS = 4 * cpu_count()\n\n CHECKSUM_DIR_SUFFIX = \".dir\"\n HASH_JOBS = max(1, min(4, cpu_count() // 2))\n DEFAULT_VERIFY = False\n LIST_OBJECT_PAGE_SIZE = 1000\n TRAVERSE_WEIGHT_MULTIPLIER = 5\n TRAVERSE_PREFIX_LEN = 3\n TRAVERSE_THRESHOLD_SIZE = 500000\n CAN_TRAVERSE = True\n\n CACHE_MODE: Optional[int] = None\n SHARED_MODE_MAP = {None: (None, None), \"group\": (None, None)}\n PARAM_CHECKSUM: ClassVar[Optional[str]] = None\n\n state = StateNoop()\n\n def __init__(self, repo, config):\n self.repo = repo\n self.config = config\n\n self._check_requires()\n\n shared = config.get(\"shared\")\n self._file_mode, self._dir_mode = self.SHARED_MODE_MAP[shared]\n\n self.verify = config.get(\"verify\", self.DEFAULT_VERIFY)\n self.path_info = None\n\n @cached_property\n def jobs(self):\n return (\n self.config.get(\"jobs\")\n or (self.repo and self.repo.config[\"core\"].get(\"jobs\"))\n or self.JOBS\n )\n\n @cached_property\n def hash_jobs(self):\n return (\n self.config.get(\"checksum_jobs\")\n or (self.repo and self.repo.config[\"core\"].get(\"checksum_jobs\"))\n or self.HASH_JOBS\n )\n\n @classmethod\n def get_missing_deps(cls):\n import importlib\n\n missing = []\n for package, module in cls.REQUIRES.items():\n try:\n importlib.import_module(module)\n except ImportError:\n missing.append(package)\n\n return missing", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree._check_requires_BaseTree._check_requires.raise_RemoteMissingDepsEr": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree._check_requires_BaseTree._check_requires.raise_RemoteMissingDepsEr", "embedding": null, "metadata": {"file_path": "dvc/tree/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 110, "end_line": 147, "span_ids": ["BaseTree._check_requires"], "tokens": 282}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseTree:\n\n def _check_requires(self):\n from ..scheme import Schemes\n from ..utils import format_link\n from ..utils.pkg import PKG\n\n missing = self.get_missing_deps()\n if not missing:\n return\n\n url = self.config.get(\"url\", f\"{self.scheme}://\")\n\n scheme = self.scheme\n if scheme == Schemes.WEBDAVS:\n scheme = Schemes.WEBDAV\n\n by_pkg = {\n \"pip\": f\"pip install 'dvc[{scheme}]'\",\n \"conda\": f\"conda install -c conda-forge dvc-{scheme}\",\n }\n\n cmd = by_pkg.get(PKG)\n if cmd:\n link = format_link(\"https://dvc.org/doc/install\")\n hint = (\n f\"To install dvc with those dependencies, run:\\n\"\n \"\\n\"\n f\"\\t{cmd}\\n\"\n \"\\n\"\n f\"See {link} for more info.\"\n )\n else:\n link = format_link(\"https://github.com/iterative/dvc/issues\")\n hint = f\"Please report this bug to {link}. Thank you!\"\n\n raise RemoteMissingDepsError(\n f\"URL '{url}' is supported but requires these missing \"\n f\"dependencies: {missing}. {hint}\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree.supported_BaseTree.is_dir_hash.return.hash__endswith_cls_CHECKS": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree.supported_BaseTree.is_dir_hash.return.hash__endswith_cls_CHECKS", "embedding": null, "metadata": {"file_path": "dvc/tree/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 149, "end_line": 268, "span_ids": ["BaseTree.is_dir_hash", "BaseTree.supported", "BaseTree.protect", "BaseTree.isdir", "BaseTree.iscopy", "BaseTree.walk_files", "BaseTree.symlink", "BaseTree.set_exec", "BaseTree.reflink", "BaseTree.is_protected", "BaseTree.is_empty", "BaseTree.hardlink", "BaseTree.isfile", "BaseTree.dir_mode", "BaseTree.file_mode", "BaseTree.open", "BaseTree.copy_fobj", "BaseTree.cache", "BaseTree.makedirs", "BaseTree.remove", "BaseTree.unprotect", "BaseTree.isexec", "BaseTree.copy", "BaseTree.exists", "BaseTree.move"], "tokens": 791}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseTree:\n\n @classmethod\n def supported(cls, config):\n if isinstance(config, (str, bytes)):\n url = config\n else:\n url = config[\"url\"]\n\n # NOTE: silently skipping remote, calling code should handle that\n parsed = urlparse(url)\n return parsed.scheme == cls.scheme\n\n @property\n def file_mode(self):\n return self._file_mode\n\n @property\n def dir_mode(self):\n return self._dir_mode\n\n @property\n def cache(self):\n return getattr(self.repo.cache, self.scheme)\n\n def open(self, path_info, mode: str = \"r\", encoding: str = None):\n if hasattr(self, \"_generate_download_url\"):\n # pylint:disable=no-member\n func = self._generate_download_url # type: ignore[attr-defined]\n get_url = partial(func, path_info)\n return open_url(get_url, mode=mode, encoding=encoding)\n\n raise RemoteActionNotImplemented(\"open\", self.scheme)\n\n def exists(self, path_info, use_dvcignore=True) -> bool:\n raise NotImplementedError\n\n # pylint: disable=unused-argument\n\n def isdir(self, path_info):\n \"\"\"Optional: Overwrite only if the remote has a way to distinguish\n between a directory and a file.\n \"\"\"\n return False\n\n def isfile(self, path_info):\n \"\"\"Optional: Overwrite only if the remote has a way to distinguish\n between a directory and a file.\n \"\"\"\n return True\n\n def set_exec(self, path_info):\n raise RemoteActionNotImplemented(\"set_exec\", self.scheme)\n\n def isexec(self, path_info):\n \"\"\"Optional: Overwrite only if the remote has a way to distinguish\n between executable and non-executable file.\n \"\"\"\n return False\n\n def iscopy(self, path_info):\n \"\"\"Check if this file is an independent copy.\"\"\"\n return False # We can't be sure by default\n\n def walk_files(self, path_info, **kwargs):\n \"\"\"Return a generator with `PathInfo`s to all the files.\n\n Optional kwargs:\n prefix (bool): If true `path_info` will be treated as a prefix\n rather than directory path.\n \"\"\"\n raise NotImplementedError\n\n def is_empty(self, path_info):\n return False\n\n def remove(self, path_info):\n raise RemoteActionNotImplemented(\"remove\", self.scheme)\n\n def makedirs(self, path_info):\n \"\"\"Optional: Implement only if the remote needs to create\n directories before copying/linking/moving data\n \"\"\"\n\n def move(self, from_info, to_info, mode=None):\n assert mode is None\n self.copy(from_info, to_info)\n self.remove(from_info)\n\n def copy(self, from_info, to_info):\n raise RemoteActionNotImplemented(\"copy\", self.scheme)\n\n def copy_fobj(self, fobj, to_info):\n raise RemoteActionNotImplemented(\"copy_fobj\", self.scheme)\n\n def symlink(self, from_info, to_info):\n raise RemoteActionNotImplemented(\"symlink\", self.scheme)\n\n def hardlink(self, from_info, to_info):\n raise RemoteActionNotImplemented(\"hardlink\", self.scheme)\n\n def reflink(self, from_info, to_info):\n raise RemoteActionNotImplemented(\"reflink\", self.scheme)\n\n @staticmethod\n def protect(path_info):\n pass\n\n def is_protected(self, path_info):\n return False\n\n # pylint: enable=unused-argument\n\n @staticmethod\n def unprotect(path_info):\n pass\n\n @classmethod\n def is_dir_hash(cls, hash_):\n if not hash_:\n return False\n return hash_.endswith(cls.CHECKSUM_DIR_SUFFIX)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree.get_hash_BaseTree.get_hash.return.hash_info": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree.get_hash_BaseTree.get_hash.return.hash_info", "embedding": null, "metadata": {"file_path": "dvc/tree/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 248, "end_line": 286, "span_ids": ["BaseTree.get_hash"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseTree:\n\n @use_state\n def get_hash(self, path_info, **kwargs):\n assert path_info and (\n isinstance(path_info, str) or path_info.scheme == self.scheme\n )\n\n if not self.exists(path_info):\n return None\n\n # pylint: disable=assignment-from-none\n hash_info = self.state.get(path_info)\n\n # If we have dir hash in state db, but dir cache file is lost,\n # then we need to recollect the dir via .get_dir_hash() call below,\n # see https://github.com/iterative/dvc/issues/2219 for context\n if (\n hash_info\n and hash_info.isdir\n and not self.cache.tree.exists(\n self.cache.tree.hash_to_path_info(hash_info.value)\n )\n ):\n hash_info = None\n\n if hash_info:\n assert hash_info.name == self.PARAM_CHECKSUM\n if hash_info.isdir:\n self.cache.set_dir_info(hash_info)\n return hash_info\n\n if self.isdir(path_info):\n hash_info = self.get_dir_hash(path_info, **kwargs)\n else:\n hash_info = self.get_file_hash(path_info)\n\n if hash_info and self.exists(path_info):\n self.state.save(path_info, hash_info)\n\n return hash_info", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree.get_file_hash_BaseTree._calculate_hashes.with_Tqdm_.with_ThreadPoolExecutor_m.return.dict_zip_file_infos_hash": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree.get_file_hash_BaseTree._calculate_hashes.with_Tqdm_.with_ThreadPoolExecutor_m.return.dict_zip_file_infos_hash", "embedding": null, "metadata": {"file_path": "dvc/tree/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 288, "end_line": 304, "span_ids": ["BaseTree.get_file_hash", "BaseTree.hash_to_path_info", "BaseTree._calculate_hashes"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseTree:\n\n def get_file_hash(self, path_info):\n raise NotImplementedError\n\n def hash_to_path_info(self, hash_):\n return self.path_info / hash_[0:2] / hash_[2:]\n\n def _calculate_hashes(self, file_infos):\n file_infos = list(file_infos)\n with Tqdm(\n total=len(file_infos),\n unit=\"md5\",\n desc=\"Computing file/dir hashes (only done once)\",\n ) as pbar:\n worker = pbar.wrap_fn(self.get_file_hash)\n with ThreadPoolExecutor(max_workers=self.hash_jobs) as executor:\n hash_infos = executor.map(worker, file_infos)\n return dict(zip(file_infos, hash_infos))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree.get_dir_hash_BaseTree.upload.self__upload_noqa_py": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree.get_dir_hash_BaseTree.upload.self__upload_noqa_py", "embedding": null, "metadata": {"file_path": "dvc/tree/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 336, "end_line": 370, "span_ids": ["BaseTree.get_dir_hash", "BaseTree.upload"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseTree:\n\n @use_state\n def get_dir_hash(self, path_info, **kwargs):\n dir_info = self._collect_dir(path_info, **kwargs)\n hash_info = self.repo.cache.local.save_dir_info(dir_info)\n hash_info.size = dir_info.size\n return hash_info\n\n def upload(\n self,\n from_info,\n to_info,\n name=None,\n no_progress_bar=False,\n file_mode=None,\n ):\n if not hasattr(self, \"_upload\"):\n raise RemoteActionNotImplemented(\"upload\", self.scheme)\n\n if to_info.scheme != self.scheme:\n raise NotImplementedError\n\n if from_info.scheme != \"local\":\n raise NotImplementedError\n\n logger.debug(\"Uploading '%s' to '%s'\", from_info, to_info)\n\n name = name or from_info.name\n\n self._upload( # noqa, pylint: disable=no-member\n from_info.fspath,\n to_info,\n name=name,\n no_progress_bar=no_progress_bar,\n file_mode=file_mode,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree.download_BaseTree.download.return.self__download_file_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree.download_BaseTree.download.return.self__download_file_", "embedding": null, "metadata": {"file_path": "dvc/tree/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 394, "end_line": 429, "span_ids": ["BaseTree.download"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseTree:\n\n def download(\n self,\n from_info,\n to_info,\n name=None,\n no_progress_bar=False,\n file_mode=None,\n dir_mode=None,\n jobs=None,\n ):\n if not hasattr(self, \"_download\"):\n raise RemoteActionNotImplemented(\"download\", self.scheme)\n\n if from_info.scheme != self.scheme:\n raise NotImplementedError\n\n if to_info.scheme == self.scheme != \"local\":\n self.copy(from_info, to_info)\n return 0\n\n if to_info.scheme != \"local\":\n raise NotImplementedError\n\n if self.isdir(from_info):\n return self._download_dir(\n from_info,\n to_info,\n name,\n no_progress_bar,\n file_mode,\n dir_mode,\n jobs,\n )\n return self._download_file(\n from_info, to_info, name, no_progress_bar, file_mode, dir_mode\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree._download_dir_BaseTree._download_dir.with_Tqdm_.with_ThreadPoolExecutor_m.for_future_in_as_complete.if_exc_.raise_exc": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree._download_dir_BaseTree._download_dir.with_Tqdm_.with_ThreadPoolExecutor_m.for_future_in_as_complete.if_exc_.raise_exc", "embedding": null, "metadata": {"file_path": "dvc/tree/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 431, "end_line": 481, "span_ids": ["BaseTree._download_dir"], "tokens": 348}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseTree:\n\n def _download_dir(\n self,\n from_info,\n to_info,\n name,\n no_progress_bar,\n file_mode,\n dir_mode,\n jobs,\n ):\n from_infos = list(self.walk_files(from_info))\n to_infos = (\n to_info / info.relative_to(from_info) for info in from_infos\n )\n\n with Tqdm(\n total=len(from_infos),\n desc=\"Downloading directory\",\n unit=\"Files\",\n disable=no_progress_bar,\n ) as pbar:\n download_files = pbar.wrap_fn(\n partial(\n self._download_file,\n name=name,\n no_progress_bar=True,\n file_mode=file_mode,\n dir_mode=dir_mode,\n )\n )\n max_workers = jobs or self.jobs\n with ThreadPoolExecutor(max_workers=max_workers) as executor:\n futures = [\n executor.submit(download_files, from_info, to_info)\n for from_info, to_info in zip(from_infos, to_infos)\n ]\n\n # NOTE: unlike pulling/fetching cache, where we need to\n # download everything we can, not raising an error here might\n # turn very ugly, as the user might think that he has\n # downloaded a complete directory, while having a partial one,\n # which might cause unexpected results in his pipeline.\n for future in as_completed(futures):\n # NOTE: executor won't let us raise until all futures that\n # it has are finished, so we need to cancel them ourselves\n # before re-raising.\n exc = future.exception()\n if exc:\n for entry in futures:\n entry.cancel()\n raise exc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/dvc.py_logging_DvcTree._find_outs.return.outs": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/dvc.py_logging_DvcTree._find_outs.return.outs", "embedding": null, "metadata": {"file_path": "dvc/tree/dvc.py", "file_name": "dvc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 51, "span_ids": ["imports", "DvcTree.__init__", "DvcTree", "DvcTree._find_outs"], "tokens": 323}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nimport typing\n\nfrom dvc.exceptions import OutputNotFoundError\nfrom dvc.path_info import PathInfo\nfrom dvc.utils import relpath\n\nfrom ._metadata import Metadata\nfrom .base import BaseTree, RemoteActionNotImplemented\n\nif typing.TYPE_CHECKING:\n from dvc.output.base import BaseOutput\n\n\nlogger = logging.getLogger(__name__)\n\n\nclass DvcTree(BaseTree): # pylint:disable=abstract-method\n \"\"\"DVC repo tree.\n\n Args:\n repo: DVC repo.\n fetch: if True, uncached DVC outs will be fetched on `open()`.\n stream: if True, uncached DVC outs will be streamed directly from\n remote on `open()`.\n\n `stream` takes precedence over `fetch`. If `stream` is enabled and\n a remote does not support streaming, uncached DVC outs will be fetched\n as a fallback.\n \"\"\"\n\n scheme = \"local\"\n PARAM_CHECKSUM = \"md5\"\n\n def __init__(self, repo, fetch=False, stream=False):\n super().__init__(repo, {\"url\": repo.root_dir})\n self.fetch = fetch\n self.stream = stream\n\n def _find_outs(self, path, *args, **kwargs):\n outs = self.repo.find_outs_by_path(path, *args, **kwargs)\n\n def _is_cached(out):\n return out.use_cache\n\n outs = list(filter(_is_cached, outs))\n if not outs:\n raise OutputNotFoundError(path, self.repo)\n\n return outs", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/dvc.py_DvcTree._get_granular_hash_DvcTree._get_granular_hash.raise_FileNotFoundError": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/dvc.py_DvcTree._get_granular_hash_DvcTree._get_granular_hash.raise_FileNotFoundError", "embedding": null, "metadata": {"file_path": "dvc/tree/dvc.py", "file_name": "dvc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 53, "end_line": 66, "span_ids": ["DvcTree._get_granular_hash"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DvcTree(BaseTree):\n\n def _get_granular_hash(\n self, path_info: PathInfo, out: \"BaseOutput\", remote=None\n ):\n assert isinstance(path_info, PathInfo)\n if not self.fetch and not self.stream:\n raise FileNotFoundError\n\n # NOTE: use string paths here for performance reasons\n key = tuple(relpath(path_info, out.path_info).split(os.sep))\n out.get_dir_cache(remote=remote)\n file_hash = out.hash_info.dir_info.trie.get(key)\n if file_hash:\n return file_hash\n raise FileNotFoundError", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/dvc.py_DvcTree.open_DvcTree.open.return.open_cache_path_mode_mod": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/dvc.py_DvcTree.open_DvcTree.open.return.open_cache_path_mode_mod", "embedding": null, "metadata": {"file_path": "dvc/tree/dvc.py", "file_name": "dvc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 72, "end_line": 111, "span_ids": ["DvcTree.open"], "tokens": 331}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DvcTree(BaseTree):\n\n def open(\n self, path: PathInfo, mode=\"r\", encoding=\"utf-8\", remote=None\n ): # pylint: disable=arguments-differ\n try:\n outs = self._find_outs(path, strict=False)\n except OutputNotFoundError as exc:\n raise FileNotFoundError from exc\n\n if len(outs) != 1 or (\n outs[0].is_dir_checksum and path == outs[0].path_info\n ):\n raise IsADirectoryError\n\n out = outs[0]\n if out.changed_cache(filter_info=path):\n if not self.fetch and not self.stream:\n raise FileNotFoundError\n\n remote_obj = self.repo.cloud.get_remote(remote)\n if self.stream:\n if out.is_dir_checksum:\n checksum = self._get_granular_hash(path, out).value\n else:\n checksum = out.hash_info.value\n try:\n remote_info = remote_obj.tree.hash_to_path_info(checksum)\n return remote_obj.tree.open(\n remote_info, mode=mode, encoding=encoding\n )\n except RemoteActionNotImplemented:\n pass\n cache_info = out.get_used_cache(filter_info=path, remote=remote)\n self.repo.cloud.pull(cache_info, remote=remote)\n\n if out.is_dir_checksum:\n checksum = self._get_granular_hash(path, out).value\n cache_path = out.cache.tree.hash_to_path_info(checksum).url\n else:\n cache_path = out.cache_path\n return open(cache_path, mode=mode, encoding=encoding)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/dvc.py_DvcTree._walk_DvcTree._walk.for_dname_in_dirs_.yield_from_self__walk_roo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/dvc.py_DvcTree._walk_DvcTree._walk.for_dname_in_dirs_.yield_from_self__walk_roo", "embedding": null, "metadata": {"file_path": "dvc/tree/dvc.py", "file_name": "dvc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 176, "end_line": 201, "span_ids": ["DvcTree._walk"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DvcTree(BaseTree):\n\n def _walk(self, root, trie, topdown=True, **kwargs):\n dirs = set()\n files = []\n\n out = trie.get(root.parts)\n if out and out.is_dir_checksum:\n self._add_dir(root, trie, out, **kwargs)\n\n root_len = len(root.parts)\n for key, out in trie.iteritems(prefix=root.parts): # noqa: B301\n if key == root.parts:\n continue\n\n name = key[root_len]\n if len(key) > root_len + 1 or (out and out.is_dir_checksum):\n dirs.add(name)\n continue\n\n files.append(name)\n\n assert topdown\n dirs = list(dirs)\n yield root.fspath, dirs, files\n\n for dname in dirs:\n yield from self._walk(root / dname, trie)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/dvc.py_DvcTree.walk_DvcTree.walk.yield_from_self__walk_roo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/dvc.py_DvcTree.walk_DvcTree.walk.yield_from_self__walk_roo", "embedding": null, "metadata": {"file_path": "dvc/tree/dvc.py", "file_name": "dvc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 203, "end_line": 227, "span_ids": ["DvcTree.walk"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DvcTree(BaseTree):\n\n def walk(self, top, topdown=True, onerror=None, **kwargs):\n from pygtrie import Trie\n\n assert topdown\n root = PathInfo(os.path.abspath(top))\n try:\n meta = self.metadata(root)\n except FileNotFoundError:\n if onerror is not None:\n onerror(FileNotFoundError(top))\n return\n\n if not meta.isdir:\n if onerror is not None:\n onerror(NotADirectoryError(top))\n return\n\n trie = Trie()\n for out in meta.outs:\n trie[out.path_info.parts] = out\n\n if out.is_dir_checksum and root.isin_or_eq(out.path_info):\n self._add_dir(top, trie, out, **kwargs)\n\n yield from self._walk(root, trie, topdown=topdown, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/dvc.py_DvcTree.walk_files_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/dvc.py_DvcTree.walk_files_", "embedding": null, "metadata": {"file_path": "dvc/tree/dvc.py", "file_name": "dvc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 222, "end_line": 273, "span_ids": ["DvcTree.metadata", "DvcTree.isdvc", "DvcTree.isexec", "DvcTree.walk_files", "DvcTree.get_dir_hash", "DvcTree.get_file_hash"], "tokens": 412}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DvcTree(BaseTree):\n\n def walk_files(self, path_info, **kwargs):\n for root, _, files in self.walk(path_info):\n for fname in files:\n # NOTE: os.path.join is ~5.5 times slower\n yield PathInfo(f\"{root}{os.sep}{fname}\")\n\n def isdvc(self, path, recursive=False, strict=True):\n try:\n meta = self.metadata(path)\n except FileNotFoundError:\n return False\n\n recurse = recursive or not strict\n return meta.output_exists if recurse else meta.is_output\n\n def isexec(self, path_info): # pylint: disable=unused-argument\n return False\n\n def get_dir_hash(self, path_info, **kwargs):\n try:\n outs = self._find_outs(path_info, strict=True)\n if len(outs) == 1 and outs[0].is_dir_checksum:\n out = outs[0]\n # other code expects us to fetch the dir at this point\n self._fetch_dir(out, **kwargs)\n return out.hash_info\n except OutputNotFoundError:\n pass\n\n return super().get_dir_hash(path_info, **kwargs)\n\n def get_file_hash(self, path_info):\n outs = self._find_outs(path_info, strict=False)\n if len(outs) != 1:\n raise OutputNotFoundError\n out = outs[0]\n if out.is_dir_checksum:\n return self._get_granular_hash(path_info, out)\n return out.hash_info\n\n def metadata(self, path_info):\n path_info = PathInfo(os.path.abspath(path_info))\n\n try:\n outs = self._find_outs(path_info, strict=False, recursive=True)\n except OutputNotFoundError as exc:\n raise FileNotFoundError from exc\n\n meta = Metadata(path_info=path_info, outs=outs, repo=self.repo)\n meta.isdir = meta.isdir or self.check_isdir(meta.path_info, meta.outs)\n return meta", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_io_FOLDER_MIME_TYPE._application_vnd_google_a": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_io_FOLDER_MIME_TYPE._application_vnd_google_a", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 24, "span_ids": ["imports"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import io\nimport logging\nimport os\nimport posixpath\nimport re\nimport threading\nfrom collections import defaultdict\nfrom contextlib import contextmanager\nfrom urllib.parse import urlparse\n\nfrom funcy import cached_property, retry, wrap_prop, wrap_with\nfrom funcy.py3 import cat\n\nfrom dvc.exceptions import DvcException, FileMissingError\nfrom dvc.path_info import CloudURLInfo\nfrom dvc.progress import Tqdm\nfrom dvc.scheme import Schemes\nfrom dvc.utils import format_link, tmp_fname\nfrom dvc.utils.stream import IterStream\n\nfrom .base import BaseTree\n\nlogger = logging.getLogger(__name__)\nFOLDER_MIME_TYPE = \"application/vnd.google-apps.folder\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveAuthError_GDriveAuthError.__init__.super___init___message_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveAuthError_GDriveAuthError.__init__.super___init___message_", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 27, "end_line": 40, "span_ids": ["GDriveAuthError.__init__", "GDriveAuthError"], "tokens": 108}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GDriveAuthError(DvcException):\n def __init__(self, cred_location):\n\n if cred_location:\n message = (\n \"GDrive remote auth failed with credentials in '{}'.\\n\"\n \"Backup first, remove or fix them, and run DVC again.\\n\"\n \"It should do auth again and refresh the credentials.\\n\\n\"\n \"Details:\".format(cred_location)\n )\n else:\n message = \"Failed to authenticate GDrive remote\"\n\n super().__init__(message)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py__gdrive_retry__gdrive_retry.return.retry_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py__gdrive_retry__gdrive_retry.return.retry_", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 43, "end_line": 70, "span_ids": ["_gdrive_retry"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _gdrive_retry(func):\n def should_retry(exc):\n from pydrive2.files import ApiRequestError\n\n if not isinstance(exc, ApiRequestError):\n return False\n\n error_code = exc.error.get(\"code\", 0)\n result = False\n if 500 <= error_code < 600:\n result = True\n\n if error_code == 403:\n result = exc.GetField(\"reason\") in [\n \"userRateLimitExceeded\",\n \"rateLimitExceeded\",\n ]\n if result:\n logger.debug(f\"Retrying GDrive API call, error: {exc}.\")\n\n return result\n\n # 16 tries, start at 0.5s, multiply by golden ratio, cap at 20s\n return retry(\n 16,\n timeout=lambda a: min(0.5 * 1.618 ** a, 20),\n filter_errors=should_retry,\n )(func)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveURLInfo_GDriveURLInfo.__init__.self._spath.re_sub_2_self": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveURLInfo_GDriveURLInfo.__init__.self._spath.re_sub_2_self", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 73, "end_line": 85, "span_ids": ["GDriveURLInfo", "GDriveURLInfo.__init__"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GDriveURLInfo(CloudURLInfo):\n def __init__(self, url):\n super().__init__(url)\n\n # GDrive URL host part is case sensitive,\n # we are restoring it here.\n p = urlparse(url)\n self.host = p.netloc\n assert self.netloc == self.host\n\n # Normalize path. Important since we have a cache (path to ID)\n # and don't want to deal with different variations of path in it.\n self._spath = re.sub(\"/{2,}\", \"/\", self._spath.rstrip(\"/\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree_GDriveTree.__init__.self._gdrive_user_credentials_path._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree_GDriveTree.__init__.self._gdrive_user_credentials_path._", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 88, "end_line": 140, "span_ids": ["GDriveTree", "GDriveTree.__init__"], "tokens": 492}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GDriveTree(BaseTree):\n scheme = Schemes.GDRIVE\n PATH_CLS = GDriveURLInfo\n REQUIRES = {\"pydrive2\": \"pydrive2\"}\n DEFAULT_VERIFY = True\n # Always prefer traverse for GDrive since API usage quotas are a concern.\n TRAVERSE_WEIGHT_MULTIPLIER = 1\n TRAVERSE_PREFIX_LEN = 2\n\n GDRIVE_CREDENTIALS_DATA = \"GDRIVE_CREDENTIALS_DATA\"\n DEFAULT_USER_CREDENTIALS_FILE = \"gdrive-user-credentials.json\"\n\n DEFAULT_GDRIVE_CLIENT_ID = \"710796635688-iivsgbgsb6uv1fap6635dhvuei09o66c.apps.googleusercontent.com\" # noqa: E501\n DEFAULT_GDRIVE_CLIENT_SECRET = \"a1Fz59uTpVNeG_VGuSKDLJXv\"\n\n def __init__(self, repo, config):\n super().__init__(repo, config)\n\n self.path_info = self.PATH_CLS(config[\"url\"])\n\n if not self.path_info.bucket:\n raise DvcException(\n \"Empty GDrive URL '{}'. Learn more at {}\".format(\n config[\"url\"],\n format_link(\"https://man.dvc.org/remote/add\"),\n )\n )\n\n self._bucket = self.path_info.bucket\n self._trash_only = config.get(\"gdrive_trash_only\")\n self._use_service_account = config.get(\"gdrive_use_service_account\")\n self._service_account_email = config.get(\n \"gdrive_service_account_email\"\n )\n self._service_account_user_email = config.get(\n \"gdrive_service_account_user_email\"\n )\n self._service_account_p12_file_path = config.get(\n \"gdrive_service_account_p12_file_path\"\n )\n self._client_id = config.get(\"gdrive_client_id\")\n self._client_secret = config.get(\"gdrive_client_secret\")\n self._validate_config()\n self._gdrive_user_credentials_path = (\n tmp_fname(os.path.join(self.repo.tmp_dir, \"\"))\n if os.getenv(GDriveTree.GDRIVE_CREDENTIALS_DATA)\n else config.get(\n \"gdrive_user_credentials_file\",\n os.path.join(\n self.repo.tmp_dir, self.DEFAULT_USER_CREDENTIALS_FILE,\n ),\n )\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._validate_config_GDriveTree._validate_config.if_not_self__use_service_.if_bool_self__client_id_.raise_DvcException_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._validate_config_GDriveTree._validate_config.if_not_self__use_service_.if_bool_self__client_id_.raise_DvcException_", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 142, "end_line": 166, "span_ids": ["GDriveTree._validate_config"], "tokens": 229}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GDriveTree(BaseTree):\n\n def _validate_config(self):\n # Validate Service Account configuration\n if self._use_service_account and (\n not self._service_account_email\n or not self._service_account_p12_file_path\n ):\n raise DvcException(\n \"To use service account, set `gdrive_service_account_email`,\\n\"\n \"`gdrive_service_account_p12_file_path`, and optionally \"\n \"`gdrive_service_account_user_email`\\nin DVC config. \"\n \"Learn more at {}\".format(\n format_link(\"https://man.dvc.org/remote/modify\")\n )\n )\n\n # Validate OAuth 2.0 Client ID configuration\n if not self._use_service_account:\n if bool(self._client_id) != bool(self._client_secret):\n raise DvcException(\n \"Please specify GDrive's client ID and secret in \"\n \"DVC config or omit both to use the defaults.\\n\"\n \"Learn more at {}\".format(\n format_link(\"https://man.dvc.org/remote/modify\")\n )\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree.credentials_location_GDriveTree.credentials_location.return.None": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree.credentials_location_GDriveTree.credentials_location.return.None", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 168, "end_line": 179, "span_ids": ["GDriveTree.credentials_location"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GDriveTree(BaseTree):\n\n @cached_property\n def credentials_location(self):\n \"\"\"\n Helper to determine where will GDrive remote read credentials from.\n Useful for tests, exception messages, etc. Returns either env variable\n name if it's set or actual path to the credentials file.\n \"\"\"\n if os.getenv(GDriveTree.GDRIVE_CREDENTIALS_DATA):\n return GDriveTree.GDRIVE_CREDENTIALS_DATA\n if os.path.exists(self._gdrive_user_credentials_path):\n return self._gdrive_user_credentials_path\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._validate_credentials_GDriveTree._validate_credentials.if_not_os_getenv_GDriveTr.if_.logger_warning_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._validate_credentials_GDriveTree._validate_credentials.if_not_os_getenv_GDriveTr.if_.logger_warning_", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 181, "end_line": 205, "span_ids": ["GDriveTree._validate_credentials"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GDriveTree(BaseTree):\n\n @staticmethod\n def _validate_credentials(auth, settings):\n \"\"\"\n Detects discrepancy in DVC config and cached credentials file.\n Usually happens when a second remote is added and it is using\n the same credentials default file. Or when someones decides to change\n DVC config client id or secret but forgets to remove the cached\n credentials file.\n \"\"\"\n if not os.getenv(GDriveTree.GDRIVE_CREDENTIALS_DATA):\n if (\n settings[\"client_config\"][\"client_id\"]\n != auth.credentials.client_id\n or settings[\"client_config\"][\"client_secret\"]\n != auth.credentials.client_secret\n ):\n logger.warning(\n \"Client ID and secret configured do not match the \"\n \"actual ones used\\nto access the remote. Do you \"\n \"use multiple GDrive remotes and forgot to\\nset \"\n \"`gdrive_user_credentials_file` for one or more of them? \"\n \"Learn more at\\n{}.\\n\".format(\n format_link(\"https://man.dvc.org/remote/modify\")\n )\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._drive_GDriveTree._drive.return.GoogleDrive_gauth_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._drive_GDriveTree._drive.return.GoogleDrive_gauth_", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 207, "end_line": 273, "span_ids": ["GDriveTree._drive"], "tokens": 559}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GDriveTree(BaseTree):\n\n @wrap_prop(threading.RLock())\n @cached_property\n def _drive(self):\n from pydrive2.auth import GoogleAuth\n from pydrive2.drive import GoogleDrive\n\n if os.getenv(GDriveTree.GDRIVE_CREDENTIALS_DATA):\n with open(self._gdrive_user_credentials_path, \"w\") as cred_file:\n cred_file.write(os.getenv(GDriveTree.GDRIVE_CREDENTIALS_DATA))\n\n auth_settings = {\n \"client_config_backend\": \"settings\",\n \"save_credentials\": True,\n \"save_credentials_backend\": \"file\",\n \"save_credentials_file\": self._gdrive_user_credentials_path,\n \"get_refresh_token\": True,\n \"oauth_scope\": [\n \"https://www.googleapis.com/auth/drive\",\n \"https://www.googleapis.com/auth/drive.appdata\",\n ],\n }\n\n if self._use_service_account:\n auth_settings[\"service_config\"] = {\n \"client_service_email\": self._service_account_email,\n \"client_user_email\": self._service_account_user_email,\n \"client_pkcs12_file_path\": self._service_account_p12_file_path,\n }\n else:\n auth_settings[\"client_config\"] = {\n \"client_id\": self._client_id or self.DEFAULT_GDRIVE_CLIENT_ID,\n \"client_secret\": self._client_secret\n or self.DEFAULT_GDRIVE_CLIENT_SECRET,\n \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n \"token_uri\": \"https://oauth2.googleapis.com/token\",\n \"revoke_uri\": \"https://oauth2.googleapis.com/revoke\",\n \"redirect_uri\": \"\",\n }\n\n GoogleAuth.DEFAULT_SETTINGS.update(auth_settings)\n\n # Pass non existent settings path to force DEFAULT_SETTINGS loadings\n gauth = GoogleAuth(settings_file=\"\")\n\n try:\n logger.debug(\n \"GDrive remote auth with config '{}'.\".format(\n GoogleAuth.DEFAULT_SETTINGS\n )\n )\n if self._use_service_account:\n gauth.ServiceAuth()\n else:\n gauth.CommandLineAuth()\n GDriveTree._validate_credentials(gauth, auth_settings)\n\n # Handle AuthenticationError, RefreshError and other auth failures\n # It's hard to come up with a narrow exception, since PyDrive throws\n # a lot of different errors - broken credentials file, refresh token\n # expired, flow failed, etc.\n except Exception as exc:\n raise GDriveAuthError(self.credentials_location) from exc\n finally:\n if os.getenv(GDriveTree.GDRIVE_CREDENTIALS_DATA):\n os.remove(self._gdrive_user_credentials_path)\n\n return GoogleDrive(gauth)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._ids_cache_GDriveTree._ids_cache.return.cache": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._ids_cache_GDriveTree._ids_cache.return.cache", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 275, "end_line": 296, "span_ids": ["GDriveTree._ids_cache"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GDriveTree(BaseTree):\n\n @wrap_prop(threading.RLock())\n @cached_property\n def _ids_cache(self):\n cache = {\n \"dirs\": defaultdict(list),\n \"ids\": {},\n \"root_id\": self._get_item_id(\n self.path_info,\n use_cache=False,\n hint=\"Confirm the directory exists and you can access it.\",\n ),\n }\n\n self._cache_path_id(self.path_info.path, cache[\"root_id\"], cache)\n\n for item in self._gdrive_list(\n \"'{}' in parents and trashed=false\".format(cache[\"root_id\"])\n ):\n item_path = (self.path_info / item[\"title\"]).path\n self._cache_path_id(item_path, item[\"id\"], cache)\n\n return cache", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._cache_path_id_GDriveTree._list_params.return.params": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._cache_path_id_GDriveTree._list_params.return.params", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 298, "end_line": 316, "span_ids": ["GDriveTree._cache_path_id", "GDriveTree._list_params"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GDriveTree(BaseTree):\n\n def _cache_path_id(self, path, item_id, cache=None):\n cache = cache or self._ids_cache\n cache[\"dirs\"][path].append(item_id)\n cache[\"ids\"][item_id] = path\n\n @cached_property\n def _list_params(self):\n params = {\"corpora\": \"default\"}\n if self._bucket != \"root\" and self._bucket != \"appDataFolder\":\n drive_id = self._gdrive_shared_drive_id(self._bucket)\n if drive_id:\n logger.debug(\n \"GDrive remote '{}' is using shared drive id '{}'.\".format(\n self.path_info, drive_id\n )\n )\n params[\"driveId\"] = drive_id\n params[\"corpora\"] = \"drive\"\n return params", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._gdrive_shared_drive_id_GDriveTree._gdrive_shared_drive_id.return.item_get_driveId_None_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._gdrive_shared_drive_id_GDriveTree._gdrive_shared_drive_id.return.item_get_driveId_None_", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 318, "end_line": 345, "span_ids": ["GDriveTree._gdrive_shared_drive_id"], "tokens": 260}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GDriveTree(BaseTree):\n\n @_gdrive_retry\n def _gdrive_shared_drive_id(self, item_id):\n from pydrive2.files import ApiRequestError\n\n param = {\"id\": item_id}\n # it does not create a file on the remote\n item = self._drive.CreateFile(param)\n # ID of the shared drive the item resides in.\n # Only populated for items in shared drives.\n try:\n item.FetchMetadata(\"driveId\")\n except ApiRequestError as exc:\n error_code = exc.error.get(\"code\", 0)\n if error_code == 404:\n raise DvcException(\n \"'{}' for '{}':\\n\\n\"\n \"1. Confirm the directory exists and you can access it.\\n\"\n \"2. Make sure that credentials in '{}'\\n\"\n \" are correct for this remote e.g. \"\n \"use the `gdrive_user_credentials_file` config\\n\"\n \" option if you use multiple GDrive remotes with \"\n \"different email accounts.\\n\\nDetails\".format(\n item_id, self.path_info, self.credentials_location\n )\n ) from exc\n raise\n\n return item.get(\"driveId\", None)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._gdrive_upload_file_GDriveTree._gdrive_upload_file.return.item": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._gdrive_upload_file_GDriveTree._gdrive_upload_file.return.item", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 347, "end_line": 371, "span_ids": ["GDriveTree._gdrive_upload_file"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GDriveTree(BaseTree):\n\n @_gdrive_retry\n def _gdrive_upload_file(\n self,\n parent_id,\n title,\n no_progress_bar=False,\n from_file=\"\",\n progress_name=\"\",\n ):\n item = self._drive.CreateFile(\n {\"title\": title, \"parents\": [{\"id\": parent_id}]}\n )\n\n with open(from_file, \"rb\") as fobj:\n total = os.path.getsize(from_file)\n with Tqdm.wrapattr(\n fobj,\n \"read\",\n desc=progress_name,\n total=total,\n disable=no_progress_bar,\n ) as wrapped:\n item.content = wrapped\n item.Upload()\n return item", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._gdrive_download_file_GDriveTree._gdrive_download_file.with_Tqdm_.gdrive_file_GetContentFil": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._gdrive_download_file_GDriveTree._gdrive_download_file.with_Tqdm_.gdrive_file_GetContentFil", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 376, "end_line": 391, "span_ids": ["GDriveTree._gdrive_download_file"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GDriveTree(BaseTree):\n\n @_gdrive_retry\n def _gdrive_download_file(\n self, item_id, to_file, progress_desc, no_progress_bar\n ):\n param = {\"id\": item_id}\n # it does not create a file on the remote\n gdrive_file = self._drive.CreateFile(param)\n\n with Tqdm(\n desc=progress_desc,\n disable=no_progress_bar,\n bytes=True,\n # explicit `bar_format` as `total` will be set by `update_to`\n bar_format=Tqdm.BAR_FMT_DEFAULT,\n ) as pbar:\n gdrive_file.GetContentFile(to_file, callback=pbar.update_to)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree.open_GDriveTree.open.yield_stream": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree.open_GDriveTree.open.yield_stream", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 393, "end_line": 408, "span_ids": ["GDriveTree.open"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GDriveTree(BaseTree):\n\n @contextmanager\n @_gdrive_retry\n def open(self, path_info, mode=\"r\", encoding=None):\n assert mode in {\"r\", \"rt\", \"rb\"}\n\n item_id = self._get_item_id(path_info)\n param = {\"id\": item_id}\n # it does not create a file on the remote\n gdrive_file = self._drive.CreateFile(param)\n fd = gdrive_file.GetContentIOBuffer()\n stream = IterStream(iter(fd))\n\n if mode != \"rb\":\n stream = io.TextIOWrapper(stream, encoding=encoding)\n\n yield stream", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree.gdrive_delete_file_GDriveTree.gdrive_delete_file.try_.except_ApiRequestError_as.raise": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree.gdrive_delete_file_GDriveTree.gdrive_delete_file.try_.except_ApiRequestError_as.raise", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 410, "end_line": 440, "span_ids": ["GDriveTree.gdrive_delete_file"], "tokens": 251}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GDriveTree(BaseTree):\n\n @_gdrive_retry\n def gdrive_delete_file(self, item_id):\n from pydrive2.files import ApiRequestError\n\n param = {\"id\": item_id}\n # it does not create a file on the remote\n item = self._drive.CreateFile(param)\n\n try:\n item.Trash() if self._trash_only else item.Delete()\n except ApiRequestError as exc:\n http_error_code = exc.error.get(\"code\", 0)\n if (\n http_error_code == 403\n and self._list_params[\"corpora\"] == \"drive\"\n and exc.GetField(\"location\") == \"file.permissions\"\n ):\n raise DvcException(\n \"Insufficient permissions to {}. You should have {} \"\n \"access level for the used shared drive. More details \"\n \"at {}.\".format(\n \"move the file into Trash\"\n if self._trash_only\n else \"permanently delete the file\",\n \"Manager or Content Manager\"\n if self._trash_only\n else \"Manager\",\n \"https://support.google.com/a/answer/7337554\",\n )\n ) from exc\n raise", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._gdrive_list_GDriveTree._create_dir.return.item_id_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._gdrive_list_GDriveTree._create_dir.return.item_id_", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 442, "end_line": 473, "span_ids": ["GDriveTree._gdrive_create_dir", "GDriveTree._create_dir", "GDriveTree._gdrive_list"], "tokens": 270}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GDriveTree(BaseTree):\n\n def _gdrive_list(self, query):\n param = {\"q\": query, \"maxResults\": 1000}\n param.update(self._list_params)\n file_list = self._drive.ListFile(param)\n\n # Isolate and decorate fetching of remote drive items in pages.\n get_list = _gdrive_retry(lambda: next(file_list, None))\n\n # Fetch pages until None is received, lazily flatten the thing.\n return cat(iter(get_list, None))\n\n @_gdrive_retry\n def _gdrive_create_dir(self, parent_id, title):\n parent = {\"id\": parent_id}\n item = self._drive.CreateFile(\n {\"title\": title, \"parents\": [parent], \"mimeType\": FOLDER_MIME_TYPE}\n )\n item.Upload()\n return item\n\n @wrap_with(threading.RLock())\n def _create_dir(self, parent_id, title, remote_path):\n cached = self._ids_cache[\"dirs\"].get(remote_path)\n if cached:\n return cached[0]\n\n item = self._gdrive_create_dir(parent_id, title)\n\n if parent_id == self._ids_cache[\"root_id\"]:\n self._cache_path_id(remote_path, item[\"id\"])\n\n return item[\"id\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._get_remote_item_ids_GDriveTree._get_remote_item_ids.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._get_remote_item_ids_GDriveTree._get_remote_item_ids.return._", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 475, "end_line": 491, "span_ids": ["GDriveTree._get_remote_item_ids"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GDriveTree(BaseTree):\n\n def _get_remote_item_ids(self, parent_ids, title):\n if not parent_ids:\n return None\n query = \"trashed=false and ({})\".format(\n \" or \".join(\n f\"'{parent_id}' in parents\" for parent_id in parent_ids\n )\n )\n query += \" and title='{}'\".format(title.replace(\"'\", \"\\\\'\"))\n\n # GDrive list API is case insensitive, we need to compare\n # all results and pick the ones with the right title\n return [\n item[\"id\"]\n for item in self._gdrive_list(query)\n if item[\"title\"] == title\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._get_cached_item_ids_GDriveTree._path_to_item_ids.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._get_cached_item_ids_GDriveTree._path_to_item_ids.return._", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 493, "end_line": 513, "span_ids": ["GDriveTree._get_cached_item_ids", "GDriveTree._path_to_item_ids"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GDriveTree(BaseTree):\n\n def _get_cached_item_ids(self, path, use_cache):\n if not path:\n return [self._bucket]\n if use_cache:\n return self._ids_cache[\"dirs\"].get(path, [])\n return []\n\n def _path_to_item_ids(self, path, create, use_cache):\n item_ids = self._get_cached_item_ids(path, use_cache)\n if item_ids:\n return item_ids\n\n parent_path, title = posixpath.split(path)\n parent_ids = self._path_to_item_ids(parent_path, create, use_cache)\n item_ids = self._get_remote_item_ids(parent_ids, title)\n if item_ids:\n return item_ids\n\n return (\n [self._create_dir(min(parent_ids), title, path)] if create else []\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._get_item_id_GDriveTree.exists.try_.else_.return.True": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._get_item_id_GDriveTree.exists.try_.else_.return.True", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 515, "end_line": 531, "span_ids": ["GDriveTree.exists", "GDriveTree._get_item_id"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GDriveTree(BaseTree):\n\n def _get_item_id(self, path_info, create=False, use_cache=True, hint=None):\n assert path_info.bucket == self._bucket\n\n item_ids = self._path_to_item_ids(path_info.path, create, use_cache)\n if item_ids:\n return min(item_ids)\n\n assert not create\n raise FileMissingError(path_info, hint)\n\n def exists(self, path_info, use_dvcignore=True):\n try:\n self._get_item_id(path_info)\n except FileMissingError:\n return False\n else:\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._list_paths_GDriveTree._list_paths.for_item_in_self__gdrive_.yield_posixpath_join_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree._list_paths_GDriveTree._list_paths.for_item_in_self__gdrive_.yield_posixpath_join_", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 533, "end_line": 552, "span_ids": ["GDriveTree._list_paths"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GDriveTree(BaseTree):\n\n def _list_paths(self, prefix=None):\n if not self._ids_cache[\"ids\"]:\n return\n\n if prefix:\n dir_ids = self._ids_cache[\"dirs\"].get(prefix[:2])\n if not dir_ids:\n return\n else:\n dir_ids = self._ids_cache[\"ids\"]\n parents_query = \" or \".join(\n f\"'{dir_id}' in parents\" for dir_id in dir_ids\n )\n query = f\"({parents_query}) and trashed=false\"\n\n for item in self._gdrive_list(query):\n parent_id = item[\"parents\"][0][\"id\"]\n yield posixpath.join(\n self._ids_cache[\"ids\"][parent_id], item[\"title\"]\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree.walk_files_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gdrive.py_GDriveTree.walk_files_", "embedding": null, "metadata": {"file_path": "dvc/tree/gdrive.py", "file_name": "gdrive.py", "file_type": "text/x-python", "category": "implementation", "start_line": 551, "end_line": 581, "span_ids": ["GDriveTree.walk_files", "GDriveTree.get_file_hash", "GDriveTree._upload", "GDriveTree._download", "GDriveTree.remove"], "tokens": 253}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GDriveTree(BaseTree):\n\n def walk_files(self, path_info, **kwargs):\n use_prefix = kwargs.pop(\"prefix\", False)\n if path_info == self.path_info or not use_prefix:\n prefix = None\n else:\n prefix = path_info.path\n for fname in self._list_paths(prefix=prefix, **kwargs):\n yield path_info.replace(fname)\n\n def remove(self, path_info):\n item_id = self._get_item_id(path_info)\n self.gdrive_delete_file(item_id)\n\n def get_file_hash(self, path_info):\n raise NotImplementedError\n\n def _upload(\n self, from_file, to_info, name=None, no_progress_bar=False, **_kwargs\n ):\n dirname = to_info.parent\n assert dirname\n parent_id = self._get_item_id(dirname, True)\n\n self._gdrive_upload_file(\n parent_id, to_info.name, no_progress_bar, from_file, name\n )\n\n def _download(self, from_info, to_file, name=None, no_progress_bar=False):\n item_id = self._get_item_id(from_info)\n self._gdrive_download_file(item_id, to_file, name, no_progress_bar)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gs.py_logging_dynamic_chunk_size.return.wrapper": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gs.py_logging_dynamic_chunk_size.return.wrapper", "embedding": null, "metadata": {"file_path": "dvc/tree/gs.py", "file_name": "gs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 45, "span_ids": ["imports", "dynamic_chunk_size"], "tokens": 306}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os.path\nimport threading\nfrom datetime import timedelta\nfrom functools import wraps\n\nfrom funcy import cached_property, wrap_prop\n\nfrom dvc.exceptions import DvcException\nfrom dvc.hash_info import HashInfo\nfrom dvc.path_info import CloudURLInfo\nfrom dvc.progress import Tqdm\nfrom dvc.scheme import Schemes\n\nfrom .base import BaseTree\n\nlogger = logging.getLogger(__name__)\n\n\ndef dynamic_chunk_size(func):\n @wraps(func)\n def wrapper(*args, **kwargs):\n import requests\n from google.cloud.storage.blob import Blob\n\n # `ConnectionError` may be due to too large `chunk_size`\n # (see [#2572]) so try halving on error.\n # Note: start with 40 * [default: 256K] = 10M.\n # Note: must be multiple of 256K.\n #\n # [#2572]: https://github.com/iterative/dvc/issues/2572\n # skipcq: PYL-W0212\n multiplier = 40\n while True:\n try:\n # skipcq: PYL-W0212\n # pylint: disable=protected-access\n chunk_size = Blob._CHUNK_SIZE_MULTIPLE * multiplier\n return func(*args, chunk_size=chunk_size, **kwargs)\n except requests.exceptions.ConnectionError:\n multiplier //= 2\n if not multiplier:\n raise\n\n return wrapper", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gs.py__upload_to_bucket__upload_to_bucket.with_open_from_file_mode.with_Tqdm_wrapattr_.blob_upload_from_file_wra": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gs.py__upload_to_bucket__upload_to_bucket.with_open_from_file_mode.with_Tqdm_wrapattr_.blob_upload_from_file_wra", "embedding": null, "metadata": {"file_path": "dvc/tree/gs.py", "file_name": "gs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 48, "end_line": 66, "span_ids": ["_upload_to_bucket"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dynamic_chunk_size\ndef _upload_to_bucket(\n bucket,\n from_file,\n to_info,\n chunk_size=None,\n name=None,\n no_progress_bar=False,\n):\n blob = bucket.blob(to_info.path, chunk_size=chunk_size)\n with open(from_file, mode=\"rb\") as fobj:\n with Tqdm.wrapattr(\n fobj,\n \"read\",\n desc=name or to_info.path,\n total=os.path.getsize(from_file),\n disable=no_progress_bar,\n ) as wrapped:\n blob.upload_from_file(wrapped)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gs.py_GSTree_GSTree.gs.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gs.py_GSTree_GSTree.gs.return._", "embedding": null, "metadata": {"file_path": "dvc/tree/gs.py", "file_name": "gs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 69, "end_line": 93, "span_ids": ["GSTree.gs", "GSTree", "GSTree.__init__"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GSTree(BaseTree):\n scheme = Schemes.GS\n PATH_CLS = CloudURLInfo\n REQUIRES = {\"google-cloud-storage\": \"google.cloud.storage\"}\n PARAM_CHECKSUM = \"md5\"\n\n def __init__(self, repo, config):\n super().__init__(repo, config)\n\n url = config.get(\"url\", \"gs:///\")\n self.path_info = self.PATH_CLS(url)\n\n self.projectname = config.get(\"projectname\", None)\n self.credentialpath = config.get(\"credentialpath\")\n\n @wrap_prop(threading.Lock())\n @cached_property\n def gs(self):\n from google.cloud.storage import Client\n\n return (\n Client.from_service_account_json(self.credentialpath)\n if self.credentialpath\n else Client(self.projectname)\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gs.py_GSTree._generate_download_url_GSTree._generate_download_url.return.signing_credentials_signe": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gs.py_GSTree._generate_download_url_GSTree._generate_download_url.return.signing_credentials_signe", "embedding": null, "metadata": {"file_path": "dvc/tree/gs.py", "file_name": "gs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 95, "end_line": 120, "span_ids": ["GSTree._generate_download_url"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GSTree(BaseTree):\n\n def _generate_download_url(self, path_info, expires=3600):\n import google.auth\n from google.auth import compute_engine\n\n expiration = timedelta(seconds=int(expires))\n\n bucket = self.gs.bucket(path_info.bucket)\n blob = bucket.get_blob(path_info.path)\n if blob is None:\n raise FileNotFoundError\n\n if isinstance(\n blob.client._credentials, # pylint: disable=protected-access\n google.auth.credentials.Signing,\n ):\n # sign if we're able to sign with credentials.\n return blob.generate_signed_url(expiration=expiration)\n\n auth_request = google.auth.transport.requests.Request()\n # create signing credentials with the default credentials\n # for use with Compute Engine and other environments where\n # Client credentials cannot sign.\n signing_credentials = compute_engine.IDTokenCredentials(\n auth_request, \"\"\n )\n return signing_credentials.signer.sign(blob)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gs.py_GSTree.exists_GSTree.copy.from_bucket_copy_blob_blo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gs.py_GSTree.exists_GSTree.copy.from_bucket_copy_blob_blo", "embedding": null, "metadata": {"file_path": "dvc/tree/gs.py", "file_name": "gs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 122, "end_line": 183, "span_ids": ["GSTree.exists", "GSTree.isdir", "GSTree.walk_files", "GSTree._list_paths", "GSTree.remove", "GSTree.isfile", "GSTree.copy", "GSTree.makedirs"], "tokens": 462}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GSTree(BaseTree):\n\n def exists(self, path_info, use_dvcignore=True):\n \"\"\"Check if the blob exists. If it does not exist,\n it could be a part of a directory path.\n\n eg: if `data/file.txt` exists, check for `data` should return True\n \"\"\"\n return self.isfile(path_info) or self.isdir(path_info)\n\n def isdir(self, path_info):\n dir_path = path_info / \"\"\n return bool(list(self._list_paths(dir_path, max_items=1)))\n\n def isfile(self, path_info):\n if path_info.path.endswith(\"/\"):\n return False\n\n blob = self.gs.bucket(path_info.bucket).blob(path_info.path)\n return blob.exists()\n\n def _list_paths(self, path_info, max_items=None):\n for blob in self.gs.bucket(path_info.bucket).list_blobs(\n prefix=path_info.path, max_results=max_items\n ):\n yield blob.name\n\n def walk_files(self, path_info, **kwargs):\n if not kwargs.pop(\"prefix\", False):\n path_info = path_info / \"\"\n for fname in self._list_paths(path_info, **kwargs):\n # skip nested empty directories\n if fname.endswith(\"/\"):\n continue\n yield path_info.replace(fname)\n\n def remove(self, path_info):\n if path_info.scheme != \"gs\":\n raise NotImplementedError\n\n logger.debug(f\"Removing gs://{path_info}\")\n blob = self.gs.bucket(path_info.bucket).get_blob(path_info.path)\n if not blob:\n return\n\n blob.delete()\n\n def makedirs(self, path_info):\n if not path_info.path:\n return\n\n self.gs.bucket(path_info.bucket).blob(\n (path_info / \"\").path\n ).upload_from_string(\"\")\n\n def copy(self, from_info, to_info):\n from_bucket = self.gs.bucket(from_info.bucket)\n blob = from_bucket.get_blob(from_info.path)\n if not blob:\n msg = f\"'{from_info.path}' doesn't exist in the cloud\"\n raise DvcException(msg)\n\n to_bucket = self.gs.bucket(to_info.bucket)\n from_bucket.copy_blob(blob, to_bucket, new_name=to_info.path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gs.py_GSTree.get_file_hash_GSTree.get_file_hash.return.HashInfo_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gs.py_GSTree.get_file_hash_GSTree.get_file_hash.return.HashInfo_", "embedding": null, "metadata": {"file_path": "dvc/tree/gs.py", "file_name": "gs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 185, "end_line": 201, "span_ids": ["GSTree.get_file_hash"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GSTree(BaseTree):\n\n def get_file_hash(self, path_info):\n import base64\n import codecs\n\n bucket = path_info.bucket\n path = path_info.path\n blob = self.gs.bucket(bucket).get_blob(path)\n if not blob:\n return HashInfo(self.PARAM_CHECKSUM, None)\n\n b64_md5 = blob.md5_hash\n md5 = base64.b64decode(b64_md5)\n return HashInfo(\n self.PARAM_CHECKSUM,\n codecs.getencoder(\"hex\")(md5)[0].decode(\"utf-8\"),\n size=blob.size,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gs.py_GSTree._upload_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/gs.py_GSTree._upload_", "embedding": null, "metadata": {"file_path": "dvc/tree/gs.py", "file_name": "gs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 203, "end_line": 227, "span_ids": ["GSTree._upload", "GSTree._download"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GSTree(BaseTree):\n\n def _upload(\n self, from_file, to_info, name=None, no_progress_bar=False, **_kwargs\n ):\n bucket = self.gs.bucket(to_info.bucket)\n _upload_to_bucket(\n bucket,\n from_file,\n to_info,\n name=name,\n no_progress_bar=no_progress_bar,\n )\n\n def _download(self, from_info, to_file, name=None, no_progress_bar=False):\n bucket = self.gs.bucket(from_info.bucket)\n blob = bucket.get_blob(from_info.path)\n with open(to_file, mode=\"wb\") as fobj:\n with Tqdm.wrapattr(\n fobj,\n \"write\",\n desc=name or from_info.path,\n total=blob.size,\n disable=no_progress_bar,\n ) as wrapped:\n blob.download_to_file(wrapped)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/hdfs.py_io_HDFSTree.hdfs.return.get_connection_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/hdfs.py_io_HDFSTree.hdfs.return.get_connection_", "embedding": null, "metadata": {"file_path": "dvc/tree/hdfs.py", "file_name": "hdfs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 63, "span_ids": ["imports", "HDFSTree.__init__", "HDFSTree", "HDFSTree.hdfs"], "tokens": 372}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import io\nimport logging\nimport os\nimport re\nimport subprocess\nfrom collections import deque\nfrom contextlib import closing, contextmanager\nfrom urllib.parse import urlparse\n\nfrom dvc.hash_info import HashInfo\nfrom dvc.progress import Tqdm\nfrom dvc.scheme import Schemes\nfrom dvc.utils import fix_env, tmp_fname\n\nfrom .base import BaseTree, RemoteCmdError\nfrom .pool import get_connection\n\nlogger = logging.getLogger(__name__)\n\n\nclass HDFSTree(BaseTree):\n scheme = Schemes.HDFS\n REQUIRES = {\"pyarrow\": \"pyarrow\"}\n REGEX = r\"^hdfs://((?P.*)@)?.*$\"\n PARAM_CHECKSUM = \"checksum\"\n TRAVERSE_PREFIX_LEN = 2\n\n def __init__(self, repo, config):\n super().__init__(repo, config)\n\n self.path_info = None\n url = config.get(\"url\")\n if not url:\n return\n\n parsed = urlparse(url)\n user = parsed.username or config.get(\"user\")\n\n self.path_info = self.PATH_CLS.from_parts(\n scheme=self.scheme,\n host=parsed.hostname,\n user=user,\n port=parsed.port,\n path=parsed.path,\n )\n\n @staticmethod\n def hdfs(path_info):\n import pyarrow.fs\n\n # NOTE: HadoopFileSystem is not meant to be closed by us and doesn't\n # have close() method or alternative, so we add a noop one to satisfy\n # our connection pool.\n class HDFSConnection(pyarrow.fs.HadoopFileSystem):\n def close(self):\n pass\n\n return get_connection(\n HDFSConnection,\n path_info.host,\n path_info.port,\n user=path_info.user,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/hdfs.py_HDFSTree._download_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/hdfs.py_HDFSTree._download_", "embedding": null, "metadata": {"file_path": "dvc/tree/hdfs.py", "file_name": "hdfs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 250, "end_line": 266, "span_ids": ["HDFSTree._download"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HDFSTree(BaseTree):\n\n def _download(\n self, from_info, to_file, name=None, no_progress_bar=False, **_kwargs\n ):\n with self.hdfs(from_info) as hdfs:\n file_info = hdfs.get_file_info(from_info.path)\n total = file_info.size\n with open(to_file, \"wb+\") as fobj:\n with Tqdm.wrapattr(\n fobj,\n \"write\",\n desc=name,\n total=total,\n disable=no_progress_bar,\n ) as wrapped:\n with hdfs.open_input_stream(from_info.path) as sobj:\n wrapped.write(sobj.read())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_logging_ask_password.return.prompt_password_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_logging_ask_password.return.prompt_password_", "embedding": null, "metadata": {"file_path": "dvc/tree/http.py", "file_name": "http.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 25, "span_ids": ["imports", "ask_password"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os.path\nimport threading\n\nfrom funcy import cached_property, memoize, wrap_prop, wrap_with\n\nimport dvc.prompt as prompt\nfrom dvc.exceptions import DvcException, HTTPError\nfrom dvc.hash_info import HashInfo\nfrom dvc.path_info import HTTPURLInfo\nfrom dvc.progress import Tqdm\nfrom dvc.scheme import Schemes\n\nfrom .base import BaseTree\n\nlogger = logging.getLogger(__name__)\n\n\n@wrap_with(threading.Lock())\n@memoize\ndef ask_password(host, user):\n return prompt.password(\n \"Enter a password for \"\n \"host '{host}' user '{user}'\".format(host=host, user=user)\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_HTTPTree_HTTPTree.__init__.self.method.config_get_method_POS": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_HTTPTree_HTTPTree.__init__.self.method.config_get_method_POS", "embedding": null, "metadata": {"file_path": "dvc/tree/http.py", "file_name": "http.py", "file_type": "text/x-python", "category": "implementation", "start_line": 28, "end_line": 57, "span_ids": ["HTTPTree", "HTTPTree.__init__"], "tokens": 239}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTTPTree(BaseTree): # pylint:disable=abstract-method\n scheme = Schemes.HTTP\n PATH_CLS = HTTPURLInfo\n PARAM_CHECKSUM = \"etag\"\n CAN_TRAVERSE = False\n\n SESSION_RETRIES = 5\n SESSION_BACKOFF_FACTOR = 0.1\n REQUEST_TIMEOUT = 60\n CHUNK_SIZE = 2 ** 16\n\n def __init__(self, repo, config):\n super().__init__(repo, config)\n\n url = config.get(\"url\")\n if url:\n self.path_info = self.PATH_CLS(url)\n user = config.get(\"user\", None)\n if user:\n self.path_info.user = user\n else:\n self.path_info = None\n\n self.auth = config.get(\"auth\", None)\n self.custom_auth_header = config.get(\"custom_auth_header\", None)\n self.password = config.get(\"password\", None)\n self.ask_password = config.get(\"ask_password\", False)\n self.headers = {}\n self.ssl_verify = config.get(\"ssl_verify\", True)\n self.method = config.get(\"method\", \"POST\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_HTTPTree._auth_method_HTTPTree._auth_method.return.None": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_HTTPTree._auth_method_HTTPTree._auth_method.return.None", "embedding": null, "metadata": {"file_path": "dvc/tree/http.py", "file_name": "http.py", "file_type": "text/x-python", "category": "implementation", "start_line": 59, "end_line": 75, "span_ids": ["HTTPTree._auth_method"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTTPTree(BaseTree):\n\n def _auth_method(self, path_info=None):\n from requests.auth import HTTPBasicAuth, HTTPDigestAuth\n\n if path_info is None:\n path_info = self.path_info\n\n if self.auth:\n if self.ask_password and self.password is None:\n host, user = path_info.host, path_info.user\n self.password = ask_password(host, user)\n if self.auth == \"basic\":\n return HTTPBasicAuth(path_info.user, self.password)\n if self.auth == \"digest\":\n return HTTPDigestAuth(path_info.user, self.password)\n if self.auth == \"custom\" and self.custom_auth_header:\n self.headers.update({self.custom_auth_header: self.password})\n return None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_HTTPTree._session_HTTPTree._session.return.session": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_HTTPTree._session_HTTPTree._session.return.session", "embedding": null, "metadata": {"file_path": "dvc/tree/http.py", "file_name": "http.py", "file_type": "text/x-python", "category": "implementation", "start_line": 77, "end_line": 96, "span_ids": ["HTTPTree._session"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTTPTree(BaseTree):\n\n @wrap_prop(threading.Lock())\n @cached_property\n def _session(self):\n import requests\n from requests.adapters import HTTPAdapter\n from urllib3.util.retry import Retry\n\n session = requests.Session()\n\n session.verify = self.ssl_verify\n\n retries = Retry(\n total=self.SESSION_RETRIES,\n backoff_factor=self.SESSION_BACKOFF_FACTOR,\n )\n\n session.mount(\"http://\", HTTPAdapter(max_retries=retries))\n session.mount(\"https://\", HTTPAdapter(max_retries=retries))\n\n return session", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_HTTPTree.request_HTTPTree.request.try_.except_requests_exception.raise_DvcException_f_coul": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_HTTPTree.request_HTTPTree.request.try_.except_requests_exception.raise_DvcException_f_coul", "embedding": null, "metadata": {"file_path": "dvc/tree/http.py", "file_name": "http.py", "file_type": "text/x-python", "category": "implementation", "start_line": 98, "end_line": 128, "span_ids": ["HTTPTree.request"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTTPTree(BaseTree):\n\n def request(self, method, url, **kwargs):\n import requests\n\n kwargs.setdefault(\"allow_redirects\", True)\n kwargs.setdefault(\"timeout\", self.REQUEST_TIMEOUT)\n\n try:\n res = self._session.request(\n method,\n url,\n auth=self._auth_method(),\n headers=self.headers,\n **kwargs,\n )\n\n redirect_no_location = (\n kwargs[\"allow_redirects\"]\n and res.status_code in (301, 302)\n and \"location\" not in res.headers\n )\n\n if redirect_no_location:\n # AWS s3 doesn't like to add a location header to its redirects\n # from https://s3.amazonaws.com//* type URLs.\n # This should be treated as an error\n raise requests.exceptions.RequestException\n\n return res\n\n except requests.exceptions.RequestException:\n raise DvcException(f\"could not perform a {method} request\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_HTTPTree._head_HTTPTree.get_file_hash.return.HashInfo_self_PARAM_CHECK": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_HTTPTree._head_HTTPTree.get_file_hash.return.HashInfo_self_PARAM_CHECK", "embedding": null, "metadata": {"file_path": "dvc/tree/http.py", "file_name": "http.py", "file_type": "text/x-python", "category": "implementation", "start_line": 130, "end_line": 164, "span_ids": ["HTTPTree.exists", "HTTPTree.get_file_hash", "HTTPTree._head"], "tokens": 247}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTTPTree(BaseTree):\n\n def _head(self, url):\n response = self.request(\"HEAD\", url)\n if response.ok:\n return response\n\n # Sometimes servers are configured to forbid HEAD requests\n # Context: https://github.com/iterative/dvc/issues/4131\n with self.request(\"GET\", url, stream=True) as r:\n if r.ok:\n return r\n\n return response\n\n def exists(self, path_info, use_dvcignore=True):\n res = self._head(path_info.url)\n if res.status_code == 404:\n return False\n if bool(res):\n return True\n raise HTTPError(res.status_code, res.reason)\n\n def get_file_hash(self, path_info):\n url = path_info.url\n\n headers = self._head(url).headers\n\n etag = headers.get(\"ETag\") or headers.get(\"Content-MD5\")\n\n if not etag:\n raise DvcException(\n \"could not find an ETag or \"\n \"Content-MD5 header for '{url}'\".format(url=url)\n )\n\n return HashInfo(self.PARAM_CHECKSUM, etag)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_HTTPTree._download_HTTPTree._download.with_open_to_file_wb_.with_Tqdm_wrapattr_.for_chunk_in_response_ite.fd_wrapped_write_chunk_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_HTTPTree._download_HTTPTree._download.with_open_to_file_wb_.with_Tqdm_wrapattr_.for_chunk_in_response_ite.fd_wrapped_write_chunk_", "embedding": null, "metadata": {"file_path": "dvc/tree/http.py", "file_name": "http.py", "file_type": "text/x-python", "category": "implementation", "start_line": 161, "end_line": 177, "span_ids": ["HTTPTree._download"], "tokens": 159}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTTPTree(BaseTree):\n\n def _download(self, from_info, to_file, name=None, no_progress_bar=False):\n response = self.request(\"GET\", from_info.url, stream=True)\n if response.status_code != 200:\n raise HTTPError(response.status_code, response.reason)\n with open(to_file, \"wb\") as fd:\n with Tqdm.wrapattr(\n fd,\n \"write\",\n total=None\n if no_progress_bar\n else self._content_length(response),\n leave=False,\n desc=from_info.url if name is None else name,\n disable=no_progress_bar,\n ) as fd_wrapped:\n for chunk in response.iter_content(chunk_size=self.CHUNK_SIZE):\n fd_wrapped.write(chunk)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_HTTPTree._upload_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/http.py_HTTPTree._upload_", "embedding": null, "metadata": {"file_path": "dvc/tree/http.py", "file_name": "http.py", "file_type": "text/x-python", "category": "implementation", "start_line": 184, "end_line": 213, "span_ids": ["HTTPTree._content_length", "HTTPTree._upload"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HTTPTree(BaseTree):\n\n def _upload(\n self, from_file, to_info, name=None, no_progress_bar=False, **_kwargs\n ):\n def chunks():\n with open(from_file, \"rb\") as fd:\n with Tqdm.wrapattr(\n fd,\n \"read\",\n total=None\n if no_progress_bar\n else os.path.getsize(from_file),\n leave=False,\n desc=to_info.url if name is None else name,\n disable=no_progress_bar,\n ) as fd_wrapped:\n while True:\n chunk = fd_wrapped.read(self.CHUNK_SIZE)\n if not chunk:\n break\n yield chunk\n\n response = self.request(self.method, to_info.url, data=chunks())\n if response.status_code not in (200, 201):\n raise HTTPError(response.status_code, response.reason)\n\n @staticmethod\n def _content_length(response):\n res = response.headers.get(\"Content-Length\")\n return int(res) if res else None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/https.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/https.py__", "embedding": null, "metadata": {"file_path": "dvc/tree/https.py", "file_name": "https.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 8, "span_ids": ["imports", "HTTPSTree"], "tokens": 42}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.scheme import Schemes\n\nfrom .http import HTTPTree\n\n\nclass HTTPSTree(HTTPTree): # pylint:disable=abstract-method\n scheme = Schemes.HTTPS", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_errno_logger.logging_getLogger___name_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_errno_logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "dvc/tree/local.py", "file_name": "local.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 20, "span_ids": ["imports"], "tokens": 128}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import errno\nimport logging\nimport os\nimport stat\nfrom typing import Any, Dict\n\nfrom funcy import cached_property\nfrom shortuuid import uuid\n\nfrom dvc.exceptions import DvcException\nfrom dvc.hash_info import HashInfo\nfrom dvc.path_info import PathInfo\nfrom dvc.scheme import Schemes\nfrom dvc.system import System\nfrom dvc.utils import file_md5, is_exec, relpath, tmp_fname\nfrom dvc.utils.fs import copy_fobj_to_file, copyfile, makedirs, move, remove\n\nfrom .base import BaseTree\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree_LocalTree.iscopy.return.not_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree_LocalTree.iscopy.return.not_", "embedding": null, "metadata": {"file_path": "dvc/tree/local.py", "file_name": "local.py", "file_type": "text/x-python", "category": "implementation", "start_line": 23, "end_line": 96, "span_ids": ["LocalTree.dvcignore", "LocalTree.tree_root", "LocalTree.exists", "LocalTree.isfile", "LocalTree.__init__", "LocalTree.state", "LocalTree.open", "LocalTree.isdir", "LocalTree", "LocalTree.iscopy"], "tokens": 570}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LocalTree(BaseTree):\n scheme = Schemes.LOCAL\n PATH_CLS = PathInfo\n PARAM_CHECKSUM = \"md5\"\n PARAM_PATH = \"path\"\n TRAVERSE_PREFIX_LEN = 2\n\n CACHE_MODE = 0o444\n SHARED_MODE_MAP: Dict[Any, Any] = {\n None: (0o644, 0o755),\n \"group\": (0o664, 0o775),\n }\n\n def __init__(self, repo, config, use_dvcignore=False, dvcignore_root=None):\n super().__init__(repo, config)\n url = config.get(\"url\")\n self.path_info = self.PATH_CLS(url) if url else None\n self.use_dvcignore = use_dvcignore\n self.dvcignore_root = dvcignore_root\n\n @property\n def tree_root(self):\n return self.config.get(\"url\")\n\n @property\n def state(self):\n from dvc.state import StateNoop\n\n return self.repo.state if self.repo else StateNoop()\n\n @cached_property\n def dvcignore(self):\n from dvc.ignore import DvcIgnoreFilter, DvcIgnoreFilterNoop\n\n root = self.dvcignore_root or self.tree_root\n cls = DvcIgnoreFilter if self.use_dvcignore else DvcIgnoreFilterNoop\n return cls(self, root)\n\n @staticmethod\n def open(path_info, mode=\"r\", encoding=None):\n return open(path_info, mode=mode, encoding=encoding)\n\n def exists(self, path_info, use_dvcignore=True):\n assert isinstance(path_info, str) or path_info.scheme == \"local\"\n if self.repo:\n ret = os.path.lexists(path_info)\n else:\n ret = os.path.exists(path_info)\n if not ret:\n return False\n if not use_dvcignore:\n return True\n\n return not self.dvcignore.is_ignored_file(\n path_info\n ) and not self.dvcignore.is_ignored_dir(path_info)\n\n def isfile(self, path_info):\n if not os.path.isfile(path_info):\n return False\n\n return not self.dvcignore.is_ignored_file(path_info)\n\n def isdir(\n self, path_info, use_dvcignore=True\n ): # pylint: disable=arguments-differ\n if not os.path.isdir(path_info):\n return False\n return not (use_dvcignore and self.dvcignore.is_ignored_dir(path_info))\n\n def iscopy(self, path_info):\n return not (\n System.is_symlink(path_info) or System.is_hardlink(path_info)\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree.walk_LocalTree.walk.for_root_dirs_files_in_.yield_os_path_normpath_ro": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree.walk_LocalTree.walk.for_root_dirs_files_in_.yield_os_path_normpath_ro", "embedding": null, "metadata": {"file_path": "dvc/tree/local.py", "file_name": "local.py", "file_type": "text/x-python", "category": "implementation", "start_line": 102, "end_line": 126, "span_ids": ["LocalTree.walk"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LocalTree(BaseTree):\n\n def walk(\n self,\n top,\n topdown=True,\n onerror=None,\n use_dvcignore=True,\n ignore_subrepos=True,\n ):\n \"\"\"Directory tree generator.\n\n See `os.walk` for the docs. Differences:\n - no support for symlinks\n \"\"\"\n for root, dirs, files in os.walk(\n top, topdown=topdown, onerror=onerror\n ):\n if use_dvcignore:\n dirs[:], files[:] = self.dvcignore(\n os.path.abspath(root),\n dirs,\n files,\n ignore_subrepos=ignore_subrepos,\n )\n\n yield os.path.normpath(root), dirs, files", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree.walk_files_LocalTree.is_symlink.return.System_is_symlink_path_in": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree.walk_files_LocalTree.is_symlink.return.System_is_symlink_path_in", "embedding": null, "metadata": {"file_path": "dvc/tree/local.py", "file_name": "local.py", "file_type": "text/x-python", "category": "implementation", "start_line": 124, "end_line": 203, "span_ids": ["LocalTree.copy_fobj", "LocalTree.walk_files", "LocalTree.set_exec", "LocalTree.is_symlink", "LocalTree.symlink", "LocalTree.isexec", "LocalTree.makedirs", "LocalTree.is_empty", "LocalTree.move", "LocalTree.copy", "LocalTree.stat", "LocalTree.remove"], "tokens": 549}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LocalTree(BaseTree):\n\n def walk_files(self, path_info, **kwargs):\n for root, _, files in self.walk(path_info):\n for file in files:\n # NOTE: os.path.join is ~5.5 times slower\n yield PathInfo(f\"{root}{os.sep}{file}\")\n\n def is_empty(self, path_info):\n if self.isfile(path_info) and os.path.getsize(path_info) == 0:\n return True\n\n if self.isdir(path_info) and len(os.listdir(path_info)) == 0:\n return True\n\n return False\n\n def remove(self, path_info):\n if isinstance(path_info, PathInfo):\n if path_info.scheme != \"local\":\n raise NotImplementedError\n remove(path_info)\n\n def makedirs(self, path_info):\n makedirs(path_info, exist_ok=True, mode=self.dir_mode)\n\n def set_exec(self, path_info):\n mode = self.stat(path_info).st_mode\n self.chmod(path_info, mode | stat.S_IEXEC)\n\n def isexec(self, path_info):\n mode = self.stat(path_info).st_mode\n return is_exec(mode)\n\n def stat(self, path):\n if self.dvcignore.is_ignored(path):\n raise FileNotFoundError\n\n return os.stat(path)\n\n def move(self, from_info, to_info, mode=None):\n if from_info.scheme != \"local\" or to_info.scheme != \"local\":\n raise NotImplementedError\n\n self.makedirs(to_info.parent)\n\n if mode is None:\n if self.isfile(from_info):\n mode = self.file_mode\n else:\n mode = self.dir_mode\n\n move(from_info, to_info, mode=mode)\n\n def copy(self, from_info, to_info):\n tmp_info = to_info.parent / tmp_fname(to_info.name)\n try:\n System.copy(from_info, tmp_info)\n os.chmod(tmp_info, self.file_mode)\n os.rename(tmp_info, to_info)\n except Exception:\n self.remove(tmp_info)\n raise\n\n def copy_fobj(self, fobj, to_info):\n self.makedirs(to_info.parent)\n tmp_info = to_info.parent / tmp_fname(to_info.name)\n try:\n copy_fobj_to_file(fobj, tmp_info)\n os.chmod(tmp_info, self.file_mode)\n os.rename(tmp_info, to_info)\n except Exception:\n self.remove(tmp_info)\n raise\n\n @staticmethod\n def symlink(from_info, to_info):\n System.symlink(from_info, to_info)\n\n @staticmethod\n def is_symlink(path_info):\n return System.is_symlink(path_info)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree.hardlink_LocalTree.hardlink.System_hardlink_from_info": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree.hardlink_LocalTree.hardlink.System_hardlink_from_info", "embedding": null, "metadata": {"file_path": "dvc/tree/local.py", "file_name": "local.py", "file_type": "text/x-python", "category": "implementation", "start_line": 205, "end_line": 225, "span_ids": ["LocalTree.hardlink"], "tokens": 260}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LocalTree(BaseTree):\n\n def hardlink(self, from_info, to_info):\n # If there are a lot of empty files (which happens a lot in datasets),\n # and the cache type is `hardlink`, we might reach link limits and\n # will get something like: `too many links error`\n #\n # This is because all those empty files will have the same hash\n # (i.e. 68b329da9893e34099c7d8ad5cb9c940), therefore, they will be\n # linked to the same file in the cache.\n #\n # From https://en.wikipedia.org/wiki/Hard_link\n # * ext4 limits the number of hard links on a file to 65,000\n # * Windows with NTFS has a limit of 1024 hard links on a file\n #\n # That's why we simply create an empty file rather than a link.\n if self.getsize(from_info) == 0:\n self.open(to_info, \"w\").close()\n\n logger.debug(\"Created empty file: %s -> %s\", from_info, to_info)\n return\n\n System.hardlink(from_info, to_info)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/oss.py_logging_OSSTree.__init__.self.key_secret._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/oss.py_logging_OSSTree.__init__.self.key_secret._", "embedding": null, "metadata": {"file_path": "dvc/tree/oss.py", "file_name": "oss.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 60, "span_ids": ["imports", "OSSTree", "OSSTree.__init__"], "tokens": 394}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nimport threading\n\nfrom funcy import cached_property, wrap_prop\n\nfrom dvc.path_info import CloudURLInfo\nfrom dvc.progress import Tqdm\nfrom dvc.scheme import Schemes\n\nfrom .base import BaseTree\n\nlogger = logging.getLogger(__name__)\n\n\nclass OSSTree(BaseTree): # pylint:disable=abstract-method\n \"\"\"\n oss2 document:\n https://www.alibabacloud.com/help/doc-detail/32026.htm\n\n\n Examples\n ----------\n $ dvc remote add myremote oss://my-bucket/path\n Set key id, key secret and endpoint using modify command\n $ dvc remote modify myremote oss_key_id my-key-id\n $ dvc remote modify myremote oss_key_secret my-key-secret\n $ dvc remote modify myremote oss_endpoint endpoint\n or environment variables\n $ export OSS_ACCESS_KEY_ID=\"my-key-id\"\n $ export OSS_ACCESS_KEY_SECRET=\"my-key-secret\"\n $ export OSS_ENDPOINT=\"endpoint\"\n \"\"\"\n\n scheme = Schemes.OSS\n PATH_CLS = CloudURLInfo\n REQUIRES = {\"oss2\": \"oss2\"}\n PARAM_CHECKSUM = \"etag\"\n COPY_POLL_SECONDS = 5\n LIST_OBJECT_PAGE_SIZE = 100\n\n def __init__(self, repo, config):\n super().__init__(repo, config)\n\n url = config.get(\"url\")\n self.path_info = self.PATH_CLS(url) if url else None\n\n self.endpoint = config.get(\"oss_endpoint\") or os.getenv(\"OSS_ENDPOINT\")\n\n self.key_id = (\n config.get(\"oss_key_id\")\n or os.getenv(\"OSS_ACCESS_KEY_ID\")\n or \"defaultId\"\n )\n\n self.key_secret = (\n config.get(\"oss_key_secret\")\n or os.getenv(\"OSS_ACCESS_KEY_SECRET\")\n or \"defaultSecret\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/oss.py_OSSTree.oss_service_OSSTree.oss_service.return.bucket": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/oss.py_OSSTree.oss_service_OSSTree.oss_service.return.bucket", "embedding": null, "metadata": {"file_path": "dvc/tree/oss.py", "file_name": "oss.py", "file_type": "text/x-python", "category": "implementation", "start_line": 62, "end_line": 84, "span_ids": ["OSSTree.oss_service"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class OSSTree(BaseTree):\n\n @wrap_prop(threading.Lock())\n @cached_property\n def oss_service(self):\n import oss2\n\n logger.debug(f\"URL: {self.path_info}\")\n logger.debug(f\"key id: {self.key_id}\")\n logger.debug(f\"key secret: {self.key_secret}\")\n\n auth = oss2.Auth(self.key_id, self.key_secret)\n bucket = oss2.Bucket(auth, self.endpoint, self.path_info.bucket)\n\n # Ensure bucket exists\n try:\n bucket.get_bucket_info()\n except oss2.exceptions.NoSuchBucket:\n bucket.create_bucket(\n oss2.BUCKET_ACL_PUBLIC_READ,\n oss2.models.BucketCreateConfig(\n oss2.BUCKET_STORAGE_CLASS_STANDARD\n ),\n )\n return bucket", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/oss.py_OSSTree._generate_download_url_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/oss.py_OSSTree._generate_download_url_", "embedding": null, "metadata": {"file_path": "dvc/tree/oss.py", "file_name": "oss.py", "file_type": "text/x-python", "category": "implementation", "start_line": 86, "end_line": 139, "span_ids": ["OSSTree.exists", "OSSTree._upload", "OSSTree._download", "OSSTree.remove", "OSSTree.walk_files", "OSSTree._generate_download_url", "OSSTree._list_paths"], "tokens": 393}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class OSSTree(BaseTree):\n\n def _generate_download_url(self, path_info, expires=3600):\n assert path_info.bucket == self.path_info.bucket\n\n return self.oss_service.sign_url(\"GET\", path_info.path, expires)\n\n def exists(self, path_info, use_dvcignore=True):\n paths = self._list_paths(path_info)\n return any(path_info.path == path for path in paths)\n\n def _list_paths(self, path_info):\n import oss2\n\n for blob in oss2.ObjectIterator(\n self.oss_service, prefix=path_info.path\n ):\n yield blob.key\n\n def walk_files(self, path_info, **kwargs):\n if not kwargs.pop(\"prefix\", False):\n path_info = path_info / \"\"\n for fname in self._list_paths(path_info):\n if fname.endswith(\"/\"):\n continue\n\n yield path_info.replace(path=fname)\n\n def remove(self, path_info):\n if path_info.scheme != self.scheme:\n raise NotImplementedError\n\n logger.debug(f\"Removing oss://{path_info}\")\n self.oss_service.delete_object(path_info.path)\n\n def _upload(\n self, from_file, to_info, name=None, no_progress_bar=False, **_kwargs\n ):\n with Tqdm(desc=name, disable=no_progress_bar, bytes=True) as pbar:\n self.oss_service.put_object_from_file(\n to_info.path, from_file, progress_callback=pbar.update_to\n )\n\n def _download(\n self, from_info, to_file, name=None, no_progress_bar=False, **_kwargs\n ):\n with Tqdm(desc=name, disable=no_progress_bar, bytes=True) as pbar:\n import oss2\n\n oss2.resumable_download(\n self.oss_service,\n from_info.path,\n to_file,\n progress_callback=pbar.update_to,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/pool.py_threading_close_pools.get_pool_memory_clear_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/pool.py_threading_close_pools.get_pool_memory_clear_", "embedding": null, "metadata": {"file_path": "dvc/tree/pool.py", "file_name": "pool.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 30, "span_ids": ["close_pools", "imports", "get_connection", "get_pool"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import threading\nfrom collections import deque\nfrom contextlib import contextmanager\n\nfrom funcy import memoize, wrap_with\n\n\n@contextmanager\ndef get_connection(conn_func, *args, **kwargs):\n pool = get_pool(conn_func, *args, **kwargs)\n conn = pool.get_connection()\n try:\n yield conn\n except Exception:\n conn.close()\n raise\n else:\n pool.release(conn)\n\n\n@wrap_with(threading.Lock())\n@memoize\ndef get_pool(conn_func, *args, **kwargs):\n return Pool(conn_func, *args, **kwargs)\n\n\ndef close_pools():\n for pool in get_pool.memory.values():\n pool.close()\n get_pool.memory.clear()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/pool.py_Pool_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/pool.py_Pool_", "embedding": null, "metadata": {"file_path": "dvc/tree/pool.py", "file_name": "pool.py", "file_type": "text/x-python", "category": "implementation", "start_line": 33, "end_line": 60, "span_ids": ["Pool.release", "Pool.get_connection", "Pool", "Pool.close", "Pool.__del__", "Pool.__init__"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Pool:\n def __init__(self, conn_func, *conn_args, **conn_kwargs):\n self._conn_func = conn_func\n self._conn_args = conn_args\n self._conn_kwargs = conn_kwargs\n self._conns = deque()\n self._closed = False\n\n def __del__(self):\n self.close()\n\n def close(self):\n while self._conns:\n self._conns.pop().close()\n self._closed = True\n\n def get_connection(self):\n try:\n return self._conns.popleft()\n except IndexError:\n return self._conn_func(*self._conn_args, **self._conn_kwargs)\n\n def release(self, conn):\n if self._closed:\n conn.close()\n else:\n self._conns.append(conn)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree_RepoTree.__init__.if_hasattr_repo_dvc_dir.self__dvctrees_repo_root_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree_RepoTree.__init__.if_hasattr_repo_dvc_dir.self__dvctrees_repo_root_", "embedding": null, "metadata": {"file_path": "dvc/tree/repo.py", "file_name": "repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 30, "end_line": 70, "span_ids": ["RepoTree.__init__", "RepoTree"], "tokens": 308}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RepoTree(BaseTree): # pylint:disable=abstract-method\n \"\"\"DVC + git-tracked files tree.\n\n Args:\n repo: DVC or git repo.\n subrepos: traverse to subrepos (by default, it ignores subrepos)\n repo_factory: A function to initialize subrepo with, default is Repo.\n kwargs: Additional keyword arguments passed to the `DvcTree()`.\n \"\"\"\n\n scheme = \"local\"\n PARAM_CHECKSUM = \"md5\"\n\n def __init__(\n self, repo, subrepos=False, repo_factory: RepoFactory = None, **kwargs\n ):\n super().__init__(repo, {\"url\": repo.root_dir})\n\n if not repo_factory:\n from dvc.repo import Repo\n\n self.repo_factory: RepoFactory = Repo\n else:\n self.repo_factory = repo_factory\n\n self._main_repo = repo\n self.root_dir = repo.root_dir\n self._traverse_subrepos = subrepos\n\n self._subrepos_trie = PathStringTrie()\n \"\"\"Keeps track of each and every path with the corresponding repo.\"\"\"\n\n self._subrepos_trie[self.root_dir] = repo\n\n self._dvctrees = {}\n \"\"\"Keep a dvctree instance of each repo.\"\"\"\n\n self._dvctree_configs = kwargs\n\n if hasattr(repo, \"dvc_dir\"):\n self._dvctrees[repo.root_dir] = DvcTree(repo, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree._get_repo_RepoTree._get_repo.return.self__subrepos_trie_get_p": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree._get_repo_RepoTree._get_repo.return.self__subrepos_trie_get_p", "embedding": null, "metadata": {"file_path": "dvc/tree/repo.py", "file_name": "repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 78, "end_line": 98, "span_ids": ["RepoTree._get_repo"], "tokens": 186}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RepoTree(BaseTree):\n\n def _get_repo(self, path) -> Optional[\"Repo\"]:\n \"\"\"Returns repo that the path falls in, using prefix.\n\n If the path is already tracked/collected, it just returns the repo.\n\n Otherwise, it collects the repos that might be in the path's parents\n and then returns the appropriate one.\n \"\"\"\n repo = self._subrepos_trie.get(path)\n if repo:\n return repo\n\n prefix, repo = self._subrepos_trie.longest_prefix(path)\n if not prefix:\n return None\n\n parents = (parent.fspath for parent in PathInfo(path).parents)\n dirs = [path] + list(takewhile(lambda p: p != prefix, parents))\n dirs.reverse()\n self._update(dirs, starting_repo=repo)\n return self._subrepos_trie.get(path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree._update_RepoTree._is_dvc_repo.return.self__main_repo_tree_isdi": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree._update_RepoTree._is_dvc_repo.return.self__main_repo_tree_isdi", "embedding": null, "metadata": {"file_path": "dvc/tree/repo.py", "file_name": "repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 100, "end_line": 121, "span_ids": ["RepoTree._is_dvc_repo", "RepoTree._update"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RepoTree(BaseTree):\n\n @wrap_with(threading.Lock())\n def _update(self, dirs, starting_repo):\n \"\"\"Checks for subrepo in directories and updates them.\"\"\"\n repo = starting_repo\n for d in dirs:\n if self._is_dvc_repo(d):\n repo = self.repo_factory(d)\n self._dvctrees[repo.root_dir] = DvcTree(\n repo, **self._dvctree_configs\n )\n self._subrepos_trie[d] = repo\n\n def _is_dvc_repo(self, dir_path):\n \"\"\"Check if the directory is a dvc repo.\"\"\"\n if not self._traverse_subrepos:\n return False\n\n from dvc.repo import Repo\n\n repo_path = os.path.join(dir_path, Repo.DVC_DIR)\n # dvcignore will ignore subrepos, therefore using `use_dvcignore=False`\n return self._main_repo.tree.isdir(repo_path, use_dvcignore=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree._get_tree_pair_RepoTree._get_tree_pair.return.repo_tree_dvc_tree": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree._get_tree_pair_RepoTree._get_tree_pair.return.repo_tree_dvc_tree", "embedding": null, "metadata": {"file_path": "dvc/tree/repo.py", "file_name": "repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 117, "end_line": 128, "span_ids": ["RepoTree._get_tree_pair"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RepoTree(BaseTree):\n\n def _get_tree_pair(self, path) -> Tuple[BaseTree, Optional[DvcTree]]:\n \"\"\"\n Returns a pair of trees based on repo the path falls in, using prefix.\n \"\"\"\n path = os.path.abspath(path)\n\n # fallback to the top-level repo if repo was not found\n # this can happen if the path is outside of the repo\n repo = self._get_repo(path) or self._main_repo\n\n dvc_tree = self._dvctrees.get(repo.root_dir)\n return repo.tree, dvc_tree", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.fetch_RepoTree.open.return.dvc_tree_open_path_info_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.fetch_RepoTree.open.return.dvc_tree_open_path_info_", "embedding": null, "metadata": {"file_path": "dvc/tree/repo.py", "file_name": "repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 138, "end_line": 160, "span_ids": ["RepoTree.fetch", "RepoTree.open", "RepoTree.stream"], "tokens": 171}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RepoTree(BaseTree):\n\n @property\n def fetch(self):\n return \"fetch\" in self._dvctree_configs\n\n @property\n def stream(self):\n return \"stream\" in self._dvctree_configs\n\n def open(\n self, path, mode=\"r\", encoding=\"utf-8\", **kwargs\n ): # pylint: disable=arguments-differ\n if \"b\" in mode:\n encoding = None\n\n tree, dvc_tree = self._get_tree_pair(path)\n path_info = PathInfo(path)\n try:\n return tree.open(path_info, mode=mode, encoding=encoding)\n except FileNotFoundError:\n if not dvc_tree:\n raise\n\n return dvc_tree.open(path_info, mode=mode, encoding=encoding, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.exists_RepoTree.isdir.return.meta_isdir": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.exists_RepoTree.isdir.return.meta_isdir", "embedding": null, "metadata": {"file_path": "dvc/tree/repo.py", "file_name": "repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 162, "end_line": 206, "span_ids": ["RepoTree.exists", "RepoTree.isdir"], "tokens": 266}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RepoTree(BaseTree):\n\n def exists(\n self, path, use_dvcignore=True\n ): # pylint: disable=arguments-differ\n tree, dvc_tree = self._get_tree_pair(path)\n\n if not dvc_tree:\n return tree.exists(path)\n\n if tree.exists(path):\n return True\n\n try:\n meta = dvc_tree.metadata(path)\n except FileNotFoundError:\n return False\n\n (out,) = meta.outs\n assert len(meta.outs) == 1\n if tree.exists(out.path_info):\n return False\n return True\n\n def isdir(self, path): # pylint: disable=arguments-differ\n tree, dvc_tree = self._get_tree_pair(path)\n\n try:\n st = tree.stat(path)\n return stat.S_ISDIR(st.st_mode)\n except (OSError, ValueError):\n # from CPython's os.path.isdir()\n pass\n\n if not dvc_tree:\n return False\n\n try:\n meta = dvc_tree.metadata(path)\n except FileNotFoundError:\n return False\n\n (out,) = meta.outs\n assert len(meta.outs) == 1\n if tree.exists(out.path_info):\n return False\n return meta.isdir", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.isdvc_RepoTree.isfile.return.meta_isfile": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.isdvc_RepoTree.isfile.return.meta_isfile", "embedding": null, "metadata": {"file_path": "dvc/tree/repo.py", "file_name": "repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 208, "end_line": 234, "span_ids": ["RepoTree.isdvc", "RepoTree.isfile"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RepoTree(BaseTree):\n\n def isdvc(self, path, **kwargs):\n _, dvc_tree = self._get_tree_pair(path)\n return dvc_tree is not None and dvc_tree.isdvc(path, **kwargs)\n\n def isfile(self, path): # pylint: disable=arguments-differ\n tree, dvc_tree = self._get_tree_pair(path)\n\n try:\n st = tree.stat(path)\n return stat.S_ISREG(st.st_mode)\n except (OSError, ValueError):\n # from CPython's os.path.isfile()\n pass\n\n if not dvc_tree:\n return False\n\n try:\n meta = dvc_tree.metadata(path)\n except FileNotFoundError:\n return False\n\n (out,) = meta.outs\n assert len(meta.outs) == 1\n if tree.exists(out.path_info):\n return False\n return meta.isfile", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.isexec_RepoTree._dvc_walk.for___in_dirs_.yield_from_self__dvc_walk": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.isexec_RepoTree._dvc_walk.for___in_dirs_.yield_from_self__dvc_walk", "embedding": null, "metadata": {"file_path": "dvc/tree/repo.py", "file_name": "repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 228, "end_line": 245, "span_ids": ["RepoTree.isexec", "RepoTree.stat", "RepoTree._dvc_walk"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RepoTree(BaseTree):\n\n def isexec(self, path_info):\n tree, dvc_tree = self._get_tree_pair(path_info)\n if dvc_tree and dvc_tree.exists(path_info):\n return dvc_tree.isexec(path_info)\n return tree.isexec(path_info)\n\n def stat(self, path):\n tree, _ = self._get_tree_pair(path)\n return tree.stat(path)\n\n def _dvc_walk(self, walk):\n try:\n root, dirs, files = next(walk)\n except StopIteration:\n return\n yield root, dirs, files\n for _ in dirs:\n yield from self._dvc_walk(walk)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree._subrepo_walk_RepoTree._subrepo_walk.yield_from_self__walk_tre": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree._subrepo_walk_RepoTree._subrepo_walk.yield_from_self__walk_tre", "embedding": null, "metadata": {"file_path": "dvc/tree/repo.py", "file_name": "repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 255, "end_line": 269, "span_ids": ["RepoTree._subrepo_walk"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RepoTree(BaseTree):\n\n def _subrepo_walk(self, dir_path, **kwargs):\n \"\"\"Walk into a new repo.\n\n NOTE: subrepo will only be discovered when walking if\n ignore_subrepos is set to False.\n \"\"\"\n tree, dvc_tree = self._get_tree_pair(dir_path)\n tree_walk = tree.walk(\n dir_path, topdown=True, ignore_subrepos=not self._traverse_subrepos\n )\n if dvc_tree:\n dvc_walk = dvc_tree.walk(dir_path, topdown=True, **kwargs)\n else:\n dvc_walk = None\n yield from self._walk(tree_walk, dvc_walk, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree._walk_RepoTree._walk.for_dirname_in_dirs_.if_dirname_in_subrepos_.elif_dirname_in_repo_set_.yield_from_self__walk_rep": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree._walk_RepoTree._walk.for_dirname_in_dirs_.if_dirname_in_subrepos_.elif_dirname_in_repo_set_.yield_from_self__walk_rep", "embedding": null, "metadata": {"file_path": "dvc/tree/repo.py", "file_name": "repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 271, "end_line": 317, "span_ids": ["RepoTree._walk"], "tokens": 456}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RepoTree(BaseTree):\n\n def _walk(self, repo_walk, dvc_walk=None, dvcfiles=False):\n assert repo_walk\n try:\n _, dvc_dirs, dvc_fnames = (\n next(dvc_walk) if dvc_walk else (None, [], [])\n )\n repo_root, repo_dirs, repo_fnames = next(repo_walk)\n except StopIteration:\n return\n\n # separate subdirs into shared dirs, dvc-only dirs, repo-only dirs\n dvc_set = set(dvc_dirs)\n repo_set = set(repo_dirs)\n dvc_only = list(dvc_set - repo_set)\n repo_only = list(repo_set - dvc_set)\n shared = list(dvc_set & repo_set)\n dirs = shared + dvc_only + repo_only\n\n # merge file lists\n files = {\n fname\n for fname in dvc_fnames + repo_fnames\n if dvcfiles or not is_valid_filename(fname)\n }\n\n yield repo_root, dirs, list(files)\n\n def is_dvc_repo(d):\n return self._is_dvc_repo(os.path.join(repo_root, d))\n\n # remove subrepos to prevent it from being traversed\n subrepos = set(filter(is_dvc_repo, repo_only))\n # set dir order for next recursion level - shared dirs first so that\n # next() for both generators recurses into the same shared directory\n dvc_dirs[:] = [dirname for dirname in dirs if dirname in dvc_set]\n repo_dirs[:] = lfilter(lambda d: d in (repo_set - subrepos), dirs)\n\n for dirname in dirs:\n if dirname in subrepos:\n dir_path = os.path.join(repo_root, dirname)\n yield from self._subrepo_walk(dir_path, dvcfiles=dvcfiles)\n elif dirname in shared:\n yield from self._walk(repo_walk, dvc_walk, dvcfiles=dvcfiles)\n elif dirname in dvc_set:\n yield from self._dvc_walk(dvc_walk)\n elif dirname in repo_set:\n yield from self._walk(repo_walk, None, dvcfiles=dvcfiles)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.walk_RepoTree.walk.yield_from_self__walk_rep": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.walk_RepoTree.walk.yield_from_self__walk_rep", "embedding": null, "metadata": {"file_path": "dvc/tree/repo.py", "file_name": "repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 311, "end_line": 369, "span_ids": ["RepoTree.walk"], "tokens": 430}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RepoTree(BaseTree):\n\n def walk(\n self,\n top,\n topdown=True,\n onerror=None,\n dvcfiles=False,\n follow_subrepos=None,\n **kwargs\n ): # pylint: disable=arguments-differ\n \"\"\"Walk and merge both DVC and repo trees.\n\n Args:\n top: path to walk from\n topdown: if True, tree will be walked from top down.\n onerror: if set, onerror function will be called if an error\n occurs (by default errors are ignored).\n dvcfiles: if True, dvcfiles will be included in the files list\n for walked directories.\n\n Any kwargs will be passed into methods used for fetching and/or\n streaming DVC outs from remotes.\n \"\"\"\n assert topdown\n\n if not self.exists(top):\n if onerror is not None:\n onerror(FileNotFoundError(top))\n return\n\n if not self.isdir(top):\n if onerror is not None:\n onerror(NotADirectoryError(top))\n return\n\n ignore_subrepos = not self._traverse_subrepos\n if follow_subrepos is not None:\n ignore_subrepos = not follow_subrepos\n\n tree, dvc_tree = self._get_tree_pair(top)\n repo_exists = tree.exists(top)\n repo_walk = tree.walk(\n top,\n topdown=topdown,\n onerror=onerror,\n ignore_subrepos=ignore_subrepos,\n )\n\n if not dvc_tree or (repo_exists and dvc_tree.isdvc(top)):\n yield from self._walk(repo_walk, None, dvcfiles=dvcfiles)\n return\n\n if not repo_exists:\n yield from dvc_tree.walk(top, topdown=topdown, **kwargs)\n\n dvc_walk = None\n if dvc_tree.exists(top):\n dvc_walk = dvc_tree.walk(top, topdown=topdown, **kwargs)\n\n yield from self._walk(repo_walk, dvc_walk, dvcfiles=dvcfiles)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.walk_files_RepoTree.get_dir_hash.return.dvc_tree_get_dir_hash_pat": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.walk_files_RepoTree.get_dir_hash.return.dvc_tree_get_dir_hash_pat", "embedding": null, "metadata": {"file_path": "dvc/tree/repo.py", "file_name": "repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 371, "end_line": 386, "span_ids": ["RepoTree.get_dir_hash", "RepoTree.walk_files"], "tokens": 160}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RepoTree(BaseTree):\n\n def walk_files(self, top, **kwargs): # pylint: disable=arguments-differ\n for root, _, files in self.walk(top, **kwargs):\n for fname in files:\n yield PathInfo(root) / fname\n\n def get_dir_hash(\n self, path_info, follow_subrepos=None, **kwargs\n ): # pylint: disable=arguments-differ\n tree, dvc_tree = self._get_tree_pair(path_info)\n if tree.exists(path_info):\n return super().get_dir_hash(\n path_info, follow_subrepos=follow_subrepos, **kwargs\n )\n if not dvc_tree:\n raise FileNotFoundError\n return dvc_tree.get_dir_hash(path_info, **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.get_file_hash_RepoTree.get_file_hash.return.HashInfo_self_PARAM_CHECK": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.get_file_hash_RepoTree.get_file_hash.return.HashInfo_self_PARAM_CHECK", "embedding": null, "metadata": {"file_path": "dvc/tree/repo.py", "file_name": "repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 382, "end_line": 397, "span_ids": ["RepoTree.get_file_hash"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RepoTree(BaseTree):\n\n def get_file_hash(self, path_info):\n \"\"\"Return file checksum for specified path.\n\n If path_info is a DVC out, the pre-computed checksum for the file\n will be used. If path_info is a git file, MD5 will be computed for\n the git object.\n \"\"\"\n if not self.exists(path_info):\n raise FileNotFoundError\n _, dvc_tree = self._get_tree_pair(path_info)\n if dvc_tree and dvc_tree.exists(path_info):\n try:\n return dvc_tree.get_file_hash(path_info)\n except FileNotFoundError:\n pass\n return HashInfo(self.PARAM_CHECKSUM, file_md5(path_info, self)[0])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.copytree_RepoTree.hash_jobs.return.self__main_repo_tree_hash": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.copytree_RepoTree.hash_jobs.return.self__main_repo_tree_hash", "embedding": null, "metadata": {"file_path": "dvc/tree/repo.py", "file_name": "repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 399, "end_line": 423, "span_ids": ["RepoTree.hash_jobs", "RepoTree.copytree"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RepoTree(BaseTree):\n\n def copytree(self, top, dest):\n top = PathInfo(top)\n dest = PathInfo(dest)\n\n if not self.exists(top):\n raise FileNotFoundError\n\n if self.isfile(top):\n makedirs(dest.parent, exist_ok=True)\n with self.open(top, mode=\"rb\") as fobj:\n copy_fobj_to_file(fobj, dest)\n return\n\n for root, _, files in self.walk(top):\n root = PathInfo(root)\n dest_dir = dest / root.relative_to(top)\n makedirs(dest_dir, exist_ok=True)\n for fname in files:\n src = root / fname\n with self.open(src, mode=\"rb\") as fobj:\n copy_fobj_to_file(fobj, dest_dir / fname)\n\n @property\n def hash_jobs(self): # pylint: disable=invalid-overridden-method\n return self._main_repo.tree.hash_jobs", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.metadata_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_RepoTree.metadata_", "embedding": null, "metadata": {"file_path": "dvc/tree/repo.py", "file_name": "repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 425, "end_line": 453, "span_ids": ["RepoTree.metadata"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RepoTree(BaseTree):\n\n def metadata(self, path):\n abspath = os.path.abspath(path)\n path_info = PathInfo(abspath)\n tree, dvc_tree = self._get_tree_pair(path_info)\n\n dvc_meta = None\n if dvc_tree:\n with suppress(FileNotFoundError):\n dvc_meta = dvc_tree.metadata(path_info)\n\n stat_result = None\n with suppress(FileNotFoundError):\n stat_result = tree.stat(path_info)\n\n if not stat_result and not dvc_meta:\n raise FileNotFoundError\n\n meta = dvc_meta or Metadata(\n path_info=path_info,\n repo=self._get_repo(abspath) or self._main_repo,\n )\n\n isdir = bool(stat_result) and stat.S_ISDIR(stat_result.st_mode)\n meta.isdir = meta.isdir or isdir\n\n if not dvc_meta:\n meta.is_exec = bool(stat_result) and is_exec(stat_result.st_mode)\n return meta", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_logging_S3Tree.__init__.if_shared_creds_.os_environ_setdefault_AW": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_logging_S3Tree.__init__.if_shared_creds_.os_environ_setdefault_AW", "embedding": null, "metadata": {"file_path": "dvc/tree/s3.py", "file_name": "s3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 60, "span_ids": ["imports", "S3Tree.__init__", "S3Tree"], "tokens": 423}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nimport threading\nfrom contextlib import contextmanager\n\nfrom funcy import cached_property, wrap_prop\n\nfrom dvc.config import ConfigError\nfrom dvc.exceptions import DvcException, ETagMismatchError\nfrom dvc.hash_info import HashInfo\nfrom dvc.path_info import CloudURLInfo\nfrom dvc.progress import Tqdm\nfrom dvc.scheme import Schemes\nfrom dvc.utils import error_link\n\nfrom .base import BaseTree\n\nlogger = logging.getLogger(__name__)\n\n\nclass S3Tree(BaseTree):\n scheme = Schemes.S3\n PATH_CLS = CloudURLInfo\n REQUIRES = {\"boto3\": \"boto3\"}\n PARAM_CHECKSUM = \"etag\"\n\n def __init__(self, repo, config):\n super().__init__(repo, config)\n\n url = config.get(\"url\", \"s3://\")\n self.path_info = self.PATH_CLS(url)\n\n self.region = config.get(\"region\")\n self.profile = config.get(\"profile\")\n self.endpoint_url = config.get(\"endpointurl\")\n\n self.use_ssl = config.get(\"use_ssl\", True)\n\n self.extra_args = {}\n\n self.sse = config.get(\"sse\")\n if self.sse:\n self.extra_args[\"ServerSideEncryption\"] = self.sse\n\n self.sse_kms_key_id = config.get(\"sse_kms_key_id\")\n if self.sse_kms_key_id:\n self.extra_args[\"SSEKMSKeyId\"] = self.sse_kms_key_id\n\n self.acl = config.get(\"acl\")\n if self.acl:\n self.extra_args[\"ACL\"] = self.acl\n\n self._append_aws_grants_to_extra_args(config)\n\n self.access_key_id = config.get(\"access_key_id\")\n self.secret_access_key = config.get(\"secret_access_key\")\n\n shared_creds = config.get(\"credentialpath\")\n if shared_creds:\n os.environ.setdefault(\"AWS_SHARED_CREDENTIALS_FILE\", shared_creds)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree.s3_S3Tree.s3.return.session_resource_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree.s3_S3Tree.s3.return.session_resource_", "embedding": null, "metadata": {"file_path": "dvc/tree/s3.py", "file_name": "s3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 62, "end_line": 81, "span_ids": ["S3Tree.s3"], "tokens": 133}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class S3Tree(BaseTree):\n\n @wrap_prop(threading.Lock())\n @cached_property\n def s3(self):\n import boto3\n\n session_opts = {\n \"profile_name\": self.profile,\n \"region_name\": self.region,\n }\n\n if self.access_key_id:\n session_opts[\"aws_access_key_id\"] = self.access_key_id\n if self.secret_access_key:\n session_opts[\"aws_secret_access_key\"] = self.secret_access_key\n\n session = boto3.session.Session(**session_opts)\n\n return session.resource(\n \"s3\", endpoint_url=self.endpoint_url, use_ssl=self.use_ssl\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree._get_s3_S3Tree._get_s3.try_.except_EndpointConnection.raise_DvcException_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree._get_s3_S3Tree._get_s3.try_.except_EndpointConnection.raise_DvcException_", "embedding": null, "metadata": {"file_path": "dvc/tree/s3.py", "file_name": "s3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 80, "end_line": 99, "span_ids": ["S3Tree._get_s3"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class S3Tree(BaseTree):\n\n @contextmanager\n def _get_s3(self):\n from botocore.exceptions import (\n EndpointConnectionError,\n NoCredentialsError,\n )\n\n try:\n yield self.s3\n except NoCredentialsError as exc:\n link = error_link(\"no-credentials\")\n raise DvcException(\n f\"Unable to find AWS credentials. {link}\"\n ) from exc\n except EndpointConnectionError as exc:\n link = error_link(\"connection-error\")\n name = self.endpoint_url or \"AWS S3\"\n raise DvcException(\n f\"Unable to connect to '{name}'. {link}\"\n ) from exc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree._get_bucket_S3Tree._get_obj.with_self__get_bucket_pat.try_.except_bucket_meta_client.raise_DvcException_f_pat": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree._get_bucket_S3Tree._get_obj.with_self__get_bucket_pat.try_.except_bucket_meta_client.raise_DvcException_f_pat", "embedding": null, "metadata": {"file_path": "dvc/tree/s3.py", "file_name": "s3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 101, "end_line": 118, "span_ids": ["S3Tree._get_obj", "S3Tree._get_bucket"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class S3Tree(BaseTree):\n\n @contextmanager\n def _get_bucket(self, bucket):\n with self._get_s3() as s3:\n try:\n yield s3.Bucket(bucket)\n except s3.meta.client.exceptions.NoSuchBucket as exc:\n link = error_link(\"no-bucket\")\n raise DvcException(\n f\"Bucket '{bucket}' does not exist. {link}\"\n ) from exc\n\n @contextmanager\n def _get_obj(self, path_info):\n with self._get_bucket(path_info.bucket) as bucket:\n try:\n yield bucket.Object(path_info.path)\n except bucket.meta.client.exceptions.NoSuchKey as exc:\n raise DvcException(f\"{path_info.url} does not exist\") from exc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree._append_aws_grants_to_extra_args_S3Tree._append_aws_grants_to_extra_args.for_grant_option_extra_a.if_config_get_grant_optio.self_extra_args_extra_arg": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree._append_aws_grants_to_extra_args_S3Tree._append_aws_grants_to_extra_args.for_grant_option_extra_a.if_config_get_grant_optio.self_extra_args_extra_arg", "embedding": null, "metadata": {"file_path": "dvc/tree/s3.py", "file_name": "s3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 120, "end_line": 149, "span_ids": ["S3Tree._append_aws_grants_to_extra_args"], "tokens": 304}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class S3Tree(BaseTree):\n\n def _append_aws_grants_to_extra_args(self, config):\n # Keys for extra_args can be one of the following list:\n # https://boto3.amazonaws.com/v1/documentation/api/latest/reference/customizations/s3.html#boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS\n \"\"\"\n ALLOWED_UPLOAD_ARGS = [\n 'ACL', 'CacheControl', 'ContentDisposition', 'ContentEncoding',\n 'ContentLanguage', 'ContentType', 'Expires', 'GrantFullControl',\n 'GrantRead', 'GrantReadACP', 'GrantWriteACP', 'Metadata',\n 'RequestPayer', 'ServerSideEncryption', 'StorageClass',\n 'SSECustomerAlgorithm', 'SSECustomerKey', 'SSECustomerKeyMD5',\n 'SSEKMSKeyId', 'WebsiteRedirectLocation'\n ]\n \"\"\"\n\n grants = {\n \"grant_full_control\": \"GrantFullControl\",\n \"grant_read\": \"GrantRead\",\n \"grant_read_acp\": \"GrantReadACP\",\n \"grant_write_acp\": \"GrantWriteACP\",\n }\n\n for grant_option, extra_args_key in grants.items():\n if config.get(grant_option):\n if self.acl:\n raise ConfigError(\n \"`acl` and `grant_*` AWS S3 config options \"\n \"are mutually exclusive\"\n )\n\n self.extra_args[extra_args_key] = config.get(grant_option)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree._generate_download_url_S3Tree.exists.return.self_isfile_path_info_or": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree._generate_download_url_S3Tree.exists.return.self_isfile_path_info_or", "embedding": null, "metadata": {"file_path": "dvc/tree/s3.py", "file_name": "s3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 151, "end_line": 166, "span_ids": ["S3Tree._generate_download_url", "S3Tree.exists"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class S3Tree(BaseTree):\n\n def _generate_download_url(self, path_info, expires=3600):\n params = {\"Bucket\": path_info.bucket, \"Key\": path_info.path}\n with self._get_s3() as s3:\n return s3.meta.client.generate_presigned_url(\n ClientMethod=\"get_object\",\n Params=params,\n ExpiresIn=int(expires),\n )\n\n def exists(self, path_info, use_dvcignore=True):\n \"\"\"Check if the blob exists. If it does not exist,\n it could be a part of a directory path.\n\n eg: if `data/file.txt` exists, check for `data` should return True\n \"\"\"\n return self.isfile(path_info) or self.isdir(path_info)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree.isdir_S3Tree.isdir.return.bool_list_self__list_path": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree.isdir_S3Tree.isdir.return.bool_list_self__list_path", "embedding": null, "metadata": {"file_path": "dvc/tree/s3.py", "file_name": "s3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 168, "end_line": 190, "span_ids": ["S3Tree.isdir"], "tokens": 220}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class S3Tree(BaseTree):\n\n def isdir(self, path_info):\n # S3 doesn't have a concept for directories.\n #\n # Using `head_object` with a path pointing to a directory\n # will throw a 404 error.\n #\n # A reliable way to know if a given path is a directory is by\n # checking if there are more files sharing the same prefix\n # with a `list_objects` call.\n #\n # We need to make sure that the path ends with a forward slash,\n # since we can end with false-positives like the following example:\n #\n # bucket\n # \u2514\u2500\u2500 data\n # \u251c\u2500\u2500 alice\n # \u2514\u2500\u2500 alpha\n #\n # Using `data/al` as prefix will return `[data/alice, data/alpha]`,\n # While `data/al/` will return nothing.\n #\n dir_path = path_info / \"\"\n return bool(list(self._list_paths(dir_path, max_items=1)))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree.isfile_S3Tree.copy.with_self__get_s3_as_s3.self__copy_s3_meta_client": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree.isfile_S3Tree.copy.with_self__get_s3_as_s3.self__copy_s3_meta_client", "embedding": null, "metadata": {"file_path": "dvc/tree/s3.py", "file_name": "s3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 192, "end_line": 239, "span_ids": ["S3Tree.remove", "S3Tree.makedirs", "S3Tree._list_paths", "S3Tree.walk_files", "S3Tree.copy", "S3Tree.isfile"], "tokens": 362}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class S3Tree(BaseTree):\n\n def isfile(self, path_info):\n if path_info.path.endswith(\"/\"):\n return False\n\n return path_info.path in self._list_paths(path_info)\n\n def _list_paths(self, path_info, max_items=None):\n kwargs = {\"Prefix\": path_info.path}\n if max_items is not None:\n kwargs[\"MaxKeys\"] = max_items\n\n with self._get_bucket(path_info.bucket) as bucket:\n for obj_summary in bucket.objects.filter(**kwargs):\n yield obj_summary.key\n\n def walk_files(self, path_info, **kwargs):\n if not kwargs.pop(\"prefix\", False):\n path_info = path_info / \"\"\n for fname in self._list_paths(path_info, **kwargs):\n if fname.endswith(\"/\"):\n continue\n\n yield path_info.replace(path=fname)\n\n def remove(self, path_info):\n if path_info.scheme != \"s3\":\n raise NotImplementedError\n\n logger.debug(f\"Removing {path_info}\")\n with self._get_obj(path_info) as obj:\n obj.delete()\n\n def makedirs(self, path_info):\n # We need to support creating empty directories, which means\n # creating an object with an empty body and a trailing slash `/`.\n #\n # We are not creating directory objects for every parent prefix,\n # as it is not required.\n if not path_info.path:\n return\n\n dir_path = path_info / \"\"\n with self._get_obj(dir_path) as obj:\n obj.put(Body=\"\")\n\n def copy(self, from_info, to_info):\n with self._get_s3() as s3:\n self._copy(s3.meta.client, from_info, to_info, self.extra_args)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree._copy_multipart_S3Tree._copy_multipart.s3_complete_multipart_upl": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree._copy_multipart_S3Tree._copy_multipart.s3_complete_multipart_upl", "embedding": null, "metadata": {"file_path": "dvc/tree/s3.py", "file_name": "s3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 241, "end_line": 283, "span_ids": ["S3Tree._copy_multipart"], "tokens": 328}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class S3Tree(BaseTree):\n\n @classmethod\n def _copy_multipart(\n cls, s3, from_info, to_info, size, n_parts, extra_args\n ):\n mpu = s3.create_multipart_upload(\n Bucket=to_info.bucket, Key=to_info.path, **extra_args\n )\n mpu_id = mpu[\"UploadId\"]\n\n parts = []\n byte_position = 0\n for i in range(1, n_parts + 1):\n obj = s3.head_object(\n Bucket=from_info.bucket, Key=from_info.path, PartNumber=i\n )\n part_size = obj[\"ContentLength\"]\n lastbyte = byte_position + part_size - 1\n if lastbyte > size:\n lastbyte = size - 1\n\n srange = f\"bytes={byte_position}-{lastbyte}\"\n\n part = s3.upload_part_copy(\n Bucket=to_info.bucket,\n Key=to_info.path,\n PartNumber=i,\n UploadId=mpu_id,\n CopySourceRange=srange,\n CopySource={\"Bucket\": from_info.bucket, \"Key\": from_info.path},\n )\n parts.append(\n {\"PartNumber\": i, \"ETag\": part[\"CopyPartResult\"][\"ETag\"]}\n )\n byte_position += part_size\n\n assert n_parts == len(parts)\n\n s3.complete_multipart_upload(\n Bucket=to_info.bucket,\n Key=to_info.path,\n UploadId=mpu_id,\n MultipartUpload={\"Parts\": parts},\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree._copy_S3Tree._copy.if_etag_cached_etag_.raise_ETagMismatchError_e": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree._copy_S3Tree._copy.if_etag_cached_etag_.raise_ETagMismatchError_e", "embedding": null, "metadata": {"file_path": "dvc/tree/s3.py", "file_name": "s3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 285, "end_line": 332, "span_ids": ["S3Tree._copy"], "tokens": 553}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class S3Tree(BaseTree):\n\n @classmethod\n def _copy(cls, s3, from_info, to_info, extra_args):\n # NOTE: object's etag depends on the way it was uploaded to s3 or the\n # way it was copied within the s3. More specifically, it depends on\n # the chunk size that was used to transfer it, which would affect\n # whether an object would be uploaded as a single part or as a\n # multipart.\n #\n # If an object's etag looks like '8978c98bb5a48c2fb5f2c4c905768afa',\n # then it was transferred as a single part, which means that the chunk\n # size used to transfer it was greater or equal to the ContentLength\n # of that object. So to preserve that tag over the next transfer, we\n # could use any value >= ContentLength.\n #\n # If an object's etag looks like '50d67013a5e1a4070bef1fc8eea4d5f9-13',\n # then it was transferred as a multipart, which means that the chunk\n # size used to transfer it was less than ContentLength of that object.\n # Unfortunately, in general, it doesn't mean that the chunk size was\n # the same throughout the transfer, so it means that in order to\n # preserve etag, we need to transfer each part separately, so the\n # object is transfered in the same chunks as it was originally.\n from boto3.s3.transfer import TransferConfig\n\n obj = s3.head_object(Bucket=from_info.bucket, Key=from_info.path)\n etag = obj[\"ETag\"].strip('\"')\n size = obj[\"ContentLength\"]\n\n _, _, parts_suffix = etag.partition(\"-\")\n if parts_suffix:\n n_parts = int(parts_suffix)\n cls._copy_multipart(\n s3, from_info, to_info, size, n_parts, extra_args=extra_args\n )\n else:\n source = {\"Bucket\": from_info.bucket, \"Key\": from_info.path}\n s3.copy(\n source,\n to_info.bucket,\n to_info.path,\n ExtraArgs=extra_args,\n Config=TransferConfig(multipart_threshold=size + 1),\n )\n\n cached_etag = s3.head_object(Bucket=to_info.bucket, Key=to_info.path)[\n \"ETag\"\n ].strip('\"')\n if etag != cached_etag:\n raise ETagMismatchError(etag, cached_etag)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree.get_file_hash_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/s3.py_S3Tree.get_file_hash_", "embedding": null, "metadata": {"file_path": "dvc/tree/s3.py", "file_name": "s3.py", "file_type": "text/x-python", "category": "implementation", "start_line": 337, "end_line": 366, "span_ids": ["S3Tree.get_file_hash", "S3Tree._upload", "S3Tree._download"], "tokens": 231}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class S3Tree(BaseTree):\n\n def get_file_hash(self, path_info):\n with self._get_obj(path_info) as obj:\n return HashInfo(\n self.PARAM_CHECKSUM,\n obj.e_tag.strip('\"'),\n size=obj.content_length,\n )\n\n def _upload(\n self, from_file, to_info, name=None, no_progress_bar=False, **_kwargs\n ):\n with self._get_obj(to_info) as obj:\n total = os.path.getsize(from_file)\n with Tqdm(\n disable=no_progress_bar, total=total, bytes=True, desc=name\n ) as pbar:\n obj.upload_file(\n from_file, Callback=pbar.update, ExtraArgs=self.extra_args,\n )\n\n def _download(self, from_info, to_file, name=None, no_progress_bar=False):\n with self._get_obj(from_info) as obj:\n with Tqdm(\n disable=no_progress_bar,\n total=obj.content_length,\n bytes=True,\n desc=name,\n ) as pbar:\n obj.download_file(to_file, Callback=pbar.update)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/__init__.py_getpass_ask_password.return.prompt_password_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/__init__.py_getpass_ask_password.return.prompt_password_", "embedding": null, "metadata": {"file_path": "dvc/tree/ssh/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 29, "span_ids": ["imports", "ask_password"], "tokens": 160}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import getpass\nimport io\nimport logging\nimport os\nimport threading\nfrom contextlib import closing, contextmanager\nfrom urllib.parse import urlparse\n\nfrom funcy import first, memoize, silent, wrap_with\n\nimport dvc.prompt as prompt\nfrom dvc.hash_info import HashInfo\nfrom dvc.scheme import Schemes\n\nfrom ..base import BaseTree\nfrom ..pool import get_connection\n\nlogger = logging.getLogger(__name__)\n\n\n@wrap_with(threading.Lock())\n@memoize\ndef ask_password(host, user, port):\n return prompt.password(\n \"Enter a private key passphrase or a password for \"\n \"host '{host}' port '{port}' user '{user}'\".format(\n host=host, port=port, user=user\n )\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/__init__.py_SSHTree_SSHTree.ssh.return.get_connection_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/__init__.py_SSHTree_SSHTree.ssh.return.get_connection_", "embedding": null, "metadata": {"file_path": "dvc/tree/ssh/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 33, "end_line": 148, "span_ids": ["SSHTree._try_get_ssh_config_port", "SSHTree._try_get_ssh_config_keyfile", "SSHTree.__init__", "SSHTree", "SSHTree.ssh_config_filename", "SSHTree.ssh", "SSHTree.ensure_credentials", "SSHTree._load_user_ssh_config"], "tokens": 830}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SSHTree(BaseTree):\n scheme = Schemes.SSH\n REQUIRES = {\"paramiko\": \"paramiko\"}\n JOBS = 4\n\n PARAM_CHECKSUM = \"md5\"\n # At any given time some of the connections will go over network and\n # paramiko stuff, so we would ideally have it double of server processors.\n # We use conservative setting of 4 instead to not exhaust max sessions.\n CHECKSUM_JOBS = 4\n DEFAULT_CACHE_TYPES = [\"copy\"]\n TRAVERSE_PREFIX_LEN = 2\n\n DEFAULT_PORT = 22\n TIMEOUT = 1800\n\n def __init__(self, repo, config):\n super().__init__(repo, config)\n url = config.get(\"url\")\n if url:\n parsed = urlparse(url)\n user_ssh_config = self._load_user_ssh_config(parsed.hostname)\n\n host = user_ssh_config.get(\"hostname\", parsed.hostname)\n user = (\n config.get(\"user\")\n or parsed.username\n or user_ssh_config.get(\"user\")\n or getpass.getuser()\n )\n port = (\n config.get(\"port\")\n or parsed.port\n or self._try_get_ssh_config_port(user_ssh_config)\n or self.DEFAULT_PORT\n )\n self.path_info = self.PATH_CLS.from_parts(\n scheme=self.scheme,\n host=host,\n user=user,\n port=port,\n path=parsed.path,\n )\n else:\n self.path_info = None\n user_ssh_config = {}\n\n self.keyfile = config.get(\n \"keyfile\"\n ) or self._try_get_ssh_config_keyfile(user_ssh_config)\n self.timeout = config.get(\"timeout\", self.TIMEOUT)\n self.password = config.get(\"password\", None)\n self.ask_password = config.get(\"ask_password\", False)\n self.gss_auth = config.get(\"gss_auth\", False)\n proxy_command = user_ssh_config.get(\"proxycommand\", False)\n if proxy_command:\n import paramiko\n\n self.sock = paramiko.ProxyCommand(proxy_command)\n else:\n self.sock = None\n self.allow_agent = config.get(\"allow_agent\", True)\n\n @staticmethod\n def ssh_config_filename():\n return os.path.expanduser(os.path.join(\"~\", \".ssh\", \"config\"))\n\n @staticmethod\n def _load_user_ssh_config(hostname):\n import paramiko\n\n user_config_file = SSHTree.ssh_config_filename()\n user_ssh_config = {}\n if hostname and os.path.exists(user_config_file):\n ssh_config = paramiko.SSHConfig()\n with open(user_config_file) as f:\n # For whatever reason parsing directly from f is unreliable\n f_copy = io.StringIO(f.read())\n ssh_config.parse(f_copy)\n user_ssh_config = ssh_config.lookup(hostname)\n return user_ssh_config\n\n @staticmethod\n def _try_get_ssh_config_port(user_ssh_config):\n return silent(int)(user_ssh_config.get(\"port\"))\n\n @staticmethod\n def _try_get_ssh_config_keyfile(user_ssh_config):\n return first(user_ssh_config.get(\"identityfile\") or ())\n\n def ensure_credentials(self, path_info=None):\n if path_info is None:\n path_info = self.path_info\n\n # NOTE: we use the same password regardless of the server :(\n if self.ask_password and self.password is None:\n host, user, port = path_info.host, path_info.user, path_info.port\n self.password = ask_password(host, user, port)\n\n def ssh(self, path_info):\n self.ensure_credentials(path_info)\n\n from .connection import SSHConnection\n\n return get_connection(\n SSHConnection,\n path_info.host,\n username=path_info.user,\n port=path_info.port,\n key_filename=self.keyfile,\n timeout=self.timeout,\n password=self.password,\n gss_auth=self.gss_auth,\n sock=self.sock,\n allow_agent=self.allow_agent,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/__init__.py_SSHTree.open_SSHTree.symlink.with_self_ssh_from_info_.ssh_symlink_from_info_pat": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/__init__.py_SSHTree.open_SSHTree.symlink.with_self_ssh_from_info_.ssh_symlink_from_info_pat", "embedding": null, "metadata": {"file_path": "dvc/tree/ssh/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 150, "end_line": 210, "span_ids": ["SSHTree.makedirs", "SSHTree.move", "SSHTree.copy", "SSHTree.isfile", "SSHTree.remove", "SSHTree.open", "SSHTree.symlink", "SSHTree.exists", "SSHTree.walk_files", "SSHTree.isdir"], "tokens": 464}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SSHTree(BaseTree):\n\n @contextmanager\n def open(self, path_info, mode=\"r\", encoding=None):\n assert mode in {\"r\", \"rt\", \"rb\", \"wb\"}\n\n with self.ssh(path_info) as ssh, closing(\n ssh.sftp.open(path_info.path, mode)\n ) as fd:\n if \"b\" in mode:\n yield fd\n else:\n yield io.TextIOWrapper(fd, encoding=encoding)\n\n def exists(self, path_info, use_dvcignore=True):\n with self.ssh(path_info) as ssh:\n return ssh.exists(path_info.path)\n\n def isdir(self, path_info):\n with self.ssh(path_info) as ssh:\n return ssh.isdir(path_info.path)\n\n def isfile(self, path_info):\n with self.ssh(path_info) as ssh:\n return ssh.isfile(path_info.path)\n\n def walk_files(self, path_info, **kwargs):\n with self.ssh(path_info) as ssh:\n for fname in ssh.walk_files(path_info.path):\n yield path_info.replace(path=fname)\n\n def remove(self, path_info):\n if path_info.scheme != self.scheme:\n raise NotImplementedError\n\n with self.ssh(path_info) as ssh:\n ssh.remove(path_info.path)\n\n def makedirs(self, path_info):\n with self.ssh(path_info) as ssh:\n ssh.makedirs(path_info.path)\n\n def move(self, from_info, to_info, mode=None):\n assert mode is None\n if from_info.scheme != self.scheme or to_info.scheme != self.scheme:\n raise NotImplementedError\n\n with self.ssh(from_info) as ssh:\n ssh.move(from_info.path, to_info.path)\n\n def copy(self, from_info, to_info):\n if not from_info.scheme == to_info.scheme == self.scheme:\n raise NotImplementedError\n\n with self.ssh(from_info) as ssh:\n ssh.atomic_copy(from_info.path, to_info.path)\n\n def symlink(self, from_info, to_info):\n if not from_info.scheme == to_info.scheme == self.scheme:\n raise NotImplementedError\n\n with self.ssh(from_info) as ssh:\n ssh.symlink(from_info.path, to_info.path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/__init__.py_SSHTree.hardlink_SSHTree.hardlink.with_self_ssh_from_info_.ssh_hardlink_from_info_pa": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/__init__.py_SSHTree.hardlink_SSHTree.hardlink.with_self_ssh_from_info_.ssh_hardlink_from_info_pa", "embedding": null, "metadata": {"file_path": "dvc/tree/ssh/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 212, "end_line": 230, "span_ids": ["SSHTree.hardlink"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SSHTree(BaseTree):\n\n def hardlink(self, from_info, to_info):\n if not from_info.scheme == to_info.scheme == self.scheme:\n raise NotImplementedError\n\n # See dvc/remote/local/__init__.py - hardlink()\n if self.getsize(from_info) == 0:\n\n with self.ssh(to_info) as ssh:\n ssh.sftp.open(to_info.path, \"w\").close()\n\n logger.debug(\n \"Created empty file: {src} -> {dest}\".format(\n src=str(from_info), dest=str(to_info)\n )\n )\n return\n\n with self.ssh(from_info) as ssh:\n ssh.hardlink(from_info.path, to_info.path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/__init__.py_SSHTree.reflink_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/__init__.py_SSHTree.reflink_", "embedding": null, "metadata": {"file_path": "dvc/tree/ssh/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 231, "end_line": 273, "span_ids": ["SSHTree._upload", "SSHTree._download", "SSHTree.get_file_hash", "SSHTree.getsize", "SSHTree.reflink"], "tokens": 292}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SSHTree(BaseTree):\n\n def reflink(self, from_info, to_info):\n if from_info.scheme != self.scheme or to_info.scheme != self.scheme:\n raise NotImplementedError\n\n with self.ssh(from_info) as ssh:\n ssh.reflink(from_info.path, to_info.path)\n\n def get_file_hash(self, path_info):\n if path_info.scheme != self.scheme:\n raise NotImplementedError\n\n with self.ssh(path_info) as ssh:\n hash_info = HashInfo(self.PARAM_CHECKSUM, ssh.md5(path_info.path),)\n\n if hash_info:\n hash_info.size = ssh.getsize(path_info.path)\n\n return hash_info\n\n def getsize(self, path_info):\n with self.ssh(path_info) as ssh:\n return ssh.getsize(path_info.path)\n\n def _download(self, from_info, to_file, name=None, no_progress_bar=False):\n with self.ssh(from_info) as ssh:\n ssh.download(\n from_info.path,\n to_file,\n progress_title=name,\n no_progress_bar=no_progress_bar,\n )\n\n def _upload(\n self, from_file, to_info, name=None, no_progress_bar=False, **_kwargs\n ):\n with self.ssh(to_info) as ssh:\n ssh.upload(\n from_file,\n to_info.path,\n progress_title=name,\n no_progress_bar=no_progress_bar,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_errno_sizeof_fmt.return._1f_format_num_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_errno_sizeof_fmt.return._1f_format_num_", "embedding": null, "metadata": {"file_path": "dvc/tree/ssh/connection.py", "file_name": "connection.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 32, "span_ids": ["imports", "sizeof_fmt"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import errno\nimport logging\nimport os\nimport posixpath\nimport shlex\nimport stat\nfrom contextlib import suppress\n\nfrom funcy import cached_property\n\nfrom dvc.exceptions import DvcException\nfrom dvc.progress import Tqdm\nfrom dvc.utils import tmp_fname\n\nfrom ..base import RemoteCmdError\n\ntry:\n import paramiko\nexcept ImportError:\n paramiko = None\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef sizeof_fmt(num, suffix=\"B\"):\n \"\"\" Convert number of bytes to human-readable string \"\"\"\n for unit in [\"\", \"K\", \"M\", \"G\", \"T\", \"P\", \"E\", \"Z\"]:\n if abs(num) < 1024.0:\n return f\"{num:3.1f}{unit}{suffix}\"\n num /= 1024.0\n return \"{:.1f}{}{}\".format(num, \"Y\", suffix)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_SSHConnection_SSHConnection.islink.return.stat_S_ISLNK_self_st_mode": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_SSHConnection_SSHConnection.islink.return.stat_S_ISLNK_self_st_mode", "embedding": null, "metadata": {"file_path": "dvc/tree/ssh/connection.py", "file_name": "connection.py", "file_type": "text/x-python", "category": "implementation", "start_line": 35, "end_line": 96, "span_ids": ["SSHConnection.sftp", "SSHConnection.isfile", "SSHConnection", "SSHConnection.islink", "SSHConnection.getsize", "SSHConnection.exists", "SSHConnection.__init__", "SSHConnection.isdir", "SSHConnection.st_mode", "SSHConnection.close"], "tokens": 467}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SSHConnection:\n def __init__(self, host, *args, **kwargs):\n logger.debug(\n \"Establishing ssh connection with '{host}' \"\n \"through port '{port}' as user '{username}'\".format(\n host=host, **kwargs\n )\n )\n self.timeout = kwargs.get(\"timeout\", 1800)\n\n self._ssh = paramiko.SSHClient()\n\n # Explicitly disable paramiko logger. Due to how paramiko dynamically\n # loads loggers, it is not disabled by DVC disable_other_loggers().\n # See https://github.com/iterative/dvc/issues/3482\n self._ssh.set_log_channel(\"dvc.paramiko\")\n logging.getLogger(\"dvc.paramiko\").disabled = True\n logging.getLogger(\"dvc.paramiko.sftp\").disabled = True\n\n self._ssh.load_system_host_keys()\n self._ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())\n\n self._ssh.connect(host, *args, **kwargs)\n self._ssh.get_transport().set_keepalive(10)\n self._sftp_channels = []\n\n @property\n def sftp(self):\n if not self._sftp_channels:\n self._sftp_channels = [self._ssh.open_sftp()]\n return self._sftp_channels[0]\n\n def close(self):\n for sftp in self._sftp_channels:\n sftp.close()\n self._ssh.close()\n\n def st_mode(self, path):\n lstat = None\n with suppress(FileNotFoundError):\n lstat = self.sftp.lstat(path)\n\n return lstat.st_mode if lstat else 0\n\n def getsize(self, path):\n lstat = None\n with suppress(FileNotFoundError):\n lstat = self.sftp.lstat(path)\n\n return lstat.st_size if lstat else 0\n\n def exists(self, path):\n return bool(self.st_mode(path))\n\n def isdir(self, path):\n return stat.S_ISDIR(self.st_mode(path))\n\n def isfile(self, path):\n return stat.S_ISREG(self.st_mode(path))\n\n def islink(self, path):\n return stat.S_ISLNK(self.st_mode(path))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_SSHConnection.makedirs_SSHConnection.makedirs.if_tail_.try_.except_OSError_as_exc_.if_exc_errno_errno_EAC.raise_DvcException_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_SSHConnection.makedirs_SSHConnection.makedirs.if_tail_.try_.except_OSError_as_exc_.if_exc_errno_errno_EAC.raise_DvcException_", "embedding": null, "metadata": {"file_path": "dvc/tree/ssh/connection.py", "file_name": "connection.py", "file_type": "text/x-python", "category": "implementation", "start_line": 95, "end_line": 121, "span_ids": ["SSHConnection.makedirs"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SSHConnection:\n\n def makedirs(self, path):\n # Single stat call will say whether this is a dir, a file or a link\n st_mode = self.st_mode(path)\n\n if stat.S_ISDIR(st_mode):\n return\n\n if stat.S_ISREG(st_mode) or stat.S_ISLNK(st_mode):\n raise DvcException(\n f\"a file with the same name '{path}' already exists\"\n )\n\n head, tail = posixpath.split(path)\n\n if head:\n self.makedirs(head)\n\n if tail:\n try:\n self.sftp.mkdir(path)\n except OSError as exc:\n # Since paramiko errors are very vague we need to recheck\n # whether it's because path already exists or something else\n if exc.errno == errno.EACCES or not self.exists(path):\n raise DvcException(\n f\"unable to create remote directory '{path}'\"\n ) from exc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_SSHConnection.walk_SSHConnection.walk.if_not_topdown_.yield_directory_dirs_no": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_SSHConnection.walk_SSHConnection.walk.if_not_topdown_.yield_directory_dirs_no", "embedding": null, "metadata": {"file_path": "dvc/tree/ssh/connection.py", "file_name": "connection.py", "file_type": "text/x-python", "category": "implementation", "start_line": 123, "end_line": 154, "span_ids": ["SSHConnection.walk"], "tokens": 216}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SSHConnection:\n\n def walk(self, directory, topdown=True):\n # NOTE: original os.walk() implementation [1] with default options was\n # used as a template.\n #\n # [1] https://github.com/python/cpython/blob/master/Lib/os.py\n try:\n dir_entries = self.sftp.listdir_attr(directory)\n except OSError as exc:\n raise DvcException(\n \"couldn't get the '{}' remote directory files list\".format(\n directory\n )\n ) from exc\n\n dirs = []\n nondirs = []\n for entry in dir_entries:\n name = entry.filename\n if stat.S_ISDIR(entry.st_mode):\n dirs.append(name)\n else:\n nondirs.append(name)\n\n if topdown:\n yield directory, dirs, nondirs\n\n for dname in dirs:\n newpath = posixpath.join(directory, dname)\n yield from self.walk(newpath, topdown=topdown)\n\n if not topdown:\n yield directory, dirs, nondirs", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_SSHConnection.walk_files_SSHConnection.upload.self_sftp_rename_tmp_file": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_SSHConnection.walk_files_SSHConnection.upload.self_sftp_rename_tmp_file", "embedding": null, "metadata": {"file_path": "dvc/tree/ssh/connection.py", "file_name": "connection.py", "file_type": "text/x-python", "category": "implementation", "start_line": 156, "end_line": 225, "span_ids": ["SSHConnection.download", "SSHConnection.walk_files", "SSHConnection.upload", "SSHConnection._remove_dir", "SSHConnection.move", "SSHConnection._remove_file", "SSHConnection.atomic_copy", "SSHConnection.remove"], "tokens": 480}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SSHConnection:\n\n def walk_files(self, directory):\n for root, _, files in self.walk(directory):\n for fname in files:\n yield posixpath.join(root, fname)\n\n def _remove_file(self, path):\n with suppress(FileNotFoundError):\n self.sftp.remove(path)\n\n def _remove_dir(self, path):\n for root, dirs, files in self.walk(path, topdown=False):\n for fname in files:\n with suppress(FileNotFoundError):\n self._remove_file(posixpath.join(root, fname))\n\n for dname in dirs:\n with suppress(FileNotFoundError):\n self.sftp.rmdir(posixpath.join(root, dname))\n\n with suppress(FileNotFoundError):\n self.sftp.rmdir(path)\n\n def remove(self, path):\n if self.isdir(path):\n self._remove_dir(path)\n else:\n self._remove_file(path)\n\n def download(self, src, dest, no_progress_bar=False, progress_title=None):\n with Tqdm(\n desc=progress_title or os.path.basename(src),\n disable=no_progress_bar,\n bytes=True,\n ) as pbar:\n self.sftp.get(src, dest, callback=pbar.update_to)\n\n def move(self, src, dst):\n \"\"\"Rename src to dst, if it is not possible (in case src and dst are\n on different filesystems) and actual physical copying of data is\n happening.\n \"\"\"\n self.makedirs(posixpath.dirname(dst))\n\n try:\n self.sftp.rename(src, dst)\n except OSError:\n self.atomic_copy(src, dst)\n self.remove(src)\n\n def atomic_copy(self, src, dst):\n tmp = tmp_fname(dst)\n\n try:\n self.copy(src, tmp)\n self.sftp.rename(tmp, dst)\n finally:\n self.remove(tmp)\n\n def upload(self, src, dest, no_progress_bar=False, progress_title=None):\n self.makedirs(posixpath.dirname(dest))\n tmp_file = tmp_fname(dest)\n if not progress_title:\n progress_title = posixpath.basename(dest)\n\n with Tqdm(\n desc=progress_title, disable=no_progress_bar, bytes=True\n ) as pbar:\n self.sftp.put(src, tmp_file, callback=pbar.update_to)\n\n self.sftp.rename(tmp_file, dest)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_SSHConnection.execute_SSHConnection.execute.return.b_join_stdout_chunks_d": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_SSHConnection.execute_SSHConnection.execute.return.b_join_stdout_chunks_d", "embedding": null, "metadata": {"file_path": "dvc/tree/ssh/connection.py", "file_name": "connection.py", "file_type": "text/x-python", "category": "implementation", "start_line": 227, "end_line": 278, "span_ids": ["SSHConnection.execute"], "tokens": 302}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SSHConnection:\n\n def execute(self, cmd):\n stdin, stdout, stderr = self._ssh.exec_command(cmd)\n channel = stdout.channel\n\n stdin.close()\n channel.shutdown_write()\n\n stdout_chunks = []\n stderr_chunks = []\n while (\n not channel.closed\n or channel.recv_ready()\n or channel.recv_stderr_ready()\n ):\n import selectors\n\n selector = selectors.DefaultSelector()\n selector.register(stdout.channel, selectors.EVENT_READ)\n\n got_chunk = False\n events = selector.select(self.timeout)\n for key, _ in events:\n c = key.fileobj\n if c.recv_ready():\n stdout_chunks.append(stdout.channel.recv(len(c.in_buffer)))\n got_chunk = True\n\n if c.recv_stderr_ready():\n stderr_len = len(c.in_stderr_buffer)\n s = stderr.channel.recv_stderr(stderr_len)\n stderr_chunks.append(s)\n got_chunk = True\n\n if (\n not got_chunk\n and stdout.channel.exit_status_ready()\n and not stderr.channel.recv_stderr_ready()\n and not stdout.channel.recv_ready()\n ):\n stdout.channel.shutdown_read()\n stdout.channel.close()\n break\n\n stdout.close()\n stderr.close()\n\n ret = stdout.channel.recv_exit_status()\n if ret != 0:\n err = b\"\".join(stderr_chunks).decode(\"utf-8\")\n raise RemoteCmdError(\"ssh\", cmd, ret, err)\n\n return b\"\".join(stdout_chunks).decode(\"utf-8\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_SSHConnection.uname_SSHConnection.md5.return.md5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_SSHConnection.uname_SSHConnection.md5.return.md5", "embedding": null, "metadata": {"file_path": "dvc/tree/ssh/connection.py", "file_name": "connection.py", "file_type": "text/x-python", "category": "implementation", "start_line": 281, "end_line": 306, "span_ids": ["SSHConnection.uname", "SSHConnection.md5"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SSHConnection:\n\n @cached_property\n def uname(self):\n return self.execute(\"uname\").strip()\n\n def md5(self, path):\n \"\"\"\n Use different md5 commands depending on the OS:\n\n - Darwin's `md5` returns BSD-style checksums by default\n - Linux's `md5sum` needs the `--tag` flag for a similar output\n\n Example:\n MD5 (foo.txt) = f3d220a856b52aabbf294351e8a24300\n \"\"\"\n path = shlex.quote(path)\n if self.uname == \"Linux\":\n md5 = self.execute(\"md5sum \" + path).split()[0]\n elif self.uname == \"Darwin\":\n md5 = self.execute(\"md5 \" + path).split()[-1]\n else:\n raise DvcException(\n f\"'{self.uname}' is not supported as a SSH remote\"\n )\n\n assert len(md5) == 32\n return md5", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_SSHConnection.copy_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/ssh/connection.py_SSHConnection.copy_", "embedding": null, "metadata": {"file_path": "dvc/tree/ssh/connection.py", "file_name": "connection.py", "file_type": "text/x-python", "category": "implementation", "start_line": 308, "end_line": 346, "span_ids": ["SSHConnection.symlink", "SSHConnection.reflink", "SSHConnection.copy", "SSHConnection.open", "SSHConnection.open_max_sftp_channels", "SSHConnection.hardlink"], "tokens": 311}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SSHConnection:\n\n def copy(self, src, dest):\n dest = shlex.quote(dest)\n src = shlex.quote(src)\n self.execute(f\"cp {src} {dest}\")\n\n def open_max_sftp_channels(self):\n # If there are more than 1 it means we've already opened max amount\n if len(self._sftp_channels) <= 1:\n while True:\n try:\n self._sftp_channels.append(self._ssh.open_sftp())\n except paramiko.ssh_exception.ChannelException:\n if not self._sftp_channels:\n raise\n break\n return self._sftp_channels\n\n def open(self, *args, **kwargs):\n return self.sftp.open(*args, **kwargs)\n\n def symlink(self, src, dest):\n self.sftp.symlink(src, dest)\n\n def reflink(self, src, dest):\n dest = shlex.quote(dest)\n src = shlex.quote(src)\n if self.uname == \"Linux\":\n return self.execute(f\"cp --reflink {src} {dest}\")\n\n if self.uname == \"Darwin\":\n return self.execute(f\"cp -c {src} {dest}\")\n\n raise DvcException(f\"'{self.uname}' is not supported as a SSH remote\")\n\n def hardlink(self, src, dest):\n dest = shlex.quote(dest)\n src = shlex.quote(src)\n self.execute(f\"ln {src} {dest}\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_logging_WebDAVConnectionError.__init__.super___init___f_Unable": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_logging_WebDAVConnectionError.__init__.super___init___f_Unable", "embedding": null, "metadata": {"file_path": "dvc/tree/webdav.py", "file_name": "webdav.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 23, "span_ids": ["imports", "WebDAVConnectionError.__init__", "WebDAVConnectionError"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nimport threading\nfrom collections import deque\n\nfrom funcy import cached_property, nullcontext, wrap_prop\n\nfrom dvc.config import ConfigError\nfrom dvc.exceptions import DvcException\nfrom dvc.hash_info import HashInfo\nfrom dvc.path_info import HTTPURLInfo, WebDAVURLInfo\nfrom dvc.progress import Tqdm\nfrom dvc.scheme import Schemes\n\nfrom .base import BaseTree\nfrom .http import ask_password\n\nlogger = logging.getLogger(__name__)\n\n\nclass WebDAVConnectionError(DvcException):\n def __init__(self, host):\n super().__init__(f\"Unable to connect to WebDAV {host}.\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_WebDAVTree_WebDAVTree._Webdav_client": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_WebDAVTree_WebDAVTree._Webdav_client", "embedding": null, "metadata": {"file_path": "dvc/tree/webdav.py", "file_name": "webdav.py", "file_type": "text/x-python", "category": "implementation", "start_line": 26, "end_line": 84, "span_ids": ["WebDAVTree.__init__", "WebDAVTree"], "tokens": 420}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class WebDAVTree(BaseTree): # pylint:disable=abstract-method\n # Use webdav scheme\n scheme = Schemes.WEBDAV\n\n # URLInfo for Webdav ~ replaces webdav -> http\n PATH_CLS = WebDAVURLInfo\n\n # Traversable as walk_files is implemented\n CAN_TRAVERSE = True\n\n # Length of walk_files prefix\n TRAVERSE_PREFIX_LEN = 2\n\n # Implementation based on webdav3.client\n REQUIRES = {\"webdavclient3\": \"webdav3.client\"}\n\n # Chunk size for buffered upload/download with progress bar\n CHUNK_SIZE = 2 ** 16\n\n PARAM_CHECKSUM = \"etag\"\n\n # Constructor\n def __init__(self, repo, config):\n # Call BaseTree constructor\n super().__init__(repo, config)\n\n # Get username from configuration\n self.user = config.get(\"user\", None)\n\n # Get password from configuration (might be None ~ not set)\n self.password = config.get(\"password\", None)\n\n # Whether to ask for password if it is not set\n self.ask_password = config.get(\"ask_password\", False)\n\n # Use token for webdav auth\n self.token = config.get(\"token\", None)\n\n # Path to certificate\n self.cert_path = config.get(\"cert_path\", None)\n\n # Path to private key\n self.key_path = config.get(\"key_path\", None)\n\n # Connection timeout\n self.timeout = config.get(\"timeout\", 30)\n\n # Get URL from configuration\n self.url = config.get(\"url\", None)\n\n # If URL in config parse path_info\n if self.url:\n self.path_info = self.PATH_CLS(self.url)\n\n # If username not specified try to use from URL\n if self.user is None and self.path_info.user is not None:\n self.user = self.path_info.user\n\n # Webdav client", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_WebDAVTree._client_WebDAVTree._client.return.client": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_WebDAVTree._client_WebDAVTree._client.return.client", "embedding": null, "metadata": {"file_path": "dvc/tree/webdav.py", "file_name": "webdav.py", "file_type": "text/x-python", "category": "implementation", "start_line": 91, "end_line": 129, "span_ids": ["WebDAVTree._client"], "tokens": 308}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class WebDAVTree(BaseTree): # pylint:disable=abstract-method\n @wrap_prop(threading.Lock())\n @cached_property\n def _client(self):\n from webdav3.client import Client\n\n # Construct hostname from path_info by stripping path\n http_info = HTTPURLInfo(self.path_info.url)\n hostname = http_info.replace(path=\"\").url\n\n # Set password or ask for it\n if self.ask_password and self.password is None and self.token is None:\n host, user = self.path_info.host, self.path_info.user\n self.password = ask_password(host, user)\n\n # Setup webdav client options dictionary\n options = {\n \"webdav_hostname\": hostname,\n \"webdav_login\": self.user,\n \"webdav_password\": self.password,\n \"webdav_token\": self.token,\n \"webdav_cert_path\": self.cert_path,\n \"webdav_key_path\": self.key_path,\n \"webdav_timeout\": self.timeout,\n \"webdav_chunk_size\": self.CHUNK_SIZE,\n }\n\n client = Client(options)\n\n # Check whether client options are valid\n if not client.valid():\n raise ConfigError(\n f\"Configuration for WebDAV {hostname} is invalid.\"\n )\n\n # Check whether connection is valid (root should always exist)\n if not client.check(self.path_info.path):\n raise WebDAVConnectionError(hostname)\n\n return client", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_WebDAVTree._Checks_whether_file_dir_WebDAVTree._Yields_path_info_to_all": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_WebDAVTree._Checks_whether_file_dir_WebDAVTree._Yields_path_info_to_all", "embedding": null, "metadata": {"file_path": "dvc/tree/webdav.py", "file_name": "webdav.py", "file_type": "text/x-python", "category": "implementation", "start_line": 131, "end_line": 155, "span_ids": ["WebDAVTree.get_file_hash", "WebDAVTree.isdir", "WebDAVTree.exists", "WebDAVTree._client"], "tokens": 230}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class WebDAVTree(BaseTree): # pylint:disable=abstract-method\n\n # Checks whether file/directory exists at remote\n def exists(self, path_info, use_dvcignore=True):\n # Use webdav check to test for file existence\n return self._client.check(path_info.path)\n\n # Gets file hash 'etag'\n def get_file_hash(self, path_info):\n # Use webdav client info method to get etag\n etag = self._client.info(path_info.path)[\"etag\"].strip('\"')\n\n # From HTTPTree\n if not etag:\n raise DvcException(\n \"could not find an ETag or \"\n \"Content-MD5 header for '{url}'\".format(url=path_info.url)\n )\n\n return HashInfo(self.PARAM_CHECKSUM, etag)\n\n # Checks whether path points to directory\n def isdir(self, path_info):\n # Use webdav is_dir to test whether path points to a directory\n return self._client.is_dir(path_info.path)\n\n # Yields path info to all files", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_WebDAVTree.walk_files_WebDAVTree.walk_files.while_dirs_.for_entry_in_self__client.if_entry_isdir_.else_.yield_info": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_WebDAVTree.walk_files_WebDAVTree.walk_files.while_dirs_.for_entry_in_self__client.if_entry_isdir_.else_.yield_info", "embedding": null, "metadata": {"file_path": "dvc/tree/webdav.py", "file_name": "webdav.py", "file_type": "text/x-python", "category": "implementation", "start_line": 156, "end_line": 177, "span_ids": ["WebDAVTree.walk_files"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class WebDAVTree(BaseTree): # pylint:disable=abstract-method\n def walk_files(self, path_info, **kwargs):\n # Check whether directory exists\n if not self.exists(path_info):\n return\n\n # Collect directories\n dirs = deque([path_info.path])\n\n # Iterate all directories found so far\n while dirs:\n # Iterate directory content\n for entry in self._client.list(dirs.pop(), get_info=True):\n # Construct path_info to entry\n info = path_info.replace(path=entry[\"path\"])\n\n # Check whether entry is a directory\n if entry[\"isdir\"]:\n # Append new found directory to directory list\n dirs.append(info.path)\n else:\n # Yield path info to non directory\n yield info", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_WebDAVTree._Removes_file_directory_WebDAVTree._Downloads_file_from_rem": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_WebDAVTree._Removes_file_directory_WebDAVTree._Downloads_file_from_rem", "embedding": null, "metadata": {"file_path": "dvc/tree/webdav.py", "file_name": "webdav.py", "file_type": "text/x-python", "category": "implementation", "start_line": 179, "end_line": 201, "span_ids": ["WebDAVTree.makedirs", "WebDAVTree.move", "WebDAVTree.walk_files", "WebDAVTree.remove"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class WebDAVTree(BaseTree): # pylint:disable=abstract-method\n\n # Removes file/directory\n def remove(self, path_info):\n # Use webdav client clean (DELETE) method to remove file/directory\n self._client.clean(path_info.path)\n\n # Creates directories\n def makedirs(self, path_info):\n # Terminate recursion\n if path_info.path == self.path_info.path or self.exists(path_info):\n return\n\n # Recursively descent to root\n self.makedirs(path_info.parent)\n\n # Construct directory at current recursion depth\n self._client.mkdir(path_info.path)\n\n # Moves file/directory at remote\n def move(self, from_info, to_info, mode=None):\n # Webdav client move\n self._client.move(from_info.path, to_info.path)\n\n # Downloads file from remote to file", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_WebDAVTree._download_WebDAVTree._Uploads_file_to_remote": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_WebDAVTree._download_WebDAVTree._Uploads_file_to_remote", "embedding": null, "metadata": {"file_path": "dvc/tree/webdav.py", "file_name": "webdav.py", "file_type": "text/x-python", "category": "implementation", "start_line": 202, "end_line": 218, "span_ids": ["WebDAVTree._download"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class WebDAVTree(BaseTree): # pylint:disable=abstract-method\n def _download(self, from_info, to_file, name=None, no_progress_bar=False):\n # Progress from HTTPTree\n with open(to_file, \"wb\") as fd:\n with Tqdm.wrapattr(\n fd,\n \"write\",\n total=None if no_progress_bar else self._file_size(from_info),\n leave=False,\n desc=from_info.url if name is None else name,\n disable=no_progress_bar,\n ) as fd_wrapped:\n # Download from WebDAV via buffer\n self._client.download_from(\n buff=fd_wrapped, remote_path=from_info.path\n )\n\n # Uploads file to remote", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_WebDAVTree._upload_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdav.py_WebDAVTree._upload_", "embedding": null, "metadata": {"file_path": "dvc/tree/webdav.py", "file_name": "webdav.py", "file_type": "text/x-python", "category": "implementation", "start_line": 213, "end_line": 242, "span_ids": ["WebDAVTree._upload", "WebDAVTree._file_size"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class WebDAVTree(BaseTree): # pylint:disable=abstract-method\n def _upload(\n self, from_file, to_info, name=None, no_progress_bar=False, **_kwargs,\n ):\n # First try to create parent directories\n self.makedirs(to_info.parent)\n\n file_size = os.path.getsize(from_file)\n with open(from_file, \"rb\") as fd:\n progress_context = (\n nullcontext(fd)\n if file_size == 0\n else Tqdm.wrapattr(\n fd,\n \"read\",\n total=None if no_progress_bar else file_size,\n leave=False,\n desc=to_info.url if name is None else name,\n disable=no_progress_bar,\n )\n )\n with progress_context as fd_wrapped:\n self._client.upload_to(\n buff=fd_wrapped, remote_path=to_info.path\n )\n\n # Queries size of file at remote\n def _file_size(self, path_info):\n # Get file size from info dictionary and convert to int (from str)\n return int(self._client.info(path_info.path)[\"size\"])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdavs.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webdavs.py__", "embedding": null, "metadata": {"file_path": "dvc/tree/webdavs.py", "file_name": "webdavs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 8, "span_ids": ["WebDAVSTree", "imports"], "tokens": 47}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.scheme import Schemes\n\nfrom .webdav import WebDAVTree\n\n\nclass WebDAVSTree(WebDAVTree): # pylint:disable=abstract-method\n scheme = Schemes.WEBDAVS", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/collections.py_os_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/collections.py_os_", "embedding": null, "metadata": {"file_path": "dvc/utils/collections.py", "file_name": "collections.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 60, "span_ids": ["PathStringTrie", "imports", "PathStringTrie.__init__", "apply_diff"], "tokens": 409}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nfrom collections.abc import Mapping\n\nfrom pygtrie import StringTrie as _StringTrie\n\n\nclass PathStringTrie(_StringTrie):\n \"\"\"Trie based on platform-dependent separator for pathname components.\"\"\"\n\n def __init__(self, *args, **kwargs):\n kwargs[\"separator\"] = os.sep\n super().__init__(*args, **kwargs)\n\n\ndef apply_diff(src, dest):\n \"\"\"Recursively apply changes from src to dest.\n\n Preserves dest type and hidden info in dest structure,\n like ruamel.yaml leaves when parses files. This includes comments,\n ordering and line foldings.\n\n Used in Stage load/dump cycle to preserve comments and custom formatting.\n \"\"\"\n Seq = (list, tuple)\n Container = (Mapping, list, tuple)\n\n def is_same_type(a, b):\n return any(\n isinstance(a, t) and isinstance(b, t)\n for t in [str, Mapping, Seq, bool]\n )\n\n if isinstance(src, Mapping) and isinstance(dest, Mapping):\n for key, value in src.items():\n if isinstance(value, Container) and is_same_type(\n value, dest.get(key)\n ):\n apply_diff(value, dest[key])\n elif key not in dest or value != dest[key]:\n dest[key] = value\n for key in set(dest) - set(src):\n del dest[key]\n elif isinstance(src, Seq) and isinstance(dest, Seq):\n if len(src) != len(dest):\n dest[:] = src\n else:\n for i, value in enumerate(src):\n if isinstance(value, Container) and is_same_type(\n value, dest[i]\n ):\n apply_diff(value, dest[i])\n elif value != dest[i]:\n dest[i] = value\n else:\n raise AssertionError(\n \"Can't apply diff from {} to {}\".format(\n src.__class__.__name__, dest.__class__.__name__\n )\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/flatten.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/flatten.py__", "embedding": null, "metadata": {"file_path": "dvc/utils/flatten.py", "file_name": "flatten.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 10, "span_ids": ["imports", "unflatten", "flatten"], "tokens": 36}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import flatten_dict\n\n\ndef flatten(d):\n return flatten_dict.flatten(d, reducer=\"dot\")\n\n\ndef unflatten(d):\n return flatten_dict.unflatten(d, splitter=\"dot\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/pager.py__Draws_DAG_in_ASCII__make_pager.return._pager": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/pager.py__Draws_DAG_in_ASCII__make_pager.return._pager", "embedding": null, "metadata": {"file_path": "dvc/utils/pager.py", "file_name": "pager.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 24, "span_ids": ["make_pager", "docstring"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Draws DAG in ASCII.\"\"\"\n\nimport logging\nimport os\nimport pydoc\nimport sys\n\nfrom dvc.env import DVC_PAGER\nfrom dvc.utils import format_link\n\nlogger = logging.getLogger(__name__)\n\n\nDEFAULT_PAGER = \"less\"\nDEFAULT_PAGER_FORMATTED = (\n f\"{DEFAULT_PAGER} --chop-long-lines --clear-screen --RAW-CONTROL-CHARS\"\n)\n\n\ndef make_pager(cmd):\n def _pager(text):\n return pydoc.tempfilepager(pydoc.plain(text), cmd)\n\n return _pager", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/pager.py_find_pager_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/pager.py_find_pager_", "embedding": null, "metadata": {"file_path": "dvc/utils/pager.py", "file_name": "pager.py", "file_type": "text/x-python", "category": "implementation", "start_line": 27, "end_line": 49, "span_ids": ["find_pager", "pager"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def find_pager():\n if not sys.stdout.isatty():\n return pydoc.plainpager\n\n env_pager = os.getenv(DVC_PAGER)\n if env_pager:\n return make_pager(env_pager)\n\n if os.system(f\"({DEFAULT_PAGER}) 2>{os.devnull}\") == 0:\n return make_pager(DEFAULT_PAGER_FORMATTED)\n\n logger.warning(\n \"Unable to find `less` in the PATH. Check out \"\n \"{} for more info.\".format(\n format_link(\"https://man.dvc.org/pipeline/show\")\n )\n )\n return pydoc.plainpager\n\n\ndef pager(text):\n find_pager()(text)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/__init__.py_from_collections_import_d_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/__init__.py_from_collections_import_d_", "embedding": null, "metadata": {"file_path": "dvc/utils/serialize/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 27, "span_ids": ["imports"], "tokens": 254}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from collections import defaultdict\nfrom typing import DefaultDict\n\nfrom ._common import * # noqa, pylint: disable=wildcard-import\nfrom ._json import * # noqa, pylint: disable=wildcard-import\nfrom ._py import * # noqa, pylint: disable=wildcard-import\nfrom ._toml import * # noqa, pylint: disable=wildcard-import\nfrom ._yaml import * # noqa, pylint: disable=wildcard-import\n\nLOADERS: DefaultDict[str, LoaderFn] = defaultdict( # noqa: F405\n lambda: load_yaml # noqa: F405\n)\nLOADERS.update(\n {\".toml\": load_toml, \".json\": load_json, \".py\": load_py} # noqa: F405\n)\n\nMODIFIERS: DefaultDict[str, ModifierFn] = defaultdict( # noqa: F405\n lambda: modify_yaml # noqa: F405\n)\nMODIFIERS.update(\n {\n \".toml\": modify_toml, # noqa: F405\n \".json\": modify_json, # noqa: F405\n \".py\": modify_py, # noqa: F405\n }\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_common.py__Common_utilities_for_s_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_common.py__Common_utilities_for_s_", "embedding": null, "metadata": {"file_path": "dvc/utils/serialize/_common.py", "file_name": "_common.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 71, "span_ids": ["DumperFn.__call__", "LoaderFn", "ParseError.__init__", "ModifierFn", "DumperFn", "impl:2", "_load_data", "_modify_data", "_dump_data", "LoaderFn.__call__", "ModifierFn.__call__", "docstring", "ParseError"], "tokens": 514}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Common utilities for serialize.\"\"\"\nimport os\nfrom contextlib import contextmanager\nfrom typing import TYPE_CHECKING, Any, Callable, ContextManager, Dict, Union\n\nfrom typing_extensions import Protocol\n\nfrom dvc.exceptions import DvcException\nfrom dvc.utils import relpath\n\nif TYPE_CHECKING:\n from dvc.tree.base import BaseTree\n from dvc.types import AnyPath\n\n\nclass DumperFn(Protocol):\n def __call__(\n self, path: \"AnyPath\", data: Any, tree: \"BaseTree\" = None\n ) -> Any:\n ...\n\n\nclass ModifierFn(Protocol):\n def __call__(\n self, path: \"AnyPath\", tree: \"BaseTree\" = None\n ) -> ContextManager[Dict]:\n ...\n\n\nclass LoaderFn(Protocol):\n def __call__(self, path: \"AnyPath\", tree: \"BaseTree\" = None) -> Any:\n ...\n\n\nReadType = Union[bytes, None, str]\nParserFn = Callable[[ReadType, \"AnyPath\"], dict]\n\n\nclass ParseError(DvcException):\n \"\"\"Errors while parsing files\"\"\"\n\n def __init__(self, path: \"AnyPath\", message: str):\n path = relpath(path)\n super().__init__(f\"unable to read: '{path}', {message}\")\n\n\ndef _load_data(path: \"AnyPath\", parser: ParserFn, tree: \"BaseTree\" = None):\n open_fn = tree.open if tree else open\n with open_fn(path, encoding=\"utf-8\") as fd: # type: ignore\n return parser(fd.read(), path)\n\n\ndef _dump_data(path, data: Any, dumper: DumperFn, tree: \"BaseTree\" = None):\n open_fn = tree.open if tree else open\n with open_fn(path, \"w+\", encoding=\"utf-8\") as fd: # type: ignore\n dumper(data, fd)\n\n\n@contextmanager\ndef _modify_data(\n path: \"AnyPath\",\n parser: ParserFn,\n dumper: DumperFn,\n tree: \"BaseTree\" = None,\n):\n exists_fn = tree.exists if tree else os.path.exists\n file_exists = exists_fn(path) # type: ignore\n data = _load_data(path, parser=parser, tree=tree) if file_exists else {}\n yield data\n dumper(path, data, tree=tree)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_json.py_json_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_json.py_json_", "embedding": null, "metadata": {"file_path": "dvc/utils/serialize/_json.py", "file_name": "_json.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 30, "span_ids": ["parse_json", "imports", "modify_json", "load_json", "dump_json", "JSONFileCorruptedError", "JSONFileCorruptedError.__init__"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import json\n\nfrom funcy import contextmanager, reraise\n\nfrom ._common import ParseError, _dump_data, _load_data, _modify_data\n\n\nclass JSONFileCorruptedError(ParseError):\n def __init__(self, path):\n super().__init__(path, \"JSON file structure is corrupted\")\n\n\ndef load_json(path, tree=None):\n return _load_data(path, parser=parse_json, tree=tree)\n\n\ndef parse_json(text, path, **kwargs):\n with reraise(json.JSONDecodeError, JSONFileCorruptedError(path)):\n return json.loads(text, **kwargs) or {}\n\n\ndef dump_json(path, data, tree=None):\n return _dump_data(path, data, dumper=json.dump, tree=tree)\n\n\n@contextmanager\ndef modify_json(path, tree=None):\n with _modify_data(path, parse_json, dump_json, tree=tree) as d:\n yield d", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_py.py_ast_parse_py_for_update.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_py.py_ast_parse_py_for_update.return.result", "embedding": null, "metadata": {"file_path": "dvc/utils/serialize/_py.py", "file_name": "_py.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 38, "span_ids": ["load_py", "parse_py_for_update", "imports", "PythonFileCorruptedError", "parse_py", "PythonFileCorruptedError.__init__"], "tokens": 267}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import ast\nfrom contextlib import contextmanager\n\nfrom funcy import reraise\n\nfrom ._common import ParseError, _dump_data, _load_data, _modify_data\n\n_PARAMS_KEY = \"__params_old_key_for_update__\"\n_PARAMS_TEXT_KEY = \"__params_text_key_for_update__\"\n\n\nclass PythonFileCorruptedError(ParseError):\n def __init__(self, path, message=\"Python file structure is corrupted\"):\n super().__init__(path, message)\n\n\ndef load_py(path, tree=None):\n return _load_data(path, parser=parse_py, tree=tree)\n\n\ndef parse_py(text, path):\n \"\"\"Parses text from .py file into Python structure.\"\"\"\n with reraise(SyntaxError, PythonFileCorruptedError(path)):\n tree = ast.parse(text, filename=path)\n\n result = _ast_tree_to_dict(tree)\n return result\n\n\ndef parse_py_for_update(text, path):\n \"\"\"Parses text into dict for update params.\"\"\"\n with reraise(SyntaxError, PythonFileCorruptedError(path)):\n tree = ast.parse(text, filename=path)\n\n result = _ast_tree_to_dict(tree)\n result.update({_PARAMS_KEY: _ast_tree_to_dict(tree, lineno=True)})\n result.update({_PARAMS_TEXT_KEY: text})\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_py.py__dump__dump.stream_close_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_py.py__dump__dump.stream_close_", "embedding": null, "metadata": {"file_path": "dvc/utils/serialize/_py.py", "file_name": "_py.py", "file_type": "text/x-python", "category": "implementation", "start_line": 41, "end_line": 76, "span_ids": ["_dump"], "tokens": 255}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _dump(data, stream):\n\n old_params = data[_PARAMS_KEY]\n new_params = {\n key: value\n for key, value in data.items()\n if key not in [_PARAMS_KEY, _PARAMS_TEXT_KEY]\n }\n old_lines = data[_PARAMS_TEXT_KEY].splitlines(True)\n\n def _update_lines(lines, old_dct, new_dct):\n for key, value in new_dct.items():\n if isinstance(value, dict):\n lines = _update_lines(lines, old_dct[key], value)\n elif value != old_dct[key][\"value\"]:\n lineno = old_dct[key][\"lineno\"]\n lines[lineno] = lines[lineno].replace(\n f\" = {old_dct[key]['value']}\", f\" = {value}\"\n )\n else:\n continue\n return lines\n\n new_lines = _update_lines(old_lines, old_params, new_params)\n new_text = \"\".join(new_lines)\n\n try:\n ast.parse(new_text)\n except SyntaxError:\n raise PythonFileCorruptedError(\n stream.name,\n \"Python file structure is corrupted after update params\",\n )\n\n stream.write(new_text)\n stream.close()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_py.py_dump_py__ast_tree_to_dict.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_py.py_dump_py__ast_tree_to_dict.return.result", "embedding": null, "metadata": {"file_path": "dvc/utils/serialize/_py.py", "file_name": "_py.py", "file_type": "text/x-python", "category": "implementation", "start_line": 79, "end_line": 120, "span_ids": ["dump_py", "modify_py", "_ast_tree_to_dict"], "tokens": 290}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def dump_py(path, data, tree=None):\n return _dump_data(path, data, dumper=_dump, tree=tree)\n\n\n@contextmanager\ndef modify_py(path, tree=None):\n with _modify_data(path, parse_py_for_update, dump_py, tree=tree) as d:\n yield d\n\n\ndef _ast_tree_to_dict(tree, only_self_params=False, lineno=False):\n \"\"\"Parses ast trees to dict.\n\n :param tree: ast.Tree\n :param only_self_params: get only self params from class __init__ function\n :param lineno: add params line number (needed for update)\n :return:\n \"\"\"\n result = {}\n for _body in tree.body:\n try:\n if isinstance(_body, (ast.Assign, ast.AnnAssign)):\n result.update(\n _ast_assign_to_dict(_body, only_self_params, lineno)\n )\n elif isinstance(_body, ast.ClassDef):\n result.update(\n {_body.name: _ast_tree_to_dict(_body, lineno=lineno)}\n )\n elif (\n isinstance(_body, ast.FunctionDef) and _body.name == \"__init__\"\n ):\n result.update(\n _ast_tree_to_dict(\n _body, only_self_params=True, lineno=lineno\n )\n )\n except ValueError:\n continue\n except AttributeError:\n continue\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_py.py__ast_assign_to_dict__ast_assign_to_dict.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_py.py__ast_assign_to_dict__ast_assign_to_dict.return.result", "embedding": null, "metadata": {"file_path": "dvc/utils/serialize/_py.py", "file_name": "_py.py", "file_type": "text/x-python", "category": "implementation", "start_line": 123, "end_line": 159, "span_ids": ["_ast_assign_to_dict"], "tokens": 309}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _ast_assign_to_dict(assign, only_self_params=False, lineno=False):\n result = {}\n\n if isinstance(assign, ast.AnnAssign):\n name = _get_ast_name(assign.target, only_self_params)\n elif len(assign.targets) == 1:\n name = _get_ast_name(assign.targets[0], only_self_params)\n else:\n raise AttributeError\n\n if isinstance(assign.value, ast.Dict):\n value = {}\n for key, val in zip(assign.value.keys, assign.value.values):\n if lineno:\n value[_get_ast_value(key)] = {\n \"lineno\": assign.lineno - 1,\n \"value\": _get_ast_value(val),\n }\n else:\n value[_get_ast_value(key)] = _get_ast_value(val)\n elif isinstance(assign.value, ast.List):\n value = [_get_ast_value(val) for val in assign.value.elts]\n elif isinstance(assign.value, ast.Set):\n values = [_get_ast_value(val) for val in assign.value.elts]\n value = set(values)\n elif isinstance(assign.value, ast.Tuple):\n values = [_get_ast_value(val) for val in assign.value.elts]\n value = tuple(values)\n else:\n value = _get_ast_value(assign.value)\n\n if lineno and not isinstance(assign.value, ast.Dict):\n result[name] = {\"lineno\": assign.lineno - 1, \"value\": value}\n else:\n result[name] = value\n\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_py.py__get_ast_name_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_py.py__get_ast_name_", "embedding": null, "metadata": {"file_path": "dvc/utils/serialize/_py.py", "file_name": "_py.py", "file_type": "text/x-python", "category": "implementation", "start_line": 162, "end_line": 182, "span_ids": ["_get_ast_name", "_get_ast_value"], "tokens": 125}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _get_ast_name(target, only_self_params=False):\n if hasattr(target, \"id\") and not only_self_params:\n result = target.id\n elif hasattr(target, \"attr\") and target.value.id == \"self\":\n result = target.attr\n else:\n raise AttributeError\n return result\n\n\ndef _get_ast_value(value):\n if isinstance(value, ast.Num):\n result = value.n\n elif isinstance(value, ast.Str):\n result = value.s\n elif isinstance(value, ast.NameConstant):\n result = value.value\n else:\n raise ValueError\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_toml.py_from_contextlib_import_co_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_toml.py_from_contextlib_import_co_", "embedding": null, "metadata": {"file_path": "dvc/utils/serialize/_toml.py", "file_name": "_toml.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 46, "span_ids": ["load_toml", "modify_toml", "_dump", "TOMLFileCorruptedError", "imports", "TOMLFileCorruptedError.__init__", "parse_toml_for_update", "parse_toml", "dump_toml"], "tokens": 336}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from contextlib import contextmanager\n\nimport toml\nfrom funcy import reraise\n\nfrom ._common import ParseError, _dump_data, _load_data, _modify_data\n\n\nclass TOMLFileCorruptedError(ParseError):\n def __init__(self, path):\n super().__init__(path, \"TOML file structure is corrupted\")\n\n\ndef load_toml(path, tree=None):\n return _load_data(path, parser=parse_toml, tree=tree)\n\n\ndef parse_toml(text, path, decoder=None):\n with reraise(toml.TomlDecodeError, TOMLFileCorruptedError(path)):\n return toml.loads(text, decoder=decoder)\n\n\ndef parse_toml_for_update(text, path):\n \"\"\"Parses text into Python structure.\n\n NOTE: Python toml package does not currently use ordered dicts, so\n keys may be re-ordered between load/dump, but this function will at\n least preserve comments.\n \"\"\"\n decoder = toml.TomlPreserveCommentDecoder()\n return parse_toml(text, path, decoder=decoder)\n\n\ndef _dump(data, stream):\n return toml.dump(data, stream, encoder=toml.TomlPreserveCommentEncoder())\n\n\ndef dump_toml(path, data, tree=None):\n return _dump_data(path, data, dumper=_dump, tree=tree)\n\n\n@contextmanager\ndef modify_toml(path, tree=None):\n with _modify_data(path, parse_toml_for_update, dump_toml, tree=tree) as d:\n yield d", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_yaml.py_io_load_yaml.return._load_data_path_parser_p": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_yaml.py_io_load_yaml.return._load_data_path_parser_p", "embedding": null, "metadata": {"file_path": "dvc/utils/serialize/_yaml.py", "file_name": "_yaml.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 23, "span_ids": ["YAMLError", "YAMLFileCorruptedError", "YAMLFileCorruptedError.__init__", "imports", "load_yaml"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import io\nfrom collections import OrderedDict\nfrom contextlib import contextmanager\n\nfrom funcy import reraise\nfrom ruamel.yaml import YAML\nfrom ruamel.yaml.constructor import DuplicateKeyError\nfrom ruamel.yaml.error import YAMLError as _YAMLError\n\nfrom ._common import ParseError, _dump_data, _load_data, _modify_data\n\n\nclass YAMLError(ParseError):\n pass\n\n\nclass YAMLFileCorruptedError(YAMLError):\n def __init__(self, path):\n super().__init__(path, \"YAML file structure is corrupted\")\n\n\ndef load_yaml(path, tree=None):\n return _load_data(path, parser=parse_yaml, tree=tree)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_yaml.py_parse_yaml_parse_yaml.try_.except_DuplicateKeyError_.raise_YAMLError_path_exc": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_yaml.py_parse_yaml_parse_yaml.try_.except_DuplicateKeyError_.raise_YAMLError_path_exc", "embedding": null, "metadata": {"file_path": "dvc/utils/serialize/_yaml.py", "file_name": "_yaml.py", "file_type": "text/x-python", "category": "implementation", "start_line": 26, "end_line": 35, "span_ids": ["parse_yaml"], "tokens": 111}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def parse_yaml(text, path, typ=\"safe\"):\n yaml = YAML(typ=typ)\n try:\n with reraise(_YAMLError, YAMLFileCorruptedError(path)):\n return yaml.load(text) or {}\n except DuplicateKeyError as exc:\n # NOTE: unfortunately this one doesn't inherit from YAMLError, so we\n # have to catch it by-hand. See\n # https://yaml.readthedocs.io/en/latest/api.html#duplicate-keys\n raise YAMLError(path, exc.problem)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_yaml.py_parse_yaml_for_update_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/serialize/_yaml.py_parse_yaml_for_update_", "embedding": null, "metadata": {"file_path": "dvc/utils/serialize/_yaml.py", "file_name": "_yaml.py", "file_type": "text/x-python", "category": "implementation", "start_line": 38, "end_line": 83, "span_ids": ["modify_yaml", "_get_yaml", "_dump", "parse_yaml_for_update", "dump_yaml", "dumps_yaml", "loads_yaml"], "tokens": 280}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def parse_yaml_for_update(text, path):\n \"\"\"Parses text into Python structure.\n\n Unlike `parse_yaml()` this returns ordered dicts, values have special\n attributes to store comments and line breaks. This allows us to preserve\n all of those upon dump.\n\n This one is, however, several times slower than simple `parse_yaml()`.\n \"\"\"\n return parse_yaml(text, path, typ=\"rt\")\n\n\ndef _get_yaml():\n yaml = YAML()\n yaml.default_flow_style = False\n\n # tell Dumper to represent OrderedDict as normal dict\n yaml_repr_cls = yaml.Representer\n yaml_repr_cls.add_representer(OrderedDict, yaml_repr_cls.represent_dict)\n return yaml\n\n\ndef _dump(data, stream):\n yaml = _get_yaml()\n return yaml.dump(data, stream)\n\n\ndef dump_yaml(path, data, tree=None):\n return _dump_data(path, data, dumper=_dump, tree=tree)\n\n\ndef loads_yaml(s, typ=\"safe\"):\n return YAML(typ=typ).load(s)\n\n\ndef dumps_yaml(d):\n stream = io.StringIO()\n _dump(d, stream)\n return stream.getvalue()\n\n\n@contextmanager\ndef modify_yaml(path, tree=None):\n with _modify_data(path, parse_yaml_for_update, dump_yaml, tree=tree) as d:\n yield d", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/hooks/hook-dvc.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/hooks/hook-dvc.py__", "embedding": null, "metadata": {"file_path": "scripts/hooks/hook-dvc.py", "file_name": "hook-dvc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 3, "span_ids": ["docstring"], "tokens": 25}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# https://github.com/pypa/setuptools/issues/1963\nhiddenimports = [\"pkg_resources.py2_warn\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/hooks/hook-dvc.tree.gs.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/hooks/hook-dvc.tree.gs.py__", "embedding": null, "metadata": {"file_path": "scripts/hooks/hook-dvc.tree.gs.py", "file_name": "hook-dvc.tree.gs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 12, "span_ids": ["imports"], "tokens": 85}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from PyInstaller.utils.hooks import ( # pylint:disable=import-error\n copy_metadata,\n)\n\ndatas = copy_metadata(\"google-cloud-storage\")\n\n# NOTE: including \"requests\" metadata because of google-resumable-media\n# bug. See [1] for more info.\n#\n# [1] https://github.com/googleapis/google-resumable-media-python/issues/59\ndatas += copy_metadata(\"requests\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/hooks/hook-dvc.utils.flatten.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/scripts/hooks/hook-dvc.utils.flatten.py__", "embedding": null, "metadata": {"file_path": "scripts/hooks/hook-dvc.utils.flatten.py", "file_name": "hook-dvc.utils.flatten.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 6, "span_ids": ["imports"], "tokens": 30}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from PyInstaller.utils.hooks import ( # pylint:disable=import-error\n copy_metadata,\n)\n\ndatas = copy_metadata(\"flatten-dict\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_show.py_test_show_experiment_test_show_experiment.for_rev_exp_in_experimen.if_rev_baseline_.else_.assert_exp_params_par": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_show.py_test_show_experiment_test_show_experiment.for_rev_exp_in_experimen.if_rev_baseline_.else_.assert_exp_params_par", "embedding": null, "metadata": {"file_path": "tests/func/experiments/test_show.py", "file_name": "test_show.py", "file_type": "text/x-python", "category": "test", "start_line": 22, "end_line": 51, "span_ids": ["test_show_experiment"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"workspace\", [True, False])\ndef test_show_experiment(tmp_dir, scm, dvc, exp_stage, workspace):\n baseline_rev = scm.get_rev()\n timestamp = datetime.fromtimestamp(\n scm.gitpython.repo.rev_parse(baseline_rev).committed_date\n )\n\n dvc.experiments.run(\n exp_stage.addressing, params=[\"foo=2\"], tmp_dir=not workspace\n )\n results = dvc.experiments.show()\n\n expected_baseline = {\n \"metrics\": {\"metrics.yaml\": {\"foo\": 1}},\n \"params\": {\"params.yaml\": {\"foo\": 1}},\n \"queued\": False,\n \"timestamp\": timestamp,\n \"name\": \"master\",\n }\n expected_params = {\"foo\": 2}\n\n assert set(results.keys()) == {\"workspace\", baseline_rev}\n experiments = results[baseline_rev]\n assert len(experiments) == 2\n for rev, exp in experiments.items():\n if rev == \"baseline\":\n assert exp == expected_baseline\n else:\n assert exp[\"metrics\"][\"metrics.yaml\"] == expected_params\n assert exp[\"params\"][\"params.yaml\"] == expected_params", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_show.py_pytest_test_show_toml.assert_dvc_params_show_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_show.py_pytest_test_show_toml.assert_dvc_params_show_", "embedding": null, "metadata": {"file_path": "tests/func/params/test_show.py", "file_name": "test_show.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 25, "span_ids": ["imports", "test_show_empty", "test_show_toml", "test_show"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.repo import Repo\nfrom dvc.repo.params.show import NoParamsError\n\n\ndef test_show_empty(dvc):\n with pytest.raises(NoParamsError):\n dvc.params.show()\n\n\ndef test_show(tmp_dir, dvc):\n tmp_dir.gen(\"params.yaml\", \"foo: bar\")\n dvc.run(cmd=\"echo params.yaml\", params=[\"foo\"], single_stage=True)\n assert dvc.params.show() == {\"\": {\"params.yaml\": {\"foo\": \"bar\"}}}\n\n\ndef test_show_toml(tmp_dir, dvc):\n tmp_dir.gen(\"params.toml\", \"[foo]\\nbar = 42\\nbaz = [1, 2]\\n\")\n dvc.run(\n cmd=\"echo params.toml\", params=[\"params.toml:foo\"], single_stage=True\n )\n assert dvc.params.show() == {\n \"\": {\"params.toml\": {\"foo\": {\"bar\": 42, \"baz\": [1, 2]}}}\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_show.py_test_show_py_test_show_py.assert_dvc_params_show_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_show.py_test_show_py_test_show_py.assert_dvc_params_show_", "embedding": null, "metadata": {"file_path": "tests/func/params/test_show.py", "file_name": "test_show.py", "file_type": "text/x-python", "category": "test", "start_line": 27, "end_line": 39, "span_ids": ["test_show_py"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_show_py(tmp_dir, dvc):\n tmp_dir.gen(\n \"params.py\",\n \"CONST = 1\\nIS_DIR: bool = True\\n\\n\\nclass Config:\\n foo = 42\\n\",\n )\n dvc.run(\n cmd=\"echo params.py\",\n params=[\"params.py:CONST,IS_DIR,Config.foo\"],\n single_stage=True,\n )\n assert dvc.params.show() == {\n \"\": {\"params.py\": {\"CONST\": 1, \"IS_DIR\": True, \"Config\": {\"foo\": 42}}}\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_show.py_test_show_multiple_test_show_list.assert_dvc_params_show_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_show.py_test_show_multiple_test_show_list.assert_dvc_params_show_", "embedding": null, "metadata": {"file_path": "tests/func/params/test_show.py", "file_name": "test_show.py", "file_type": "text/x-python", "category": "test", "start_line": 42, "end_line": 64, "span_ids": ["test_show_list", "test_show_multiple"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_show_multiple(tmp_dir, dvc):\n tmp_dir.gen(\"params.yaml\", \"foo: bar\\nbaz: qux\\n\")\n dvc.run(\n cmd=\"echo params.yaml\",\n fname=\"foo.dvc\",\n params=[\"foo\"],\n single_stage=True,\n )\n dvc.run(\n cmd=\"echo params.yaml\",\n fname=\"baz.dvc\",\n params=[\"baz\"],\n single_stage=True,\n )\n assert dvc.params.show() == {\n \"\": {\"params.yaml\": {\"foo\": \"bar\", \"baz\": \"qux\"}}\n }\n\n\ndef test_show_list(tmp_dir, dvc):\n tmp_dir.gen(\"params.yaml\", \"foo:\\n- bar\\n- baz\\n\")\n dvc.run(cmd=\"echo params.yaml\", params=[\"foo\"], single_stage=True)\n assert dvc.params.show() == {\"\": {\"params.yaml\": {\"foo\": [\"bar\", \"baz\"]}}}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_show.py_test_show_branch_test_show_branch.assert_dvc_params_show_re": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/params/test_show.py_test_show_branch_test_show_branch.assert_dvc_params_show_re", "embedding": null, "metadata": {"file_path": "tests/func/params/test_show.py", "file_name": "test_show.py", "file_type": "text/x-python", "category": "test", "start_line": 67, "end_line": 79, "span_ids": ["test_show_branch"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_show_branch(tmp_dir, scm, dvc):\n tmp_dir.gen(\"params.yaml\", \"foo: bar\")\n dvc.run(cmd=\"echo params.yaml\", params=[\"foo\"], single_stage=True)\n scm.add([\"params.yaml\", \"Dvcfile\"])\n scm.commit(\"init\")\n\n with tmp_dir.branch(\"branch\", new=True):\n tmp_dir.scm_gen(\"params.yaml\", \"foo: baz\", commit=\"branch\")\n\n assert dvc.params.show(revs=[\"branch\"]) == {\n \"workspace\": {\"params.yaml\": {\"foo\": \"bar\"}},\n \"branch\": {\"params.yaml\": {\"foo\": \"baz\"}},\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/remote/test_index.py_test_indexed_on_status_test_indexed_on_status.None_1.assert_foo_hash_info_valu": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/remote/test_index.py_test_indexed_on_status_test_indexed_on_status.None_1.assert_foo_hash_info_valu", "embedding": null, "metadata": {"file_path": "tests/func/remote/test_index.py", "file_name": "test_index.py", "file_type": "text/x-python", "category": "test", "start_line": 32, "end_line": 46, "span_ids": ["test_indexed_on_status"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_indexed_on_status(tmp_dir, dvc, tmp_path_factory, remote):\n foo = tmp_dir.dvc_gen({\"foo\": \"foo content\"})[0].outs[0]\n bar = tmp_dir.dvc_gen({\"bar\": {\"baz\": \"baz content\"}})[0].outs[0]\n baz_hash = bar.dir_cache.trie.get((\"baz\",))\n dvc.push()\n with remote.index:\n remote.index.clear()\n\n dvc.status(cloud=True)\n with remote.index:\n assert {bar.hash_info.value, baz_hash.value} == set(\n remote.index.hashes()\n )\n assert [bar.hash_info.value] == list(remote.index.dir_hashes())\n assert foo.hash_info.value not in remote.index.hashes()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/remote/test_index.py_test_indexed_on_push_test_indexed_on_push.with_remote_index_.assert_foo_hash_info_valu": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/remote/test_index.py_test_indexed_on_push_test_indexed_on_push.with_remote_index_.assert_foo_hash_info_valu", "embedding": null, "metadata": {"file_path": "tests/func/remote/test_index.py", "file_name": "test_index.py", "file_type": "text/x-python", "category": "test", "start_line": 49, "end_line": 60, "span_ids": ["test_indexed_on_push"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_indexed_on_push(tmp_dir, dvc, tmp_path_factory, remote):\n foo = tmp_dir.dvc_gen({\"foo\": \"foo content\"})[0].outs[0]\n bar = tmp_dir.dvc_gen({\"bar\": {\"baz\": \"baz content\"}})[0].outs[0]\n baz_hash = bar.dir_cache.trie.get((\"baz\",))\n\n dvc.push()\n with remote.index:\n assert {bar.hash_info.value, baz_hash.value} == set(\n remote.index.hashes()\n )\n assert [bar.hash_info.value] == list(remote.index.dir_hashes())\n assert foo.hash_info.value not in remote.index.hashes()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_output_duplication_for_pipeline_tracked_test_add_pipeline_file.with_pytest_raises_Output.dvc_add_PIPELINE_FILE_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_output_duplication_for_pipeline_tracked_test_add_pipeline_file.with_pytest_raises_Output.dvc_add_PIPELINE_FILE_", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 795, "end_line": 809, "span_ids": ["test_add_pipeline_file", "test_output_duplication_for_pipeline_tracked"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_output_duplication_for_pipeline_tracked(tmp_dir, dvc, run_copy):\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n with pytest.raises(OutputDuplicationError):\n dvc.add(\"bar\")\n\n\ndef test_add_pipeline_file(tmp_dir, dvc, run_copy):\n from dvc.dvcfile import PIPELINE_FILE\n\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n\n with pytest.raises(OutputIsStageFileError):\n dvc.add(PIPELINE_FILE)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_open_scm_controlled_test_open_not_cached.with_pytest_raises_FileMi.api_read_metric_file_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_open_scm_controlled_test_open_not_cached.with_pytest_raises_FileMi.api_read_metric_file_", "embedding": null, "metadata": {"file_path": "tests/func/test_api.py", "file_name": "test_api.py", "file_type": "text/x-python", "category": "test", "start_line": 153, "end_line": 177, "span_ids": ["test_open_not_cached", "test_open_scm_controlled"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_open_scm_controlled(tmp_dir, erepo_dir):\n erepo_dir.scm_gen({\"scm_controlled\": \"file content\"}, commit=\"create file\")\n\n with api.open(\"scm_controlled\", repo=os.fspath(erepo_dir)) as fd:\n assert fd.read() == \"file content\"\n\n\ndef test_open_not_cached(dvc):\n metric_file = \"metric.txt\"\n metric_content = \"0.6\"\n metric_code = \"open('{}', 'w').write('{}')\".format(\n metric_file, metric_content\n )\n dvc.run(\n single_stage=True,\n metrics_no_cache=[metric_file],\n cmd=(f'python -c \"{metric_code}\"'),\n )\n\n with api.open(metric_file) as fd:\n assert fd.read() == metric_content\n\n os.remove(metric_file)\n with pytest.raises(FileMissingError):\n api.read(metric_file)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_api_missing_local_cache_exists_on_remote_test_api_missing_local_cache_exists_on_remote.assert_api_read_to_read_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_api_missing_local_cache_exists_on_remote_test_api_missing_local_cache_exists_on_remote.assert_api_read_to_read_", "embedding": null, "metadata": {"file_path": "tests/func/test_api.py", "file_name": "test_api.py", "file_type": "text/x-python", "category": "test", "start_line": 180, "end_line": 202, "span_ids": ["test_api_missing_local_cache_exists_on_remote"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"as_external\", [True, False])\n@pytest.mark.parametrize(\"remote\", [pytest.lazy_fixture(\"ssh\")], indirect=True)\n@pytest.mark.parametrize(\n \"files, to_read\",\n [\n ({\"foo\": \"foo\"}, \"foo\"),\n ({\"dir\": {\"foo\": \"foo\", \"bar\": \"bar\"}}, os.path.join(\"dir\", \"foo\")),\n ],\n ids=[\"file\", \"inside-dir\"],\n)\ndef test_api_missing_local_cache_exists_on_remote(\n tmp_dir, scm, dvc, as_external, remote, files, to_read,\n):\n tmp_dir.dvc_gen(files, commit=\"DVC track files\")\n dvc.push()\n\n # Remove cache to make foo missing\n remove(dvc.cache.local.cache_dir)\n remove(first(files))\n\n repo_url = f\"file://{tmp_dir}\" if as_external else None\n file_content = get_in(files, to_read.split(os.sep))\n assert api.read(to_read, repo=repo_url) == file_content", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_read_with_subrepos_test_read_with_subrepos.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_read_with_subrepos_test_read_with_subrepos.None_3", "embedding": null, "metadata": {"file_path": "tests/func/test_api.py", "file_name": "test_api.py", "file_type": "text/x-python", "category": "test", "start_line": 205, "end_line": 231, "span_ids": ["test_read_with_subrepos"], "tokens": 300}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"local_repo\", [False, True])\ndef test_read_with_subrepos(tmp_dir, scm, local_cloud, local_repo):\n tmp_dir.scm_gen(\"foo.txt\", \"foo.txt\", commit=\"add foo.txt\")\n subrepo = tmp_dir / \"dir\" / \"subrepo\"\n make_subrepo(subrepo, scm, config=local_cloud.config)\n with subrepo.chdir():\n subrepo.scm_gen({\"lorem\": \"lorem\"}, commit=\"add lorem\")\n subrepo.dvc_gen({\"dir\": {\"file.txt\": \"file.txt\"}}, commit=\"add dir\")\n subrepo.dvc_gen(\"dvc-file\", \"dvc-file\", commit=\"add dir\")\n subrepo.dvc.push()\n\n repo_path = None if local_repo else f\"file:///{tmp_dir}\"\n subrepo_path = os.path.join(\"dir\", \"subrepo\")\n\n assert api.read(\"foo.txt\", repo=repo_path) == \"foo.txt\"\n assert (\n api.read(os.path.join(subrepo_path, \"lorem\"), repo=repo_path)\n == \"lorem\"\n )\n assert (\n api.read(os.path.join(subrepo_path, \"dvc-file\"), repo=repo_path)\n == \"dvc-file\"\n )\n assert (\n api.read(os.path.join(subrepo_path, \"dir\", \"file.txt\"), repo=repo_path)\n == \"file.txt\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_get_url_granular_test_get_url_granular.assert_api_get_url_os_pat": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_get_url_granular_test_get_url_granular.assert_api_get_url_os_pat", "embedding": null, "metadata": {"file_path": "tests/func/test_api.py", "file_name": "test_api.py", "file_type": "text/x-python", "category": "test", "start_line": 234, "end_line": 250, "span_ids": ["test_get_url_granular"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_url_granular(tmp_dir, dvc, s3):\n tmp_dir.add_remote(config=s3.config)\n tmp_dir.dvc_gen(\n {\"dir\": {\"foo\": \"foo\", \"bar\": \"bar\", \"nested\": {\"file\": \"file\"}}}\n )\n\n expected_url = URLInfo(s3.url) / \"5f/c28ea78987408341668eba6525ebd1.dir\"\n assert api.get_url(\"dir\") == expected_url\n\n expected_url = URLInfo(s3.url) / \"ac/bd18db4cc2f85cedef654fccc4a4d8\"\n assert api.get_url(\"dir/foo\") == expected_url\n\n expected_url = URLInfo(s3.url) / \"37/b51d194a7513e45b56f6524f2d51f2\"\n assert api.get_url(\"dir/bar\") == expected_url\n\n expected_url = URLInfo(s3.url) / \"8c/7dd922ad47494fc02c388e12c00eac\"\n assert api.get_url(os.path.join(\"dir\", \"nested\", \"file\")) == expected_url", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_get_url_subrepos_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_api.py_test_get_url_subrepos_", "embedding": null, "metadata": {"file_path": "tests/func/test_api.py", "file_name": "test_api.py", "file_type": "text/x-python", "category": "test", "start_line": 253, "end_line": 269, "span_ids": ["test_get_url_subrepos"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_url_subrepos(tmp_dir, scm, local_cloud):\n subrepo = tmp_dir / \"subrepo\"\n make_subrepo(subrepo, scm, config=local_cloud.config)\n with subrepo.chdir():\n subrepo.dvc_gen(\n {\"dir\": {\"foo\": \"foo\"}, \"bar\": \"bar\"}, commit=\"add files\"\n )\n subrepo.dvc.push()\n\n path = os.path.relpath(local_cloud.config[\"url\"])\n\n expected_url = os.path.join(path, \"ac\", \"bd18db4cc2f85cedef654fccc4a4d8\")\n assert api.get_url(os.path.join(\"subrepo\", \"dir\", \"foo\")) == expected_url\n\n expected_url = os.path.join(path, \"37\", \"b51d194a7513e45b56f6524f2d51f2\")\n assert api.get_url(\"subrepo/bar\") == expected_url", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_check_ignore.py_os_test_check_ignore.assert_Having_any_troubl": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_check_ignore.py_os_test_check_ignore.assert_Having_any_troubl", "embedding": null, "metadata": {"file_path": "tests/func/test_check_ignore.py", "file_name": "test_check_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 17, "span_ids": ["imports", "test_check_ignore"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nimport pytest\n\nfrom dvc.ignore import DvcIgnore\nfrom dvc.main import main\n\n\n@pytest.mark.parametrize(\n \"file,ret,output\", [(\"ignored\", 0, True), (\"not_ignored\", 1, False)]\n)\ndef test_check_ignore(tmp_dir, dvc, file, ret, output, caplog):\n tmp_dir.gen(DvcIgnore.DVCIGNORE_FILE, \"ignored\")\n\n assert main([\"check-ignore\", file]) == ret\n assert (file in caplog.text) is output\n assert \"Having any troubles?\" not in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_check_ignore.py_test_check_ignore_details_test_check_ignore_details.assert_output_in_caplog_t": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_check_ignore.py_test_check_ignore_details_test_check_ignore_details.assert_output_in_caplog_t", "embedding": null, "metadata": {"file_path": "tests/func/test_check_ignore.py", "file_name": "test_check_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 20, "end_line": 40, "span_ids": ["test_check_ignore_details"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"file,ret,output\",\n [\n (\"file\", 0, \"{}:1:f*\\tfile\\n\".format(DvcIgnore.DVCIGNORE_FILE)),\n (\"foo\", 0, \"{}:2:!foo\\tfoo\\n\".format(DvcIgnore.DVCIGNORE_FILE)),\n (\n os.path.join(\"dir\", \"foobar\"),\n 0,\n \"{}:1:foobar\\t{}\\n\".format(\n os.path.join(\"dir\", DvcIgnore.DVCIGNORE_FILE),\n os.path.join(\"dir\", \"foobar\"),\n ),\n ),\n ],\n)\ndef test_check_ignore_details(tmp_dir, dvc, file, ret, output, caplog):\n tmp_dir.gen(DvcIgnore.DVCIGNORE_FILE, \"f*\\n!foo\")\n tmp_dir.gen({\"dir\": {DvcIgnore.DVCIGNORE_FILE: \"foobar\"}})\n\n assert main([\"check-ignore\", \"-d\", file]) == ret\n assert output in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_check_ignore.py_test_check_ignore_non_matching_test_check_ignore_out_side_repo.assert_main_check_ignor": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_check_ignore.py_test_check_ignore_non_matching_test_check_ignore_out_side_repo.assert_main_check_ignor", "embedding": null, "metadata": {"file_path": "tests/func/test_check_ignore.py", "file_name": "test_check_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 43, "end_line": 83, "span_ids": ["test_check_ignore_error_args_cases", "test_check_ignore_default_dir", "test_check_ignore_dir", "test_check_ignore_out_side_repo", "test_check_ignore_non_matching"], "tokens": 356}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"non_matching\", [True, False])\ndef test_check_ignore_non_matching(tmp_dir, dvc, non_matching, caplog):\n tmp_dir.gen(DvcIgnore.DVCIGNORE_FILE, \"other\")\n if non_matching:\n assert main([\"check-ignore\", \"-d\", \"-n\", \"file\"]) == 1\n else:\n assert main([\"check-ignore\", \"-d\", \"file\"]) == 1\n\n assert (\"::\\tfile\\n\" in caplog.text) is non_matching\n\n\n@pytest.mark.parametrize(\n \"args\",\n [\n [\"-n\", \"file\"],\n [\"-a\", \"file\"],\n [\"-q\", \"-d\", \"file\"],\n [\"--stdin\", \"file\"],\n [],\n ],\n)\ndef test_check_ignore_error_args_cases(tmp_dir, dvc, args, caplog):\n assert main([\"check-ignore\"] + args) == 255\n assert \"Having any troubles?\" not in caplog.text\n\n\n@pytest.mark.parametrize(\"path,ret\", [({\"dir\": {}}, 0), ({\"dir\": \"files\"}, 1)])\ndef test_check_ignore_dir(tmp_dir, dvc, path, ret):\n tmp_dir.gen(DvcIgnore.DVCIGNORE_FILE, \"dir/\")\n tmp_dir.gen(path)\n\n assert main([\"check-ignore\", \"-q\", \"dir\"]) == ret\n\n\ndef test_check_ignore_default_dir(tmp_dir, dvc):\n assert main([\"check-ignore\", \"-q\", \".dvc\"]) == 1\n\n\ndef test_check_ignore_out_side_repo(tmp_dir, dvc):\n tmp_dir.gen(DvcIgnore.DVCIGNORE_FILE, \"file\")\n assert main([\"check-ignore\", \"-q\", \"../file\"]) == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_check_ignore.py_test_check_ignore_sub_repo_test_check_ignore_sub_repo.assert_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_check_ignore.py_test_check_ignore_sub_repo_test_check_ignore_sub_repo.assert_", "embedding": null, "metadata": {"file_path": "tests/func/test_check_ignore.py", "file_name": "test_check_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 86, "end_line": 95, "span_ids": ["test_check_ignore_sub_repo"], "tokens": 108}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_check_ignore_sub_repo(tmp_dir, dvc, caplog):\n tmp_dir.gen(\n {DvcIgnore.DVCIGNORE_FILE: \"other\", \"dir\": {\".dvc\": {}, \"foo\": \"bar\"}}\n )\n\n assert main([\"check-ignore\", \"-d\", os.path.join(\"dir\", \"foo\")]) == 0\n assert (\n \"in sub_repo:{}\\t{}\".format(\"dir\", os.path.join(\"dir\", \"foo\"),)\n in caplog.text\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_check_ignore.py_test_check_sub_dir_ignore_file_test_check_sub_dir_ignore_file.with_sub_dir_chdir_.assert_dvcignore_2_foo_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_check_ignore.py_test_check_sub_dir_ignore_file_test_check_sub_dir_ignore_file.with_sub_dir_chdir_.assert_dvcignore_2_foo_", "embedding": null, "metadata": {"file_path": "tests/func/test_check_ignore.py", "file_name": "test_check_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 98, "end_line": 118, "span_ids": ["test_check_sub_dir_ignore_file"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_check_sub_dir_ignore_file(tmp_dir, dvc, caplog):\n tmp_dir.gen(\n {\n DvcIgnore.DVCIGNORE_FILE: \"other\",\n \"dir\": {DvcIgnore.DVCIGNORE_FILE: \"bar\\nfoo\", \"foo\": \"bar\"},\n }\n )\n\n assert main([\"check-ignore\", \"-d\", os.path.join(\"dir\", \"foo\")]) == 0\n assert (\n \"{}:2:foo\\t{}\".format(\n os.path.join(\"dir\", DvcIgnore.DVCIGNORE_FILE),\n os.path.join(\"dir\", \"foo\"),\n )\n in caplog.text\n )\n\n sub_dir = tmp_dir / \"dir\"\n with sub_dir.chdir():\n assert main([\"check-ignore\", \"-d\", \"foo\"]) == 0\n assert \".dvcignore:2:foo\\tfoo\" in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_check_ignore.py_test_check_ignore_details_all_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_check_ignore.py_test_check_ignore_details_all_", "embedding": null, "metadata": {"file_path": "tests/func/test_check_ignore.py", "file_name": "test_check_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 121, "end_line": 140, "span_ids": ["test_check_ignore_details_all", "test_check_ignore_stdin_mode"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_check_ignore_details_all(tmp_dir, dvc, caplog):\n tmp_dir.gen(DvcIgnore.DVCIGNORE_FILE, \"f*\\n!foo\")\n\n assert main([\"check-ignore\", \"-d\", \"-a\", \"foo\"]) == 0\n assert \"{}:1:f*\\tfoo\\n\".format(DvcIgnore.DVCIGNORE_FILE) in caplog.text\n assert \"{}:2:!foo\\tfoo\\n\".format(DvcIgnore.DVCIGNORE_FILE) in caplog.text\n\n\n@pytest.mark.parametrize(\n \"file,ret,output\", [(\"ignored\", 0, True), (\"not_ignored\", 1, False)]\n)\ndef test_check_ignore_stdin_mode(\n tmp_dir, dvc, file, ret, output, caplog, mocker\n):\n tmp_dir.gen(DvcIgnore.DVCIGNORE_FILE, \"ignored\")\n mocker.patch(\"builtins.input\", side_effect=[file, \"\"])\n\n assert main([\"check-ignore\", \"--stdin\"]) == ret\n assert (file in caplog.text) is output", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkouts_for_pipeline_tracked_outs_test_checkouts_for_pipeline_tracked_outs.None_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkouts_for_pipeline_tracked_outs_test_checkouts_for_pipeline_tracked_outs.None_4", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 831, "end_line": 852, "span_ids": ["test_checkouts_for_pipeline_tracked_outs"], "tokens": 253}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_checkouts_for_pipeline_tracked_outs(tmp_dir, dvc, scm, run_copy):\n tmp_dir.gen(\"foo\", \"foo\")\n stage1 = run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n tmp_dir.gen(\"lorem\", \"lorem\")\n stage2 = run_copy(\"lorem\", \"ipsum\", name=\"copy-lorem-ipsum\")\n\n for out in [\"bar\", \"ipsum\"]:\n (tmp_dir / out).unlink()\n assert dvc.checkout([\"bar\"])[\"added\"] == [\"bar\"]\n\n (tmp_dir / \"bar\").unlink()\n assert set(dvc.checkout([PIPELINE_FILE])[\"added\"]) == {\"bar\", \"ipsum\"}\n\n for out in [\"bar\", \"ipsum\"]:\n (tmp_dir / out).unlink()\n assert set(dvc.checkout([stage1.addressing])[\"added\"]) == {\"bar\"}\n\n (tmp_dir / \"bar\").unlink()\n assert set(dvc.checkout([stage2.addressing])[\"added\"]) == {\"ipsum\"}\n\n (tmp_dir / \"ipsum\").unlink()\n assert set(dvc.checkout()[\"added\"]) == {\"bar\", \"ipsum\"}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_commit.py_from_os_import_fspath_test_commit_recursive.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_commit.py_from_os_import_fspath_test_commit_recursive.None_2", "embedding": null, "metadata": {"file_path": "tests/func/test_commit.py", "file_name": "test_commit.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 20, "span_ids": ["imports", "test_commit_recursive"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from os import fspath\n\nimport pytest\n\nfrom dvc.dependency.base import DependencyDoesNotExistError\nfrom dvc.dvcfile import PIPELINE_FILE\nfrom dvc.output.base import OutputDoesNotExistError\nfrom dvc.stage.exceptions import StageCommitError\nfrom dvc.utils.serialize import dump_yaml, load_yaml\n\n\ndef test_commit_recursive(tmp_dir, dvc):\n tmp_dir.gen({\"dir\": {\"file\": \"text1\", \"subdir\": {\"file2\": \"text2\"}}})\n stages = dvc.add(\"dir\", recursive=True, no_commit=True)\n\n assert len(stages) == 2\n assert dvc.status() != {}\n\n dvc.commit(\"dir\", recursive=True)\n assert dvc.status() == {}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_commit.py_test_commit_with_deps_test_commit_with_deps.assert_not_stage_outs_0_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_commit.py_test_commit_with_deps_test_commit_with_deps.assert_not_stage_outs_0_", "embedding": null, "metadata": {"file_path": "tests/func/test_commit.py", "file_name": "test_commit.py", "file_type": "text/x-python", "category": "test", "start_line": 42, "end_line": 58, "span_ids": ["test_commit_with_deps"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"run_kw\", [{\"single_stage\": True}, {\"name\": \"copy\"}])\ndef test_commit_with_deps(tmp_dir, dvc, run_copy, run_kw):\n tmp_dir.gen(\"foo\", \"foo\")\n (foo_stage,) = dvc.add(\"foo\", no_commit=True)\n assert foo_stage is not None\n assert len(foo_stage.outs) == 1\n\n stage = run_copy(\"foo\", \"file\", no_commit=True, **run_kw)\n assert stage is not None\n assert len(stage.outs) == 1\n\n assert foo_stage.outs[0].changed_cache()\n assert stage.outs[0].changed_cache()\n\n dvc.commit(stage.path, with_deps=True)\n assert not foo_stage.outs[0].changed_cache()\n assert not stage.outs[0].changed_cache()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_commit.py_test_commit_changed_md5_test_commit_changed_md5.assert_md5_not_in_load_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_commit.py_test_commit_changed_md5_test_commit_changed_md5.assert_md5_not_in_load_", "embedding": null, "metadata": {"file_path": "tests/func/test_commit.py", "file_name": "test_commit.py", "file_type": "text/x-python", "category": "test", "start_line": 61, "end_line": 73, "span_ids": ["test_commit_changed_md5"], "tokens": 112}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_commit_changed_md5(tmp_dir, dvc):\n tmp_dir.gen({\"file\": \"file content\"})\n (stage,) = dvc.add(\"file\", no_commit=True)\n\n stage_file_content = load_yaml(stage.path)\n stage_file_content[\"md5\"] = \"1111111111\"\n dump_yaml(stage.path, stage_file_content)\n\n with pytest.raises(StageCommitError):\n dvc.commit(stage.path)\n\n dvc.commit(stage.path, force=True)\n assert \"md5\" not in load_yaml(stage.path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_commit.py_test_commit_no_exec_test_commit_no_exec_missing_out.with_pytest_raises_Output.dvc_commit_stage_path_fo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_commit.py_test_commit_no_exec_test_commit_no_exec_missing_out.with_pytest_raises_Output.dvc_commit_stage_path_fo", "embedding": null, "metadata": {"file_path": "tests/func/test_commit.py", "file_name": "test_commit.py", "file_type": "text/x-python", "category": "test", "start_line": 76, "end_line": 101, "span_ids": ["test_commit_no_exec", "test_commit_no_exec_missing_dep", "test_commit_no_exec_missing_out"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_commit_no_exec(tmp_dir, dvc):\n tmp_dir.gen({\"dep\": \"dep\", \"out\": \"out\"})\n stage = dvc.run(\n name=\"my\", cmd=\"mycmd\", deps=[\"dep\"], outs=[\"out\"], no_exec=True\n )\n assert dvc.status(stage.path)\n dvc.commit(stage.path, force=True)\n assert dvc.status(stage.path) == {}\n\n\ndef test_commit_no_exec_missing_dep(tmp_dir, dvc):\n stage = dvc.run(\n name=\"my\", cmd=\"mycmd\", deps=[\"dep\"], outs=[\"out\"], no_exec=True\n )\n assert dvc.status(stage.path)\n\n with pytest.raises(DependencyDoesNotExistError):\n dvc.commit(stage.path, force=True)\n\n\ndef test_commit_no_exec_missing_out(tmp_dir, dvc):\n stage = dvc.run(name=\"my\", cmd=\"mycmd\", outs=[\"out\"], no_exec=True)\n assert dvc.status(stage.path)\n\n with pytest.raises(OutputDoesNotExistError):\n dvc.commit(stage.path, force=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_logging_all_clouds._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_logging_all_clouds._", "embedding": null, "metadata": {"file_path": "tests/func/test_data_cloud.py", "file_name": "test_data_cloud.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 42, "span_ids": ["imports"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nimport shutil\n\nimport pytest\nfrom flaky.flaky_decorator import flaky\n\nfrom dvc.cache import NamedCache\nfrom dvc.external_repo import clean_repos\nfrom dvc.main import main\nfrom dvc.remote.base import (\n STATUS_DELETED,\n STATUS_MISSING,\n STATUS_NEW,\n STATUS_OK,\n)\nfrom dvc.stage.exceptions import StageNotFound\nfrom dvc.tree.local import LocalTree\nfrom dvc.utils.fs import move, remove\nfrom dvc.utils.serialize import dump_yaml, load_yaml\n\nall_clouds = [\n pytest.lazy_fixture(cloud)\n for cloud in [\n \"s3\",\n \"gs\",\n \"azure\",\n \"gdrive\",\n \"ssh\",\n \"http\",\n \"hdfs\",\n \"webdav\",\n \"webhdfs\",\n ]\n] + [\n pytest.param(\n pytest.lazy_fixture(\"oss\"),\n marks=pytest.mark.xfail(\n reason=\"https://github.com/iterative/dvc/issues/4633\",\n ),\n )\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_cloud_test_cloud.None_17": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_cloud_test_cloud.None_17", "embedding": null, "metadata": {"file_path": "tests/func/test_data_cloud.py", "file_name": "test_data_cloud.py", "file_type": "text/x-python", "category": "test", "start_line": 35, "end_line": 126, "span_ids": ["test_cloud"], "tokens": 813}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"remote\", all_clouds, indirect=True)\ndef test_cloud(tmp_dir, dvc, remote): # pylint:disable=unused-argument\n (stage,) = tmp_dir.dvc_gen(\"foo\", \"foo\")\n out = stage.outs[0]\n cache = out.cache_path\n md5 = out.hash_info.value\n info = out.get_used_cache()\n\n (stage_dir,) = tmp_dir.dvc_gen(\n {\n \"data_dir\": {\n \"data_sub_dir\": {\"data_sub\": \"data_sub\"},\n \"data\": \"data\",\n \"empty\": \"\",\n }\n }\n )\n out_dir = stage_dir.outs[0]\n cache_dir = out_dir.cache_path\n name_dir = str(out_dir)\n md5_dir = out_dir.hash_info.value\n info_dir = NamedCache.make(out_dir.scheme, md5_dir, name_dir)\n\n # Check status\n status = dvc.cloud.status(info, show_checksums=True)\n expected = {md5: {\"name\": md5, \"status\": STATUS_NEW}}\n assert status == expected\n\n status_dir = dvc.cloud.status(info_dir, show_checksums=True)\n expected = {md5_dir: {\"name\": md5_dir, \"status\": STATUS_NEW}}\n assert status_dir == expected\n\n # Move cache and check status\n # See issue https://github.com/iterative/dvc/issues/4383 for details\n backup_dir = dvc.cache.local.cache_dir + \".backup\"\n move(dvc.cache.local.cache_dir, backup_dir)\n status = dvc.cloud.status(info, show_checksums=True)\n expected = {md5: {\"name\": md5, \"status\": STATUS_MISSING}}\n assert status == expected\n\n status_dir = dvc.cloud.status(info_dir, show_checksums=True)\n expected = {md5_dir: {\"name\": md5_dir, \"status\": STATUS_MISSING}}\n assert status_dir == expected\n\n # Restore original cache:\n remove(dvc.cache.local.cache_dir)\n move(backup_dir, dvc.cache.local.cache_dir)\n\n # Push and check status\n dvc.cloud.push(info)\n assert os.path.exists(cache)\n assert os.path.isfile(cache)\n\n dvc.cloud.push(info_dir)\n assert os.path.isfile(cache_dir)\n\n status = dvc.cloud.status(info, show_checksums=True)\n expected = {md5: {\"name\": md5, \"status\": STATUS_OK}}\n assert status == expected\n\n status_dir = dvc.cloud.status(info_dir, show_checksums=True)\n expected = {md5_dir: {\"name\": md5_dir, \"status\": STATUS_OK}}\n assert status_dir == expected\n\n # Remove and check status\n remove(dvc.cache.local.cache_dir)\n\n status = dvc.cloud.status(info, show_checksums=True)\n expected = {md5: {\"name\": md5, \"status\": STATUS_DELETED}}\n assert status == expected\n\n status_dir = dvc.cloud.status(info_dir, show_checksums=True)\n expected = {md5_dir: {\"name\": md5_dir, \"status\": STATUS_DELETED}}\n assert status_dir == expected\n\n # Pull and check status\n dvc.cloud.pull(info)\n assert os.path.exists(cache)\n assert os.path.isfile(cache)\n with open(cache) as fd:\n assert fd.read() == \"foo\"\n\n dvc.cloud.pull(info_dir)\n assert os.path.isfile(cache_dir)\n\n status = dvc.cloud.status(info, show_checksums=True)\n expected = {md5: {\"name\": md5, \"status\": STATUS_OK}}\n assert status == expected\n\n status_dir = dvc.cloud.status(info_dir, show_checksums=True)\n expected = {md5_dir: {\"name\": md5_dir, \"status\": STATUS_OK}}\n assert status_dir == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_missing_cache_test_missing_cache.assert_bar_not_in_caplog_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_data_cloud.py_test_missing_cache_test_missing_cache.assert_bar_not_in_caplog_", "embedding": null, "metadata": {"file_path": "tests/func/test_data_cloud.py", "file_name": "test_data_cloud.py", "file_type": "text/x-python", "category": "test", "start_line": 236, "end_line": 265, "span_ids": ["test_missing_cache"], "tokens": 269}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_missing_cache(tmp_dir, dvc, local_remote, caplog):\n tmp_dir.dvc_gen({\"foo\": \"foo\", \"bar\": \"bar\"})\n\n # purge cache\n remove(dvc.cache.local.cache_dir)\n\n header = (\n \"Some of the cache files do not exist \"\n \"neither locally nor on remote. Missing cache files:\\n\"\n )\n foo = \"name: bar, md5: 37b51d194a7513e45b56f6524f2d51f2\\n\"\n bar = \"name: foo, md5: acbd18db4cc2f85cedef654fccc4a4d8\\n\"\n\n caplog.clear()\n dvc.push()\n assert header in caplog.text\n assert foo in caplog.text\n assert bar in caplog.text\n\n caplog.clear()\n dvc.fetch()\n assert header in caplog.text\n assert foo in caplog.text\n assert bar in caplog.text\n\n caplog.clear()\n assert dvc.status(cloud=True) == {\"bar\": \"missing\", \"foo\": \"missing\"}\n assert header not in caplog.text\n assert foo not in caplog.text\n assert bar not in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_test_diff_no_cache_test_diff_no_cache.None_7": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_diff.py_test_diff_no_cache_test_diff_no_cache.None_7", "embedding": null, "metadata": {"file_path": "tests/func/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 183, "end_line": 214, "span_ids": ["test_diff_no_cache"], "tokens": 266}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_diff_no_cache(tmp_dir, scm, dvc):\n tmp_dir.dvc_gen({\"dir\": {\"file\": \"file content\"}}, commit=\"first\")\n scm.tag(\"v1\")\n\n tmp_dir.dvc_gen(\n {\"dir\": {\"file\": \"modified file content\"}}, commit=\"second\"\n )\n scm.tag(\"v2\")\n\n remove(dvc.cache.local.cache_dir)\n\n # invalidate_dir_info to force cache loading\n dvc.cache.local._dir_info = {}\n\n diff = dvc.diff(\"v1\", \"v2\")\n assert diff[\"added\"] == []\n assert diff[\"deleted\"] == []\n assert first(diff[\"modified\"])[\"path\"] == os.path.join(\"dir\", \"\")\n assert diff[\"not in cache\"] == []\n\n (tmp_dir / \"dir\" / \"file\").unlink()\n remove(str(tmp_dir / \"dir\"))\n diff = dvc.diff()\n assert diff[\"added\"] == []\n assert diff[\"deleted\"] == []\n assert diff[\"modified\"] == []\n assert diff[\"not in cache\"] == [\n {\n \"path\": os.path.join(\"dir\", \"\"),\n \"hash\": \"f0f7a307d223921557c929f944bf5303.dir\",\n },\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_remove_stage_removes_dvcfiles_if_no_stages_left_test_remove_stage_removes_dvcfiles_if_no_stages_left.assert_not_tmp_dir_PIP": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_remove_stage_removes_dvcfiles_if_no_stages_left_test_remove_stage_removes_dvcfiles_if_no_stages_left.assert_not_tmp_dir_PIP", "embedding": null, "metadata": {"file_path": "tests/func/test_dvcfile.py", "file_name": "test_dvcfile.py", "file_type": "text/x-python", "category": "test", "start_line": 288, "end_line": 302, "span_ids": ["test_remove_stage_removes_dvcfiles_if_no_stages_left"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_remove_stage_removes_dvcfiles_if_no_stages_left(\n tmp_dir, dvc, run_copy\n):\n tmp_dir.gen(\"foo\", \"foo\")\n run_copy(\"foo\", \"bar\", name=\"run_copy\")\n\n dvc_file = Dvcfile(dvc, PIPELINE_FILE)\n\n assert dvc_file.exists()\n assert (tmp_dir / PIPELINE_LOCK).exists()\n assert (tmp_dir / \"foo\").exists()\n\n dvc_file.remove_stage(dvc_file.stages[\"run_copy\"])\n assert not dvc_file.exists()\n assert not (tmp_dir / PIPELINE_LOCK).exists()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_test_relative_remote_test_relative_remote.with_external_repo_url_a.with_repo_open_by_relpath.assert_fd_read_cont": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_test_relative_remote_test_relative_remote.with_external_repo_url_a.with_repo_open_by_relpath.assert_fd_read_cont", "embedding": null, "metadata": {"file_path": "tests/func/test_external_repo.py", "file_name": "test_external_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 104, "end_line": 125, "span_ids": ["test_relative_remote"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_relative_remote(erepo_dir, tmp_dir):\n # these steps reproduce the script on this issue:\n # https://github.com/iterative/dvc/issues/2756\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\"file\", \"contents\", commit=\"create file\")\n\n upstream_dir = tmp_dir\n upstream_url = relpath(upstream_dir, erepo_dir)\n erepo_dir.add_remote(url=upstream_url)\n\n erepo_dir.dvc.push()\n\n (erepo_dir / \"file\").unlink()\n remove(erepo_dir.dvc.cache.local.cache_dir)\n\n url = os.fspath(erepo_dir)\n\n with external_repo(url) as repo:\n assert os.path.isabs(repo.config[\"remote\"][\"upstream\"][\"url\"])\n assert os.path.isdir(repo.config[\"remote\"][\"upstream\"][\"url\"])\n with repo.open_by_relpath(\"file\") as fd:\n assert fd.read() == \"contents\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_test_shallow_clone_branch_test_shallow_clone_branch.with_patch_object_Git_c.assert_not_shallow": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_test_shallow_clone_branch_test_shallow_clone_branch.with_patch_object_Git_c.assert_not_shallow", "embedding": null, "metadata": {"file_path": "tests/func/test_external_repo.py", "file_name": "test_external_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 128, "end_line": 151, "span_ids": ["test_shallow_clone_branch"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_shallow_clone_branch(erepo_dir):\n with erepo_dir.chdir():\n with erepo_dir.branch(\"branch\", new=True):\n erepo_dir.dvc_gen(\"file\", \"branch\", commit=\"create file on branch\")\n erepo_dir.dvc_gen(\"file\", \"master\", commit=\"create file on master\")\n\n url = os.fspath(erepo_dir)\n\n with patch.object(Git, \"clone\", wraps=Git.clone) as mock_clone:\n with external_repo(url, rev=\"branch\") as repo:\n with repo.open_by_relpath(\"file\") as fd:\n assert fd.read() == \"branch\"\n\n mock_clone.assert_called_with(url, ANY, shallow_branch=\"branch\")\n _, shallow = CLONES[url]\n assert shallow\n\n with external_repo(url) as repo:\n with repo.open_by_relpath(\"file\") as fd:\n assert fd.read() == \"master\"\n\n assert mock_clone.call_count == 1\n _, shallow = CLONES[url]\n assert not shallow", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_test_shallow_clone_tag_test_shallow_clone_tag.with_patch_object_Git_c.assert_not_shallow": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_test_shallow_clone_tag_test_shallow_clone_tag.with_patch_object_Git_c.assert_not_shallow", "embedding": null, "metadata": {"file_path": "tests/func/test_external_repo.py", "file_name": "test_external_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 154, "end_line": 177, "span_ids": ["test_shallow_clone_tag"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_shallow_clone_tag(erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\"file\", \"foo\", commit=\"init\")\n erepo_dir.scm.tag(\"v1\")\n erepo_dir.dvc_gen(\"file\", \"bar\", commit=\"update file\")\n\n url = os.fspath(erepo_dir)\n\n with patch.object(Git, \"clone\", wraps=Git.clone) as mock_clone:\n with external_repo(url, rev=\"v1\") as repo:\n with repo.open_by_relpath(\"file\") as fd:\n assert fd.read() == \"foo\"\n\n mock_clone.assert_called_with(url, ANY, shallow_branch=\"v1\")\n _, shallow = CLONES[url]\n assert shallow\n\n with external_repo(url, rev=\"master\") as repo:\n with repo.open_by_relpath(\"file\") as fd:\n assert fd.read() == \"bar\"\n\n assert mock_clone.call_count == 1\n _, shallow = CLONES[url]\n assert not shallow", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_test_subrepos_are_ignored_test_subrepos_are_ignored.with_external_repo_os_fsp.assert_repo_fetch_externa": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_test_subrepos_are_ignored_test_subrepos_are_ignored.with_external_repo_os_fsp.assert_repo_fetch_externa", "embedding": null, "metadata": {"file_path": "tests/func/test_external_repo.py", "file_name": "test_external_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 180, "end_line": 212, "span_ids": ["test_subrepos_are_ignored"], "tokens": 307}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_subrepos_are_ignored(tmp_dir, erepo_dir):\n subrepo = erepo_dir / \"dir\" / \"subrepo\"\n make_subrepo(subrepo, erepo_dir.scm)\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\"dir/foo\", \"foo\", commit=\"foo\")\n erepo_dir.scm_gen(\"dir/bar\", \"bar\", commit=\"bar\")\n\n with subrepo.chdir():\n subrepo.dvc_gen({\"file\": \"file\"}, commit=\"add files on subrepo\")\n\n with external_repo(os.fspath(erepo_dir)) as repo:\n repo.get_external(\"dir\", \"out\")\n expected_files = {\"foo\": \"foo\", \"bar\": \"bar\", \".gitignore\": \"/foo\\n\"}\n assert (tmp_dir / \"out\").read_text() == expected_files\n\n expected_hash = HashInfo(\"md5\", \"e1d9e8eae5374860ae025ec84cfd85c7.dir\")\n assert (\n repo.repo_tree.get_hash(\n os.path.join(repo.root_dir, \"dir\"), follow_subrepos=False\n )\n == expected_hash\n )\n\n # clear cache to test `fetch_external` again\n cache_dir = tmp_dir / repo.cache.local.cache_dir\n remove(cache_dir)\n makedirs(cache_dir)\n\n assert repo.fetch_external([\"dir\"]) == (\n len(expected_files),\n 0,\n [expected_hash],\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_test_subrepos_are_ignored_for_git_tracked_dirs_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_external_repo.py_test_subrepos_are_ignored_for_git_tracked_dirs_", "embedding": null, "metadata": {"file_path": "tests/func/test_external_repo.py", "file_name": "test_external_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 213, "end_line": 227, "span_ids": ["test_subrepos_are_ignored_for_git_tracked_dirs"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_subrepos_are_ignored_for_git_tracked_dirs(tmp_dir, erepo_dir):\n subrepo = erepo_dir / \"dir\" / \"subrepo\"\n make_subrepo(subrepo, erepo_dir.scm)\n with erepo_dir.chdir():\n scm_files = {\"foo\": \"foo\", \"bar\": \"bar\", \"subdir\": {\"lorem\": \"lorem\"}}\n erepo_dir.scm_gen({\"dir\": scm_files}, commit=\"add scm dir\")\n\n with subrepo.chdir():\n subrepo.dvc_gen({\"file\": \"file\"}, commit=\"add files on subrepo\")\n\n with external_repo(os.fspath(erepo_dir)) as repo:\n repo.get_external(\"dir\", \"out\")\n # subrepo files should not be here\n assert (tmp_dir / \"out\").read_text() == scm_files", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_pipeline_tracked_outs_test_get_pipeline_tracked_outs.with_git_dir_chdir_.assert_git_dir_baz_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_pipeline_tracked_outs_test_get_pipeline_tracked_outs.with_git_dir_chdir_.assert_git_dir_baz_", "embedding": null, "metadata": {"file_path": "tests/func/test_get.py", "file_name": "test_get.py", "file_type": "text/x-python", "category": "test", "start_line": 242, "end_line": 256, "span_ids": ["test_get_pipeline_tracked_outs"], "tokens": 144}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_pipeline_tracked_outs(\n tmp_dir, dvc, scm, git_dir, run_copy, local_remote\n):\n from dvc.dvcfile import PIPELINE_FILE, PIPELINE_LOCK\n\n tmp_dir.gen(\"foo\", \"foo\")\n run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n dvc.push()\n\n dvc.scm.add([PIPELINE_FILE, PIPELINE_LOCK])\n dvc.scm.commit(\"add pipeline stage\")\n\n with git_dir.chdir():\n Repo.get(\"file:///{}\".format(os.fspath(tmp_dir)), \"bar\", out=\"baz\")\n assert (git_dir / \"baz\").read_text() == \"foo\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_mixed_dir_test_get_mixed_dir.assert_tmp_dir_dir_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_mixed_dir_test_get_mixed_dir.assert_tmp_dir_dir_", "embedding": null, "metadata": {"file_path": "tests/func/test_get.py", "file_name": "test_get.py", "file_type": "text/x-python", "category": "test", "start_line": 259, "end_line": 269, "span_ids": ["test_get_mixed_dir"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_mixed_dir(tmp_dir, erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(os.path.join(\"dir\", \"foo\"), \"foo\", commit=\"foo\")\n erepo_dir.scm_gen(os.path.join(\"dir\", \"bar\"), \"bar\", commit=\"bar\")\n\n Repo.get(os.fspath(erepo_dir), \"dir\")\n assert (tmp_dir / \"dir\").read_text() == {\n \".gitignore\": \"/foo\\n\",\n \"foo\": \"foo\",\n \"bar\": \"bar\",\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_from_subrepos_test_get_from_subrepos.assert_tmp_dir_out_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_from_subrepos_test_get_from_subrepos.assert_tmp_dir_out_", "embedding": null, "metadata": {"file_path": "tests/func/test_get.py", "file_name": "test_get.py", "file_type": "text/x-python", "category": "test", "start_line": 272, "end_line": 284, "span_ids": ["test_get_from_subrepos"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"is_dvc\", [True, False])\n@pytest.mark.parametrize(\"files\", [{\"foo\": \"foo\"}, {\"dir\": {\"bar\": \"bar\"}}])\ndef test_get_from_subrepos(tmp_dir, erepo_dir, is_dvc, files):\n subrepo = erepo_dir / \"subrepo\"\n make_subrepo(subrepo, erepo_dir.scm)\n gen = subrepo.dvc_gen if is_dvc else subrepo.scm_gen\n with subrepo.chdir():\n gen(files, commit=\"add files in subrepo\")\n\n key = next(iter(files))\n Repo.get(os.fspath(erepo_dir), f\"subrepo/{key}\", out=\"out\")\n\n assert (tmp_dir / \"out\").read_text() == files[key]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_granular_get_from_subrepos_test_granular_get_from_subrepos.assert_tmp_dir_out_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_granular_get_from_subrepos_test_granular_get_from_subrepos.assert_tmp_dir_out_", "embedding": null, "metadata": {"file_path": "tests/func/test_get.py", "file_name": "test_get.py", "file_type": "text/x-python", "category": "test", "start_line": 287, "end_line": 295, "span_ids": ["test_granular_get_from_subrepos"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_granular_get_from_subrepos(tmp_dir, erepo_dir):\n subrepo = erepo_dir / \"subrepo\"\n make_subrepo(subrepo, erepo_dir.scm)\n with subrepo.chdir():\n subrepo.dvc_gen({\"dir\": {\"bar\": \"bar\"}}, commit=\"files in subrepo\")\n\n path = os.path.join(\"subrepo\", \"dir\", \"bar\")\n Repo.get(os.fspath(erepo_dir), path, out=\"out\")\n assert (tmp_dir / \"out\").read_text() == \"bar\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_try_to_get_complete_repo_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_try_to_get_complete_repo_", "embedding": null, "metadata": {"file_path": "tests/func/test_get.py", "file_name": "test_get.py", "file_type": "text/x-python", "category": "test", "start_line": 298, "end_line": 312, "span_ids": ["test_try_to_get_complete_repo"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_try_to_get_complete_repo(tmp_dir, dvc, erepo_dir):\n subrepo = erepo_dir / \"subrepo\"\n make_subrepo(subrepo, erepo_dir.scm)\n with subrepo.chdir():\n subrepo.dvc_gen({\"dir\": {\"bar\": \"bar\"}}, commit=\"files in subrepo\")\n\n expected_message = \"Cannot fetch a complete DVC repository\"\n with pytest.raises(IsADVCRepoError) as exc_info:\n Repo.get(os.fspath(erepo_dir), \"subrepo\", out=\"out\")\n assert f\"{expected_message} 'subrepo'\" == str(exc_info.value)\n\n with pytest.raises(IsADVCRepoError) as exc_info:\n Repo.get(os.fspath(erepo_dir), \".\", out=\"out\")\n assert expected_message == str(exc_info.value)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_os_test_ignore_unicode.assert_set_dvc_tree_walk_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_os_test_ignore_unicode.assert_set_dvc_tree_walk_", "embedding": null, "metadata": {"file_path": "tests/func/test_ignore.py", "file_name": "test_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 37, "span_ids": ["test_ignore_unicode", "imports", "_to_pattern_info_list", "test_ignore"], "tokens": 309}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport shutil\n\nimport pytest\n\nfrom dvc.exceptions import DvcIgnoreInCollectedDirError\nfrom dvc.ignore import DvcIgnore, DvcIgnorePatterns\nfrom dvc.output.base import OutputIsIgnoredError\nfrom dvc.path_info import PathInfo\nfrom dvc.pathspec_math import PatternInfo, merge_patterns\nfrom dvc.repo import Repo\nfrom dvc.utils import relpath\nfrom dvc.utils.fs import get_mtime_and_size\nfrom tests.dir_helpers import TmpDir\n\n\ndef _to_pattern_info_list(str_list):\n return [PatternInfo(a, \"\") for a in str_list]\n\n\ndef test_ignore(tmp_dir, dvc, monkeypatch):\n tmp_dir.gen({\"dir\": {\"ignored\": \"text\", \"other\": \"text2\"}})\n tmp_dir.gen(DvcIgnore.DVCIGNORE_FILE, \"dir/ignored\")\n\n dvc.tree._reset()\n\n path = PathInfo(tmp_dir)\n\n assert set(dvc.tree.walk_files(path / \"dir\")) == {path / \"dir\" / \"other\"}\n\n\ndef test_ignore_unicode(tmp_dir, dvc):\n tmp_dir.gen({\"dir\": {\"other\": \"text\", \"\u0442\u0435\u0441\u0442\": \"\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430\"}})\n tmp_dir.gen(DvcIgnore.DVCIGNORE_FILE, \"dir/\u0442\u0435\u0441\u0442\")\n dvc.tree._reset()\n path = PathInfo(tmp_dir)\n assert set(dvc.tree.walk_files(path / \"dir\")) == {path / \"dir\" / \"other\"}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_rename_file_test_remove_ignored_file.assert_new_mtime_mtime": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_rename_file_test_remove_ignored_file.assert_new_mtime_mtime", "embedding": null, "metadata": {"file_path": "tests/func/test_ignore.py", "file_name": "test_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 54, "end_line": 74, "span_ids": ["test_remove_ignored_file", "test_rename_file"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_rename_file(tmp_dir, dvc):\n tmp_dir.gen({\"dir\": {\"foo\": \"foo\", \"bar\": \"bar\"}})\n mtime, size = get_mtime_and_size(\"dir\", dvc.tree)\n\n shutil.move(\"dir/foo\", \"dir/foo_new\")\n new_mtime, new_size = get_mtime_and_size(\"dir\", dvc.tree)\n\n assert new_mtime != mtime and new_size == size\n\n\ndef test_remove_ignored_file(tmp_dir, dvc):\n tmp_dir.gen({\"dir\": {\"ignored\": \"...\", \"other\": \"text\"}})\n tmp_dir.gen(DvcIgnore.DVCIGNORE_FILE, \"dir/ignored\")\n dvc.tree._reset()\n\n mtime, size = get_mtime_and_size(\"dir\", dvc.tree)\n\n os.remove(\"dir/ignored\")\n new_mtime, new_size = get_mtime_and_size(\"dir\", dvc.tree)\n\n assert new_mtime == mtime and new_size == size", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_remove_file_test_dvcignore_in_out_dir.with_pytest_raises_DvcIgn.dvc_add_dir_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_remove_file_test_dvcignore_in_out_dir.with_pytest_raises_DvcIgn.dvc_add_dir_", "embedding": null, "metadata": {"file_path": "tests/func/test_ignore.py", "file_name": "test_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 77, "end_line": 91, "span_ids": ["test_dvcignore_in_out_dir", "test_remove_file"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_remove_file(tmp_dir, dvc):\n tmp_dir.gen({\"dir\": {\"foo\": \"foo\", \"bar\": \"bar\"}})\n mtime, size = get_mtime_and_size(\"dir\", dvc.tree)\n\n os.remove(\"dir/foo\")\n new_mtime, new_size = get_mtime_and_size(\"dir\", dvc.tree)\n\n assert new_mtime != mtime and new_size != size\n\n\ndef test_dvcignore_in_out_dir(tmp_dir, dvc):\n tmp_dir.gen({\"dir\": {\"foo\": \"foo\", DvcIgnore.DVCIGNORE_FILE: \"\"}})\n\n with pytest.raises(DvcIgnoreInCollectedDirError):\n dvc.add(\"dir\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_ignore_collecting_dvcignores_test_ignore_collecting_dvcignores.assert_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_ignore_collecting_dvcignores_test_ignore_collecting_dvcignores.assert_", "embedding": null, "metadata": {"file_path": "tests/func/test_ignore.py", "file_name": "test_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 94, "end_line": 122, "span_ids": ["test_ignore_collecting_dvcignores"], "tokens": 247}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"dname\", [\"dir\", \"dir/subdir\"])\ndef test_ignore_collecting_dvcignores(tmp_dir, dvc, dname):\n tmp_dir.gen({\"dir\": {\"subdir\": {}}})\n\n top_ignore_file = (tmp_dir / dname).with_name(DvcIgnore.DVCIGNORE_FILE)\n top_ignore_file.write_text(os.path.basename(dname))\n dvc.tree._reset()\n\n ignore_file = tmp_dir / dname / DvcIgnore.DVCIGNORE_FILE\n ignore_file.write_text(\"foo\")\n\n dvcignore = dvc.tree.dvcignore\n\n top_ignore_path = os.path.dirname(os.fspath(top_ignore_file))\n\n sub_dir_path = os.path.dirname(os.fspath(ignore_file))\n\n assert (\n DvcIgnorePatterns(\n *merge_patterns(\n _to_pattern_info_list([\".hg/\", \".git/\", \".dvc/\"]),\n os.fspath(tmp_dir),\n _to_pattern_info_list([os.path.basename(dname)]),\n top_ignore_path,\n )\n )\n == dvcignore._get_trie_pattern(top_ignore_path)\n == dvcignore._get_trie_pattern(sub_dir_path)\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_match_nested_test_match_nested.assert_result_dvcig": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_match_nested_test_match_nested.assert_result_dvcig", "embedding": null, "metadata": {"file_path": "tests/func/test_ignore.py", "file_name": "test_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 146, "end_line": 157, "span_ids": ["test_match_nested"], "tokens": 107}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_match_nested(tmp_dir, dvc):\n tmp_dir.gen(\n {\n \".dvcignore\": \"*.backup\\ntmp\",\n \"foo\": \"foo\",\n \"tmp\": \"...\",\n \"dir\": {\"x.backup\": \"x backup\", \"tmp\": \"content\"},\n }\n )\n dvc.tree._reset()\n result = {os.fspath(os.path.normpath(f)) for f in dvc.tree.walk_files(\".\")}\n assert result == {\".dvcignore\", \"foo\"}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_ignore_external_test_ignore_external.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_ignore_external_test_ignore_external.None_2", "embedding": null, "metadata": {"file_path": "tests/func/test_ignore.py", "file_name": "test_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 160, "end_line": 173, "span_ids": ["test_ignore_external"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ignore_external(tmp_dir, scm, dvc, tmp_path_factory):\n tmp_dir.gen(\".dvcignore\", \"*.backup\\ntmp\")\n ext_dir = TmpDir(os.fspath(tmp_path_factory.mktemp(\"external_dir\")))\n ext_dir.gen({\"y.backup\": \"y\", \"tmp\": {\"file\": \"ext tmp\"}})\n\n result = {relpath(f, ext_dir) for f in dvc.tree.walk_files(ext_dir)}\n assert result == {\"y.backup\", os.path.join(\"tmp\", \"file\")}\n assert (\n dvc.tree.dvcignore.is_ignored_dir(os.fspath(ext_dir / \"tmp\")) is False\n )\n assert (\n dvc.tree.dvcignore.is_ignored_file(os.fspath(ext_dir / \"y.backup\"))\n is False\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_ignore_subrepo_test_ignore_subrepo.for___in_subrepo_brancher.assert_subrepo_tree_exist": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_ignore_subrepo_test_ignore_subrepo.for___in_subrepo_brancher.assert_subrepo_tree_exist", "embedding": null, "metadata": {"file_path": "tests/func/test_ignore.py", "file_name": "test_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 176, "end_line": 191, "span_ids": ["test_ignore_subrepo"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ignore_subrepo(tmp_dir, scm, dvc):\n tmp_dir.gen({\".dvcignore\": \"foo\", \"subdir\": {\"foo\": \"foo\"}})\n scm.add([\".dvcignore\"])\n scm.commit(\"init parent dvcignore\")\n dvc.tree._reset()\n\n subrepo_dir = tmp_dir / \"subdir\"\n assert not dvc.tree.exists(PathInfo(subrepo_dir / \"foo\"))\n\n with subrepo_dir.chdir():\n subrepo = Repo.init(subdir=True)\n scm.add(str(subrepo_dir / \"foo\"))\n scm.commit(\"subrepo init\")\n\n for _ in subrepo.brancher(all_commits=True):\n assert subrepo.tree.exists(PathInfo(subrepo_dir / \"foo\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_ignore_resurface_subrepo_test_ignore_blank_line.assert_set_dvc_tree_walk_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_ignore_resurface_subrepo_test_ignore_blank_line.assert_set_dvc_tree_walk_", "embedding": null, "metadata": {"file_path": "tests/func/test_ignore.py", "file_name": "test_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 194, "end_line": 221, "span_ids": ["test_ignore_resurface_subrepo", "test_ignore_blank_line"], "tokens": 280}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ignore_resurface_subrepo(tmp_dir, scm, dvc):\n tmp_dir.dvc_gen({\"foo\": \"foo\"}, commit=\"add foo\")\n subrepo_dir = tmp_dir / \"subdir\"\n subrepo_dir.mkdir()\n with subrepo_dir.chdir():\n Repo.init(subdir=True)\n\n dvc.tree._reset()\n\n dirs = [\"subdir\"]\n files = [\"foo\"]\n assert dvc.tree.dvcignore(os.fspath(tmp_dir), dirs, files) == ([], files)\n assert dvc.tree.dvcignore(\n os.fspath(tmp_dir), dirs, files, ignore_subrepos=False\n ) == (dirs, files)\n\n assert dvc.tree.dvcignore.is_ignored_dir(os.fspath(subrepo_dir))\n assert not dvc.tree.dvcignore.is_ignored_dir(\n os.fspath(subrepo_dir), ignore_subrepos=False\n )\n\n\ndef test_ignore_blank_line(tmp_dir, dvc):\n tmp_dir.gen({\"dir\": {\"ignored\": \"text\", \"other\": \"text2\"}})\n tmp_dir.gen(DvcIgnore.DVCIGNORE_FILE, \"foo\\n\\ndir/ignored\")\n dvc.tree._reset()\n path = PathInfo(tmp_dir)\n assert set(dvc.tree.walk_files(path / \"dir\")) == {path / \"dir\" / \"other\"}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py__It_is_not_possible_to_r_test_ignore_file_in_parent_path.assert_set_dvc_tree_walk_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py__It_is_not_possible_to_r_test_ignore_file_in_parent_path.assert_set_dvc_tree_walk_", "embedding": null, "metadata": {"file_path": "tests/func/test_ignore.py", "file_name": "test_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 224, "end_line": 258, "span_ids": ["test_ignore_file_in_parent_path", "test_ignore_blank_line"], "tokens": 278}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# It is not possible to re-include a file if a parent directory of\n# that file is excluded.\n# Git doesn\u2019t list excluded directories for performance reasons,\n# so any patterns on contained files have no effect,\n# no matter where they are defined.\n@pytest.mark.parametrize(\n \"data_struct, pattern_list, result_set\",\n [\n (\n {\"dir\": {\"subdir\": {\"not_ignore\": \"121\"}}},\n [\"subdir/*\", \"!not_ignore\"],\n {os.path.join(\"dir\", \"subdir\", \"not_ignore\")},\n ),\n (\n {\"dir\": {\"subdir\": {\"should_ignore\": \"121\"}}},\n [\"subdir\", \"!should_ignore\"],\n set(),\n ),\n (\n {\"dir\": {\"subdir\": {\"should_ignore\": \"121\"}}},\n [\"subdir/\", \"!should_ignore\"],\n set(),\n ),\n ],\n)\ndef test_ignore_file_in_parent_path(\n tmp_dir, dvc, data_struct, pattern_list, result_set\n):\n tmp_dir.gen(data_struct)\n tmp_dir.gen(DvcIgnore.DVCIGNORE_FILE, \"\\n\".join(pattern_list))\n dvc.tree._reset()\n path = PathInfo(tmp_dir)\n assert set(dvc.tree.walk_files(path / \"dir\")) == {\n path / relpath for relpath in result_set\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py__If_there_is_a_separator_test_ignore_sub_directory.assert_set_dvc_tree_walk_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py__If_there_is_a_separator_test_ignore_sub_directory.assert_set_dvc_tree_walk_", "embedding": null, "metadata": {"file_path": "tests/func/test_ignore.py", "file_name": "test_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 261, "end_line": 282, "span_ids": ["test_ignore_file_in_parent_path", "test_ignore_sub_directory"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# If there is a separator at the end of the pattern then the pattern\n# will only match directories,\n# otherwise the pattern can match both files and directories.\n# For example, a pattern doc/frotz/ matches doc/frotz directory,\n# but not a/doc/frotz directory;\ndef test_ignore_sub_directory(tmp_dir, dvc):\n tmp_dir.gen(\n {\n \"dir\": {\n \"doc\": {\"fortz\": {\"b\": \"b\"}},\n \"a\": {\"doc\": {\"fortz\": {\"a\": \"a\"}}},\n }\n }\n )\n tmp_dir.gen({\"dir\": {DvcIgnore.DVCIGNORE_FILE: \"doc/fortz\"}})\n\n dvc.tree._reset()\n path = PathInfo(tmp_dir)\n assert set(dvc.tree.walk_files(path / \"dir\")) == {\n path / \"dir\" / \"a\" / \"doc\" / \"fortz\" / \"a\",\n path / \"dir\" / DvcIgnore.DVCIGNORE_FILE,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py__however_frotz_matches__test_ignore_directory.assert_set_dvc_tree_walk_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py__however_frotz_matches__test_ignore_directory.assert_set_dvc_tree_walk_", "embedding": null, "metadata": {"file_path": "tests/func/test_ignore.py", "file_name": "test_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 285, "end_line": 293, "span_ids": ["test_ignore_directory", "test_ignore_sub_directory"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# however frotz/ matches frotz and a/frotz that is a directory\ndef test_ignore_directory(tmp_dir, dvc):\n tmp_dir.gen({\"dir\": {\"fortz\": {}, \"a\": {\"fortz\": {}}}})\n tmp_dir.gen({\"dir\": {DvcIgnore.DVCIGNORE_FILE: \"fortz\"}})\n dvc.tree._reset()\n path = PathInfo(tmp_dir)\n assert set(dvc.tree.walk_files(path / \"dir\")) == {\n path / \"dir\" / DvcIgnore.DVCIGNORE_FILE,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_multi_ignore_file_test_multi_ignore_file.assert_set_dvc_tree_walk_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_multi_ignore_file_test_multi_ignore_file.assert_set_dvc_tree_walk_", "embedding": null, "metadata": {"file_path": "tests/func/test_ignore.py", "file_name": "test_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 296, "end_line": 305, "span_ids": ["test_multi_ignore_file"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_multi_ignore_file(tmp_dir, dvc, monkeypatch):\n tmp_dir.gen({\"dir\": {\"subdir\": {\"should_ignore\": \"1\", \"not_ignore\": \"1\"}}})\n tmp_dir.gen(DvcIgnore.DVCIGNORE_FILE, \"dir/subdir/*_ignore\")\n tmp_dir.gen({\"dir\": {DvcIgnore.DVCIGNORE_FILE: \"!subdir/not_ignore\"}})\n dvc.tree._reset()\n path = PathInfo(tmp_dir)\n assert set(dvc.tree.walk_files(path / \"dir\")) == {\n path / \"dir\" / \"subdir\" / \"not_ignore\",\n path / \"dir\" / DvcIgnore.DVCIGNORE_FILE,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_pattern_trie_tree_test_pattern_trie_tree.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_pattern_trie_tree_test_pattern_trie_tree.None_3", "embedding": null, "metadata": {"file_path": "tests/func/test_ignore.py", "file_name": "test_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 308, "end_line": 378, "span_ids": ["test_pattern_trie_tree"], "tokens": 570}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_pattern_trie_tree(tmp_dir, dvc):\n tmp_dir.gen(\n {\n \"top\": {\n \"first\": {\n DvcIgnore.DVCIGNORE_FILE: \"a\\nb\\nc\",\n \"middle\": {\n \"second\": {\n DvcIgnore.DVCIGNORE_FILE: \"d\\ne\\nf\",\n \"bottom\": {},\n }\n },\n },\n },\n \"other\": {DvcIgnore.DVCIGNORE_FILE: \"1\\n2\\n3\"},\n }\n )\n dvc.tree._reset()\n dvcignore = dvc.tree.dvcignore\n\n ignore_pattern_top = dvcignore._get_trie_pattern(\n os.fspath(tmp_dir / \"top\")\n )\n ignore_pattern_other = dvcignore._get_trie_pattern(\n os.fspath(tmp_dir / \"other\")\n )\n ignore_pattern_first = dvcignore._get_trie_pattern(\n os.fspath(tmp_dir / \"top\" / \"first\")\n )\n ignore_pattern_middle = dvcignore._get_trie_pattern(\n os.fspath(tmp_dir / \"top\" / \"first\" / \"middle\")\n )\n ignore_pattern_second = dvcignore._get_trie_pattern(\n os.fspath(tmp_dir / \"top\" / \"first\" / \"middle\" / \"second\")\n )\n ignore_pattern_bottom = dvcignore._get_trie_pattern(\n os.fspath(tmp_dir / \"top\" / \"first\" / \"middle\" / \"second\" / \"bottom\")\n )\n\n base_pattern = (\n _to_pattern_info_list([\".hg/\", \".git/\", \".dvc/\"]),\n os.fspath(tmp_dir),\n )\n first_pattern = merge_patterns(\n *base_pattern,\n _to_pattern_info_list([\"a\", \"b\", \"c\"]),\n os.fspath(tmp_dir / \"top\" / \"first\")\n )\n second_pattern = merge_patterns(\n *first_pattern,\n _to_pattern_info_list([\"d\", \"e\", \"f\"]),\n os.fspath(tmp_dir / \"top\" / \"first\" / \"middle\" / \"second\")\n )\n other_pattern = merge_patterns(\n *base_pattern,\n _to_pattern_info_list([\"1\", \"2\", \"3\"]),\n os.fspath(tmp_dir / \"other\")\n )\n\n assert DvcIgnorePatterns(*base_pattern) == ignore_pattern_top\n assert DvcIgnorePatterns(*other_pattern) == ignore_pattern_other\n assert (\n DvcIgnorePatterns(*first_pattern)\n == ignore_pattern_first\n == ignore_pattern_middle\n )\n assert (\n DvcIgnorePatterns(*second_pattern)\n == ignore_pattern_second\n == ignore_pattern_bottom\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_ignore_in_added_dir_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ignore.py_test_ignore_in_added_dir_", "embedding": null, "metadata": {"file_path": "tests/func/test_ignore.py", "file_name": "test_ignore.py", "file_type": "text/x-python", "category": "test", "start_line": 381, "end_line": 411, "span_ids": ["test_ignored_output", "test_ignore_in_added_dir"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ignore_in_added_dir(tmp_dir, dvc):\n tmp_dir.gen(\n {\n \"dir\": {\n \"sub\": {\n \"ignored\": {\"content\": \"ignored content\"},\n \"not_ignored\": \"not ignored content\",\n }\n },\n \".dvcignore\": \"**/ignored\",\n }\n )\n dvc.tree._reset()\n\n ignored_path = tmp_dir / \"dir\" / \"sub\" / \"ignored\"\n assert not dvc.tree.exists(PathInfo(ignored_path))\n assert ignored_path.exists()\n\n dvc.add(\"dir\")\n shutil.rmtree(ignored_path)\n dvc.checkout()\n\n assert not ignored_path.exists()\n\n\ndef test_ignored_output(tmp_dir, scm, dvc, run_copy):\n tmp_dir.gen({\".dvcignore\": \"*.log\", \"foo\": \"foo content\"})\n\n with pytest.raises(OutputIsIgnoredError):\n run_copy(\"foo\", \"foo.log\", name=\"copy\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_filecmp_from_tests_unit_tree_test": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_filecmp_from_tests_unit_tree_test", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 17, "span_ids": ["imports"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import filecmp\nimport os\n\nimport pytest\nfrom funcy import first\nfrom mock import patch\n\nimport dvc.data_cloud as cloud\nfrom dvc.cache import Cache\nfrom dvc.config import NoRemoteError\nfrom dvc.dvcfile import Dvcfile\nfrom dvc.exceptions import CollectCacheError, DownloadError, PathMissingError\nfrom dvc.external_repo import IsADVCRepoError\nfrom dvc.stage.exceptions import StagePathNotFoundError\nfrom dvc.system import System\nfrom dvc.utils.fs import makedirs, remove\nfrom tests.unit.tree.test_repo import make_subrepo", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_test_import.assert_stage_deps_0_def_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_test_import.assert_stage_deps_0_def_", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 20, "end_line": 32, "span_ids": ["test_import"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_import(tmp_dir, scm, dvc, erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\"foo\", \"foo content\", commit=\"create foo\")\n\n stage = dvc.imp(os.fspath(erepo_dir), \"foo\", \"foo_imported\")\n\n assert os.path.isfile(\"foo_imported\")\n assert (tmp_dir / \"foo_imported\").read_text() == \"foo content\"\n assert scm.is_ignored(\"foo_imported\")\n assert stage.deps[0].def_repo == {\n \"url\": os.fspath(erepo_dir),\n \"rev_lock\": erepo_dir.scm.get_rev(),\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_file_from_dir_to_dir_test_import_file_from_dir_to_dir.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_file_from_dir_to_dir_test_import_file_from_dir_to_dir.None_2", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 139, "end_line": 158, "span_ids": ["test_import_file_from_dir_to_dir"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_import_file_from_dir_to_dir(tmp_dir, scm, dvc, erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen({\"dir\": {\"foo\": \"foo\"}}, commit=\"create dir\")\n\n with pytest.raises(StagePathNotFoundError):\n dvc.imp(\n os.fspath(erepo_dir),\n os.path.join(\"dir\", \"foo\"),\n out=os.path.join(\"dir\", \"foo\"),\n )\n\n tmp_dir.gen({\"dir\": {}})\n dvc.imp(\n os.fspath(erepo_dir),\n os.path.join(\"dir\", \"foo\"),\n out=os.path.join(\"dir\", \"foo\"),\n )\n assert not (tmp_dir / \"foo.dvc\").exists()\n assert (tmp_dir / \"dir\" / \"foo\").read_text() == \"foo\"\n assert (tmp_dir / \"dir\" / \"foo.dvc\").exists()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_pipeline_tracked_outs_test_import_pipeline_tracked_outs.with_erepo_dir_chdir_.assert_erepo_dir_baz_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_pipeline_tracked_outs_test_import_pipeline_tracked_outs.with_erepo_dir_chdir_.assert_erepo_dir_baz_", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 351, "end_line": 367, "span_ids": ["test_import_pipeline_tracked_outs"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_import_pipeline_tracked_outs(\n tmp_dir, dvc, scm, erepo_dir, run_copy, local_remote\n):\n from dvc.dvcfile import PIPELINE_FILE, PIPELINE_LOCK\n\n tmp_dir.gen(\"foo\", \"foo\")\n run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n dvc.push()\n\n dvc.scm.add([PIPELINE_FILE, PIPELINE_LOCK])\n dvc.scm.commit(\"add pipeline stage\")\n\n with erepo_dir.chdir():\n erepo_dir.dvc.imp(\n \"file:///{}\".format(os.fspath(tmp_dir)), \"bar\", out=\"baz\"\n )\n assert (erepo_dir / \"baz\").read_text() == \"foo\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_local_import_test_import_mixed_dir.assert_tmp_dir_dir_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_local_import_test_import_mixed_dir.assert_tmp_dir_dir_", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 370, "end_line": 386, "span_ids": ["test_import_mixed_dir", "test_local_import"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_local_import(tmp_dir, dvc, scm):\n tmp_dir.dvc_gen(\"foo\", \"foo\", commit=\"init\")\n (tmp_dir / \"outdir\").mkdir()\n dvc.imp(\".\", \"foo\", out=\"outdir\")\n\n\ndef test_import_mixed_dir(tmp_dir, dvc, erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(os.path.join(\"dir\", \"foo\"), \"foo\", commit=\"foo\")\n erepo_dir.scm_gen(os.path.join(\"dir\", \"bar\"), \"bar\", commit=\"bar\")\n\n dvc.imp(os.fspath(erepo_dir), \"dir\")\n assert (tmp_dir / \"dir\").read_text() == {\n \".gitignore\": \"/foo\\n\",\n \"foo\": \"foo\",\n \"bar\": \"bar\",\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_subrepos_test_import_subrepos.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_import_subrepos_test_import_subrepos.None_2", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 389, "end_line": 408, "span_ids": ["test_import_subrepos"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"is_dvc\", [True, False])\n@pytest.mark.parametrize(\"files\", [{\"foo\": \"foo\"}, {\"dir\": {\"bar\": \"bar\"}}])\ndef test_import_subrepos(tmp_dir, erepo_dir, dvc, scm, is_dvc, files):\n subrepo = erepo_dir / \"subrepo\"\n make_subrepo(subrepo, erepo_dir.scm)\n gen = subrepo.dvc_gen if is_dvc else subrepo.scm_gen\n with subrepo.chdir():\n gen(files, commit=\"add files in subrepo\")\n\n key = next(iter(files))\n path = str((subrepo / key).relative_to(erepo_dir))\n\n stage = dvc.imp(os.fspath(erepo_dir), path, out=\"out\",)\n\n assert (tmp_dir / \"out\").read_text() == files[key]\n assert stage.deps[0].def_path == path\n assert stage.deps[0].def_repo == {\n \"url\": os.fspath(erepo_dir),\n \"rev_lock\": erepo_dir.scm.get_rev(),\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_granular_import_from_subrepos_test_granular_import_from_subrepos.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_granular_import_from_subrepos_test_granular_import_from_subrepos.None_2", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 411, "end_line": 424, "span_ids": ["test_granular_import_from_subrepos"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_granular_import_from_subrepos(tmp_dir, dvc, erepo_dir):\n subrepo = erepo_dir / \"subrepo\"\n make_subrepo(subrepo, erepo_dir.scm)\n with subrepo.chdir():\n subrepo.dvc_gen({\"dir\": {\"bar\": \"bar\"}}, commit=\"files in subrepo\")\n\n path = os.path.join(\"subrepo\", \"dir\", \"bar\")\n stage = dvc.imp(os.fspath(erepo_dir), path, out=\"out\")\n assert (tmp_dir / \"out\").read_text() == \"bar\"\n assert stage.deps[0].def_path == path\n assert stage.deps[0].def_repo == {\n \"url\": os.fspath(erepo_dir),\n \"rev_lock\": erepo_dir.scm.get_rev(),\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_pull_imported_stage_from_subrepos_test_pull_imported_stage_from_subrepos.assert_tmp_dir_out_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import.py_test_pull_imported_stage_from_subrepos_test_pull_imported_stage_from_subrepos.assert_tmp_dir_out_", "embedding": null, "metadata": {"file_path": "tests/func/test_import.py", "file_name": "test_import.py", "file_type": "text/x-python", "category": "test", "start_line": 427, "end_line": 451, "span_ids": ["test_pull_imported_stage_from_subrepos"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"is_dvc\", [True, False])\n@pytest.mark.parametrize(\"files\", [{\"foo\": \"foo\"}, {\"dir\": {\"bar\": \"bar\"}}])\ndef test_pull_imported_stage_from_subrepos(\n tmp_dir, dvc, erepo_dir, is_dvc, files\n):\n subrepo = erepo_dir / \"subrepo\"\n make_subrepo(subrepo, erepo_dir.scm)\n gen = subrepo.dvc_gen if is_dvc else subrepo.scm_gen\n with subrepo.chdir():\n gen(files, commit=\"files in subrepo\")\n\n key = first(files)\n path = os.path.join(\"subrepo\", key)\n dvc.imp(os.fspath(erepo_dir), path, out=\"out\")\n\n # clean everything\n remove(dvc.cache.local.cache_dir)\n remove(\"out\")\n makedirs(dvc.cache.local.cache_dir)\n\n stats = dvc.pull([\"out.dvc\"])\n\n expected = [f\"out{os.sep}\"] if isinstance(files[key], dict) else [\"out\"]\n assert stats[\"added\"] == expected\n assert (tmp_dir / \"out\").read_text() == files[key]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_install.py_TestInstall.test_pre_push_hook_TestInstall.test_pre_push_hook.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_install.py_TestInstall.test_pre_push_hook_TestInstall.test_pre_push_hook.None_2", "embedding": null, "metadata": {"file_path": "tests/func/test_install.py", "file_name": "test_install.py", "file_type": "text/x-python", "category": "test", "start_line": 57, "end_line": 80, "span_ids": ["TestInstall.test_pre_push_hook"], "tokens": 247}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(\n sys.platform == \"win32\", reason=\"Git hooks aren't supported on Windows\"\n)\nclass TestInstall:\n\n def test_pre_push_hook(self, tmp_dir, scm, dvc, tmp_path_factory):\n temp = tmp_path_factory.mktemp(\"external\")\n git_remote = temp / \"project.git\"\n storage_path = temp / \"dvc_storage\"\n\n with dvc.config.edit() as conf:\n conf[\"remote\"][\"store\"] = {\"url\": os.fspath(storage_path)}\n conf[\"core\"][\"remote\"] = \"store\"\n tmp_dir.dvc_gen(\"file\", \"file_content\", \"commit message\")\n\n file_checksum = file_md5(\"file\")[0]\n expected_storage_path = (\n storage_path / file_checksum[:2] / file_checksum[2:]\n )\n\n scm.gitpython.repo.clone(os.fspath(git_remote))\n scm.gitpython.repo.create_remote(\"origin\", os.fspath(git_remote))\n\n scm.install()\n\n assert not expected_storage_path.is_file()\n scm.gitpython.repo.git.push(\"origin\", \"master\")\n assert expected_storage_path.is_file()\n assert expected_storage_path.read_text() == \"file_content\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_install.py_test_merge_driver_no_ancestor_test_merge_driver_no_ancestor.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_install.py_test_merge_driver_no_ancestor_test_merge_driver_no_ancestor.None_2", "embedding": null, "metadata": {"file_path": "tests/func/test_install.py", "file_name": "test_install.py", "file_type": "text/x-python", "category": "test", "start_line": 83, "end_line": 115, "span_ids": ["test_merge_driver_no_ancestor"], "tokens": 357}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(\n sys.platform == \"win32\", reason=\"Git hooks aren't supported on Windows\"\n)\ndef test_merge_driver_no_ancestor(tmp_dir, scm, dvc):\n with tmp_dir.branch(\"one\", new=True):\n tmp_dir.dvc_gen({\"data\": {\"foo\": \"foo\"}}, commit=\"one: add data\")\n\n scm.checkout(\"two\", create_new=True)\n dvc.checkout() # keep things in sync\n\n tmp_dir.dvc_gen({\"data\": {\"bar\": \"bar\"}}, commit=\"two: add data\")\n\n # installing hook only before merge, as it runs `dvc` commands which makes\n # `checkouts` and `commits` above slower\n scm.install()\n (tmp_dir / \".gitattributes\").write_text(\"*.dvc merge=dvc\")\n\n scm.gitpython.repo.git.merge(\n \"one\", m=\"merged\", no_gpg_sign=True, no_signoff=True\n )\n\n # NOTE: dvc shouldn't checkout automatically as it might take a long time\n assert (tmp_dir / \"data\").read_text() == {\"bar\": \"bar\"}\n assert (tmp_dir / \"data.dvc\").read_text() == (\n \"outs:\\n\"\n \"- md5: 5ea40360f5b4ec688df672a4db9c17d1.dir\\n\"\n \" size: 6\\n\"\n \" nfiles: 2\\n\"\n \" path: data\\n\"\n )\n\n dvc.checkout(\"data.dvc\")\n assert (tmp_dir / \"data\").read_text() == {\"foo\": \"foo\", \"bar\": \"bar\"}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_install.py_test_merge_driver_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_install.py_test_merge_driver_", "embedding": null, "metadata": {"file_path": "tests/func/test_install.py", "file_name": "test_install.py", "file_type": "text/x-python", "category": "test", "start_line": 118, "end_line": 157, "span_ids": ["test_merge_driver"], "tokens": 393}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(\n sys.platform == \"win32\", reason=\"Git hooks aren't supported on Windows\"\n)\ndef test_merge_driver(tmp_dir, scm, dvc):\n tmp_dir.dvc_gen({\"data\": {\"master\": \"master\"}}, commit=\"master: add data\")\n\n with tmp_dir.branch(\"one\", new=True):\n tmp_dir.dvc_gen({\"data\": {\"one\": \"one\"}}, commit=\"one: add data\")\n\n scm.checkout(\"two\", create_new=True)\n dvc.checkout() # keep things in sync\n\n tmp_dir.dvc_gen({\"data\": {\"two\": \"two\"}}, commit=\"two: add data\")\n\n # installing hook only before merge, as it runs `dvc` commands on\n # `checkouts` and `commits` which slows tests down\n scm.install()\n (tmp_dir / \".gitattributes\").write_text(\"*.dvc merge=dvc\")\n\n scm.gitpython.repo.git.merge(\n \"one\", m=\"merged\", no_gpg_sign=True, no_signoff=True\n )\n\n # NOTE: dvc shouldn't checkout automatically as it might take a long time\n assert (tmp_dir / \"data\").read_text() == {\"master\": \"master\", \"two\": \"two\"}\n assert (tmp_dir / \"data.dvc\").read_text() == (\n \"outs:\\n\"\n \"- md5: 839ef9371606817569c1ee0e5f4ed233.dir\\n\"\n \" size: 12\\n\"\n \" nfiles: 3\\n\"\n \" path: data\\n\"\n )\n\n dvc.checkout(\"data.dvc\")\n assert (tmp_dir / \"data\").read_text() == {\n \"master\": \"master\",\n \"one\": \"one\",\n \"two\": \"two\",\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_lock.py_pytest_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_lock.py_pytest_", "embedding": null, "metadata": {"file_path": "tests/func/test_lock.py", "file_name": "test_lock.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 30, "span_ids": ["imports", "test_with", "test_cli"], "tokens": 232}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.lock import Lock, LockError\nfrom dvc.main import main\n\n\ndef test_with(tmp_dir, dvc, mocker):\n # patching to speedup tests\n mocker.patch(\"dvc.lock.DEFAULT_TIMEOUT\", 0.01)\n\n lockfile = tmp_dir / dvc.tmp_dir / \"lock\"\n with Lock(lockfile):\n with pytest.raises(LockError), Lock(lockfile):\n pass\n\n\ndef test_cli(tmp_dir, dvc, mocker, caplog):\n # patching to speedup tests\n mocker.patch(\"dvc.lock.DEFAULT_TIMEOUT\", 0.01)\n\n expected_error_msg = (\n \"Unable to acquire lock. Most likely another DVC process is \"\n \"running or was terminated abruptly. Check the page \"\n \" \"\n \"for other possible reasons and to learn how to resolve this.\"\n )\n with Lock(tmp_dir / dvc.tmp_dir / \"lock\"):\n assert main([\"add\", \"foo\"]) == 1\n assert expected_error_msg in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_path_file_out_test_ls_repo_with_missed_path_dvc_only.assert_exc_info_value_dvc": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_path_file_out_test_ls_repo_with_missed_path_dvc_only.assert_exc_info_value_dvc", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 213, "end_line": 251, "span_ids": ["test_ls_repo_with_missed_path_dvc_only", "test_ls_repo_with_path_file_out", "test_ls_repo_with_file_path_fs", "test_ls_repo_with_missed_path"], "tokens": 351}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ls_repo_with_path_file_out(tmp_dir, dvc, scm):\n tmp_dir.scm_gen(FS_STRUCTURE, commit=\"init\")\n tmp_dir.dvc_gen(DVC_STRUCTURE, commit=\"dvc\")\n\n path = os.path.join(\"data\", \"subcontent\", \"data.xml\")\n files = Repo.ls(os.fspath(tmp_dir), path)\n match_files(files, (((\"data.xml\",), True),))\n\n\ndef test_ls_repo_with_file_path_fs(tmp_dir, dvc, scm):\n tmp_dir.scm_gen(FS_STRUCTURE, commit=\"init\")\n tmp_dir.dvc_gen(DVC_STRUCTURE, commit=\"dvc\")\n\n path = \"README.md\"\n files = Repo.ls(os.fspath(tmp_dir), path, recursive=True)\n match_files(files, (((\"README.md\",), False),))\n\n\ndef test_ls_repo_with_missed_path(tmp_dir, dvc, scm):\n tmp_dir.scm_gen(FS_STRUCTURE, commit=\"init\")\n tmp_dir.dvc_gen(DVC_STRUCTURE, commit=\"dvc\")\n\n with pytest.raises(PathMissingError) as exc_info:\n Repo.ls(os.fspath(tmp_dir), path=\"missed_path\")\n assert not exc_info.value.dvc_only\n\n\ndef test_ls_repo_with_missed_path_dvc_only(tmp_dir, dvc, scm):\n tmp_dir.scm_gen(FS_STRUCTURE, commit=\"init\")\n tmp_dir.dvc_gen(DVC_STRUCTURE, commit=\"dvc\")\n\n with pytest.raises(PathMissingError) as exc_info:\n Repo.ls(\n os.fspath(tmp_dir),\n path=\"missed_path\",\n recursive=True,\n dvc_only=True,\n )\n assert exc_info.value.dvc_only", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_removed_dvc_dir_test_ls_repo_with_removed_dvc_dir.match_files_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_repo_with_removed_dvc_dir_test_ls_repo_with_removed_dvc_dir.match_files_", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 254, "end_line": 269, "span_ids": ["test_ls_repo_with_removed_dvc_dir"], "tokens": 111}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ls_repo_with_removed_dvc_dir(tmp_dir, dvc, scm):\n create_dvc_pipeline(tmp_dir, dvc)\n\n files = Repo.ls(os.fspath(tmp_dir))\n match_files(\n files,\n (\n ((\"script.py\",), False),\n ((\"dep.dvc\",), False),\n ((\"out.dvc\",), False),\n ((\"dep\",), True),\n ((\"out\",), False),\n ((\".dvcignore\",), False),\n ((\".gitignore\",), False),\n ),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_granular_test_ls_granular.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_granular_test_ls_granular.None_1", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 461, "end_line": 485, "span_ids": ["test_ls_granular"], "tokens": 255}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_ls_granular(erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\n {\n \"dir\": {\n \"1\": \"1\",\n \"2\": \"2\",\n \"subdir\": {\"foo\": \"foo\", \"bar\": \"bar\"},\n }\n },\n commit=\"create dir\",\n )\n\n entries = Repo.ls(os.fspath(erepo_dir), os.path.join(\"dir\", \"subdir\"))\n assert entries == [\n {\"isout\": False, \"isdir\": False, \"isexec\": False, \"path\": \"bar\"},\n {\"isout\": False, \"isdir\": False, \"isexec\": False, \"path\": \"foo\"},\n ]\n\n entries = Repo.ls(os.fspath(erepo_dir), \"dir\")\n assert entries == [\n {\"isout\": False, \"isdir\": False, \"isexec\": False, \"path\": \"1\"},\n {\"isout\": False, \"isdir\": False, \"isexec\": False, \"path\": \"2\"},\n {\"isout\": False, \"isdir\": True, \"isexec\": False, \"path\": \"subdir\"},\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_target_test_ls_target.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_ls_target_test_ls_target.None_2", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 488, "end_line": 515, "span_ids": ["test_ls_target"], "tokens": 285}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"use_scm\", [True, False])\ndef test_ls_target(erepo_dir, use_scm):\n with erepo_dir.chdir():\n gen = erepo_dir.scm_gen if use_scm else erepo_dir.dvc_gen\n gen(\n {\n \"dir\": {\n \"1\": \"1\",\n \"2\": \"2\",\n \"subdir\": {\"foo\": \"foo\", \"bar\": \"bar\"},\n }\n },\n commit=\"create dir\",\n )\n\n def _ls(path):\n return Repo.ls(os.fspath(erepo_dir), path)\n\n assert _ls(os.path.join(\"dir\", \"1\")) == [\n {\"isout\": False, \"isdir\": False, \"isexec\": False, \"path\": \"1\"}\n ]\n assert _ls(os.path.join(\"dir\", \"subdir\", \"foo\")) == [\n {\"isout\": False, \"isdir\": False, \"isexec\": False, \"path\": \"foo\"}\n ]\n assert _ls(os.path.join(\"dir\", \"subdir\")) == [\n {\"isdir\": False, \"isexec\": 0, \"isout\": False, \"path\": \"bar\"},\n {\"isdir\": False, \"isexec\": 0, \"isout\": False, \"path\": \"foo\"},\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_subrepo_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_ls.py_test_subrepo_", "embedding": null, "metadata": {"file_path": "tests/func/test_ls.py", "file_name": "test_ls.py", "file_type": "text/x-python", "category": "test", "start_line": 518, "end_line": 559, "span_ids": ["test_subrepo"], "tokens": 421}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"dvc_top_level, erepo\",\n [\n (True, pytest.lazy_fixture(\"erepo_dir\")),\n (False, pytest.lazy_fixture(\"git_dir\")),\n ],\n)\ndef test_subrepo(dvc_top_level, erepo):\n from tests.func.test_get import make_subrepo\n\n dvc_files = {\"foo.txt\": \"foo.txt\", \"dvc_dir\": {\"lorem\": \"lorem\"}}\n scm_files = {\"bar.txt\": \"bar.txt\", \"scm_dir\": {\"ipsum\": \"ipsum\"}}\n subrepo = erepo / \"subrepo\"\n make_subrepo(subrepo, erepo.scm)\n\n for repo in [erepo, subrepo]:\n with repo.chdir():\n repo.scm_gen(scm_files, commit=f\"scm track for top {repo}\")\n if hasattr(repo, \"dvc\"):\n repo.dvc_gen(dvc_files, commit=f\"dvc track for {repo}\")\n\n def _list_files(path=None):\n return set(map(itemgetter(\"path\"), Repo.ls(os.fspath(erepo), path)))\n\n extras = {\".dvcignore\", \".gitignore\"}\n git_tracked_outputs = {\"bar.txt\", \"scm_dir\"}\n dvc_files = {\"dvc_dir\", \"foo.txt\", \"foo.txt.dvc\", \"dvc_dir.dvc\"}\n common_outputs = git_tracked_outputs | extras | dvc_files\n\n top_level_outputs = (\n common_outputs if dvc_top_level else git_tracked_outputs\n )\n assert _list_files() == top_level_outputs | {\"subrepo\"}\n assert _list_files(\"subrepo\") == common_outputs\n\n assert _list_files(\"scm_dir\") == {\"ipsum\"}\n assert _list_files(\"subrepo/scm_dir\") == {\"ipsum\"}\n\n if dvc_top_level:\n assert _list_files(\"dvc_dir\") == {\"lorem\"}\n assert _list_files(\"subrepo/dvc_dir\") == {\"lorem\"}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_merge_driver.py_os_test_merge.assert_tmp_dir_our_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_merge_driver.py_os_test_merge.assert_tmp_dir_our_", "embedding": null, "metadata": {"file_path": "tests/func/test_merge_driver.py", "file_name": "test_merge_driver.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 67, "span_ids": ["imports", "test_merge", "_gen"], "tokens": 522}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nimport pytest\n\nfrom dvc.main import main\nfrom dvc.utils.fs import remove\n\n\ndef _gen(tmp_dir, struct, name):\n remove(tmp_dir / \"data\")\n if struct is None:\n (tmp_dir / name).touch()\n else:\n (stage,) = tmp_dir.dvc_gen({\"data\": struct})\n os.rename(stage.path, name)\n\n\n@pytest.mark.parametrize(\n \"ancestor, our, their, merged\",\n [\n (\n {\"foo\": \"foo\"},\n {\"foo\": \"foo\", \"bar\": \"bar\"},\n {\"foo\": \"foo\", \"baz\": \"baz\"},\n {\"foo\": \"foo\", \"bar\": \"bar\", \"baz\": \"baz\"},\n ),\n (\n {\"common\": \"common\", \"subdir\": {\"foo\": \"foo\"}},\n {\"common\": \"common\", \"subdir\": {\"foo\": \"foo\", \"bar\": \"bar\"}},\n {\"common\": \"common\", \"subdir\": {\"foo\": \"foo\", \"baz\": \"baz\"}},\n {\n \"common\": \"common\",\n \"subdir\": {\"foo\": \"foo\", \"bar\": \"bar\", \"baz\": \"baz\"},\n },\n ),\n ({}, {\"foo\": \"foo\"}, {\"bar\": \"bar\"}, {\"foo\": \"foo\", \"bar\": \"bar\"},),\n ({}, {}, {\"bar\": \"bar\"}, {\"bar\": \"bar\"},),\n ({}, {\"foo\": \"foo\"}, {}, {\"foo\": \"foo\"},),\n (None, {\"foo\": \"foo\"}, {\"bar\": \"bar\"}, {\"foo\": \"foo\", \"bar\": \"bar\"},),\n (None, None, {\"bar\": \"bar\"}, {\"bar\": \"bar\"},),\n (None, {\"foo\": \"foo\"}, None, {\"foo\": \"foo\"},),\n ],\n)\ndef test_merge(tmp_dir, dvc, ancestor, our, their, merged):\n _gen(tmp_dir, ancestor, \"ancestor\")\n _gen(tmp_dir, our, \"our\")\n _gen(tmp_dir, their, \"their\")\n\n assert (\n main(\n [\n \"git-hook\",\n \"merge-driver\",\n \"--ancestor\",\n \"ancestor\",\n \"--our\",\n \"our\",\n \"--their\",\n \"their\",\n ]\n )\n == 0\n )\n\n _gen(tmp_dir, merged, \"merged\")\n\n assert (tmp_dir / \"our\").read_text() == (tmp_dir / \"merged\").read_text()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_merge_driver.py_test_merge_conflict_test_merge_conflict.assert_error_in_caplog_te": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_merge_driver.py_test_merge_conflict_test_merge_conflict.assert_error_in_caplog_te", "embedding": null, "metadata": {"file_path": "tests/func/test_merge_driver.py", "file_name": "test_merge_driver.py", "file_type": "text/x-python", "category": "test", "start_line": 70, "end_line": 114, "span_ids": ["test_merge_conflict"], "tokens": 246}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"ancestor, our, their, error\",\n [\n (\n {\"foo\": \"foo\"},\n {\"foo\": \"bar\"},\n {\"foo\": \"baz\"},\n (\n \"unable to auto-merge directories with \"\n \"diff that contains 'change'ed files\"\n ),\n ),\n (\n {\"common\": \"common\", \"foo\": \"foo\"},\n {\"common\": \"common\", \"bar\": \"bar\"},\n {\"baz\": \"baz\"},\n (\n \"unable to auto-merge directories with \"\n \"diff that contains 'remove'ed files\"\n ),\n ),\n ],\n)\ndef test_merge_conflict(tmp_dir, dvc, ancestor, our, their, error, caplog):\n _gen(tmp_dir, ancestor, \"ancestor\")\n _gen(tmp_dir, our, \"our\")\n _gen(tmp_dir, their, \"their\")\n\n assert (\n main(\n [\n \"git-hook\",\n \"merge-driver\",\n \"--ancestor\",\n \"ancestor\",\n \"--our\",\n \"our\",\n \"--their\",\n \"their\",\n ]\n )\n != 0\n )\n\n assert error in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_merge_driver.py_test_merge_different_output_types_test_merge_different_output_types.assert_error_in_caplog_te": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_merge_driver.py_test_merge_different_output_types_test_merge_different_output_types.assert_error_in_caplog_te", "embedding": null, "metadata": {"file_path": "tests/func/test_merge_driver.py", "file_name": "test_merge_driver.py", "file_type": "text/x-python", "category": "test", "start_line": 117, "end_line": 148, "span_ids": ["test_merge_different_output_types"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"workspace\", [pytest.lazy_fixture(\"ssh\")], indirect=True\n)\ndef test_merge_different_output_types(tmp_dir, dvc, caplog, workspace):\n (tmp_dir / \"ancestor\").touch()\n\n (tmp_dir / \"our\").write_text(\n \"outs:\\n- md5: f123456789.dir\\n path: ssh://example.com/path\\n\"\n )\n\n (tmp_dir / \"their\").write_text(\n \"outs:\\n- md5: f987654321.dir\\n path: path\\n\"\n )\n\n assert (\n main(\n [\n \"git-hook\",\n \"merge-driver\",\n \"--ancestor\",\n \"ancestor\",\n \"--our\",\n \"our\",\n \"--their\",\n \"their\",\n ]\n )\n != 0\n )\n\n error = \"unable to auto-merge outputs of different types\"\n assert error in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_merge_driver.py_test_merge_different_output_options_test_merge_different_output_options.assert_error_in_caplog_te": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_merge_driver.py_test_merge_different_output_options_test_merge_different_output_options.assert_error_in_caplog_te", "embedding": null, "metadata": {"file_path": "tests/func/test_merge_driver.py", "file_name": "test_merge_driver.py", "file_type": "text/x-python", "category": "test", "start_line": 151, "end_line": 179, "span_ids": ["test_merge_different_output_options"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_merge_different_output_options(tmp_dir, dvc, caplog):\n (tmp_dir / \"ancestor\").touch()\n\n (tmp_dir / \"our\").write_text(\n \"outs:\\n- md5: f123456789.dir\\n path: path\\n\"\n )\n\n (tmp_dir / \"their\").write_text(\n \"outs:\\n- md5: f987654321.dir\\n path: path\\n cache: false\\n\"\n )\n\n assert (\n main(\n [\n \"git-hook\",\n \"merge-driver\",\n \"--ancestor\",\n \"ancestor\",\n \"--our\",\n \"our\",\n \"--their\",\n \"their\",\n ]\n )\n != 0\n )\n\n error = \"unable to auto-merge outputs with different options\"\n assert error in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_merge_driver.py_test_merge_file_test_merge_file.assert_err_in_caplog_text": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_merge_driver.py_test_merge_file_test_merge_file.assert_err_in_caplog_text", "embedding": null, "metadata": {"file_path": "tests/func/test_merge_driver.py", "file_name": "test_merge_driver.py", "file_type": "text/x-python", "category": "test", "start_line": 182, "end_line": 208, "span_ids": ["test_merge_file"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_merge_file(tmp_dir, dvc, caplog):\n (tmp_dir / \"ancestor\").touch()\n\n (tmp_dir / \"our\").write_text(\n \"outs:\\n- md5: f123456789.dir\\n path: path\\n\"\n )\n\n (tmp_dir / \"their\").write_text(\"outs:\\n- md5: f987654321\\n path: path\\n\")\n\n assert (\n main(\n [\n \"git-hook\",\n \"merge-driver\",\n \"--ancestor\",\n \"ancestor\",\n \"--our\",\n \"our\",\n \"--their\",\n \"their\",\n ]\n )\n != 0\n )\n\n err = \"unable to auto-merge outputs that are not directories\"\n assert err in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_merge_driver.py_test_merge_non_dvc_add_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_merge_driver.py_test_merge_non_dvc_add_", "embedding": null, "metadata": {"file_path": "tests/func/test_merge_driver.py", "file_name": "test_merge_driver.py", "file_type": "text/x-python", "category": "test", "start_line": 211, "end_line": 242, "span_ids": ["test_merge_non_dvc_add"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_merge_non_dvc_add(tmp_dir, dvc, caplog):\n (tmp_dir / \"ancestor\").touch()\n\n (tmp_dir / \"our\").write_text(\n \"outs:\\n\"\n \"- md5: f123456789.dir\\n\"\n \" path: path\\n\"\n \"- md5: ff123456789.dir\\n\"\n \" path: another\\n\"\n )\n\n (tmp_dir / \"their\").write_text(\"outs:\\n- md5: f987654321\\n path: path\\n\")\n\n assert (\n main(\n [\n \"git-hook\",\n \"merge-driver\",\n \"--ancestor\",\n \"ancestor\",\n \"--our\",\n \"our\",\n \"--their\",\n \"their\",\n ]\n )\n != 0\n )\n\n error = \"unable to auto-merge DVC-files that weren't created by `dvc add`\"\n assert error in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remote_modify_local_on_repo_config_test_remote_modify_local_on_repo_config.assert_dvc_config_remote": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remote_modify_local_on_repo_config_test_remote_modify_local_on_repo_config.assert_dvc_config_remote", "embedding": null, "metadata": {"file_path": "tests/func/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 236, "end_line": 251, "span_ids": ["test_remote_modify_local_on_repo_config"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_remote_modify_local_on_repo_config(tmp_dir, dvc):\n assert main([\"remote\", \"add\", \"myremote\", \"http://example.com/path\"]) == 0\n assert (\n main([\"remote\", \"modify\", \"myremote\", \"user\", \"xxx\", \"--local\"]) == 0\n )\n assert dvc.config.load_one(\"local\")[\"remote\"][\"myremote\"] == {\n \"user\": \"xxx\"\n }\n assert dvc.config.load_one(\"repo\")[\"remote\"][\"myremote\"] == {\n \"url\": \"http://example.com/path\"\n }\n dvc.config.load()\n assert dvc.config[\"remote\"][\"myremote\"] == {\n \"url\": \"http://example.com/path\",\n \"user\": \"xxx\",\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_push_order_test_push_order.assert_paths_index_foo_pa": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_push_order_test_push_order.assert_paths_index_foo_pa", "embedding": null, "metadata": {"file_path": "tests/func/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 267, "end_line": 281, "span_ids": ["test_push_order"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_push_order(tmp_dir, dvc, tmp_path_factory, mocker, local_remote):\n foo = tmp_dir.dvc_gen({\"foo\": {\"bar\": \"bar content\"}})[0].outs[0]\n tmp_dir.dvc_gen({\"baz\": \"baz content\"})\n\n mocked_upload = mocker.patch.object(LocalTree, \"_upload\", return_value=0)\n dvc.push()\n\n # foo .dir file should be uploaded after bar\n remote = dvc.cloud.get_remote(\"upstream\")\n foo_path = remote.tree.hash_to_path_info(foo.hash_info.value)\n bar_path = remote.tree.hash_to_path_info(\n foo.hash_info.dir_info.trie[(\"bar\",)].value\n )\n paths = [args[1] for args, _ in mocked_upload.call_args_list]\n assert paths.index(foo_path) > paths.index(bar_path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remote_modify_validation_test_remote_modify_validation.assert_unsupported_config": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remote_modify_validation_test_remote_modify_validation.assert_unsupported_config", "embedding": null, "metadata": {"file_path": "tests/func/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 286, "end_line": 299, "span_ids": ["test_remote_modify_validation"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_remote_modify_validation(dvc):\n remote_name = \"drive\"\n unsupported_config = \"unsupported_config\"\n assert (\n main([\"remote\", \"add\", \"-d\", remote_name, \"gdrive://test/test\"]) == 0\n )\n assert (\n main(\n [\"remote\", \"modify\", remote_name, unsupported_config, \"something\"]\n )\n == 251\n )\n config = configobj.ConfigObj(dvc.config.files[\"repo\"])\n assert unsupported_config not in config[f'remote \"{remote_name}\"']", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remote_default_test_remote_default.None_11": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_remote_default_test_remote_default.None_11", "embedding": null, "metadata": {"file_path": "tests/func/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 389, "end_line": 411, "span_ids": ["test_remote_default"], "tokens": 262}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_remote_default(dvc):\n remote_name = \"drive\"\n remote_url = \"gdrive://test/test\"\n new_name = \"new\"\n # prepare\n assert main([\"remote\", \"add\", \"-d\", remote_name, remote_url]) == 0\n assert main([\"remote\", \"default\", \"--local\", remote_name]) == 0\n config = dvc.config.load_one(\"repo\")\n assert config[\"core\"][\"remote\"] == remote_name\n assert config[\"remote\"][remote_name][\"url\"] == remote_url\n assert new_name not in config.get(\"remote\", {})\n local_config = dvc.config.load_one(\"local\")\n assert local_config[\"core\"][\"remote\"] == remote_name\n\n # rename success\n assert main([\"remote\", \"rename\", remote_name, new_name]) == 0\n config = dvc.config.load_one(\"repo\")\n assert remote_name not in config.get(\"remote\", {})\n assert config[\"core\"][\"remote\"] == new_name\n assert config[\"remote\"][new_name][\"url\"] == remote_url\n assert remote_name not in config.get(\"remote\", {})\n local_config = dvc.config.load_one(\"local\")\n assert local_config[\"core\"][\"remote\"] == new_name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_protect_local_remote_test_push_incomplete_dir.assert_remote_tree_exists": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_protect_local_remote_test_push_incomplete_dir.assert_remote_tree_exists", "embedding": null, "metadata": {"file_path": "tests/func/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 414, "end_line": 444, "span_ids": ["test_push_incomplete_dir", "test_protect_local_remote"], "tokens": 289}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_protect_local_remote(tmp_dir, dvc, local_remote):\n (stage,) = tmp_dir.dvc_gen(\"file\", \"file content\")\n\n dvc.push()\n remote = dvc.cloud.get_remote(\"upstream\")\n remote_cache_file = remote.tree.hash_to_path_info(\n stage.outs[0].hash_info.value\n )\n\n assert os.path.exists(remote_cache_file)\n assert stat.S_IMODE(os.stat(remote_cache_file).st_mode) == 0o444\n\n\ndef test_push_incomplete_dir(tmp_dir, dvc, mocker, local_remote):\n (stage,) = tmp_dir.dvc_gen({\"dir\": {\"foo\": \"foo\", \"bar\": \"bar\"}})\n remote = dvc.cloud.get_remote(\"upstream\")\n\n cache = dvc.cache.local\n dir_hash = stage.outs[0].hash_info.value\n used = stage.get_used_cache(remote=remote)\n\n # remove one of the cache files for directory\n file_hashes = list(used.child_keys(cache.tree.scheme, dir_hash))\n remove(cache.tree.hash_to_path_info(file_hashes[0]))\n\n dvc.push()\n assert not remote.tree.exists(remote.tree.hash_to_path_info(dir_hash))\n assert not remote.tree.exists(\n remote.tree.hash_to_path_info(file_hashes[0])\n )\n assert remote.tree.exists(remote.tree.hash_to_path_info(file_hashes[1]))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_upload_exists_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_remote.py_test_upload_exists_", "embedding": null, "metadata": {"file_path": "tests/func/test_remote.py", "file_name": "test_remote.py", "file_type": "text/x-python", "category": "test", "start_line": 447, "end_line": 463, "span_ids": ["test_upload_exists"], "tokens": 158}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_upload_exists(tmp_dir, dvc, local_remote):\n tmp_dir.gen(\"foo\", \"foo\")\n remote = dvc.cloud.get_remote(\"upstream\")\n # allow uploaded files to be writable for this test,\n # normally they are set to read-only for DVC remotes\n remote.tree.CACHE_MODE = 0o644\n\n from_info = PathInfo(tmp_dir / \"foo\")\n to_info = remote.tree.path_info / \"foo\"\n remote.tree.upload(from_info, to_info)\n assert remote.tree.exists(to_info)\n\n tmp_dir.gen(\"foo\", \"bar\")\n remote.tree.upload(from_info, to_info)\n with remote.tree.open(to_info) as fobj:\n assert fobj.read() == \"bar\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproPhony_TestReproDataSource.test.self_assertEqual_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_TestReproPhony_TestReproDataSource.test.self_assertEqual_", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 649, "end_line": 679, "span_ids": ["TestReproDataSource.test", "TestReproDataSource", "TestReproPhony", "TestReproPhony.test", "TestNonExistingOutput", "TestNonExistingOutput.test"], "tokens": 213}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestReproPhony(TestReproChangedData):\n def test(self):\n stage = self._run(\n cmd=\"cat \" + self.file1, deps=[self.file1], name=\"no_cmd\"\n )\n\n self.swap_foo_with_bar()\n\n self.dvc.reproduce(self._get_stage_target(stage))\n\n self.assertTrue(filecmp.cmp(self.file1, self.BAR, shallow=False))\n\n\nclass TestNonExistingOutput(TestRepro):\n def test(self):\n os.unlink(self.FOO)\n\n with self.assertRaises(ReproductionError):\n self.dvc.reproduce(self._get_stage_target(self.stage))\n\n\nclass TestReproDataSource(TestReproChangedData):\n def test(self):\n self.swap_foo_with_bar()\n\n stages = self.dvc.reproduce(self.foo_stage.path)\n\n self.assertTrue(filecmp.cmp(self.FOO, self.BAR, shallow=False))\n self.assertEqual(\n stages[0].outs[0].hash_info.value, file_md5(self.BAR)[0]\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_cache.py_test_memory_runs_of_multiple_stages_test_memory_runs_of_multiple_stages.None_11": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_cache.py_test_memory_runs_of_multiple_stages_test_memory_runs_of_multiple_stages.None_11", "embedding": null, "metadata": {"file_path": "tests/func/test_run_cache.py", "file_name": "test_run_cache.py", "file_type": "text/x-python", "category": "test", "start_line": 117, "end_line": 149, "span_ids": ["test_memory_runs_of_multiple_stages"], "tokens": 319}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_memory_runs_of_multiple_stages(tmp_dir, dvc, run_copy, mocker):\n tmp_dir.gen(\"foo\", \"foo\")\n assert not os.path.exists(dvc.stage_cache.cache_dir)\n\n run_copy(\"foo\", \"foo.bak\", name=\"backup-foo\")\n assert _recurse_count_files(dvc.stage_cache.cache_dir) == 1\n\n tmp_dir.gen(\"bar\", \"bar\")\n run_copy(\"bar\", \"bar.bak\", name=\"backup-bar\")\n assert _recurse_count_files(dvc.stage_cache.cache_dir) == 2\n\n from dvc.stage import run as _run\n\n mock_restore = mocker.spy(dvc.stage_cache, \"restore\")\n mock_run = mocker.spy(_run, \"cmd_run\")\n\n (tmp_dir / \"foo.bak\").unlink()\n (tmp_dir / \"bar.bak\").unlink()\n (tmp_dir / PIPELINE_LOCK).unlink()\n (stage,) = dvc.reproduce(\"backup-foo\")\n\n assert (tmp_dir / \"foo.bak\").read_text() == \"foo\"\n assert (tmp_dir / PIPELINE_LOCK).exists()\n mock_run.assert_not_called()\n mock_restore.assert_called_once_with(stage)\n mock_restore.reset_mock()\n\n (stage,) = dvc.reproduce(\"backup-bar\")\n\n assert (tmp_dir / \"bar.bak\").read_text() == \"bar\"\n assert (tmp_dir / PIPELINE_LOCK).exists()\n mock_run.assert_not_called()\n mock_restore.assert_called_once_with(stage)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_cache.py_test_restore_pull_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_cache.py_test_restore_pull_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_cache.py", "file_name": "test_run_cache.py", "file_type": "text/x-python", "category": "test", "start_line": 152, "end_line": 174, "span_ids": ["test_restore_pull"], "tokens": 221}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_restore_pull(tmp_dir, dvc, run_copy, mocker, local_remote):\n tmp_dir.gen(\"foo\", \"foo\")\n stage = run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n\n dvc.push()\n\n mock_restore = mocker.spy(dvc.stage_cache, \"restore\")\n mock_run = mocker.patch(\"dvc.stage.run.cmd_run\")\n mock_checkout = mocker.spy(dvc.cache.local, \"checkout\")\n\n # removing any information that `dvc` could use to re-generate from\n (tmp_dir / \"bar\").unlink()\n (tmp_dir / PIPELINE_LOCK).unlink()\n remove(stage.outs[0].cache_path)\n\n (stage,) = dvc.reproduce(\"copy-foo-bar\", pull=True)\n\n mock_restore.assert_called_once_with(stage, pull=True)\n mock_run.assert_not_called()\n mock_checkout.assert_called_once()\n assert (tmp_dir / \"bar\").exists() and not (tmp_dir / \"foo\").unlink()\n assert (tmp_dir / PIPELINE_LOCK).exists()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_params_no_exec_test_run_without_cmd.assert_command_is_not_sp": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_params_no_exec_test_run_without_cmd.assert_command_is_not_sp", "embedding": null, "metadata": {"file_path": "tests/func/test_run_multistage.py", "file_name": "test_run_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 280, "end_line": 311, "span_ids": ["test_run_params_no_exec", "test_run_without_cmd"], "tokens": 240}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_run_params_no_exec(tmp_dir, dvc):\n from dvc.dependency import ParamsDependency\n\n dump_yaml(tmp_dir / \"params2.yaml\", supported_params)\n stage = dvc.run(\n name=\"read_params\",\n params=[\"params2.yaml:lists\"],\n cmd=\"cat params2.yaml\",\n no_exec=True,\n )\n\n isinstance(stage.deps[0], ParamsDependency)\n assert stage.deps[0].params == [\"lists\"]\n assert not stage.dvcfile._lockfile.exists()\n\n data, _ = stage.dvcfile._load()\n assert data[\"stages\"][\"read_params\"][\"params\"] == [\n {\"params2.yaml\": [\"lists\"]}\n ]\n\n\n@pytest.mark.parametrize(\n \"kwargs\",\n [\n {\"outs\": [\"foo\"], \"deps\": [\"bar\"]},\n {\"outs\": [\"foo\"], \"deps\": [\"bar\"], \"name\": \"copy-foo-bar\"},\n ],\n)\ndef test_run_without_cmd(tmp_dir, dvc, kwargs):\n with pytest.raises(InvalidArgumentError) as exc:\n dvc.run(**kwargs)\n assert \"command is not specified\" == str(exc.value)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_overwrite_order_test_run_overwrite_order.assert_list_data_stages_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_multistage.py_test_run_overwrite_order_test_run_overwrite_order.assert_list_data_stages_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_multistage.py", "file_name": "test_run_multistage.py", "file_type": "text/x-python", "category": "test", "start_line": 314, "end_line": 326, "span_ids": ["test_run_overwrite_order"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_run_overwrite_order(tmp_dir, dvc, run_copy):\n from dvc.dvcfile import PIPELINE_FILE\n\n tmp_dir.gen({\"foo\": \"foo\", \"foo1\": \"foo1\"})\n run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n run_copy(\"bar\", \"foobar\", name=\"copy-bar-foobar\")\n\n run_copy(\"foo1\", \"bar1\", name=\"copy-foo-bar\", force=True)\n\n data = parse_yaml_for_update(\n (tmp_dir / PIPELINE_FILE).read_text(), PIPELINE_FILE\n )\n assert list(data[\"stages\"].keys()) == [\"copy-foo-bar\", \"copy-bar-foobar\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_test_metrics_dir_test_metrics_dir.assert_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_test_metrics_dir_test_metrics_dir.assert_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 995, "end_line": 1005, "span_ids": ["test_metrics_dir"], "tokens": 115}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"metrics_type\", [\"metrics\", \"metrics_no_cache\"],\n)\ndef test_metrics_dir(tmp_dir, dvc, caplog, run_copy_metrics, metrics_type):\n copyargs = {metrics_type: [\"dir_metric\"]}\n tmp_dir.gen({\"dir\": {\"file\": \"content\"}})\n with caplog.at_level(logging.DEBUG, \"dvc\"):\n run_copy_metrics(\"dir\", \"dir_metric\", **copyargs)\n assert (\n \"directory 'dir_metric' cannot be used as metrics.\" in caplog.messages\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_s3.py_from_functools_import_wra_test_copy_singlepart_preserve_etag.S3Tree__copy_s3_from_inf": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_s3.py_from_functools_import_wra_test_copy_singlepart_preserve_etag.S3Tree__copy_s3_from_inf", "embedding": null, "metadata": {"file_path": "tests/func/test_s3.py", "file_name": "test_s3.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 46, "span_ids": ["imports", "_get_src_dst", "test_copy_singlepart_preserve_etag", "reduced_min_part_size"], "tokens": 322}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from functools import wraps\n\nimport boto3\nimport moto.s3.models as s3model\nimport pytest\nfrom moto import mock_s3\n\nfrom dvc.cache.base import CloudCache\nfrom dvc.tree.s3 import S3Tree\nfrom tests.remotes import S3\n\n# from https://github.com/spulec/moto/blob/v1.3.5/tests/test_s3/test_s3.py#L40\nREDUCED_PART_SIZE = 256\n\n\ndef reduced_min_part_size(f):\n \"\"\" speed up tests by temporarily making the multipart minimum part size\n small\n \"\"\"\n orig_size = s3model.UPLOAD_PART_MIN_SIZE\n\n @wraps(f)\n def wrapped(*args, **kwargs):\n try:\n s3model.UPLOAD_PART_MIN_SIZE = REDUCED_PART_SIZE\n return f(*args, **kwargs)\n finally:\n s3model.UPLOAD_PART_MIN_SIZE = orig_size\n\n return wrapped\n\n\ndef _get_src_dst():\n base_info = S3Tree.PATH_CLS(S3.get_url())\n return base_info / \"from\", base_info / \"to\"\n\n\n@mock_s3\ndef test_copy_singlepart_preserve_etag():\n from_info, to_info = _get_src_dst()\n\n s3 = boto3.client(\"s3\")\n s3.create_bucket(Bucket=from_info.bucket)\n s3.put_object(Bucket=from_info.bucket, Key=from_info.path, Body=\"data\")\n\n S3Tree._copy(s3, from_info, to_info, {})", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_stage_remove_pipeline_stage_test_stage_remove_pipeline_stage.assert_copy_bar_foobar_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_stage_remove_pipeline_stage_test_stage_remove_pipeline_stage.assert_copy_bar_foobar_", "embedding": null, "metadata": {"file_path": "tests/func/test_stage.py", "file_name": "test_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 251, "end_line": 264, "span_ids": ["test_stage_remove_pipeline_stage"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stage_remove_pipeline_stage(tmp_dir, dvc, run_copy):\n tmp_dir.gen(\"foo\", \"foo\")\n stage = run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n run_copy(\"bar\", \"foobar\", name=\"copy-bar-foobar\")\n\n dvc_file = stage.dvcfile\n with dvc.lock:\n stage.remove(purge=False)\n assert stage.name in dvc_file.stages\n\n with dvc.lock:\n stage.remove()\n assert stage.name not in dvc_file.stages\n assert \"copy-bar-foobar\" in dvc_file.stages", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_stage_remove_pointer_stage_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_stage_remove_pointer_stage_", "embedding": null, "metadata": {"file_path": "tests/func/test_stage.py", "file_name": "test_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 286, "end_line": 313, "span_ids": ["test_stage_remove_pointer_stage", "test_stage_run_checkpoint"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stage_remove_pointer_stage(tmp_dir, dvc, run_copy):\n (stage,) = tmp_dir.dvc_gen(\"foo\", \"foo\")\n\n with dvc.lock:\n stage.remove(purge=False)\n assert not (tmp_dir / \"foo\").exists()\n assert (tmp_dir / stage.relpath).exists()\n\n with dvc.lock:\n stage.remove()\n assert not (tmp_dir / stage.relpath).exists()\n\n\n@pytest.mark.parametrize(\"checkpoint\", [True, False])\ndef test_stage_run_checkpoint(tmp_dir, dvc, mocker, checkpoint):\n stage = Stage(dvc, \"stage.dvc\", cmd=\"mycmd arg1 arg2\")\n mocker.patch.object(stage, \"save\")\n\n mock_cmd_run = mocker.patch(\"dvc.stage.run.cmd_run\")\n if checkpoint:\n callback = mocker.Mock()\n else:\n callback = None\n\n with lock_repo(dvc):\n run_stage(stage, checkpoint_func=callback)\n mock_cmd_run.assert_called_with(stage, checkpoint_func=callback, dry=False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_status.py_os_test_implied_cloud.assert_mock_status_called": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_status.py_os_test_implied_cloud.assert_mock_status_called", "embedding": null, "metadata": {"file_path": "tests/func/test_status.py", "file_name": "test_status.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 31, "span_ids": ["imports", "test_quiet", "test_implied_cloud"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nfrom dvc.main import main\n\n\ndef test_quiet(tmp_dir, dvc, capsys):\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n\n # clear\n capsys.readouterr()\n\n assert main([\"status\", \"--quiet\"]) == 0\n out_err = capsys.readouterr()\n assert not out_err.out\n assert not out_err.err\n\n tmp_dir.gen(\"foo\", \"barr\")\n\n assert main([\"status\", \"--quiet\"]) == 1\n out_err = capsys.readouterr()\n assert not out_err.out\n assert not out_err.err\n\n\ndef test_implied_cloud(dvc, mocker):\n mock_status = mocker.patch(\n \"dvc.repo.status._cloud_status\", return_value=True\n )\n\n main([\"status\", \"--remote\", \"something\"])\n assert mock_status.called", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_status.py_test_status_recursive_test_status_recursive.assert_dvc_status_targets": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_status.py_test_status_recursive_test_status_recursive.assert_dvc_status_targets", "embedding": null, "metadata": {"file_path": "tests/func/test_status.py", "file_name": "test_status.py", "file_type": "text/x-python", "category": "test", "start_line": 103, "end_line": 120, "span_ids": ["test_status_recursive"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_status_recursive(tmp_dir, dvc):\n tmp_dir.gen({\"dir\": {\"file\": \"text1\", \"subdir\": {\"file2\": \"text2\"}}})\n stages = dvc.add(\"dir\", recursive=True, no_commit=True)\n\n assert len(stages) == 2\n\n assert dvc.status(targets=[\"dir\"], recursive=True) == {\n os.path.join(\"dir\", \"file.dvc\"): [\n {\"changed outs\": {os.path.join(\"dir\", \"file\"): \"not in cache\"}}\n ],\n os.path.join(\"dir\", \"subdir\", \"file2.dvc\"): [\n {\n \"changed outs\": {\n os.path.join(\"dir\", \"subdir\", \"file2\"): \"not in cache\"\n }\n }\n ],\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_status.py_test_status_outputs_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_status.py_test_status_outputs_", "embedding": null, "metadata": {"file_path": "tests/func/test_status.py", "file_name": "test_status.py", "file_type": "text/x-python", "category": "test", "start_line": 123, "end_line": 142, "span_ids": ["test_status_outputs"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_status_outputs(tmp_dir, dvc):\n tmp_dir.dvc_gen({\"foo\": \"foo\", \"bar\": \"bar\"})\n dvc.run(\n outs=[\"alice\", \"bob\"],\n deps=[\"foo\", \"bar\"],\n cmd=\"echo alice>alice && echo bob>bob\",\n name=\"alice_bob\",\n )\n tmp_dir.gen({\"alice\": \"new alice\", \"bob\": \"new bob\"})\n\n assert dvc.status(targets=[\"alice_bob\"]) == {\n \"alice_bob\": [\n {\"changed outs\": {\"alice\": \"modified\", \"bob\": \"modified\"}}\n ]\n }\n\n assert dvc.status(targets=[\"alice\"]) == {\n \"alice_bob\": [{\"changed outs\": {\"alice\": \"modified\"}}]\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_os_TestLocalTree.test_isfile.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_os_TestLocalTree.test_isfile.None_2", "embedding": null, "metadata": {"file_path": "tests/func/test_tree.py", "file_name": "test_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 38, "span_ids": ["TestLocalTree.test_open", "TestLocalTree.test_isdir", "imports", "TestLocalTree.setUp", "TestLocalTree.test_exists", "TestLocalTree", "TestLocalTree.test_isfile"], "tokens": 281}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nfrom operator import itemgetter\nfrom os.path import join\n\nfrom dvc.path_info import PathInfo\nfrom dvc.repo import Repo\nfrom dvc.scm import SCM\nfrom dvc.tree.local import LocalTree\nfrom dvc.tree.repo import RepoTree\nfrom dvc.utils.fs import remove\nfrom tests.basic_env import TestDir, TestGit, TestGitSubmodule\n\n\nclass TestLocalTree(TestDir):\n def setUp(self):\n super().setUp()\n self.tree = LocalTree(None, {})\n\n def test_open(self):\n with self.tree.open(self.FOO) as fd:\n self.assertEqual(fd.read(), self.FOO_CONTENTS)\n with self.tree.open(self.UNICODE, encoding=\"utf-8\") as fd:\n self.assertEqual(fd.read(), self.UNICODE_CONTENTS)\n\n def test_exists(self):\n self.assertTrue(self.tree.exists(self.FOO))\n self.assertTrue(self.tree.exists(self.UNICODE))\n self.assertFalse(self.tree.exists(\"not-existing-file\"))\n\n def test_isdir(self):\n self.assertTrue(self.tree.isdir(self.DATA_DIR))\n self.assertFalse(self.tree.isdir(self.FOO))\n self.assertFalse(self.tree.isdir(\"not-existing-file\"))\n\n def test_isfile(self):\n self.assertTrue(self.tree.isfile(self.FOO))\n self.assertFalse(self.tree.isfile(self.DATA_DIR))\n self.assertFalse(self.tree.isfile(\"not-existing-file\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_GitTreeTests_GitTreeTests.test_open.None_3.tree_open_self_DATA_DIR_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_GitTreeTests_GitTreeTests.test_open.None_3.tree_open_self_DATA_DIR_", "embedding": null, "metadata": {"file_path": "tests/func/test_tree.py", "file_name": "test_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 41, "end_line": 55, "span_ids": ["GitTreeTests", "GitTreeTests.test_open"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GitTreeTests:\n # pylint: disable=no-member\n def test_open(self):\n self.scm.add([self.FOO, self.UNICODE, self.DATA_DIR])\n self.scm.commit(\"add\")\n\n tree = self.scm.get_tree(\"master\")\n with tree.open(self.FOO) as fd:\n self.assertEqual(fd.read(), self.FOO_CONTENTS)\n with tree.open(self.UNICODE) as fd:\n self.assertEqual(fd.read(), self.UNICODE_CONTENTS)\n with self.assertRaises(IOError):\n tree.open(\"not-existing-file\")\n with self.assertRaises(IOError):\n tree.open(self.DATA_DIR)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_GitTreeTests.test_exists_GitTreeTests.test_exists.None_8": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_GitTreeTests.test_exists_GitTreeTests.test_exists.None_8", "embedding": null, "metadata": {"file_path": "tests/func/test_tree.py", "file_name": "test_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 57, "end_line": 69, "span_ids": ["GitTreeTests.test_exists"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GitTreeTests:\n\n def test_exists(self):\n tree = self.scm.get_tree(\"master\")\n self.assertFalse(tree.exists(self.FOO))\n self.assertFalse(tree.exists(self.UNICODE))\n self.assertFalse(tree.exists(self.DATA_DIR))\n self.scm.add([self.FOO, self.UNICODE, self.DATA])\n self.scm.commit(\"add\")\n\n tree = self.scm.get_tree(\"master\")\n self.assertTrue(tree.exists(self.FOO))\n self.assertTrue(tree.exists(self.UNICODE))\n self.assertTrue(tree.exists(self.DATA_DIR))\n self.assertFalse(tree.exists(\"non-existing-file\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_GitTreeTests.test_isdir_GitTreeTests.test_isfile.None_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_GitTreeTests.test_isdir_GitTreeTests.test_isfile.None_4", "embedding": null, "metadata": {"file_path": "tests/func/test_tree.py", "file_name": "test_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 71, "end_line": 87, "span_ids": ["GitTreeTests.test_isdir", "GitTreeTests.test_isfile"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GitTreeTests:\n\n def test_isdir(self):\n self.scm.add([self.FOO, self.DATA_DIR])\n self.scm.commit(\"add\")\n\n tree = self.scm.get_tree(\"master\")\n self.assertTrue(tree.isdir(self.DATA_DIR))\n self.assertFalse(tree.isdir(self.FOO))\n self.assertFalse(tree.isdir(\"non-existing-file\"))\n\n def test_isfile(self):\n self.scm.add([self.FOO, self.DATA_DIR])\n self.scm.commit(\"add\")\n\n tree = self.scm.get_tree(\"master\")\n self.assertTrue(tree.isfile(self.FOO))\n self.assertFalse(tree.isfile(self.DATA_DIR))\n self.assertFalse(tree.isfile(\"not-existing-file\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_test_cleantree_subrepo_test_cleantree_subrepo.assert_subrepo_tree_isdir": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_test_cleantree_subrepo_test_cleantree_subrepo.assert_subrepo_tree_isdir", "embedding": null, "metadata": {"file_path": "tests/func/test_tree.py", "file_name": "test_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 234, "end_line": 253, "span_ids": ["test_cleantree_subrepo"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_cleantree_subrepo(tmp_dir, dvc, scm, monkeypatch):\n tmp_dir.gen({\"subdir\": {}})\n subrepo_dir = tmp_dir / \"subdir\"\n with subrepo_dir.chdir():\n subrepo = Repo.init(subdir=True)\n subrepo_dir.gen({\"foo\": \"foo\", \"dir\": {\"bar\": \"bar\"}})\n\n path = PathInfo(subrepo_dir)\n\n assert dvc.tree.use_dvcignore\n assert not dvc.tree.exists(path / \"foo\")\n assert not dvc.tree.isfile(path / \"foo\")\n assert not dvc.tree.exists(path / \"dir\")\n assert not dvc.tree.isdir(path / \"dir\")\n\n assert subrepo.tree.use_dvcignore\n assert subrepo.tree.exists(path / \"foo\")\n assert subrepo.tree.isfile(path / \"foo\")\n assert subrepo.tree.exists(path / \"dir\")\n assert subrepo.tree.isdir(path / \"dir\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_test_walk_dont_ignore_subrepos_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_test_walk_dont_ignore_subrepos_", "embedding": null, "metadata": {"file_path": "tests/func/test_tree.py", "file_name": "test_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 256, "end_line": 277, "span_ids": ["test_walk_dont_ignore_subrepos"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_walk_dont_ignore_subrepos(tmp_dir, scm, dvc):\n tmp_dir.dvc_gen({\"foo\": \"foo\"}, commit=\"add foo\")\n subrepo_dir = tmp_dir / \"subdir\"\n subrepo_dir.mkdir()\n with subrepo_dir.chdir():\n Repo.init(subdir=True)\n scm.add([\"subdir\"])\n scm.commit(\"Add subrepo\")\n\n dvc_tree = dvc.tree\n dvc_tree._reset()\n scm_tree = scm.get_tree(\"HEAD\", use_dvcignore=True)\n path = os.fspath(tmp_dir)\n get_dirs = itemgetter(1)\n\n assert get_dirs(next(dvc_tree.walk(path))) == []\n assert get_dirs(next(scm_tree.walk(path))) == []\n\n kw = {\"ignore_subrepos\": False}\n assert get_dirs(next(dvc_tree.walk(path, **kw))) == [\"subdir\"]\n assert get_dirs(next(scm_tree.walk(path, **kw))) == [\"subdir\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_update.py_test_update_recursive_test_update_recursive.None_9": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_update.py_test_update_recursive_test_update_recursive.None_9", "embedding": null, "metadata": {"file_path": "tests/func/test_update.py", "file_name": "test_update.py", "file_type": "text/x-python", "category": "test", "start_line": 239, "end_line": 296, "span_ids": ["test_update_recursive"], "tokens": 564}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_update_recursive(tmp_dir, dvc, erepo_dir):\n with erepo_dir.branch(\"branch\", new=True), erepo_dir.chdir():\n erepo_dir.scm_gen(\n {\"foo1\": \"text1\", \"foo2\": \"text2\", \"foo3\": \"text3\"},\n commit=\"add foo files\",\n )\n old_rev = erepo_dir.scm.get_rev()\n\n tmp_dir.gen({\"dir\": {\"subdir\": {}}})\n stage1 = dvc.imp(\n os.fspath(erepo_dir),\n \"foo1\",\n os.path.join(\"dir\", \"foo1\"),\n rev=\"branch\",\n )\n stage2 = dvc.imp(\n os.fspath(erepo_dir),\n \"foo2\",\n os.path.join(\"dir\", \"subdir\", \"foo2\"),\n rev=\"branch\",\n )\n stage3 = dvc.imp(\n os.fspath(erepo_dir),\n \"foo3\",\n os.path.join(\"dir\", \"subdir\", \"foo3\"),\n rev=\"branch\",\n )\n\n assert (tmp_dir / os.path.join(\"dir\", \"foo1\")).read_text() == \"text1\"\n assert (\n tmp_dir / os.path.join(\"dir\", \"subdir\", \"foo2\")\n ).read_text() == \"text2\"\n assert (\n tmp_dir / os.path.join(\"dir\", \"subdir\", \"foo3\")\n ).read_text() == \"text3\"\n\n assert stage1.deps[0].def_repo[\"rev_lock\"] == old_rev\n assert stage2.deps[0].def_repo[\"rev_lock\"] == old_rev\n assert stage3.deps[0].def_repo[\"rev_lock\"] == old_rev\n\n with erepo_dir.branch(\"branch\", new=False), erepo_dir.chdir():\n erepo_dir.scm_gen(\n {\"foo1\": \"updated1\", \"foo2\": \"updated2\", \"foo3\": \"updated3\"},\n \"\",\n \"update foo content\",\n )\n new_rev = erepo_dir.scm.get_rev()\n\n assert old_rev != new_rev\n\n dvc.update([\"dir\"], recursive=True)\n\n stage1 = Dvcfile(dvc, stage1.path).stage\n stage2 = Dvcfile(dvc, stage2.path).stage\n stage3 = Dvcfile(dvc, stage3.path).stage\n assert stage1.deps[0].def_repo[\"rev_lock\"] == new_rev\n assert stage2.deps[0].def_repo[\"rev_lock\"] == new_rev\n assert stage3.deps[0].def_repo[\"rev_lock\"] == new_rev", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_update.py_test_update_from_subrepos_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_update.py_test_update_from_subrepos_", "embedding": null, "metadata": {"file_path": "tests/func/test_update.py", "file_name": "test_update.py", "file_type": "text/x-python", "category": "test", "start_line": 299, "end_line": 326, "span_ids": ["test_update_from_subrepos"], "tokens": 281}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"is_dvc\", [True, False])\ndef test_update_from_subrepos(tmp_dir, dvc, erepo_dir, is_dvc):\n subrepo = erepo_dir / \"subrepo\"\n make_subrepo(subrepo, erepo_dir.scm)\n gen = subrepo.dvc_gen if is_dvc else subrepo.scm_gen\n with subrepo.chdir():\n gen(\"foo\", \"foo\", commit=\"subrepo initial\")\n\n path = os.path.join(\"subrepo\", \"foo\")\n repo_path = os.fspath(erepo_dir)\n dvc.imp(repo_path, path, out=\"out\")\n assert dvc.status() == {}\n\n with subrepo.chdir():\n gen(\"foo\", \"foobar\", commit=\"subrepo second commit\")\n\n assert dvc.status()[\"out.dvc\"][0][\"changed deps\"] == {\n f\"{path} ({repo_path})\": \"update available\"\n }\n (stage,) = dvc.update([\"out.dvc\"])\n\n assert (tmp_dir / \"out\").read_text() == \"foobar\"\n assert stage.deps[0].def_path == os.path.join(\"subrepo\", \"foo\")\n assert stage.deps[0].def_repo == {\n \"url\": repo_path,\n \"rev_lock\": erepo_dir.scm.get_rev(),\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_version.py_re_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_version.py_re_", "embedding": null, "metadata": {"file_path": "tests/func/test_version.py", "file_name": "test_version.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 17, "span_ids": ["imports", "test_"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import re\n\nfrom dvc.main import main\nfrom tests.unit.test_info import PYTHON_VERSION_REGEX\n\n\ndef test_(tmp_dir, dvc, scm, caplog):\n assert main([\"version\"]) == 0\n\n assert re.search(r\"DVC version: \\d+\\.\\d+\\.\\d+.*\", caplog.text)\n assert re.search(f\"Platform: {PYTHON_VERSION_REGEX} on .*\", caplog.text)\n assert re.search(r\"Supports: .*\", caplog.text)\n assert re.search(r\"Cache types: .*\", caplog.text)\n assert re.search(r\"Caches: local\", caplog.text)\n assert re.search(r\"Remotes: None\", caplog.text)\n assert \"Repo: dvc, git\" in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/__init__.py_subprocess_docker_compose_project_name.return._pytest_dvc_test_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/__init__.py_subprocess_docker_compose_project_name.return._pytest_dvc_test_", "embedding": null, "metadata": {"file_path": "tests/remotes/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 68, "span_ids": ["imports", "docker_compose", "docker_compose_project_name", "docker"], "tokens": 484}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import subprocess\n\nimport pytest\n\nfrom .azure import Azure, azure, azure_server # noqa: F401\nfrom .gdrive import ( # noqa: F401; noqa: F401\n TEST_GDRIVE_REPO_BUCKET,\n GDrive,\n gdrive,\n)\nfrom .gs import ( # noqa: F401; noqa: F401\n GCP,\n TEST_GCP_CREDS_FILE,\n TEST_GCP_REPO_BUCKET,\n gs,\n)\nfrom .hdfs import HDFS, hadoop, hdfs, hdfs_server, webhdfs # noqa: F401\nfrom .http import HTTP, http, http_server # noqa: F401\nfrom .local import Local, local_cloud, local_remote # noqa: F401\nfrom .oss import ( # noqa: F401\n OSS,\n TEST_OSS_REPO_BUCKET,\n oss,\n oss_server,\n real_oss,\n)\nfrom .s3 import S3, TEST_AWS_REPO_BUCKET, real_s3, s3 # noqa: F401\nfrom .ssh import ( # noqa: F401; noqa: F401\n SSHMocked,\n ssh,\n ssh_connection,\n ssh_server,\n)\nfrom .webdav import Webdav, webdav, webdav_server # noqa: F401\n\nTEST_REMOTE = \"upstream\"\nTEST_CONFIG = {\n \"cache\": {},\n \"core\": {\"remote\": TEST_REMOTE},\n \"remote\": {TEST_REMOTE: {\"url\": \"\"}},\n}\n\n\n@pytest.fixture(scope=\"session\")\ndef docker():\n import os\n\n # See https://travis-ci.community/t/docker-linux-containers-on-windows/301\n if os.environ.get(\"CI\") and os.name == \"nt\":\n pytest.skip(\"disabled for Windows on Github Actions\")\n\n try:\n subprocess.check_output(\"docker ps\", shell=True)\n except (subprocess.CalledProcessError, OSError):\n pytest.skip(\"no docker installed\")\n\n\n@pytest.fixture(scope=\"session\")\ndef docker_compose(docker):\n try:\n subprocess.check_output(\"docker-compose version\", shell=True)\n except (subprocess.CalledProcessError, OSError):\n pytest.skip(\"no docker-compose installed\")\n\n\n@pytest.fixture(scope=\"session\")\ndef docker_compose_project_name():\n return \"pytest-dvc-test\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/__init__.py_docker_services_docker_services.return.Services_executor_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/__init__.py_docker_services_docker_services.return.Services_executor_", "embedding": null, "metadata": {"file_path": "tests/remotes/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 65, "end_line": 86, "span_ids": ["docker_services"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture(scope=\"session\")\ndef docker_services(\n docker_compose_file, docker_compose_project_name, tmp_path_factory\n):\n # overriding `docker_services` fixture from `pytest_docker` plugin to\n # only launch docker images once.\n\n from filelock import FileLock\n from pytest_docker.plugin import DockerComposeExecutor, Services\n\n executor = DockerComposeExecutor(\n docker_compose_file, docker_compose_project_name,\n )\n\n # making sure we don't accidentally launch docker-compose in parallel,\n # as it might result in network conflicts. Inspired by:\n # https://github.com/pytest-dev/pytest-xdist#making-session-scoped-fixtures-execute-only-once\n lockfile = tmp_path_factory.getbasetemp().parent / \"docker-compose.lock\"\n with FileLock(str(lockfile)):\n executor.execute(\"up --build -d\")\n\n return Services(executor)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/__init__.py_remote_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/__init__.py_remote_", "embedding": null, "metadata": {"file_path": "tests/remotes/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 89, "end_line": 118, "span_ids": ["workspace", "remote"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture\ndef remote(tmp_dir, dvc, request):\n cloud = request.param\n assert cloud\n tmp_dir.add_remote(config=cloud.config)\n yield cloud\n\n\n@pytest.fixture\ndef workspace(tmp_dir, dvc, request):\n from dvc.cache import Cache\n\n cloud = request.param\n\n assert cloud\n\n tmp_dir.add_remote(name=\"workspace\", config=cloud.config, default=False)\n tmp_dir.add_remote(\n name=\"cache\", url=\"remote://workspace/cache\", default=False\n )\n\n scheme = getattr(cloud, \"scheme\", \"local\")\n if scheme != \"http\":\n with dvc.config.edit() as conf:\n conf[\"cache\"][scheme] = \"cache\"\n\n dvc.cache = Cache(dvc)\n\n return cloud", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/hdfs.py_locale_HDFS.read_text.return.self_read_bytes_decode_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/hdfs.py_locale_HDFS.read_text.return.self_read_bytes_decode_", "embedding": null, "metadata": {"file_path": "tests/remotes/hdfs.py", "file_name": "hdfs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 74, "span_ids": ["HDFS", "HDFS.exists", "HDFS.write_text", "HDFS.read_text", "imports", "HDFS.read_bytes", "HDFS.is_file", "HDFS.is_dir", "HDFS.mkdir", "HDFS.write_bytes", "HDFS._hdfs"], "tokens": 488}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import locale\nimport os\nimport platform\nimport subprocess\nimport uuid\nfrom contextlib import contextmanager\n\nimport pytest\n\nfrom dvc.path_info import URLInfo\nfrom tests import PY39, PYARROW_NOT_AVAILABLE\n\nfrom .base import Base\n\n\nclass HDFS(Base, URLInfo): # pylint: disable=abstract-method\n @contextmanager\n def _hdfs(self):\n import pyarrow.fs\n\n conn = pyarrow.fs.HadoopFileSystem(self.host, self.port)\n yield conn\n\n def is_file(self):\n with self._hdfs() as _hdfs:\n import pyarrow.fs\n\n file_info = _hdfs.get_file_info(self.path)\n return file_info.type == pyarrow.fs.FileType.File\n\n def is_dir(self):\n with self._hdfs() as _hdfs:\n import pyarrow.fs\n\n file_info = _hdfs.get_file_info(self.path)\n return file_info.type == pyarrow.fs.FileType.Directory\n\n def exists(self):\n with self._hdfs() as _hdfs:\n import pyarrow.fs\n\n file_info = _hdfs.get_file_info(self.path)\n return file_info.type != pyarrow.fs.FileType.NotFound\n\n def mkdir(self, mode=0o777, parents=False, exist_ok=False):\n assert mode == 0o777\n assert parents\n assert not exist_ok\n\n with self._hdfs() as _hdfs:\n # NOTE: fs.create_dir creates parents by default\n _hdfs.create_dir(self.path)\n\n def write_bytes(self, contents):\n with self._hdfs() as _hdfs:\n with _hdfs.open_output_stream(self.path) as fobj:\n fobj.write(contents)\n\n def write_text(self, contents, encoding=None, errors=None):\n if not encoding:\n encoding = locale.getpreferredencoding(False)\n assert errors is None\n self.write_bytes(contents.encode(encoding))\n\n def read_bytes(self):\n with self._hdfs() as _hdfs:\n with _hdfs.open_input_stream(self.path) as fobj:\n return fobj.read()\n\n def read_text(self, encoding=None, errors=None):\n if not encoding:\n encoding = locale.getpreferredencoding(False)\n assert errors is None\n return self.read_bytes().decode(encoding)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/ssh.py_locale_SSHMocked.get_url.return.url": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/ssh.py_locale_SSHMocked.get_url.return.url", "embedding": null, "metadata": {"file_path": "tests/remotes/ssh.py", "file_name": "ssh.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 45, "span_ids": ["imports", "SSHMocked.get_url", "SSHMocked"], "tokens": 394}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import locale\nimport os\nfrom contextlib import contextmanager\n\nimport pytest\nfrom funcy import cached_property\n\nfrom dvc.path_info import URLInfo\n\nfrom .base import Base\nfrom .local import Local\n\nTEST_SSH_USER = \"user\"\nTEST_SSH_KEY_PATH = os.path.join(\n os.path.abspath(os.path.dirname(__file__)), f\"{TEST_SSH_USER}.key\"\n)\n\n\nclass SSHMocked(Base, URLInfo):\n @staticmethod\n def get_url(user, port): # pylint: disable=arguments-differ\n path = Local.get_storagepath()\n if os.name == \"nt\":\n # NOTE: On Windows Local.get_storagepath() will return an\n # ntpath that looks something like `C:\\some\\path`, which is not\n # compatible with SFTP paths [1], so we need to convert it to\n # a proper posixpath.\n # To do that, we should construct a posixpath that would be\n # relative to the server's root.\n # Our URL format requires absolute paths, so the\n # resulting path would look like `/some/path`.\n #\n # [1]https://tools.ietf.org/html/draft-ietf-secsh-filexfer-13#section-6\n drive, path = os.path.splitdrive(path)\n\n # Hackish way to make sure SSH server runs on same drive as tests\n # and temporary directories are.\n # Context: https://github.com/iterative/dvc/pull/4660\n test_drive, _ = os.path.splitdrive(os.getcwd())\n if drive.lower() != test_drive.lower():\n raise Exception(\"Did you forget to use `tmp_dir?`\")\n\n path = path.replace(\"\\\\\", \"/\")\n url = f\"ssh://{user}@127.0.0.1:{port}{path}\"\n return url", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_collections_test_digest.assert_expected__diges": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_collections_test_digest.assert_expected__diges", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 21, "span_ids": ["imports", "test_digest"], "tokens": 119}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import collections\nimport logging\nimport os\n\nimport mock\nimport pytest\n\nfrom dvc.cli import parse_args\nfrom dvc.command.diff import _digest, _show_md\n\n\n@pytest.mark.parametrize(\n \"checksum, expected\",\n [\n (\"wxyz1234pq\", \"wxyz1234\"),\n ({\"old\": \"1234567890\", \"new\": \"0987654321\"}, \"12345678..09876543\"),\n ],\n ids=[\"str\", \"dict\"],\n)\ndef test_digest(checksum, expected):\n assert expected == _digest(checksum)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_default_test_default.assert_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_default_test_default.assert_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 24, "end_line": 41, "span_ids": ["test_default"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_default(mocker, caplog):\n args = parse_args([\"diff\"])\n cmd = args.func(args)\n diff = {\n \"added\": [{\"path\": \"file\", \"hash\": \"00000000\"}],\n \"deleted\": [],\n \"modified\": [],\n \"not in cache\": [],\n }\n mocker.patch(\"dvc.repo.Repo.diff\", return_value=diff)\n\n assert 0 == cmd.run()\n assert (\n \"Added:\\n\"\n \" file\\n\"\n \"\\n\"\n \"files summary: 1 added, 0 deleted, 0 modified, 0 not in cache\"\n ) in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_show_json_test_show_json.assert_not_in_cache_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_show_json_test_show_json.assert_not_in_cache_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 76, "end_line": 94, "span_ids": ["test_show_json"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_show_json(mocker, caplog):\n args = parse_args([\"diff\", \"--show-json\"])\n cmd = args.func(args)\n diff = {\n \"added\": [\n {\"path\": \"file2\", \"hash\": \"22222222\"},\n {\"path\": \"file1\", \"hash\": \"11111111\"},\n ],\n \"deleted\": [],\n \"modified\": [],\n \"not in cache\": [],\n }\n mocker.patch(\"dvc.repo.Repo.diff\", return_value=diff)\n\n assert 0 == cmd.run()\n assert '\"added\": [{\"path\": \"file1\"}, {\"path\": \"file2\"}]' in caplog.text\n assert '\"deleted\": []' in caplog.text\n assert '\"modified\": []' in caplog.text\n assert '\"not in cache\": []' in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_show_json_and_hash_test_show_json_and_hash.assert_not_in_cache_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_show_json_and_hash_test_show_json_and_hash.assert_not_in_cache_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 97, "end_line": 120, "span_ids": ["test_show_json_and_hash"], "tokens": 231}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_show_json_and_hash(mocker, caplog):\n args = parse_args([\"diff\", \"--show-json\", \"--show-hash\"])\n cmd = args.func(args)\n\n diff = {\n \"added\": [\n # py35: maintain a consistent key order for tests purposes\n collections.OrderedDict([(\"path\", \"file2\"), (\"hash\", \"22222222\")]),\n collections.OrderedDict([(\"path\", \"file1\"), (\"hash\", \"11111111\")]),\n ],\n \"deleted\": [],\n \"modified\": [],\n \"not in cache\": [],\n }\n mocker.patch(\"dvc.repo.Repo.diff\", return_value=diff)\n\n assert 0 == cmd.run()\n assert (\n '\"added\": [{\"path\": \"file1\", \"hash\": \"11111111\"}, '\n '{\"path\": \"file2\", \"hash\": \"22222222\"}]' in caplog.text\n )\n assert '\"deleted\": []' in caplog.text\n assert '\"modified\": []' in caplog.text\n assert '\"not in cache\": []' in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_show_json_hide_missing_test_show_json_hide_missing.assert_not_in_cache_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_show_json_hide_missing_test_show_json_hide_missing.assert_not_in_cache_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 123, "end_line": 141, "span_ids": ["test_show_json_hide_missing"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_show_json_hide_missing(mocker, caplog):\n args = parse_args([\"diff\", \"--show-json\", \"--hide-missing\"])\n cmd = args.func(args)\n diff = {\n \"added\": [\n {\"path\": \"file2\", \"hash\": \"22222222\"},\n {\"path\": \"file1\", \"hash\": \"11111111\"},\n ],\n \"deleted\": [],\n \"modified\": [],\n \"not in cache\": [],\n }\n mocker.patch(\"dvc.repo.Repo.diff\", return_value=diff)\n\n assert 0 == cmd.run()\n assert '\"added\": [{\"path\": \"file1\"}, {\"path\": \"file2\"}]' in caplog.text\n assert '\"deleted\": []' in caplog.text\n assert '\"modified\": []' in caplog.text\n assert '\"not in cache\": []' not in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_diff_show_md_and_hash_test_diff_show_md_and_hash.mock_show_md_assert_calle": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_diff_show_md_and_hash_test_diff_show_md_and_hash.mock_show_md_assert_calle", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 144, "end_line": 156, "span_ids": ["test_diff_show_md_and_hash"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"show_hash\", [None, True, False])\n@mock.patch(\"dvc.command.diff._show_md\")\ndef test_diff_show_md_and_hash(mock_show_md, mocker, caplog, show_hash):\n options = [\"diff\", \"--show-md\"] + ([\"--show-hash\"] if show_hash else [])\n args = parse_args(options)\n cmd = args.func(args)\n\n diff = {}\n show_hash = show_hash if show_hash else False\n mocker.patch(\"dvc.repo.Repo.diff\", return_value=diff.copy())\n\n assert 0 == cmd.run()\n mock_show_md.assert_called_once_with(diff, show_hash, False)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_show_md_test_show_md.assert__show_md_diff_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_show_md_test_show_md.assert__show_md_diff_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 186, "end_line": 208, "span_ids": ["test_show_md"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_show_md():\n diff = {\n \"deleted\": [\n {\"path\": \"zoo\"},\n {\"path\": os.path.join(\"data\", \"\")},\n {\"path\": os.path.join(\"data\", \"foo\")},\n {\"path\": os.path.join(\"data\", \"bar\")},\n ],\n \"modified\": [{\"path\": \"file\"}],\n \"added\": [{\"path\": \"file\"}],\n \"not in cache\": [{\"path\": \"file2\"}],\n }\n assert _show_md(diff) == (\n \"| Status | Path |\\n\"\n \"|--------------|----------|\\n\"\n \"| added | file |\\n\"\n \"| deleted | zoo |\\n\"\n \"| deleted | data{sep} |\\n\"\n \"| deleted | data{sep}foo |\\n\"\n \"| deleted | data{sep}bar |\\n\"\n \"| modified | file |\\n\"\n \"| not in cache | file2 |\\n\"\n ).format(sep=os.path.sep)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_show_md_with_hash_test_show_md_with_hash.assert__show_md_diff_sho": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_show_md_with_hash_test_show_md_with_hash.assert__show_md_diff_sho", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 211, "end_line": 235, "span_ids": ["test_show_md_with_hash"], "tokens": 333}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_show_md_with_hash():\n diff = {\n \"deleted\": [\n {\"path\": \"zoo\", \"hash\": \"22222\"},\n {\"path\": os.path.join(\"data\", \"\"), \"hash\": \"XXXXXXXX.dir\"},\n {\"path\": os.path.join(\"data\", \"foo\"), \"hash\": \"11111111\"},\n {\"path\": os.path.join(\"data\", \"bar\"), \"hash\": \"00000000\"},\n ],\n \"modified\": [\n {\"path\": \"file\", \"hash\": {\"old\": \"AAAAAAAA\", \"new\": \"BBBBBBBB\"}}\n ],\n \"added\": [{\"path\": \"file\", \"hash\": \"00000000\"}],\n \"not in cache\": [{\"path\": \"file2\", \"hash\": \"12345678\"}],\n }\n assert _show_md(diff, show_hash=True) == (\n \"| Status | Hash | Path |\\n\"\n \"|--------------|--------------------|----------|\\n\"\n \"| added | 00000000 | file |\\n\"\n \"| deleted | 22222 | zoo |\\n\"\n \"| deleted | XXXXXXXX | data{sep} |\\n\"\n \"| deleted | 11111111 | data{sep}foo |\\n\"\n \"| deleted | 00000000 | data{sep}bar |\\n\"\n \"| modified | AAAAAAAA..BBBBBBBB | file |\\n\"\n \"| not in cache | 12345678 | file2 |\\n\"\n ).format(sep=os.path.sep)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_show_md_hide_missing_test_show_md_hide_missing.assert__show_md_diff_hid": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_show_md_hide_missing_test_show_md_hide_missing.assert__show_md_diff_hid", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 238, "end_line": 259, "span_ids": ["test_show_md_hide_missing"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_show_md_hide_missing():\n diff = {\n \"deleted\": [\n {\"path\": \"zoo\"},\n {\"path\": os.path.join(\"data\", \"\")},\n {\"path\": os.path.join(\"data\", \"foo\")},\n {\"path\": os.path.join(\"data\", \"bar\")},\n ],\n \"modified\": [{\"path\": \"file\"}],\n \"added\": [{\"path\": \"file\"}],\n \"not in cache\": [{\"path\": \"file2\"}],\n }\n assert _show_md(diff, hide_missing=True) == (\n \"| Status | Path |\\n\"\n \"|----------|----------|\\n\"\n \"| added | file |\\n\"\n \"| deleted | zoo |\\n\"\n \"| deleted | data{sep} |\\n\"\n \"| deleted | data{sep}foo |\\n\"\n \"| deleted | data{sep}bar |\\n\"\n \"| modified | file |\\n\"\n ).format(sep=os.path.sep)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_hide_missing_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_diff.py_test_hide_missing_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 262, "end_line": 281, "span_ids": ["test_hide_missing"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_hide_missing(mocker, caplog):\n args = parse_args([\"diff\", \"--hide-missing\"])\n cmd = args.func(args)\n diff = {\n \"added\": [{\"path\": \"file\", \"hash\": \"00000000\"}],\n \"deleted\": [],\n \"modified\": [],\n \"not in cache\": [],\n }\n mocker.patch(\"dvc.repo.Repo.diff\", return_value=diff)\n\n assert 0 == cmd.run()\n assert (\n \"Added:\\n\"\n \" file\\n\"\n \"\\n\"\n \"files summary: 1 added, 0 deleted, 0 modified\"\n ) in caplog.text\n assert \"not in cache\" not in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_experiments.py_test_experiments_show_test_experiments_show.m_assert_called_once_with": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_experiments.py_test_experiments_show_test_experiments_show.m_assert_called_once_with", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_experiments.py", "file_name": "test_experiments.py", "file_type": "text/x-python", "category": "test", "start_line": 59, "end_line": 83, "span_ids": ["test_experiments_show"], "tokens": 137}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_experiments_show(dvc, scm, mocker):\n cli_args = parse_args(\n [\n \"experiments\",\n \"show\",\n \"--all-tags\",\n \"--all-branches\",\n \"--all-commits\",\n \"--sha\",\n ]\n )\n assert cli_args.func == CmdExperimentsShow\n\n cmd = cli_args.func(cli_args)\n m = mocker.patch(\"dvc.repo.experiments.show.show\", return_value={})\n\n assert cmd.run() == 0\n\n m.assert_called_once_with(\n cmd.repo,\n all_tags=True,\n all_branches=True,\n all_commits=True,\n sha_only=True,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_plots.py_from_dvc_cli_import_parse_test_plots_diff.m_assert_called_once_with": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_plots.py_from_dvc_cli_import_parse_test_plots_diff.m_assert_called_once_with", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_plots.py", "file_name": "test_plots.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 55, "span_ids": ["imports", "test_plots_diff"], "tokens": 301}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.cli import parse_args\nfrom dvc.command.plots import CmdPlotsDiff, CmdPlotsShow\n\n\ndef test_plots_diff(dvc, mocker):\n cli_args = parse_args(\n [\n \"plots\",\n \"diff\",\n \"--out\",\n \"result.extension\",\n \"-t\",\n \"template\",\n \"--targets\",\n \"datafile\",\n \"--show-vega\",\n \"-x\",\n \"x_field\",\n \"-y\",\n \"y_field\",\n \"--title\",\n \"my_title\",\n \"--x-label\",\n \"x_title\",\n \"--y-label\",\n \"y_title\",\n \"--experiment\",\n \"HEAD\",\n \"tag1\",\n \"tag2\",\n ]\n )\n assert cli_args.func == CmdPlotsDiff\n\n cmd = cli_args.func(cli_args)\n m = mocker.patch(\n \"dvc.repo.plots.diff.diff\", return_value={\"datafile\": \"filledtemplate\"}\n )\n\n assert cmd.run() == 0\n\n m.assert_called_once_with(\n cmd.repo,\n targets=[\"datafile\"],\n revs=[\"HEAD\", \"tag1\", \"tag2\"],\n props={\n \"template\": \"template\",\n \"x\": \"x_field\",\n \"y\": \"y_field\",\n \"title\": \"my_title\",\n \"x_label\": \"x_title\",\n \"y_label\": \"y_title\",\n },\n experiment=True,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_plots.py_test_plots_show_test_plots_show.m_assert_called_once_with": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_plots.py_test_plots_show_test_plots_show.m_assert_called_once_with", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_plots.py", "file_name": "test_plots.py", "file_type": "text/x-python", "category": "test", "start_line": 58, "end_line": 85, "span_ids": ["test_plots_show"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_plots_show(dvc, mocker):\n cli_args = parse_args(\n [\n \"plots\",\n \"show\",\n \"-o\",\n \"result.extension\",\n \"-t\",\n \"template\",\n \"--show-vega\",\n \"--no-header\",\n \"datafile\",\n ]\n )\n assert cli_args.func == CmdPlotsShow\n\n cmd = cli_args.func(cli_args)\n\n m = mocker.patch(\n \"dvc.repo.plots.Plots.show\",\n return_value={\"datafile\": \"filledtemplate\"},\n )\n\n assert cmd.run() == 0\n\n m.assert_called_once_with(\n targets=[\"datafile\"], props={\"template\": \"template\", \"header\": False},\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_params.py_pytest_test_loads_params.assert_not_deps_2_hash_i": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_params.py_pytest_test_loads_params.assert_not_deps_2_hash_i", "embedding": null, "metadata": {"file_path": "tests/unit/dependency/test_params.py", "file_name": "test_params.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 45, "span_ids": ["imports", "test_loads_params"], "tokens": 329}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.dependency import ParamsDependency, loadd_from, loads_params\nfrom dvc.dependency.param import BadParamFileError, MissingParamsError\nfrom dvc.stage import Stage\nfrom dvc.utils.serialize import dump_toml, dump_yaml, load_yaml\n\nPARAMS = {\n \"foo\": 1,\n \"bar\": 53.135,\n \"baz\": \"str\",\n \"qux\": None,\n}\nDEFAULT_PARAMS_FILE = ParamsDependency.DEFAULT_PARAMS_FILE\n\n\ndef test_loads_params(dvc):\n stage = Stage(dvc)\n deps = loads_params(\n stage,\n [\n \"foo\",\n \"bar\",\n {\"a_file\": [\"baz\", \"bat\"]},\n {\"b_file\": [\"cat\"]},\n {},\n {\"a_file\": [\"foobar\"]},\n ],\n )\n assert len(deps) == 3\n\n assert isinstance(deps[0], ParamsDependency)\n assert deps[0].def_path == ParamsDependency.DEFAULT_PARAMS_FILE\n assert deps[0].params == [\"foo\", \"bar\"]\n assert not deps[0].hash_info\n\n assert isinstance(deps[1], ParamsDependency)\n assert deps[1].def_path == \"a_file\"\n assert deps[1].params == [\"baz\", \"bat\", \"foobar\"]\n assert not deps[1].hash_info\n\n assert isinstance(deps[2], ParamsDependency)\n assert deps[2].def_path == \"b_file\"\n assert deps[2].params == [\"cat\"]\n assert not deps[2].hash_info", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_params.py_test_params_error_test_read_params_toml.assert_dep_read_params_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_params.py_test_params_error_test_read_params_toml.assert_dep_read_params_", "embedding": null, "metadata": {"file_path": "tests/unit/dependency/test_params.py", "file_name": "test_params.py", "file_type": "text/x-python", "category": "test", "start_line": 48, "end_line": 119, "span_ids": ["test_read_params_default_loader", "test_read_params_nonexistent_file", "test_read_params_toml", "test_dumpd_with_info", "test_dumpd_without_info", "test_read_params_nested", "test_params_error", "test_read_params_unsupported_format", "test_loadd_from", "test_read_params_wrong_suffix"], "tokens": 667}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"params\", [[3], [{\"b_file\": \"cat\"}]])\ndef test_params_error(dvc, params):\n with pytest.raises(ValueError):\n loads_params(Stage(dvc), params)\n\n\ndef test_loadd_from(dvc):\n stage = Stage(dvc)\n deps = loadd_from(stage, [{\"params\": PARAMS}])\n assert len(deps) == 1\n assert isinstance(deps[0], ParamsDependency)\n assert deps[0].def_path == ParamsDependency.DEFAULT_PARAMS_FILE\n assert deps[0].params == list(PARAMS.keys())\n assert deps[0].hash_info.value == PARAMS\n\n\ndef test_dumpd_with_info(dvc):\n dep = ParamsDependency(Stage(dvc), None, PARAMS)\n assert dep.dumpd() == {\n \"path\": DEFAULT_PARAMS_FILE,\n \"params\": PARAMS,\n }\n\n\ndef test_dumpd_without_info(dvc):\n dep = ParamsDependency(Stage(dvc), None, list(PARAMS.keys()))\n assert dep.dumpd() == {\n \"path\": DEFAULT_PARAMS_FILE,\n \"params\": list(PARAMS.keys()),\n }\n\n\ndef test_read_params_nonexistent_file(dvc):\n dep = ParamsDependency(Stage(dvc), None, [\"foo\"])\n assert dep.read_params() == {}\n\n\ndef test_read_params_unsupported_format(tmp_dir, dvc):\n tmp_dir.gen(DEFAULT_PARAMS_FILE, b\"\\0\\1\\2\\3\\4\\5\\6\\7\")\n dep = ParamsDependency(Stage(dvc), None, [\"foo\"])\n with pytest.raises(BadParamFileError):\n dep.read_params()\n\n\ndef test_read_params_nested(tmp_dir, dvc):\n dump_yaml(\n DEFAULT_PARAMS_FILE, {\"some\": {\"path\": {\"foo\": [\"val1\", \"val2\"]}}}\n )\n dep = ParamsDependency(Stage(dvc), None, [\"some.path.foo\"])\n assert dep.read_params() == {\"some.path.foo\": [\"val1\", \"val2\"]}\n\n\ndef test_read_params_default_loader(tmp_dir, dvc):\n parameters_file = \"parameters.foo\"\n dump_yaml(parameters_file, {\"some\": {\"path\": {\"foo\": [\"val1\", \"val2\"]}}})\n dep = ParamsDependency(Stage(dvc), parameters_file, [\"some.path.foo\"])\n assert dep.read_params() == {\"some.path.foo\": [\"val1\", \"val2\"]}\n\n\ndef test_read_params_wrong_suffix(tmp_dir, dvc):\n parameters_file = \"parameters.toml\"\n dump_yaml(parameters_file, {\"some\": {\"path\": {\"foo\": [\"val1\", \"val2\"]}}})\n dep = ParamsDependency(Stage(dvc), parameters_file, [\"some.path.foo\"])\n with pytest.raises(BadParamFileError):\n dep.read_params()\n\n\ndef test_read_params_toml(tmp_dir, dvc):\n parameters_file = \"parameters.toml\"\n dump_toml(parameters_file, {\"some\": {\"path\": {\"foo\": [\"val1\", \"val2\"]}}})\n dep = ParamsDependency(Stage(dvc), parameters_file, [\"some.path.foo\"])\n assert dep.read_params() == {\"some.path.foo\": [\"val1\", \"val2\"]}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_params.py_test_read_params_py_test_read_params_py.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_params.py_test_read_params_py_test_read_params_py.None_3", "embedding": null, "metadata": {"file_path": "tests/unit/dependency/test_params.py", "file_name": "test_params.py", "file_type": "text/x-python", "category": "test", "start_line": 122, "end_line": 186, "span_ids": ["test_read_params_py"], "tokens": 526}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_read_params_py(tmp_dir, dvc):\n parameters_file = \"parameters.py\"\n tmp_dir.gen(\n parameters_file,\n \"INT: int = 5\\n\"\n \"FLOAT = 0.001\\n\"\n \"STR = 'abc'\\n\"\n \"BOOL: bool = True\\n\"\n \"DICT = {'a': 1}\\n\"\n \"LIST = [1, 2, 3]\\n\"\n \"SET = {4, 5, 6}\\n\"\n \"TUPLE = (10, 100)\\n\"\n \"NONE = None\\n\",\n )\n dep = ParamsDependency(\n Stage(dvc),\n parameters_file,\n [\n \"INT\",\n \"FLOAT\",\n \"STR\",\n \"BOOL\",\n \"DICT\",\n \"LIST\",\n \"SET\",\n \"TUPLE\",\n \"NONE\",\n ],\n )\n assert dep.read_params() == {\n \"INT\": 5,\n \"FLOAT\": 0.001,\n \"STR\": \"abc\",\n \"BOOL\": True,\n \"DICT\": {\"a\": 1},\n \"LIST\": [1, 2, 3],\n \"SET\": {4, 5, 6},\n \"TUPLE\": (10, 100),\n \"NONE\": None,\n }\n\n tmp_dir.gen(\n parameters_file, \"class Train:\\n foo = 'val1'\\n bar = 'val2'\\n\",\n )\n dep = ParamsDependency(Stage(dvc), parameters_file, [\"Train.foo\"])\n assert dep.read_params() == {\"Train.foo\": \"val1\"}\n\n dep = ParamsDependency(Stage(dvc), parameters_file, [\"Train\"])\n assert dep.read_params() == {\n \"Train\": {\"foo\": \"val1\", \"bar\": \"val2\"},\n }\n\n tmp_dir.gen(\n parameters_file,\n \"x = 4\\n\"\n \"config.x = 3\\n\"\n \"class Klass:\\n\"\n \" def __init__(self):\\n\"\n \" self.a = 'val1'\\n\"\n \" container.a = 2\\n\"\n \" self.container.a = 1\\n\"\n \" a = 'val2'\\n\",\n )\n dep = ParamsDependency(Stage(dvc), parameters_file, [\"x\", \"Klass.a\"])\n assert dep.read_params() == {\"x\": 4, \"Klass.a\": \"val1\"}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_params.py_test_get_hash_missing_config_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_params.py_test_get_hash_missing_config_", "embedding": null, "metadata": {"file_path": "tests/unit/dependency/test_params.py", "file_name": "test_params.py", "file_type": "text/x-python", "category": "test", "start_line": 189, "end_line": 212, "span_ids": ["test_get_hash_missing_config", "test_params_with_false_values", "test_get_hash_missing_param"], "tokens": 203}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_hash_missing_config(dvc):\n dep = ParamsDependency(Stage(dvc), None, [\"foo\"])\n with pytest.raises(MissingParamsError):\n dep.get_hash()\n\n\ndef test_get_hash_missing_param(tmp_dir, dvc):\n tmp_dir.gen(DEFAULT_PARAMS_FILE, \"bar: baz\")\n dep = ParamsDependency(Stage(dvc), None, [\"foo\"])\n with pytest.raises(MissingParamsError):\n dep.get_hash()\n\n\n@pytest.mark.parametrize(\"param_value\", [\"\", \"false\", \"[]\", \"{}\", \"null\"])\ndef test_params_with_false_values(tmp_dir, dvc, param_value):\n \"\"\"These falsy params values should not ignored by `status` on loading.\"\"\"\n key = \"param\"\n dep = ParamsDependency(Stage(dvc), DEFAULT_PARAMS_FILE, [key])\n (tmp_dir / DEFAULT_PARAMS_FILE).write_text(f\"{key}: {param_value}\")\n\n dep.fill_values(load_yaml(DEFAULT_PARAMS_FILE))\n\n assert dep.status() == {}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_webdav.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/dependency/test_webdav.py__", "embedding": null, "metadata": {"file_path": "tests/unit/dependency/test_webdav.py", "file_name": "test_webdav.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 8, "span_ids": ["imports", "TestWebDAVDependency", "TestWebDAVDependency._get_cls"], "tokens": 49}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.dependency.webdav import WebDAVDependency\nfrom tests.unit.dependency.test_local import TestLocalDependency\n\n\nclass TestWebDAVDependency(TestLocalDependency):\n def _get_cls(self):\n return WebDAVDependency", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_ssh_allow_agent_test_ssh_allow_agent.assert_tree_allow_agent_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_ssh.py_test_ssh_allow_agent_test_ssh_allow_agent.assert_tree_allow_agent_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/ssh/test_ssh.py", "file_name": "test_ssh.py", "file_type": "text/x-python", "category": "test", "start_line": 186, "end_line": 208, "span_ids": ["test_ssh_allow_agent"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"config,expected_allow_agent\",\n [\n ({\"url\": \"ssh://example.com\"}, True),\n ({\"url\": \"ssh://not_in_ssh_config.com\"}, True),\n ({\"url\": \"ssh://example.com\", \"allow_agent\": True}, True),\n ({\"url\": \"ssh://example.com\", \"allow_agent\": False}, False),\n ],\n)\n@patch(\"os.path.exists\", return_value=True)\n@patch(\n f\"{builtin_module_name}.open\",\n new_callable=mock_open,\n read_data=mock_ssh_config,\n)\ndef test_ssh_allow_agent(\n mock_file, mock_exists, dvc, config, expected_allow_agent\n):\n tree = SSHTree(dvc, config)\n\n mock_exists.assert_called_with(SSHTree.ssh_config_filename())\n mock_file.assert_called_with(SSHTree.ssh_config_filename())\n assert tree.allow_agent == expected_allow_agent", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_base.py_math_test_cmd_error.with_mock_patch_object_.with_pytest_raises_Remote.BaseTree_dvc_config_rem": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_base.py_math_test_cmd_error.with_mock_patch_object_.with_pytest_raises_Remote.BaseTree_dvc_config_rem", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_base.py", "file_name": "test_base.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 32, "span_ids": ["_CallableOrNone.__eq__", "_CallableOrNone", "test_cmd_error", "impl", "imports"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import math\n\nimport mock\nimport pytest\n\nfrom dvc.cache.base import CloudCache\nfrom dvc.path_info import PathInfo\nfrom dvc.tree.base import BaseTree, RemoteCmdError\n\n\nclass _CallableOrNone:\n \"\"\"Helper for testing if object is callable() or None.\"\"\"\n\n def __eq__(self, other):\n return other is None or callable(other)\n\n\nCallableOrNone = _CallableOrNone()\n\n\ndef test_cmd_error(dvc):\n config = {}\n\n cmd = \"sed 'hello'\"\n ret = \"1\"\n err = \"sed: expression #1, char 2: extra characters after command\"\n\n with mock.patch.object(\n BaseTree, \"remove\", side_effect=RemoteCmdError(\"base\", cmd, ret, err),\n ):\n with pytest.raises(RemoteCmdError):\n BaseTree(dvc, config).remove(\"file\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_http.py_test_digest_auth_method_test_digest_auth_method.assert_isinstance_tree__a": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_http.py_test_digest_auth_method_test_digest_auth_method.assert_isinstance_tree__a", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_http.py", "file_name": "test_http.py", "file_type": "text/x-python", "category": "test", "start_line": 47, "end_line": 64, "span_ids": ["test_digest_auth_method"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_digest_auth_method(dvc):\n from requests.auth import HTTPDigestAuth\n\n user = \"username\"\n password = \"password\"\n auth = HTTPDigestAuth(user, password)\n config = {\n \"url\": \"http://example.com/\",\n \"path_info\": \"file.html\",\n \"auth\": \"digest\",\n \"user\": user,\n \"password\": password,\n }\n\n tree = HTTPTree(dvc, config)\n\n assert tree._auth_method() == auth\n assert isinstance(tree._auth_method(), HTTPDigestAuth)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_http.py_test_custom_auth_method_test_ssl_verify_disable.assert_tree__session_veri": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_http.py_test_custom_auth_method_test_ssl_verify_disable.assert_tree__session_veri", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_http.py", "file_name": "test_http.py", "file_type": "text/x-python", "category": "test", "start_line": 67, "end_line": 105, "span_ids": ["test_ssl_verify_is_enabled_by_default", "test_custom_auth_method", "test_ssl_verify_disable"], "tokens": 224}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_custom_auth_method(dvc):\n header = \"Custom-Header\"\n password = \"password\"\n config = {\n \"url\": \"http://example.com/\",\n \"path_info\": \"file.html\",\n \"auth\": \"custom\",\n \"custom_auth_header\": header,\n \"password\": password,\n }\n\n tree = HTTPTree(dvc, config)\n\n assert tree._auth_method() is None\n assert header in tree.headers\n assert tree.headers[header] == password\n\n\ndef test_ssl_verify_is_enabled_by_default(dvc):\n config = {\n \"url\": \"http://example.com/\",\n \"path_info\": \"file.html\",\n }\n\n tree = HTTPTree(dvc, config)\n\n assert tree._session.verify is True\n\n\ndef test_ssl_verify_disable(dvc):\n config = {\n \"url\": \"http://example.com/\",\n \"path_info\": \"file.html\",\n \"ssl_verify\": False,\n }\n\n tree = HTTPTree(dvc, config)\n\n assert tree._session.verify is False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_oss.py_from_dvc_tree_oss_import__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_oss.py_from_dvc_tree_oss_import__", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_oss.py", "file_name": "test_oss.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 23, "span_ids": ["test_init", "imports"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.tree.oss import OSSTree\n\nbucket_name = \"bucket-name\"\nendpoint = \"endpoint\"\nkey_id = \"Fq2UVErCz4I6tq\"\nkey_secret = \"Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsu\"\n\n\ndef test_init(dvc):\n prefix = \"some/prefix\"\n url = f\"oss://{bucket_name}/{prefix}\"\n config = {\n \"url\": url,\n \"oss_key_id\": key_id,\n \"oss_key_secret\": key_secret,\n \"oss_endpoint\": endpoint,\n }\n tree = OSSTree(dvc, config)\n assert tree.path_info == url\n assert tree.endpoint == endpoint\n assert tree.key_id == key_id\n assert tree.key_secret == key_secret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote_tree.py_test_walk_files_test_walk_files.assert_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_remote_tree.py_test_walk_files_test_walk_files.assert_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_remote_tree.py", "file_name": "test_remote_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 72, "end_line": 86, "span_ids": ["test_walk_files"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"remote\", remotes, indirect=True)\ndef test_walk_files(remote):\n files = [\n remote.tree.path_info / \"data/alice\",\n remote.tree.path_info / \"data/alpha\",\n remote.tree.path_info / \"data/subdir-file.txt\",\n remote.tree.path_info / \"data/subdir/1\",\n remote.tree.path_info / \"data/subdir/2\",\n remote.tree.path_info / \"data/subdir/3\",\n remote.tree.path_info / \"data/subdir/empty_file\",\n ]\n\n assert (\n list(remote.tree.walk_files(remote.tree.path_info / \"data\")) == files\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/plots/test_diff.py_pytest_test_revisions.assert__revisions_mock_re": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/plots/test_diff.py_pytest_test_revisions.assert__revisions_mock_re", "embedding": null, "metadata": {"file_path": "tests/unit/repo/plots/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 19, "span_ids": ["imports", "test_revisions"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.repo.plots.diff import _revisions\n\n\n@pytest.mark.parametrize(\n \"arg_revisions,is_dirty,expected_revisions\",\n [\n ([], False, [\"workspace\"]),\n ([], True, [\"HEAD\", \"workspace\"]),\n ([\"v1\", \"v2\", \"workspace\"], False, [\"v1\", \"v2\", \"workspace\"]),\n ([\"v1\", \"v2\", \"workspace\"], True, [\"v1\", \"v2\", \"workspace\"]),\n ],\n)\ndef test_revisions(mocker, arg_revisions, is_dirty, expected_revisions):\n mock_scm = mocker.Mock()\n mock_scm.configure_mock(**{\"is_dirty.return_value\": is_dirty})\n mock_repo = mocker.Mock(scm=mock_scm)\n assert _revisions(mock_repo, arg_revisions, False) == expected_revisions", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/plots/test_diff.py_test_revisions_experiment_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/plots/test_diff.py_test_revisions_experiment_", "embedding": null, "metadata": {"file_path": "tests/unit/repo/plots/test_diff.py", "file_name": "test_diff.py", "file_type": "text/x-python", "category": "test", "start_line": 22, "end_line": 40, "span_ids": ["test_revisions_experiment"], "tokens": 199}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"arg_revisions,baseline,expected_revisions\",\n [\n ([\"v1\"], \"v0\", [\"v1\", \"v0\"]),\n ([\"v1\"], None, [\"v1\", \"workspace\"]),\n ([\"v1\", \"v2\"], \"v0\", [\"v1\", \"v2\"]),\n ([\"v1\", \"v2\"], None, [\"v1\", \"v2\"]),\n ],\n)\ndef test_revisions_experiment(\n mocker, arg_revisions, baseline, expected_revisions\n):\n mock_scm = mocker.Mock()\n mock_scm.configure_mock(**{\"is_dirty.return_value\": False})\n mock_experiments = mocker.Mock()\n mock_experiments.configure_mock(**{\"get_baseline.return_value\": baseline})\n mock_repo = mocker.Mock(scm=mock_scm, experiments=mock_experiments)\n assert _revisions(mock_repo, arg_revisions, True) == expected_revisions", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/test_repo.py_test_used_cache_test_used_cache.assert_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/test_repo.py_test_used_cache_test_used_cache.assert_", "embedding": null, "metadata": {"file_path": "tests/unit/repo/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 33, "end_line": 57, "span_ids": ["test_used_cache"], "tokens": 228}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"path\",\n [os.path.join(\"dir\", \"subdir\", \"file\"), os.path.join(\"dir\", \"subdir\")],\n)\ndef test_used_cache(tmp_dir, dvc, path):\n from dvc.cache import NamedCache\n\n tmp_dir.dvc_gen({\"dir\": {\"subdir\": {\"file\": \"file\"}, \"other\": \"other\"}})\n expected = NamedCache.make(\n \"local\", \"70922d6bf66eb073053a82f77d58c536.dir\", \"dir\"\n )\n expected.add_child_cache(\n \"70922d6bf66eb073053a82f77d58c536.dir\",\n NamedCache.make(\n \"local\",\n \"8c7dd922ad47494fc02c388e12c00eac\",\n os.path.join(\"dir\", \"subdir\", \"file\"),\n ),\n )\n\n used_cache = dvc.used_cache([path])\n assert (\n used_cache._items == expected._items\n and used_cache.external == expected.external\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/test_repo.py_test_branch_config_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/test_repo.py_test_branch_config_", "embedding": null, "metadata": {"file_path": "tests/unit/repo/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 133, "end_line": 155, "span_ids": ["test_branch_config"], "tokens": 169}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_branch_config(tmp_dir, scm):\n tmp_dir.scm_gen(\"foo\", \"foo\", commit=\"init\")\n\n scm.checkout(\"branch\", create_new=True)\n dvc = Repo.init()\n with dvc.config.edit() as conf:\n conf[\"remote\"][\"branch\"] = {\"url\": \"/some/path\"}\n scm.add([\".dvc\"])\n scm.commit(\"init dvc\")\n scm.checkout(\"master\")\n\n remove(\".dvc\")\n\n # sanity check\n with pytest.raises(NotDvcRepoError):\n Repo()\n\n with pytest.raises(NotDvcRepoError):\n Repo(scm=scm, rev=\"master\")\n\n dvc = Repo(scm=scm, rev=\"branch\")\n assert dvc.config[\"remote\"][\"branch\"][\"url\"] == \"/some/path\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_scm.py_from_unittest_import_Test_TestScmContext.test_should_successfully_perform_method.self_assertEqual_0_self_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_scm.py_from_unittest_import_Test_TestScmContext.test_should_successfully_perform_method.self_assertEqual_0_self_", "embedding": null, "metadata": {"file_path": "tests/unit/scm/test_scm.py", "file_name": "test_scm.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 27, "span_ids": ["TestScmContext.test_should_successfully_perform_method", "imports", "TestScmContext", "TestScmContext.setUp"], "tokens": 185}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from unittest import TestCase\n\nimport mock\n\nfrom dvc.repo import Repo\nfrom dvc.repo.scm_context import scm_context\nfrom dvc.scm import NoSCM\n\n\nclass TestScmContext(TestCase):\n def setUp(self):\n self.repo_mock = mock.Mock(spec=Repo)\n self.scm_mock = mock.Mock(spec=NoSCM)\n self.repo_mock.scm = self.scm_mock\n\n def test_should_successfully_perform_method(self):\n method = mock.Mock()\n wrapped = scm_context(method)\n\n self.repo_mock.configure_mock(config={})\n wrapped(self.repo_mock)\n\n self.assertEqual(1, method.call_count)\n self.assertEqual(1, self.scm_mock.reset_ignores.call_count)\n self.assertEqual(1, self.scm_mock.remind_to_track.call_count)\n\n self.assertEqual(0, self.scm_mock.cleanup_ignores.call_count)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_scm.py_TestScmContext.test_should_check_autostage_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_scm.py_TestScmContext.test_should_check_autostage_", "embedding": null, "metadata": {"file_path": "tests/unit/scm/test_scm.py", "file_name": "test_scm.py", "file_type": "text/x-python", "category": "test", "start_line": 29, "end_line": 61, "span_ids": ["test_remind_to_track", "TestScmContext.test_should_check_autostage", "TestScmContext.test_should_throw_and_cleanup"], "tokens": 291}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestScmContext(TestCase):\n\n def test_should_check_autostage(self):\n method = mock.Mock()\n wrapped = scm_context(method)\n\n config_autostage_attrs = {\"config\": {\"core\": {\"autostage\": True}}}\n self.repo_mock.configure_mock(**config_autostage_attrs)\n wrapped(self.repo_mock)\n\n self.assertEqual(1, method.call_count)\n self.assertEqual(1, self.scm_mock.reset_ignores.call_count)\n self.assertEqual(1, self.scm_mock.track_changed_files.call_count)\n\n self.assertEqual(0, self.scm_mock.cleanup_ignores.call_count)\n\n def test_should_throw_and_cleanup(self):\n method = mock.Mock(side_effect=Exception(\"some problem\"))\n wrapped = scm_context(method)\n\n with self.assertRaises(Exception):\n wrapped(self.repo_mock)\n\n self.assertEqual(1, method.call_count)\n self.assertEqual(1, self.scm_mock.cleanup_ignores.call_count)\n\n self.assertEqual(0, self.scm_mock.reset_ignores.call_count)\n self.assertEqual(0, self.scm_mock.remind_to_track.call_count)\n\n\ndef test_remind_to_track(scm, caplog):\n scm.files_to_track = [\"fname with spaces.txt\", \"\u0442\u0435\u0441\u0442\", \"foo\"]\n scm.remind_to_track()\n assert \"git add 'fname with spaces.txt' '\u0442\u0435\u0441\u0442' foo\" in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_cache.py_test_stage_cache_wdir_test_stage_cache_wdir.None_11": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_cache.py_test_stage_cache_wdir_test_stage_cache_wdir.None_11", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_cache.py", "file_name": "test_cache.py", "file_type": "text/x-python", "category": "test", "start_line": 109, "end_line": 160, "span_ids": ["test_stage_cache_wdir"], "tokens": 496}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stage_cache_wdir(tmp_dir, dvc, mocker):\n tmp_dir.gen(\"dep\", \"dep\")\n tmp_dir.gen(\n \"script.py\",\n (\n 'open(\"out\", \"w+\").write(\"out\"); '\n 'open(\"out_no_cache\", \"w+\").write(\"out_no_cache\")'\n ),\n )\n tmp_dir.gen({\"wdir\": {}})\n stage = dvc.run(\n cmd=\"python ../script.py\",\n deps=[\"../script.py\", \"../dep\"],\n outs=[\"out\"],\n outs_no_cache=[\"out_no_cache\"],\n single_stage=True,\n wdir=\"wdir\",\n )\n\n with dvc.lock, dvc.state:\n stage.remove(remove_outs=True, force=True)\n\n assert not (tmp_dir / \"wdir\" / \"out\").exists()\n assert not (tmp_dir / \"wdir\" / \"out_no_cache\").exists()\n assert not (tmp_dir / \"wdir\" / \"out.dvc\").exists()\n\n cache_dir = os.path.join(\n dvc.stage_cache.cache_dir,\n \"d2\",\n \"d2b5da199f4da73a861027f5f76020a948794011db9704814fdb2a488ca93ec2\",\n )\n cache_file = os.path.join(\n cache_dir,\n \"65cc63ade5ab338541726b26185ebaf42331141ec3a670a7d6e8a227505afade\",\n )\n\n assert os.path.isdir(cache_dir)\n assert os.listdir(cache_dir) == [os.path.basename(cache_file)]\n assert os.path.isfile(cache_file)\n\n run_spy = mocker.patch(\"dvc.stage.run.cmd_run\")\n checkout_spy = mocker.spy(dvc.cache.local, \"checkout\")\n with dvc.lock, dvc.state:\n stage.run()\n\n assert not run_spy.called\n assert checkout_spy.call_count == 2\n\n assert (tmp_dir / \"wdir\" / \"out\").exists()\n assert (tmp_dir / \"wdir\" / \"out_no_cache\").exists()\n assert (tmp_dir / \"wdir\" / \"out\").read_text() == \"out\"\n assert (tmp_dir / \"wdir\" / \"out_no_cache\").read_text() == \"out_no_cache\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_fill_from_lock_deps_outs_test_fill_from_lock_deps_outs.assert_stage_outs_0_hash": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_fill_from_lock_deps_outs_test_fill_from_lock_deps_outs.assert_stage_outs_0_hash", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_loader_pipeline_file.py", "file_name": "test_loader_pipeline_file.py", "file_type": "text/x-python", "category": "test", "start_line": 28, "end_line": 39, "span_ids": ["test_fill_from_lock_deps_outs"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_fill_from_lock_deps_outs(dvc, lock_data):\n stage = create_stage(\n PipelineStage, dvc, PIPELINE_FILE, deps=[\"foo\"], outs=[\"bar\"]\n )\n\n for item in chain(stage.deps, stage.outs):\n assert not item.hash_info\n\n StageLoader.fill_from_lock(stage, lock_data)\n\n assert stage.deps[0].hash_info == HashInfo(\"md5\", \"foo_checksum\")\n assert stage.outs[0].hash_info == HashInfo(\"md5\", \"bar_checksum\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_fill_from_lock_params_test_fill_from_lock_params.assert_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_fill_from_lock_params_test_fill_from_lock_params.assert_", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_loader_pipeline_file.py", "file_name": "test_loader_pipeline_file.py", "file_type": "text/x-python", "category": "test", "start_line": 42, "end_line": 75, "span_ids": ["test_fill_from_lock_params"], "tokens": 279}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_fill_from_lock_params(dvc, lock_data):\n stage = create_stage(\n PipelineStage,\n dvc,\n PIPELINE_FILE,\n deps=[\"foo\"],\n outs=[\"bar\"],\n params=[\n \"lorem\",\n \"lorem.ipsum\",\n {\"myparams.yaml\": [\"ipsum\", \"foobar\"]},\n ],\n )\n lock_data[\"params\"] = {\n \"params.yaml\": {\n \"lorem\": \"lorem\",\n \"lorem.ipsum\": [\"i\", \"p\", \"s\", \"u\", \"m\"],\n },\n \"myparams.yaml\": {\n # missing value in lock for `foobar` params\n \"ipsum\": \"ipsum\"\n },\n }\n params_deps = split_params_deps(stage)[0]\n assert set(params_deps[0].params) == {\"lorem\", \"lorem.ipsum\"}\n assert set(params_deps[1].params) == {\"ipsum\", \"foobar\"}\n assert not params_deps[0].hash_info\n assert not params_deps[1].hash_info\n\n StageLoader.fill_from_lock(stage, lock_data)\n assert params_deps[0].hash_info.value == lock_data[\"params\"][\"params.yaml\"]\n assert (\n params_deps[1].hash_info.value == lock_data[\"params\"][\"myparams.yaml\"]\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_fill_from_lock_use_appropriate_checksum_test_fill_from_lock_use_appropriate_checksum.assert_stage_outs_0_hash": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_fill_from_lock_use_appropriate_checksum_test_fill_from_lock_use_appropriate_checksum.assert_stage_outs_0_hash", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_loader_pipeline_file.py", "file_name": "test_loader_pipeline_file.py", "file_type": "text/x-python", "category": "test", "start_line": 108, "end_line": 119, "span_ids": ["test_fill_from_lock_use_appropriate_checksum"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_fill_from_lock_use_appropriate_checksum(dvc, lock_data):\n stage = create_stage(\n PipelineStage,\n dvc,\n PIPELINE_FILE,\n deps=[\"s3://dvc-temp/foo\"],\n outs=[\"bar\"],\n )\n lock_data[\"deps\"] = [{\"path\": \"s3://dvc-temp/foo\", \"etag\": \"e-tag\"}]\n StageLoader.fill_from_lock(stage, lock_data)\n assert stage.deps[0].hash_info == HashInfo(\"etag\", \"e-tag\")\n assert stage.outs[0].hash_info == HashInfo(\"md5\", \"bar_checksum\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_load_stage_test_load_stage.assert_stage_outs_0_hash": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_load_stage_test_load_stage.assert_stage_outs_0_hash", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_loader_pipeline_file.py", "file_name": "test_loader_pipeline_file.py", "file_type": "text/x-python", "category": "test", "start_line": 149, "end_line": 160, "span_ids": ["test_load_stage"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_load_stage(dvc, stage_data, lock_data):\n dvcfile = Dvcfile(dvc, PIPELINE_FILE)\n stage = StageLoader.load_stage(dvcfile, \"stage-1\", stage_data, lock_data)\n\n assert stage.wdir == os.path.abspath(os.curdir)\n assert stage.name == \"stage-1\"\n assert stage.cmd == \"command\"\n assert stage.path == os.path.abspath(PIPELINE_FILE)\n assert stage.deps[0].def_path == \"foo\"\n assert stage.deps[0].hash_info == HashInfo(\"md5\", \"foo_checksum\")\n assert stage.outs[0].def_path == \"bar\"\n assert stage.outs[0].hash_info == HashInfo(\"md5\", \"bar_checksum\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_load_stage_with_params_test_load_stage_with_params.assert_stage_outs_0_hash": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_load_stage_with_params_test_load_stage_with_params.assert_stage_outs_0_hash", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_loader_pipeline_file.py", "file_name": "test_loader_pipeline_file.py", "file_type": "text/x-python", "category": "test", "start_line": 178, "end_line": 189, "span_ids": ["test_load_stage_with_params"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_load_stage_with_params(dvc, stage_data, lock_data):\n lock_data[\"params\"] = {\"params.yaml\": {\"lorem\": \"ipsum\"}}\n stage_data[\"params\"] = [\"lorem\"]\n dvcfile = Dvcfile(dvc, PIPELINE_FILE)\n stage = StageLoader.load_stage(dvcfile, \"stage-1\", stage_data, lock_data)\n\n params, deps = split_params_deps(stage)\n assert deps[0].def_path == \"foo\" and stage.outs[0].def_path == \"bar\"\n assert params[0].def_path == \"params.yaml\"\n assert params[0].hash_info == HashInfo(\"params\", {\"lorem\": \"ipsum\"})\n assert deps[0].hash_info == HashInfo(\"md5\", \"foo_checksum\")\n assert stage.outs[0].hash_info == HashInfo(\"md5\", \"bar_checksum\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_load_stage_with_metrics_and_plots_test_load_stage_with_metrics_and_plots.assert_stage_outs_0_hash": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_loader_pipeline_file.py_test_load_stage_with_metrics_and_plots_test_load_stage_with_metrics_and_plots.assert_stage_outs_0_hash", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_loader_pipeline_file.py", "file_name": "test_loader_pipeline_file.py", "file_type": "text/x-python", "category": "test", "start_line": 192, "end_line": 199, "span_ids": ["test_load_stage_with_metrics_and_plots"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"typ\", [\"metrics\", \"plots\"])\ndef test_load_stage_with_metrics_and_plots(dvc, stage_data, lock_data, typ):\n stage_data[typ] = stage_data.pop(\"outs\")\n dvcfile = Dvcfile(dvc, PIPELINE_FILE)\n stage = StageLoader.load_stage(dvcfile, \"stage-1\", stage_data, lock_data)\n\n assert stage.outs[0].def_path == \"bar\"\n assert stage.outs[0].hash_info == HashInfo(\"md5\", \"bar_checksum\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_dump_nondefault_hash_test_dump_nondefault_hash.assert_to_single_stage_lo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_serialize_pipeline_lock.py_test_dump_nondefault_hash_test_dump_nondefault_hash.assert_to_single_stage_lo", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_serialize_pipeline_lock.py", "file_name": "test_serialize_pipeline_lock.py", "file_type": "text/x-python", "category": "test", "start_line": 156, "end_line": 173, "span_ids": ["test_dump_nondefault_hash"], "tokens": 118}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_dump_nondefault_hash(dvc):\n stage = create_stage(\n PipelineStage, dvc, deps=[\"s3://dvc-temp/file\"], **kwargs\n )\n stage.deps[0].hash_info = HashInfo(\"md5\", \"value\")\n assert to_single_stage_lockfile(stage) == OrderedDict(\n [\n (\"cmd\", \"command\"),\n (\n \"deps\",\n [\n OrderedDict(\n [(\"path\", \"s3://dvc-temp/file\"), (\"md5\", \"value\")]\n )\n ],\n ),\n ]\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_config.py_os_test_to_relpath.assert_Config__to_relpath": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_config.py_os_test_to_relpath.assert_Config__to_relpath", "embedding": null, "metadata": {"file_path": "tests/unit/test_config.py", "file_name": "test_config.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 19, "span_ids": ["imports", "test_to_relpath"], "tokens": 110}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\n\nimport pytest\n\nfrom dvc.config import Config\nfrom dvc.tree.local import LocalTree\n\n\n@pytest.mark.parametrize(\n \"path, expected\",\n [\n (\"cache\", \"../cache\"),\n (os.path.join(\"..\", \"cache\"), \"../../cache\"),\n (os.getcwd(), os.getcwd().replace(\"\\\\\", \"/\")),\n (\"ssh://some/path\", \"ssh://some/path\"),\n ],\n)\ndef test_to_relpath(path, expected):\n assert Config._to_relpath(os.path.join(\".\", \"config\"), path) == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_config.py_test_get_tree_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_config.py_test_get_tree_", "embedding": null, "metadata": {"file_path": "tests/unit/test_config.py", "file_name": "test_config.py", "file_type": "text/x-python", "category": "test", "start_line": 22, "end_line": 36, "span_ids": ["test_get_tree"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_tree(tmp_dir, scm):\n tmp_dir.scm_gen(\"foo\", \"foo\", commit=\"add foo\")\n\n tree = scm.get_tree(\"master\")\n config = Config(tree=tree)\n\n assert config.tree == tree\n assert config.wtree != tree\n assert isinstance(config.wtree, LocalTree)\n\n assert config._get_tree(\"repo\") == tree\n assert config._get_tree(\"local\") == config.wtree\n assert config._get_tree(\"global\") == config.wtree\n assert config._get_tree(\"system\") == config.wtree", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_external_repo.py_os_test_hook_is_called.with_external_repo_str_er.spy_assert_has_calls_cal": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_external_repo.py_os_test_hook_is_called.with_external_repo_str_er.spy_assert_has_calls_cal", "embedding": null, "metadata": {"file_path": "tests/unit/test_external_repo.py", "file_name": "test_external_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 35, "span_ids": ["imports", "test_hook_is_called"], "tokens": 291}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nfrom unittest.mock import call\n\nimport pytest\n\nfrom dvc.external_repo import external_repo\nfrom tests.unit.tree.test_repo import make_subrepo\n\n\ndef test_hook_is_called(tmp_dir, erepo_dir, mocker):\n subrepo_paths = [\n \"subrepo1\",\n \"subrepo2\",\n os.path.join(\"dir\", \"subrepo3\"),\n os.path.join(\"dir\", \"subrepo4\"),\n \"subrepo5\",\n os.path.join(\"subrepo5\", \"subrepo6\"),\n ]\n subrepos = [erepo_dir / path for path in subrepo_paths]\n for repo in subrepos:\n make_subrepo(repo, erepo_dir.scm)\n\n for repo in subrepos + [erepo_dir]:\n with repo.chdir():\n repo.scm_gen(\"foo\", \"foo\", commit=f\"git add {repo}/foo\")\n repo.dvc_gen(\"bar\", \"bar\", commit=f\"dvc add {repo}/bar\")\n\n with external_repo(str(erepo_dir)) as repo:\n spy = mocker.spy(repo, \"make_repo\")\n\n list(repo.repo_tree.walk(repo.root_dir)) # drain\n assert spy.call_count == len(subrepos)\n\n paths = [os.path.join(repo.root_dir, path) for path in subrepo_paths]\n spy.assert_has_calls([call(path) for path in paths], any_order=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_info.py_os_PYTHON_VERSION_REGEX.r_Python_d_d_d_S_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_info.py_os_PYTHON_VERSION_REGEX.r_Python_d_d_d_S_", "embedding": null, "metadata": {"file_path": "tests/unit/test_info.py", "file_name": "test_info.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 13, "span_ids": ["imports"], "tokens": 106}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport re\nimport shutil\n\nimport pytest\n\nfrom dvc.info import get_dvc_info, psutil\n\n# Python's version is in the shape of:\n# ..[{a|b|rc}N][.postN][.devN]\n# `patch` is more than enough for the tests.\n# Refer PEP-0440 for complete regex just in-case.\nPYTHON_VERSION_REGEX = r\"Python \\d\\.\\d+\\.\\d+\\S*\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_info.py_test_info_in_repo_test_info_in_repo.if_scm_init_.else_.assert_Repo_dvc_no_scm": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_info.py_test_info_in_repo_test_info_in_repo.if_scm_init_.else_.assert_Repo_dvc_no_scm", "embedding": null, "metadata": {"file_path": "tests/unit/test_info.py", "file_name": "test_info.py", "file_type": "text/x-python", "category": "test", "start_line": 16, "end_line": 32, "span_ids": ["test_info_in_repo"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"scm_init\", [True, False])\ndef test_info_in_repo(scm_init, tmp_dir):\n tmp_dir.init(scm=scm_init, dvc=True)\n # Create `.dvc/cache`, that is needed to check supported link types.\n os.mkdir(tmp_dir.dvc.cache.local.cache_dir)\n\n dvc_info = get_dvc_info()\n\n assert re.search(r\"DVC version: \\d+\\.\\d+\\.\\d+.*\", dvc_info)\n assert re.search(f\"Platform: {PYTHON_VERSION_REGEX} on .*\", dvc_info)\n assert re.search(r\"Supports: .*\", dvc_info)\n assert re.search(r\"Cache types: .*\", dvc_info)\n\n if scm_init:\n assert \"Repo: dvc, git\" in dvc_info\n else:\n assert \"Repo: dvc (no_scm)\" in dvc_info", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_info.py_test_info_outside_of_repo_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_info.py_test_info_outside_of_repo_", "embedding": null, "metadata": {"file_path": "tests/unit/test_info.py", "file_name": "test_info.py", "file_type": "text/x-python", "category": "test", "start_line": 65, "end_line": 81, "span_ids": ["test_info_outside_of_repo", "test_fs_info_outside_of_repo"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_info_outside_of_repo(tmp_dir, caplog):\n dvc_info = get_dvc_info()\n\n assert re.search(r\"DVC version: \\d+\\.\\d+\\.\\d+.*\", dvc_info)\n assert re.search(f\"Platform: {PYTHON_VERSION_REGEX} on .*\", dvc_info)\n assert re.search(r\"Supports: .*\", dvc_info)\n assert not re.search(r\"Cache types: .*\", dvc_info)\n assert \"Repo:\" not in dvc_info\n\n\n@pytest.mark.skipif(psutil is None, reason=\"No psutil.\")\ndef test_fs_info_outside_of_repo(tmp_dir, caplog):\n dvc_info = get_dvc_info()\n assert re.search(r\"DVC version: \\d+\\.\\d+\\.\\d+.*\", dvc_info)\n assert re.search(f\"Platform: {PYTHON_VERSION_REGEX} on .*\", dvc_info)\n assert re.search(r\"Supports: .*\", dvc_info)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_lockfile.py_pytest_test_stage_dump_no_outs_deps.assert_lockfile_load_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_lockfile.py_pytest_test_stage_dump_no_outs_deps.assert_lockfile_load_", "embedding": null, "metadata": {"file_path": "tests/unit/test_lockfile.py", "file_name": "test_lockfile.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 12, "span_ids": ["imports", "test_stage_dump_no_outs_deps"], "tokens": 108}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.dvcfile import Lockfile, LockfileCorruptedError\nfrom dvc.stage import PipelineStage\nfrom dvc.utils.serialize import dump_yaml\n\n\ndef test_stage_dump_no_outs_deps(tmp_dir, dvc):\n stage = PipelineStage(name=\"s1\", repo=dvc, path=\"path\", cmd=\"command\")\n lockfile = Lockfile(dvc, \"path.lock\")\n lockfile.dump(stage)\n assert lockfile.load() == {\"s1\": {\"cmd\": \"command\"}}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_lockfile.py_test_stage_dump_when_already_exists_test_stage_dump_when_already_exists.assert_lockfile_load_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_lockfile.py_test_stage_dump_when_already_exists_test_stage_dump_when_already_exists.assert_lockfile_load_", "embedding": null, "metadata": {"file_path": "tests/unit/test_lockfile.py", "file_name": "test_lockfile.py", "file_type": "text/x-python", "category": "test", "start_line": 15, "end_line": 24, "span_ids": ["test_stage_dump_when_already_exists"], "tokens": 112}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stage_dump_when_already_exists(tmp_dir, dvc):\n data = {\"s1\": {\"cmd\": \"command\", \"deps\": [], \"outs\": []}}\n dump_yaml(\"path.lock\", data)\n stage = PipelineStage(name=\"s2\", repo=dvc, path=\"path\", cmd=\"command2\")\n lockfile = Lockfile(dvc, \"path.lock\")\n lockfile.dump(stage)\n assert lockfile.load() == {\n **data,\n \"s2\": {\"cmd\": \"command2\"},\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_pathspec_math.py_pytest_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_pathspec_math.py_pytest_", "embedding": null, "metadata": {"file_path": "tests/unit/test_pathspec_math.py", "file_name": "test_pathspec_math.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 75, "span_ids": ["test_dvcignore_pattern_change_dir", "imports"], "tokens": 967}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.pathspec_math import PatternInfo, _change_dirname\n\n\n@pytest.mark.parametrize(\n \"patterns, dirname, changed\",\n [\n # A line starting with # serves as a comment.\n (\"#comment\", \"/dir\", \"#comment\"),\n # Put a backslash (\"\\\") in front of the first hash for patterns that\n # begin with a hash.\n (\"\\\\#hash\", \"/dir\", \"/dir/**/#hash\"),\n (\"\\\\#hash\", \"/#dir\", \"/#dir/**/#hash\"),\n # Trailing spaces are ignored unless they are quoted with\n # backslash (\"\\\").\n (\" space\", \"/dir\", \"/dir/**/space\"),\n (\"\\\\ space\", \"/dir\", \"/dir/**/ space\"),\n # An optional prefix \"!\" which negates the pattern;\n (\"!include\", \"/dir\", \"!/dir/**/include\"),\n # Put a backslash (\"\\\") in front of the first \"!\" for patterns that\n # begin with a literal \"!\", for example, \"\\!important!.txt\".\n (\"\\\\!important!.txt\", \"/dir\", \"/dir/**/!important!.txt\"),\n # If there is a separator at the beginning or middle (or both) of the\n # pattern, then the pattern is relative to the directory level of the\n # particular .gitignore file itself.\n (\"/separator.txt\", \"/dir\", \"/dir/separator.txt\"),\n (\"subdir/separator.txt\", \"/dir\", \"/dir/subdir/separator.txt\"),\n # Otherwise the pattern may also match at any level below\n # the .gitignore level.\n (\"no_sep\", \"/dir\", \"/dir/**/no_sep\"),\n # If there is a separator at the end of the pattern then the pattern\n # will only match directories, otherwise the pattern can match both\n # files and directories.\n (\"doc/fortz/\", \"/dir\", \"/dir/doc/fortz/\"),\n (\"fortz/\", \"/dir\", \"/dir/**/fortz/\"),\n # An asterisk \"*\" matches anything except a slash.\n (\"*aste*risk*\", \"/dir\", \"/dir/**/*aste*risk*\"),\n # The character \"?\" matches any one character except \"/\".\n (\"?fi?le?\", \"/dir\", \"/dir/**/?fi?le?\"),\n # The range notation, e.g. [a-zA-Z], can be used to match one of the\n # characters in a range. See fnmatch(3) and the FNM_PATHNAME flag\n # for a more detailed description.\n (\"[a-zA-Z]file[a-zA-Z]\", \"/dir\", \"/dir/**/[a-zA-Z]file[a-zA-Z]\"),\n # Two consecutive asterisks (\"**\") in patterns matched against full\n # pathname may have special meaning:\n # A leading \"**\" followed by a slash means match in all directories.\n # For example, \"**/foo\" matches file or directory \"foo\" anywhere,\n # the same as pattern \"foo\".\n (\"**/foo\", \"/dir\", \"/dir/**/foo\"),\n # \"**/foo/bar\" matches file or directory \"bar\" anywhere that is\n # directly under directory \"foo\".\n (\"**/foo/bar\", \"/dir\", \"/dir/**/foo/bar\"),\n # A trailing \"/**\" matches everything inside.\n # For example, \"abc/**\" matches all files inside directory \"abc\",\n # relative to the location of the .gitignore file, with infinite depth.\n (\"abc/**\", \"/dir\", \"/dir/abc/**\"),\n # A slash followed by two consecutive asterisks then a slash matches\n # zero or more directories. For example, \"a/**/b\"\n # matches \"a/b\", \"a/x/b\", \"a/x/y/b\" and so on.\n (\"a/**/b\", \"/dir\", \"/dir/a/**/b\"),\n # Other consecutive asterisks are considered regular asterisks and\n # will match according to the previous rules.\n (\"/***.txt\", \"/dir\", \"/dir/***.txt\"),\n (\"data/***\", \"/dir\", \"/dir/data/***\"),\n (\"***/file.txt\", \"/dir\", \"/dir/***/file.txt\"),\n (\"***file\", \"/dir\", \"/dir/**/***file\"),\n (\"a/***/b\", \"/dir\", \"/dir/a/***/b\"),\n ],\n)\ndef test_dvcignore_pattern_change_dir(tmp_dir, patterns, dirname, changed):\n assert _change_dirname(dirname, [PatternInfo(patterns, \"\")], \"/\") == [\n PatternInfo(changed, \"\")\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_updater.py_test_is_enabled_test_check_update_respect_config.assert_result_mock_che": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_updater.py_test_is_enabled_test_check_update_respect_config.assert_result_mock_che", "embedding": null, "metadata": {"file_path": "tests/unit/test_updater.py", "file_name": "test_updater.py", "file_type": "text/x-python", "category": "test", "start_line": 47, "end_line": 66, "span_ids": ["test_check_update_respect_config", "test_is_enabled"], "tokens": 149}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"core, result\",\n [\n ({}, True),\n ({\"check_update\": \"true\"}, True),\n ({\"check_update\": \"false\"}, False),\n ],\n)\ndef test_is_enabled(dvc, updater, core, result):\n with dvc.config.edit(\"local\") as conf:\n conf[\"core\"] = core\n assert result == updater.is_enabled()\n\n\n@pytest.mark.parametrize(\"result\", [True, False])\n@mock.patch(\"dvc.updater.Updater._check\")\ndef test_check_update_respect_config(mock_check, result, updater, mocker):\n mocker.patch.object(updater, \"is_enabled\", return_value=result)\n updater.check()\n assert result == mock_check.called", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_os_test_open_dirty_no_hash.with_pytest_raises_FileNo.with_tree_open_file_r.pass": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_os_test_open_dirty_no_hash.with_pytest_raises_FileNo.with_tree_open_file_r.pass", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_dvc.py", "file_name": "test_dvc.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 50, "span_ids": ["test_open_dirty_no_hash", "imports", "test_open_dirty_hash", "test_exists", "test_open"], "tokens": 346}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport shutil\n\nimport pytest\n\nfrom dvc.hash_info import HashInfo\nfrom dvc.path_info import PathInfo\nfrom dvc.tree.dvc import DvcTree\n\n\ndef test_exists(tmp_dir, dvc):\n tmp_dir.gen(\"foo\", \"foo\")\n dvc.add(\"foo\")\n (tmp_dir / \"foo\").unlink()\n\n tree = DvcTree(dvc)\n assert tree.exists(\"foo\")\n\n\ndef test_open(tmp_dir, dvc):\n tmp_dir.gen(\"foo\", \"foo\")\n dvc.add(\"foo\")\n (tmp_dir / \"foo\").unlink()\n\n tree = DvcTree(dvc)\n with tree.open(\"foo\", \"r\") as fobj:\n assert fobj.read() == \"foo\"\n\n\ndef test_open_dirty_hash(tmp_dir, dvc):\n tmp_dir.dvc_gen(\"file\", \"file\")\n (tmp_dir / \"file\").write_text(\"something\")\n\n tree = DvcTree(dvc)\n with tree.open(\"file\", \"r\") as fobj:\n # NOTE: Unlike RepoTree, DvcTree should not\n # be affected by a dirty workspace.\n assert fobj.read() == \"file\"\n\n\ndef test_open_dirty_no_hash(tmp_dir, dvc):\n tmp_dir.gen(\"file\", \"file\")\n (tmp_dir / \"file.dvc\").write_text(\"outs:\\n- path: file\\n\")\n\n tree = DvcTree(dvc)\n # NOTE: Unlike RepoTree, DvcTree should not\n # be affected by a dirty workspace.\n with pytest.raises(FileNotFoundError):\n with tree.open(\"file\", \"r\"):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_open_in_history_test_open_in_history.for_rev_in_dvc_brancher_r.with_tree_open_foo_r_.assert_fobj_read_fo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_open_in_history_test_open_in_history.for_rev_in_dvc_brancher_r.with_tree_open_foo_r_.assert_fobj_read_fo", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_dvc.py", "file_name": "test_dvc.py", "file_type": "text/x-python", "category": "test", "start_line": 53, "end_line": 70, "span_ids": ["test_open_in_history"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_open_in_history(tmp_dir, scm, dvc):\n tmp_dir.gen(\"foo\", \"foo\")\n dvc.add(\"foo\")\n dvc.scm.add([\"foo.dvc\", \".gitignore\"])\n dvc.scm.commit(\"foo\")\n\n tmp_dir.gen(\"foo\", \"foofoo\")\n dvc.add(\"foo\")\n dvc.scm.add([\"foo.dvc\", \".gitignore\"])\n dvc.scm.commit(\"foofoo\")\n\n for rev in dvc.brancher(revs=[\"HEAD~1\"]):\n if rev == \"workspace\":\n continue\n\n tree = DvcTree(dvc)\n with tree.open(\"foo\", \"r\") as fobj:\n assert fobj.read() == \"foo\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_isdir_isfile_test_isdir_mixed.assert_not_tree_isfile_d": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_isdir_isfile_test_isdir_mixed.assert_not_tree_isfile_d", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_dvc.py", "file_name": "test_dvc.py", "file_type": "text/x-python", "category": "test", "start_line": 73, "end_line": 99, "span_ids": ["test_isdir_isfile", "test_isdir_mixed"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_isdir_isfile(tmp_dir, dvc):\n tmp_dir.gen({\"datafile\": \"data\", \"datadir\": {\"foo\": \"foo\", \"bar\": \"bar\"}})\n\n tree = DvcTree(dvc)\n assert not tree.isdir(\"datadir\")\n assert not tree.isfile(\"datadir\")\n assert not tree.isdir(\"datafile\")\n assert not tree.isfile(\"datafile\")\n\n dvc.add([\"datadir\", \"datafile\"])\n shutil.rmtree(tmp_dir / \"datadir\")\n (tmp_dir / \"datafile\").unlink()\n\n assert tree.isdir(\"datadir\")\n assert not tree.isfile(\"datadir\")\n assert not tree.isdir(\"datafile\")\n assert tree.isfile(\"datafile\")\n\n\ndef test_isdir_mixed(tmp_dir, dvc):\n tmp_dir.gen({\"dir\": {\"foo\": \"foo\", \"bar\": \"bar\"}})\n\n dvc.add(str(tmp_dir / \"dir\" / \"foo\"))\n\n tree = DvcTree(dvc)\n assert tree.isdir(\"dir\")\n assert not tree.isfile(\"dir\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_walk_test_walk.assert_len_actual_len": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_walk_test_walk.assert_len_actual_len", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_dvc.py", "file_name": "test_dvc.py", "file_type": "text/x-python", "category": "test", "start_line": 102, "end_line": 133, "span_ids": ["test_walk"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_walk(tmp_dir, dvc):\n tmp_dir.gen(\n {\n \"dir\": {\n \"subdir1\": {\"foo1\": \"foo1\", \"bar1\": \"bar1\"},\n \"subdir2\": {\"foo2\": \"foo2\"},\n \"foo\": \"foo\",\n \"bar\": \"bar\",\n }\n }\n )\n\n dvc.add(\"dir\", recursive=True)\n tree = DvcTree(dvc)\n\n expected = [\n str(tmp_dir / \"dir\" / \"subdir1\"),\n str(tmp_dir / \"dir\" / \"subdir2\"),\n str(tmp_dir / \"dir\" / \"subdir1\" / \"foo1\"),\n str(tmp_dir / \"dir\" / \"subdir1\" / \"bar1\"),\n str(tmp_dir / \"dir\" / \"subdir2\" / \"foo2\"),\n str(tmp_dir / \"dir\" / \"foo\"),\n str(tmp_dir / \"dir\" / \"bar\"),\n ]\n\n actual = []\n for root, dirs, files in tree.walk(\"dir\"):\n for entry in dirs + files:\n actual.append(os.path.join(root, entry))\n\n assert set(actual) == set(expected)\n assert len(actual) == len(expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_walk_dir_test_walk_dir.assert_len_actual_len": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_walk_dir_test_walk_dir.assert_len_actual_len", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_dvc.py", "file_name": "test_dvc.py", "file_type": "text/x-python", "category": "test", "start_line": 136, "end_line": 177, "span_ids": ["test_walk_dir"], "tokens": 296}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"fetch,expected\",\n [\n (False, []),\n (\n True,\n [\n PathInfo(\"dir\") / \"subdir1\",\n PathInfo(\"dir\") / \"subdir2\",\n PathInfo(\"dir\") / \"subdir1\" / \"foo1\",\n PathInfo(\"dir\") / \"subdir1\" / \"bar1\",\n PathInfo(\"dir\") / \"subdir2\" / \"foo2\",\n PathInfo(\"dir\") / \"foo\",\n PathInfo(\"dir\") / \"bar\",\n ],\n ),\n ],\n)\ndef test_walk_dir(tmp_dir, dvc, fetch, expected):\n tmp_dir.gen(\n {\n \"dir\": {\n \"subdir1\": {\"foo1\": \"foo1\", \"bar1\": \"bar1\"},\n \"subdir2\": {\"foo2\": \"foo2\"},\n \"foo\": \"foo\",\n \"bar\": \"bar\",\n }\n }\n )\n\n dvc.add(\"dir\")\n tree = DvcTree(dvc, fetch=fetch)\n\n expected = [str(tmp_dir / path) for path in expected]\n\n actual = []\n for root, dirs, files in tree.walk(\"dir\"):\n for entry in dirs + files:\n actual.append(os.path.join(root, entry))\n\n assert set(actual) == set(expected)\n assert len(actual) == len(expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_walk_onerror_test_walk_onerror.None_3.for___in_tree_walk_foo_.pass": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_walk_onerror_test_walk_onerror.None_3.for___in_tree_walk_foo_.pass", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_dvc.py", "file_name": "test_dvc.py", "file_type": "text/x-python", "category": "test", "start_line": 180, "end_line": 199, "span_ids": ["test_walk_onerror"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_walk_onerror(tmp_dir, dvc):\n def onerror(exc):\n raise exc\n\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n tree = DvcTree(dvc)\n\n # path does not exist\n for _ in tree.walk(\"dir\"):\n pass\n with pytest.raises(OSError):\n for _ in tree.walk(\"dir\", onerror=onerror):\n pass\n\n # path is not a directory\n for _ in tree.walk(\"foo\"):\n pass\n with pytest.raises(OSError):\n for _ in tree.walk(\"foo\", onerror=onerror):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_isdvc_test_get_hash_file.assert_tree_get_hash_Path": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_isdvc_test_get_hash_file.assert_tree_get_hash_Path", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_dvc.py", "file_name": "test_dvc.py", "file_type": "text/x-python", "category": "test", "start_line": 202, "end_line": 215, "span_ids": ["test_isdvc", "test_get_hash_file"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_isdvc(tmp_dir, dvc):\n tmp_dir.gen({\"foo\": \"foo\", \"bar\": \"bar\"})\n dvc.add(\"foo\")\n tree = DvcTree(dvc)\n assert tree.isdvc(\"foo\")\n assert not tree.isdvc(\"bar\")\n\n\ndef test_get_hash_file(tmp_dir, dvc):\n tmp_dir.dvc_gen({\"foo\": \"foo\"})\n tree = DvcTree(dvc)\n assert tree.get_hash(PathInfo(tmp_dir) / \"foo\") == HashInfo(\n \"md5\", \"acbd18db4cc2f85cedef654fccc4a4d8\",\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_get_hash_dir_test_get_hash_dir.assert_not_get_file_hash_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_get_hash_dir_test_get_hash_dir.assert_not_get_file_hash_", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_dvc.py", "file_name": "test_dvc.py", "file_type": "text/x-python", "category": "test", "start_line": 218, "end_line": 227, "span_ids": ["test_get_hash_dir"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_hash_dir(tmp_dir, dvc, mocker):\n tmp_dir.dvc_gen(\n {\"dir\": {\"foo\": \"foo\", \"bar\": \"bar\", \"subdir\": {\"data\": \"data\"}}}\n )\n tree = DvcTree(dvc)\n get_file_hash_spy = mocker.spy(tree, \"get_file_hash\")\n assert tree.get_hash(PathInfo(tmp_dir) / \"dir\") == HashInfo(\n \"md5\", \"8761c4e9acad696bee718615e23e22db.dir\",\n )\n assert not get_file_hash_spy.called", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_get_hash_granular_test_get_hash_granular.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_get_hash_granular_test_get_hash_granular.None_1", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_dvc.py", "file_name": "test_dvc.py", "file_type": "text/x-python", "category": "test", "start_line": 230, "end_line": 241, "span_ids": ["test_get_hash_granular"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_hash_granular(tmp_dir, dvc):\n tmp_dir.dvc_gen(\n {\"dir\": {\"foo\": \"foo\", \"bar\": \"bar\", \"subdir\": {\"data\": \"data\"}}}\n )\n tree = DvcTree(dvc, fetch=True)\n subdir = PathInfo(tmp_dir) / \"dir\" / \"subdir\"\n assert tree.get_hash(subdir) == HashInfo(\n \"md5\", \"af314506f1622d107e0ed3f14ec1a3b5.dir\",\n )\n assert tree.get_hash(subdir / \"data\") == HashInfo(\n \"md5\", \"8d777f385d3dfec8815d20f7496026dc\",\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_get_hash_dirty_file_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_dvc.py_test_get_hash_dirty_file_", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_dvc.py", "file_name": "test_dvc.py", "file_type": "text/x-python", "category": "test", "start_line": 244, "end_line": 263, "span_ids": ["test_get_hash_dirty_file", "test_get_hash_dirty_dir"], "tokens": 208}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_hash_dirty_file(tmp_dir, dvc):\n tmp_dir.dvc_gen(\"file\", \"file\")\n (tmp_dir / \"file\").write_text(\"something\")\n\n tree = DvcTree(dvc)\n actual = tree.get_hash(PathInfo(tmp_dir) / \"file\")\n expected = HashInfo(\"md5\", \"8c7dd922ad47494fc02c388e12c00eac\")\n assert actual == expected\n\n\ndef test_get_hash_dirty_dir(tmp_dir, dvc):\n tmp_dir.dvc_gen({\"dir\": {\"foo\": \"foo\", \"bar\": \"bar\"}})\n (tmp_dir / \"dir\" / \"baz\").write_text(\"baz\")\n\n tree = DvcTree(dvc)\n actual = tree.get_hash(PathInfo(tmp_dir) / \"dir\")\n expected = HashInfo(\"md5\", \"5ea40360f5b4ec688df672a4db9c17d1.dir\")\n\n assert actual == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_os_test_open_dirty_no_hash.with_tree_open_file_r.assert_fobj_read_fi": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_os_test_open_dirty_no_hash.with_tree_open_file_r.assert_fobj_read_fi", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 46, "span_ids": ["test_open_dirty_no_hash", "imports", "test_open_dirty_hash", "test_exists", "test_open"], "tokens": 304}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport shutil\nfrom unittest import mock\n\nimport pytest\n\nfrom dvc.hash_info import HashInfo\nfrom dvc.path_info import PathInfo\nfrom dvc.tree.repo import RepoTree\n\n\ndef test_exists(tmp_dir, dvc):\n tmp_dir.gen(\"foo\", \"foo\")\n dvc.add(\"foo\")\n (tmp_dir / \"foo\").unlink()\n\n tree = RepoTree(dvc)\n assert tree.exists(\"foo\")\n\n\ndef test_open(tmp_dir, dvc):\n tmp_dir.gen(\"foo\", \"foo\")\n dvc.add(\"foo\")\n (tmp_dir / \"foo\").unlink()\n\n tree = RepoTree(dvc)\n with tree.open(\"foo\", \"r\") as fobj:\n assert fobj.read() == \"foo\"\n\n\ndef test_open_dirty_hash(tmp_dir, dvc):\n tmp_dir.dvc_gen(\"file\", \"file\")\n (tmp_dir / \"file\").write_text(\"something\")\n\n tree = RepoTree(dvc)\n with tree.open(\"file\", \"r\") as fobj:\n assert fobj.read() == \"something\"\n\n\ndef test_open_dirty_no_hash(tmp_dir, dvc):\n tmp_dir.gen(\"file\", \"file\")\n (tmp_dir / \"file.dvc\").write_text(\"outs:\\n- path: file\\n\")\n\n tree = RepoTree(dvc)\n with tree.open(\"file\", \"r\") as fobj:\n assert fobj.read() == \"file\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_open_in_history_test_open_in_history.for_rev_in_dvc_brancher_r.with_tree_open_foo_r_.assert_fobj_read_fo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_open_in_history_test_open_in_history.for_rev_in_dvc_brancher_r.with_tree_open_foo_r_.assert_fobj_read_fo", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 49, "end_line": 66, "span_ids": ["test_open_in_history"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_open_in_history(tmp_dir, scm, dvc):\n tmp_dir.gen(\"foo\", \"foo\")\n dvc.add(\"foo\")\n dvc.scm.add([\"foo.dvc\", \".gitignore\"])\n dvc.scm.commit(\"foo\")\n\n tmp_dir.gen(\"foo\", \"foofoo\")\n dvc.add(\"foo\")\n dvc.scm.add([\"foo.dvc\", \".gitignore\"])\n dvc.scm.commit(\"foofoo\")\n\n for rev in dvc.brancher(revs=[\"HEAD~1\"]):\n if rev == \"workspace\":\n continue\n\n tree = RepoTree(dvc)\n with tree.open(\"foo\", \"r\") as fobj:\n assert fobj.read() == \"foo\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_isdir_isfile_test_isdir_isfile.assert_tree_isdvc_datafi": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_isdir_isfile_test_isdir_isfile.assert_tree_isdvc_datafi", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 69, "end_line": 89, "span_ids": ["test_isdir_isfile"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_isdir_isfile(tmp_dir, dvc):\n tmp_dir.gen({\"datafile\": \"data\", \"datadir\": {\"foo\": \"foo\", \"bar\": \"bar\"}})\n\n tree = RepoTree(dvc)\n assert tree.isdir(\"datadir\")\n assert not tree.isfile(\"datadir\")\n assert not tree.isdvc(\"datadir\")\n assert not tree.isdir(\"datafile\")\n assert tree.isfile(\"datafile\")\n assert not tree.isdvc(\"datafile\")\n\n dvc.add([\"datadir\", \"datafile\"])\n shutil.rmtree(tmp_dir / \"datadir\")\n (tmp_dir / \"datafile\").unlink()\n\n assert tree.isdir(\"datadir\")\n assert not tree.isfile(\"datadir\")\n assert tree.isdvc(\"datadir\")\n assert not tree.isdir(\"datafile\")\n assert tree.isfile(\"datafile\")\n assert tree.isdvc(\"datafile\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_exists_isdir_isfile_dirty_test_isdir_mixed.assert_not_tree_isfile_d": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_exists_isdir_isfile_dirty_test_isdir_mixed.assert_not_tree_isfile_d", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 92, "end_line": 135, "span_ids": ["test_isdir_mixed", "test_exists_isdir_isfile_dirty"], "tokens": 455}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_exists_isdir_isfile_dirty(tmp_dir, dvc):\n tmp_dir.dvc_gen(\n {\"datafile\": \"data\", \"datadir\": {\"foo\": \"foo\", \"bar\": \"bar\"}}\n )\n\n tree = RepoTree(dvc, stream=True)\n shutil.rmtree(tmp_dir / \"datadir\")\n (tmp_dir / \"datafile\").unlink()\n\n root = PathInfo(tmp_dir)\n assert tree.exists(root / \"datafile\")\n assert tree.exists(root / \"datadir\")\n assert tree.exists(root / \"datadir\" / \"foo\")\n assert tree.isfile(root / \"datafile\")\n assert not tree.isfile(root / \"datadir\")\n assert tree.isfile(root / \"datadir\" / \"foo\")\n assert not tree.isdir(root / \"datafile\")\n assert tree.isdir(root / \"datadir\")\n assert not tree.isdir(root / \"datadir\" / \"foo\")\n\n # NOTE: creating file instead of dir and dir instead of file\n tmp_dir.gen({\"datadir\": \"data\", \"datafile\": {\"foo\": \"foo\", \"bar\": \"bar\"}})\n assert tree.exists(root / \"datafile\")\n assert tree.exists(root / \"datadir\")\n assert not tree.exists(root / \"datadir\" / \"foo\")\n assert tree.exists(root / \"datafile\" / \"foo\")\n assert not tree.isfile(root / \"datafile\")\n assert tree.isfile(root / \"datadir\")\n assert not tree.isfile(root / \"datadir\" / \"foo\")\n assert tree.isfile(root / \"datafile\" / \"foo\")\n assert tree.isdir(root / \"datafile\")\n assert not tree.isdir(root / \"datadir\")\n assert not tree.isdir(root / \"datadir\" / \"foo\")\n assert not tree.isdir(root / \"datafile\" / \"foo\")\n\n\ndef test_isdir_mixed(tmp_dir, dvc):\n tmp_dir.gen({\"dir\": {\"foo\": \"foo\", \"bar\": \"bar\"}})\n\n dvc.add(str(tmp_dir / \"dir\" / \"foo\"))\n\n tree = RepoTree(dvc)\n assert tree.isdir(\"dir\")\n assert not tree.isfile(\"dir\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_walk_test_walk.assert_len_actual_len": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_walk_test_walk.assert_len_actual_len", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 138, "end_line": 182, "span_ids": ["test_walk"], "tokens": 379}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"dvcfiles,extra_expected\",\n [\n (False, []),\n (\n True,\n [\n PathInfo(\"dir\") / \"subdir1\" / \"foo1.dvc\",\n PathInfo(\"dir\") / \"subdir1\" / \"bar1.dvc\",\n PathInfo(\"dir\") / \"subdir2\" / \"foo2.dvc\",\n ],\n ),\n ],\n)\ndef test_walk(tmp_dir, dvc, dvcfiles, extra_expected):\n tmp_dir.gen(\n {\n \"dir\": {\n \"subdir1\": {\"foo1\": \"foo1\", \"bar1\": \"bar1\"},\n \"subdir2\": {\"foo2\": \"foo2\"},\n }\n }\n )\n dvc.add(str(tmp_dir / \"dir\"), recursive=True)\n tmp_dir.gen({\"dir\": {\"foo\": \"foo\", \"bar\": \"bar\"}})\n tree = RepoTree(dvc)\n\n expected = [\n PathInfo(\"dir\") / \"subdir1\",\n PathInfo(\"dir\") / \"subdir2\",\n PathInfo(\"dir\") / \"subdir1\" / \"foo1\",\n PathInfo(\"dir\") / \"subdir1\" / \"bar1\",\n PathInfo(\"dir\") / \"subdir2\" / \"foo2\",\n PathInfo(\"dir\") / \"foo\",\n PathInfo(\"dir\") / \"bar\",\n ]\n\n actual = []\n for root, dirs, files in tree.walk(\"dir\", dvcfiles=dvcfiles):\n for entry in dirs + files:\n actual.append(os.path.join(root, entry))\n\n expected = [str(path) for path in expected + extra_expected]\n assert set(actual) == set(expected)\n assert len(actual) == len(expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_walk_dirty_test_walk_dirty.assert_len_actual_len": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_walk_dirty_test_walk_dirty.assert_len_actual_len", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 185, "end_line": 217, "span_ids": ["test_walk_dirty"], "tokens": 307}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_walk_dirty(tmp_dir, dvc):\n tmp_dir.dvc_gen(\n {\n \"dir\": {\n \"foo\": \"foo\",\n \"subdir1\": {\"foo1\": \"foo1\", \"bar1\": \"bar1\"},\n \"subdir2\": {\"foo2\": \"foo2\"},\n }\n }\n )\n tmp_dir.gen({\"dir\": {\"bar\": \"bar\", \"subdir3\": {\"foo3\": \"foo3\"}}})\n (tmp_dir / \"dir\" / \"foo\").unlink()\n\n tree = RepoTree(dvc)\n expected = [\n PathInfo(\"dir\") / \"subdir1\",\n PathInfo(\"dir\") / \"subdir2\",\n PathInfo(\"dir\") / \"subdir3\",\n PathInfo(\"dir\") / \"subdir1\" / \"foo1\",\n PathInfo(\"dir\") / \"subdir1\" / \"bar1\",\n PathInfo(\"dir\") / \"subdir2\" / \"foo2\",\n PathInfo(\"dir\") / \"subdir3\" / \"foo3\",\n PathInfo(\"dir\") / \"bar\",\n ]\n\n actual = []\n for root, dirs, files in tree.walk(\"dir\"):\n for entry in dirs + files:\n actual.append(os.path.join(root, entry))\n\n expected = [str(path) for path in expected]\n assert set(actual) == set(expected)\n assert len(actual) == len(expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_walk_dirty_cached_dir_test_walk_dirty_cached_dir.assert_actual_data_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_walk_dirty_cached_dir_test_walk_dirty_cached_dir.assert_actual_data_", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 220, "end_line": 235, "span_ids": ["test_walk_dirty_cached_dir"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_walk_dirty_cached_dir(tmp_dir, scm, dvc):\n tmp_dir.dvc_gen(\n {\"data\": {\"foo\": \"foo\", \"bar\": \"bar\"}}, commit=\"add data\",\n )\n (tmp_dir / \"data\" / \"foo\").unlink()\n\n tree = RepoTree(dvc)\n\n data = PathInfo(tmp_dir) / \"data\"\n\n actual = []\n for root, dirs, files in tree.walk(data):\n for entry in dirs + files:\n actual.append(os.path.join(root, entry))\n\n assert actual == [(data / \"bar\").fspath]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_walk_mixed_dir_test_walk_mixed_dir.assert_len_actual_len": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_walk_mixed_dir_test_walk_mixed_dir.assert_len_actual_len", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 238, "end_line": 263, "span_ids": ["test_walk_mixed_dir"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_walk_mixed_dir(tmp_dir, scm, dvc):\n tmp_dir.gen({\"dir\": {\"foo\": \"foo\", \"bar\": \"bar\"}})\n tmp_dir.dvc.add(os.path.join(\"dir\", \"foo\"))\n tmp_dir.scm.add(\n [\n os.path.join(\"dir\", \"bar\"),\n os.path.join(\"dir\", \".gitignore\"),\n os.path.join(\"dir\", \"foo.dvc\"),\n ]\n )\n tmp_dir.scm.commit(\"add dir\")\n\n tree = RepoTree(dvc)\n\n expected = [\n str(PathInfo(\"dir\") / \"foo\"),\n str(PathInfo(\"dir\") / \"bar\"),\n str(PathInfo(\"dir\") / \".gitignore\"),\n ]\n actual = []\n for root, dirs, files in tree.walk(\"dir\"):\n for entry in dirs + files:\n actual.append(os.path.join(root, entry))\n\n assert set(actual) == set(expected)\n assert len(actual) == len(expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_walk_onerror_test_walk_onerror.None_3.for___in_tree_walk_foo_.pass": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_walk_onerror_test_walk_onerror.None_3.for___in_tree_walk_foo_.pass", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 266, "end_line": 285, "span_ids": ["test_walk_onerror"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_walk_onerror(tmp_dir, dvc):\n def onerror(exc):\n raise exc\n\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n tree = RepoTree(dvc)\n\n # path does not exist\n for _ in tree.walk(\"dir\"):\n pass\n with pytest.raises(OSError):\n for _ in tree.walk(\"dir\", onerror=onerror):\n pass\n\n # path is not a directory\n for _ in tree.walk(\"foo\"):\n pass\n with pytest.raises(OSError):\n for _ in tree.walk(\"foo\", onerror=onerror):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_isdvc_make_subrepo.with_dir__chdir_.if_config_.dir__add_remote_config_co": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_isdvc_make_subrepo.with_dir__chdir_.if_config_.dir__add_remote_config_co", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 288, "end_line": 306, "span_ids": ["make_subrepo", "test_isdvc"], "tokens": 174}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_isdvc(tmp_dir, dvc):\n tmp_dir.gen({\"foo\": \"foo\", \"bar\": \"bar\", \"dir\": {\"baz\": \"baz\"}})\n dvc.add(\"foo\")\n dvc.add(\"dir\")\n tree = RepoTree(dvc)\n assert tree.isdvc(\"foo\")\n assert not tree.isdvc(\"bar\")\n assert tree.isdvc(\"dir\")\n assert not tree.isdvc(\"dir/baz\")\n assert tree.isdvc(\"dir/baz\", recursive=True)\n\n\ndef make_subrepo(dir_, scm, config=None):\n dir_.mkdir(parents=True, exist_ok=True)\n with dir_.chdir():\n dir_.scm = scm\n dir_.init(dvc=True, subdir=True)\n if config:\n dir_.add_remote(config=config)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_subrepos_test_subrepos.None_2.assert_tree_isdvc_subrepo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_subrepos_test_subrepos.None_2.assert_tree_isdvc_subrepo", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 309, "end_line": 369, "span_ids": ["test_subrepos"], "tokens": 561}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_subrepos(tmp_dir, scm, dvc):\n tmp_dir.scm_gen(\n {\"dir\": {\"repo.txt\": \"file to confuse RepoTree\"}},\n commit=\"dir/repo.txt\",\n )\n\n subrepo1 = tmp_dir / \"dir\" / \"repo\"\n subrepo2 = tmp_dir / \"dir\" / \"repo2\"\n\n for repo in [subrepo1, subrepo2]:\n make_subrepo(repo, scm)\n\n subrepo1.dvc_gen({\"foo\": \"foo\", \"dir1\": {\"bar\": \"bar\"}}, commit=\"FOO\")\n subrepo2.dvc_gen(\n {\"lorem\": \"lorem\", \"dir2\": {\"ipsum\": \"ipsum\"}}, commit=\"BAR\"\n )\n\n dvc.tree._reset()\n tree = RepoTree(dvc, subrepos=True, fetch=True)\n\n def assert_tree_belongs_to_repo(ret_val):\n method = tree._get_repo\n\n def f(*args, **kwargs):\n r = method(*args, **kwargs)\n assert r.root_dir == ret_val.root_dir\n return r\n\n return f\n\n with mock.patch.object(\n tree,\n \"_get_repo\",\n side_effect=assert_tree_belongs_to_repo(subrepo1.dvc),\n ):\n assert tree.exists(subrepo1 / \"foo\") is True\n assert tree.exists(subrepo1 / \"bar\") is False\n\n assert tree.isfile(subrepo1 / \"foo\") is True\n assert tree.isfile(subrepo1 / \"dir1\" / \"bar\") is True\n assert tree.isfile(subrepo1 / \"dir1\") is False\n\n assert tree.isdir(subrepo1 / \"dir1\") is True\n assert tree.isdir(subrepo1 / \"dir1\" / \"bar\") is False\n assert tree.isdvc(subrepo1 / \"foo\") is True\n\n with mock.patch.object(\n tree,\n \"_get_repo\",\n side_effect=assert_tree_belongs_to_repo(subrepo2.dvc),\n ):\n assert tree.exists(subrepo2 / \"lorem\") is True\n assert tree.exists(subrepo2 / \"ipsum\") is False\n\n assert tree.isfile(subrepo2 / \"lorem\") is True\n assert tree.isfile(subrepo2 / \"dir2\" / \"ipsum\") is True\n assert tree.isfile(subrepo2 / \"dir2\") is False\n\n assert tree.isdir(subrepo2 / \"dir2\") is True\n assert tree.isdir(subrepo2 / \"dir2\" / \"ipsum\") is False\n assert tree.isdvc(subrepo2 / \"lorem\") is True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_subrepo_walk_test_subrepo_walk.assert_len_actual_len": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_subrepo_walk_test_subrepo_walk.assert_len_actual_len", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 372, "end_line": 431, "span_ids": ["test_subrepo_walk"], "tokens": 592}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"dvcfiles,extra_expected\",\n [\n (False, []),\n (\n True,\n [\n PathInfo(\"dir\") / \"repo\" / \"foo.dvc\",\n PathInfo(\"dir\") / \"repo\" / \"dir1.dvc\",\n PathInfo(\"dir\") / \"repo2\" / \"lorem.dvc\",\n PathInfo(\"dir\") / \"repo2\" / \"dir2.dvc\",\n ],\n ),\n ],\n)\ndef test_subrepo_walk(tmp_dir, scm, dvc, dvcfiles, extra_expected):\n tmp_dir.scm_gen(\n {\"dir\": {\"repo.txt\": \"file to confuse RepoTree\"}},\n commit=\"dir/repo.txt\",\n )\n\n subrepo1 = tmp_dir / \"dir\" / \"repo\"\n subrepo2 = tmp_dir / \"dir\" / \"repo2\"\n\n subdirs = [subrepo1, subrepo2]\n for dir_ in subdirs:\n make_subrepo(dir_, scm)\n\n subrepo1.dvc_gen({\"foo\": \"foo\", \"dir1\": {\"bar\": \"bar\"}}, commit=\"FOO\")\n subrepo2.dvc_gen(\n {\"lorem\": \"lorem\", \"dir2\": {\"ipsum\": \"ipsum\"}}, commit=\"BAR\"\n )\n\n # using tree that does not have dvcignore\n dvc.tree._reset()\n tree = RepoTree(dvc, subrepos=True, fetch=True)\n expected = [\n PathInfo(\"dir\") / \"repo\",\n PathInfo(\"dir\") / \"repo.txt\",\n PathInfo(\"dir\") / \"repo2\",\n PathInfo(\"dir\") / \"repo\" / \".dvcignore\",\n PathInfo(\"dir\") / \"repo\" / \".gitignore\",\n PathInfo(\"dir\") / \"repo\" / \"foo\",\n PathInfo(\"dir\") / \"repo\" / \"dir1\",\n PathInfo(\"dir\") / \"repo\" / \"dir1\" / \"bar\",\n PathInfo(\"dir\") / \"repo2\" / \".dvcignore\",\n PathInfo(\"dir\") / \"repo2\" / \".gitignore\",\n PathInfo(\"dir\") / \"repo2\" / \"lorem\",\n PathInfo(\"dir\") / \"repo2\" / \"dir2\",\n PathInfo(\"dir\") / \"repo2\" / \"dir2\" / \"ipsum\",\n ]\n\n actual = []\n for root, dirs, files in tree.walk(\"dir\", dvcfiles=dvcfiles):\n for entry in dirs + files:\n actual.append(os.path.join(root, entry))\n\n expected = [str(path) for path in expected + extra_expected]\n assert set(actual) == set(expected)\n assert len(actual) == len(expected)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_repo_tree_no_subrepos_test_repo_tree_no_subrepos.None_9": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_repo_tree_no_subrepos_test_repo_tree_no_subrepos.None_9", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 434, "end_line": 476, "span_ids": ["test_repo_tree_no_subrepos"], "tokens": 443}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_repo_tree_no_subrepos(tmp_dir, dvc, scm):\n tmp_dir.scm_gen(\n {\"dir\": {\"repo.txt\": \"file to confuse RepoTree\"}},\n commit=\"dir/repo.txt\",\n )\n tmp_dir.dvc_gen({\"lorem\": \"lorem\"}, commit=\"add foo\")\n\n subrepo = tmp_dir / \"dir\" / \"repo\"\n make_subrepo(subrepo, scm)\n subrepo.dvc_gen({\"foo\": \"foo\", \"dir1\": {\"bar\": \"bar\"}}, commit=\"FOO\")\n subrepo.scm_gen({\"ipsum\": \"ipsum\"}, commit=\"BAR\")\n\n # using tree that does not have dvcignore\n dvc.tree._reset()\n tree = RepoTree(dvc, subrepos=False, fetch=True)\n expected = [\n tmp_dir / \".dvcignore\",\n tmp_dir / \".gitignore\",\n tmp_dir / \"lorem\",\n tmp_dir / \"lorem.dvc\",\n tmp_dir / \"dir\",\n tmp_dir / \"dir\" / \"repo.txt\",\n ]\n\n actual = []\n for root, dirs, files in tree.walk(tmp_dir, dvcfiles=True):\n for entry in dirs + files:\n actual.append(os.path.normpath(os.path.join(root, entry)))\n\n expected = [str(path) for path in expected]\n assert set(actual) == set(expected)\n assert len(actual) == len(expected)\n\n assert tree.isfile(tmp_dir / \"lorem\") is True\n assert tree.isfile(tmp_dir / \"dir\" / \"repo\" / \"foo\") is False\n assert tree.isdir(tmp_dir / \"dir\" / \"repo\") is False\n assert tree.isdir(tmp_dir / \"dir\") is True\n\n assert tree.isdvc(tmp_dir / \"lorem\") is True\n assert tree.isdvc(tmp_dir / \"dir\" / \"repo\" / \"dir1\") is False\n\n assert tree.exists(tmp_dir / \"dir\" / \"repo.txt\") is True\n assert tree.exists(tmp_dir / \"repo\" / \"ipsum\") is False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_get_hash_cached_file_test_get_hash_cached_file.assert_dvc_tree_spy_calle": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_get_hash_cached_file_test_get_hash_cached_file.assert_dvc_tree_spy_calle", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 479, "end_line": 486, "span_ids": ["test_get_hash_cached_file"], "tokens": 112}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_hash_cached_file(tmp_dir, dvc, mocker):\n tmp_dir.dvc_gen({\"foo\": \"foo\"})\n tree = RepoTree(dvc)\n dvc_tree_spy = mocker.spy(tree._dvctrees[dvc.root_dir], \"get_file_hash\")\n assert tree.get_hash(PathInfo(tmp_dir) / \"foo\") == HashInfo(\n \"md5\", \"acbd18db4cc2f85cedef654fccc4a4d8\",\n )\n assert dvc_tree_spy.called", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_get_hash_cached_dir_test_get_hash_cached_dir.assert_dvc_tree_spy_calle": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_get_hash_cached_dir_test_get_hash_cached_dir.assert_dvc_tree_spy_calle", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 489, "end_line": 508, "span_ids": ["test_get_hash_cached_dir"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_hash_cached_dir(tmp_dir, dvc, mocker):\n tmp_dir.dvc_gen(\n {\"dir\": {\"foo\": \"foo\", \"bar\": \"bar\", \"subdir\": {\"data\": \"data\"}}}\n )\n tree = RepoTree(dvc)\n get_file_hash_spy = mocker.spy(tree, \"get_file_hash\")\n dvc_tree_spy = mocker.spy(tree._dvctrees[dvc.root_dir], \"get_dir_hash\")\n assert tree.get_hash(PathInfo(tmp_dir) / \"dir\") == HashInfo(\n \"md5\", \"8761c4e9acad696bee718615e23e22db.dir\",\n )\n assert get_file_hash_spy.called\n assert not dvc_tree_spy.called\n get_file_hash_spy.reset_mock()\n\n shutil.rmtree(tmp_dir / \"dir\")\n assert tree.get_hash(PathInfo(tmp_dir) / \"dir\") == HashInfo(\n \"md5\", \"8761c4e9acad696bee718615e23e22db.dir\",\n )\n assert not get_file_hash_spy.called\n assert dvc_tree_spy.called", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_get_hash_cached_granular_test_get_hash_cached_granular.assert_dvc_tree_spy_calle": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_get_hash_cached_granular_test_get_hash_cached_granular.assert_dvc_tree_spy_calle", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 511, "end_line": 524, "span_ids": ["test_get_hash_cached_granular"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_hash_cached_granular(tmp_dir, dvc, mocker):\n tmp_dir.dvc_gen(\n {\"dir\": {\"foo\": \"foo\", \"bar\": \"bar\", \"subdir\": {\"data\": \"data\"}}}\n )\n tree = RepoTree(dvc, fetch=True)\n dvc_tree_spy = mocker.spy(tree._dvctrees[dvc.root_dir], \"get_file_hash\")\n subdir = PathInfo(tmp_dir) / \"dir\" / \"subdir\"\n assert tree.get_hash(subdir) == HashInfo(\n \"md5\", \"af314506f1622d107e0ed3f14ec1a3b5.dir\",\n )\n assert tree.get_hash(subdir / \"data\") == HashInfo(\n \"md5\", \"8d777f385d3dfec8815d20f7496026dc\",\n )\n assert dvc_tree_spy.called", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_get_hash_mixed_dir_test_get_hash_mixed_dir.assert_actual_expected": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_get_hash_mixed_dir_test_get_hash_mixed_dir.assert_actual_expected", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 527, "end_line": 542, "span_ids": ["test_get_hash_mixed_dir"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_hash_mixed_dir(tmp_dir, scm, dvc):\n tmp_dir.gen({\"dir\": {\"foo\": \"foo\", \"bar\": \"bar\"}})\n tmp_dir.dvc.add(os.path.join(\"dir\", \"foo\"))\n tmp_dir.scm.add(\n [\n os.path.join(\"dir\", \"bar\"),\n os.path.join(\"dir\", \".gitignore\"),\n os.path.join(\"dir\", \"foo.dvc\"),\n ]\n )\n tmp_dir.scm.commit(\"add dir\")\n\n tree = RepoTree(dvc)\n actual = tree.get_hash(PathInfo(tmp_dir) / \"dir\")\n expected = HashInfo(\"md5\", \"e1d9e8eae5374860ae025ec84cfd85c7.dir\")\n assert actual == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_walk_nested_subrepos_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_walk_nested_subrepos_", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 566, "end_line": 615, "span_ids": ["test_walk_nested_subrepos"], "tokens": 509}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"traverse_subrepos\", [True, False])\ndef test_walk_nested_subrepos(tmp_dir, dvc, scm, traverse_subrepos):\n # generate a dvc and fs structure, with suffix based on repo's basename\n def fs_structure(suffix):\n return {\n f\"foo-{suffix}\": f\"foo-{suffix}\",\n f\"dir-{suffix}\": {f\"bar-{suffix}\": f\"bar-{suffix}\"},\n }\n\n def dvc_structure(suffix):\n return {\n f\"lorem-{suffix}\": f\"lorem-{suffix}\",\n f\"dvc-{suffix}\": {f\"ipsum-{suffix}\": f\"ipsum-{suffix}\"},\n }\n\n paths = [\"subrepo1\", \"subrepo2\", \"subrepo1/subrepo3\"]\n subrepos = [tmp_dir / path for path in paths]\n for repo_dir in subrepos:\n make_subrepo(repo_dir, scm)\n\n extras = {\".dvcignore\", \".gitignore\"} # these files are always there\n expected = {}\n for repo_dir in subrepos + [tmp_dir]:\n base = os.path.basename(repo_dir)\n scm_files = fs_structure(base)\n dvc_files = dvc_structure(base)\n with repo_dir.chdir():\n repo_dir.scm_gen(scm_files, commit=f\"git add in {repo_dir}\")\n repo_dir.dvc_gen(dvc_files, commit=f\"dvc add in {repo_dir}\")\n\n if traverse_subrepos or repo_dir == tmp_dir:\n expected[str(repo_dir)] = set(\n scm_files.keys() | dvc_files.keys() | extras\n )\n # files inside a dvc directory\n expected[str(repo_dir / f\"dvc-{base}\")] = {f\"ipsum-{base}\"}\n # files inside a git directory\n expected[str(repo_dir / f\"dir-{base}\")] = {f\"bar-{base}\"}\n\n if traverse_subrepos:\n # update subrepos\n expected[str(tmp_dir)].update([\"subrepo1\", \"subrepo2\"])\n expected[str(tmp_dir / \"subrepo1\")].add(\"subrepo3\")\n\n actual = {}\n tree = RepoTree(dvc, subrepos=traverse_subrepos)\n for root, dirs, files in tree.walk(str(tmp_dir)):\n actual[root] = set(dirs + files)\n assert expected == actual", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo_metadata.py_test_metadata_not_existing_test_metadata_git_tracked_file.assert_not_meta_outs": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo_metadata.py_test_metadata_not_existing_test_metadata_git_tracked_file.assert_not_meta_outs", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo_metadata.py", "file_name": "test_repo_metadata.py", "file_type": "text/x-python", "category": "test", "start_line": 60, "end_line": 91, "span_ids": ["test_metadata_not_existing", "test_metadata_git_tracked_file"], "tokens": 220}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_metadata_not_existing(repo_tree):\n path = PathInfo(\"path\") / \"that\" / \"does\" / \"not\" / \"exist\"\n\n with pytest.raises(FileNotFoundError):\n repo_tree.metadata(path)\n\n\n@pytest.mark.parametrize(\n \"path\",\n [\n \"README.md\",\n \"models/train.py\",\n \"models/test.py\",\n PathInfo(\"src\") / \"utils\" / \"__init__.py\",\n PathInfo(\"src\") / \"utils\" / \"serve_model.py\",\n ],\n)\ndef test_metadata_git_tracked_file(repo_tree, path):\n root = PathInfo(repo_tree.root_dir)\n meta = repo_tree.metadata(path)\n\n assert meta.path_info == root / path\n assert meta.repo.root_dir == repo_tree.root_dir\n assert not meta.is_output\n assert not meta.part_of_output\n assert not meta.contains_outputs\n assert not meta.is_dvc\n assert not meta.output_exists\n assert not meta.isdir\n assert not meta.is_exec\n assert meta.isfile\n assert not meta.outs", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo_metadata.py_test_metadata_dvc_tracked_file_test_metadata_dvc_tracked_file.assert_out_path_info_for": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo_metadata.py_test_metadata_dvc_tracked_file_test_metadata_dvc_tracked_file.assert_out_path_info_for", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo_metadata.py", "file_name": "test_repo_metadata.py", "file_type": "text/x-python", "category": "test", "start_line": 94, "end_line": 130, "span_ids": ["test_metadata_dvc_tracked_file"], "tokens": 300}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"path, outs, is_output\",\n [\n (PathInfo(\"data\") / \"raw\" / \"raw-1.csv\", [PathInfo(\"data\")], False),\n (PathInfo(\"data\") / \"raw\" / \"raw-2.csv\", [PathInfo(\"data\")], False),\n (\n PathInfo(\"data\") / \"processed\" / \"processed-1.csv\",\n [PathInfo(\"data\")],\n False,\n ),\n (\n PathInfo(\"data\") / \"processed\" / \"processed-2.csv\",\n [PathInfo(\"data\")],\n False,\n ),\n (\n \"models/transform.pickle\",\n [PathInfo(\"models\") / \"transform.pickle\"],\n True,\n ),\n ],\n)\ndef test_metadata_dvc_tracked_file(repo_tree, path, outs, is_output):\n root = PathInfo(repo_tree.root_dir)\n meta = repo_tree.metadata(path)\n\n assert meta.path_info == root / path\n assert meta.repo.root_dir == repo_tree.root_dir\n assert meta.is_output == is_output\n assert meta.part_of_output != is_output\n assert not meta.contains_outputs\n assert meta.is_dvc\n assert meta.output_exists\n assert not meta.isdir\n assert not meta.is_exec\n assert meta.isfile\n assert {out.path_info for out in meta.outs} == {root / out for out in outs}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo_metadata.py_test_metadata_git_only_dirs_test_metadata_git_only_dirs.assert_not_meta_outs": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo_metadata.py_test_metadata_git_only_dirs_test_metadata_git_only_dirs.assert_not_meta_outs", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo_metadata.py", "file_name": "test_repo_metadata.py", "file_type": "text/x-python", "category": "test", "start_line": 133, "end_line": 148, "span_ids": ["test_metadata_git_only_dirs"], "tokens": 124}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"path\", [\"src\", \"src/utils\"])\ndef test_metadata_git_only_dirs(repo_tree, path):\n root = PathInfo(repo_tree.root_dir)\n meta = repo_tree.metadata(path)\n\n assert meta.path_info == root / path\n assert meta.repo.root_dir == repo_tree.root_dir\n assert not meta.is_output\n assert not meta.part_of_output\n assert not meta.contains_outputs\n assert not meta.is_dvc\n assert not meta.output_exists\n assert meta.isdir\n assert meta.is_exec\n assert not meta.isfile\n assert not meta.outs", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo_metadata.py_test_metadata_git_dvc_mixed_dirs_test_metadata_git_dvc_mixed_dirs.assert_out_path_info_for": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo_metadata.py_test_metadata_git_dvc_mixed_dirs_test_metadata_git_dvc_mixed_dirs.assert_out_path_info_for", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo_metadata.py", "file_name": "test_repo_metadata.py", "file_type": "text/x-python", "category": "test", "start_line": 151, "end_line": 175, "span_ids": ["test_metadata_git_dvc_mixed_dirs"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"path, expected_outs\",\n [\n (\".\", [PathInfo(\"data\"), PathInfo(\"models\") / \"transform.pickle\"]),\n (\"models\", [PathInfo(\"models\") / \"transform.pickle\"]),\n ],\n)\ndef test_metadata_git_dvc_mixed_dirs(repo_tree, path, expected_outs):\n root = PathInfo(repo_tree.root_dir)\n meta = repo_tree.metadata(root / path)\n\n assert meta.path_info == root / path\n assert meta.repo.root_dir == repo_tree.root_dir\n assert not meta.is_output\n assert not meta.part_of_output\n assert meta.contains_outputs\n assert not meta.is_dvc\n assert meta.output_exists\n assert meta.isdir\n assert not meta.is_exec\n assert not meta.isfile\n\n assert {out.path_info for out in meta.outs} == {\n root / out for out in expected_outs\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo_metadata.py_test_metadata_dvc_only_dirs_test_metadata_dvc_only_dirs.assert_out_path_info_for": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo_metadata.py_test_metadata_dvc_only_dirs_test_metadata_dvc_only_dirs.assert_out_path_info_for", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo_metadata.py", "file_name": "test_repo_metadata.py", "file_type": "text/x-python", "category": "test", "start_line": 178, "end_line": 201, "span_ids": ["test_metadata_dvc_only_dirs"], "tokens": 188}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"path, is_output\",\n [\n (\"data\", True),\n (\"data/raw\", False), # is inside output\n (\"data/processed\", False),\n ],\n)\ndef test_metadata_dvc_only_dirs(repo_tree, path, is_output):\n data = PathInfo(repo_tree.root_dir) / \"data\"\n root = PathInfo(repo_tree.root_dir)\n meta = repo_tree.metadata(root / path)\n\n assert meta.path_info == root / path\n assert meta.repo.root_dir == repo_tree.root_dir\n assert meta.is_output == is_output\n assert meta.part_of_output != is_output\n assert not meta.contains_outputs\n assert meta.is_dvc\n assert meta.output_exists\n assert meta.isdir\n assert not meta.is_exec\n assert not meta.isfile\n assert {out.path_info for out in meta.outs} == {data}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo_metadata.py_test_metadata_on_subrepos_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo_metadata.py_test_metadata_on_subrepos_", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo_metadata.py", "file_name": "test_repo_metadata.py", "file_type": "text/x-python", "category": "test", "start_line": 187, "end_line": 205, "span_ids": ["test_metadata_on_subrepos"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_metadata_on_subrepos(make_tmp_dir, tmp_dir, dvc, scm, repo_tree):\n subrepo = tmp_dir / \"subrepo\"\n make_subrepo(subrepo, scm)\n subrepo.scm_gen(\"foo\", \"foo\", commit=\"add foo on subrepo\")\n subrepo.dvc_gen(\"foobar\", \"foobar\", commit=\"add foobar on subrepo\")\n\n for path in [\"subrepo\", \"subrepo/foo\", \"subrepo/foobar\"]:\n meta = repo_tree.metadata(tmp_dir / path)\n assert meta.repo.root_dir == str(\n subrepo\n ), f\"repo root didn't match for {path}\"\n\n # supports external outputs on top-level DVC repo\n external_dir = make_tmp_dir(\"external-output\")\n external_dir.gen(\"bar\", \"bar\")\n dvc.add(str(external_dir / \"bar\"), external=True)\n meta = repo_tree.metadata(external_dir / \"bar\")\n assert meta.repo.root_dir == str(tmp_dir)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_s3.py_pytest_test_init.assert_tree_path_info_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_s3.py_pytest_test_init.assert_tree_path_info_", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_s3.py", "file_name": "test_s3.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 28, "span_ids": ["test_init", "imports", "grants"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.config import ConfigError\nfrom dvc.exceptions import DvcException\nfrom dvc.tree.s3 import S3Tree\n\nbucket_name = \"bucket-name\"\nprefix = \"some/prefix\"\nurl = f\"s3://{bucket_name}/{prefix}\"\nkey_id = \"key-id\"\nkey_secret = \"key-secret\"\n\n\n@pytest.fixture(autouse=True)\ndef grants():\n return {\n \"grant_read\": \"id=read-permission-id,id=other-read-permission-id\",\n \"grant_read_acp\": \"id=read-acp-permission-id\",\n \"grant_write_acp\": \"id=write-acp-permission-id\",\n \"grant_full_control\": \"id=full-control-permission-id\",\n }\n\n\ndef test_init(dvc):\n config = {\"url\": url}\n tree = S3Tree(dvc, config)\n\n assert tree.path_info == url", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_s3.py_test_grants_test_grants.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_s3.py_test_grants_test_grants.None_3", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_s3.py", "file_name": "test_s3.py", "file_type": "text/x-python", "category": "test", "start_line": 31, "end_line": 49, "span_ids": ["test_grants"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_grants(dvc):\n config = {\n \"url\": url,\n \"grant_read\": \"id=read-permission-id,id=other-read-permission-id\",\n \"grant_read_acp\": \"id=read-acp-permission-id\",\n \"grant_write_acp\": \"id=write-acp-permission-id\",\n \"grant_full_control\": \"id=full-control-permission-id\",\n }\n tree = S3Tree(dvc, config)\n\n assert (\n tree.extra_args[\"GrantRead\"]\n == \"id=read-permission-id,id=other-read-permission-id\"\n )\n assert tree.extra_args[\"GrantReadACP\"] == \"id=read-acp-permission-id\"\n assert tree.extra_args[\"GrantWriteACP\"] == \"id=write-acp-permission-id\"\n assert (\n tree.extra_args[\"GrantFullControl\"] == \"id=full-control-permission-id\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_s3.py_test_grants_mutually_exclusive_acl_error_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_s3.py_test_grants_mutually_exclusive_acl_error_", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_s3.py", "file_name": "test_s3.py", "file_type": "text/x-python", "category": "test", "start_line": 52, "end_line": 110, "span_ids": ["test_get_s3_no_credentials", "test_sse_kms_key_id", "test_get_s3_connection_error", "test_grants_mutually_exclusive_acl_error", "test_key_id_and_secret", "test_get_bucket", "test_get_s3_connection_error_endpoint"], "tokens": 464}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_grants_mutually_exclusive_acl_error(dvc, grants):\n for grant_option, grant_value in grants.items():\n config = {\"url\": url, \"acl\": \"public-read\", grant_option: grant_value}\n\n with pytest.raises(ConfigError):\n S3Tree(dvc, config)\n\n\ndef test_sse_kms_key_id(dvc):\n tree = S3Tree(dvc, {\"url\": url, \"sse_kms_key_id\": \"key\"})\n assert tree.extra_args[\"SSEKMSKeyId\"] == \"key\"\n\n\ndef test_key_id_and_secret(dvc):\n tree = S3Tree(\n dvc,\n {\"url\": url, \"access_key_id\": key_id, \"secret_access_key\": key_secret},\n )\n assert tree.access_key_id == key_id\n assert tree.secret_access_key == key_secret\n\n\ndef test_get_s3_no_credentials(mocker):\n from botocore.exceptions import NoCredentialsError\n\n tree = S3Tree(None, {})\n with pytest.raises(DvcException, match=\"Unable to find AWS credentials\"):\n with tree._get_s3():\n raise NoCredentialsError\n\n\ndef test_get_s3_connection_error(mocker):\n from botocore.exceptions import EndpointConnectionError\n\n tree = S3Tree(None, {})\n\n msg = \"Unable to connect to 'AWS S3'.\"\n with pytest.raises(DvcException, match=msg):\n with tree._get_s3():\n raise EndpointConnectionError(endpoint_url=\"url\")\n\n\ndef test_get_s3_connection_error_endpoint(mocker):\n from botocore.exceptions import EndpointConnectionError\n\n tree = S3Tree(None, {\"endpointurl\": \"https://example.com\"})\n\n msg = \"Unable to connect to 'https://example.com'.\"\n with pytest.raises(DvcException, match=msg):\n with tree._get_s3():\n raise EndpointConnectionError(endpoint_url=\"url\")\n\n\ndef test_get_bucket():\n tree = S3Tree(None, {\"url\": \"s3://mybucket/path\"})\n with pytest.raises(DvcException, match=\"Bucket 'mybucket' does not exist\"):\n with tree._get_bucket(\"mybucket\") as bucket:\n raise bucket.meta.client.exceptions.NoSuchBucket({}, None)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/serialize/test_yaml.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/serialize/test_yaml.py__", "embedding": null, "metadata": {"file_path": "tests/unit/utils/serialize/test_yaml.py", "file_name": "test_yaml.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 15, "span_ids": ["imports", "test_parse_yaml_duplicate_key_error"], "tokens": 76}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.utils.serialize._yaml import YAMLError, parse_yaml\n\n\ndef test_parse_yaml_duplicate_key_error():\n text = \"\"\"\\\n mykey:\n - foo\n mykey:\n - bar\n \"\"\"\n with pytest.raises(YAMLError, match='found duplicate key \"mykey\"'):\n parse_yaml(text, \"mypath\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__format_time__format_field.return.str_val_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__format_time__format_field.return.str_val_", "embedding": null, "metadata": {"file_path": "dvc/command/experiments.py", "file_name": "experiments.py", "file_type": "text/x-python", "category": "implementation", "start_line": 178, "end_line": 196, "span_ids": ["_format_field", "_format_time"], "tokens": 140}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _format_time(timestamp):\n if timestamp is None:\n return \"-\"\n if timestamp.date() == date.today():\n fmt = \"%I:%M %p\"\n else:\n fmt = \"%b %d, %Y\"\n return timestamp.strftime(fmt)\n\n\ndef _format_field(val, precision=DEFAULT_PRECISION):\n if isinstance(val, float):\n fmt = f\"{{:.{precision}g}}\"\n return fmt.format(val)\n elif isinstance(val, Mapping):\n return {k: _format_field(v) for k, v in val.items()}\n elif isinstance(val, list):\n return [_format_field(x) for x in val]\n return str(val)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__extend_row__parse_list.return.ret": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__extend_row__parse_list.return.ret", "embedding": null, "metadata": {"file_path": "dvc/command/experiments.py", "file_name": "experiments.py", "file_type": "text/x-python", "category": "implementation", "start_line": 199, "end_line": 234, "span_ids": ["_parse_list", "_extend_row"], "tokens": 235}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _extend_row(row, names, items, precision):\n from rich.text import Text\n\n if not items:\n row.extend([\"-\"] * len(names))\n return\n\n for fname, item in items:\n if isinstance(item, dict):\n item = flatten(item)\n else:\n item = {fname: item}\n for name in names:\n if name in item:\n value = item[name]\n if value is None:\n text = \"-\"\n else:\n # wrap field data in rich.Text, otherwise rich may\n # interpret unescaped braces from list/dict types as rich\n # markup tags\n text = Text(str(_format_field(value, precision)))\n row.append(text)\n else:\n row.append(\"-\")\n\n\ndef _parse_list(param_list):\n ret = []\n for param_str in param_list:\n # we don't care about filename prefixes for show, silently\n # ignore it if provided to keep usage consistent with other\n # metric/param list command options\n _, _, param_str = param_str.rpartition(\":\")\n ret.extend(param_str.split(\",\"))\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_add_parser_add_parser.None_13": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_add_parser_add_parser.None_13", "embedding": null, "metadata": {"file_path": "dvc/command/experiments.py", "file_name": "experiments.py", "file_type": "text/x-python", "category": "implementation", "start_line": 602, "end_line": 712, "span_ids": ["add_parser"], "tokens": 712}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def add_parser(subparsers, parent_parser):\n EXPERIMENTS_HELP = \"Commands to run and compare experiments.\"\n\n experiments_parser = subparsers.add_parser(\n \"experiments\",\n parents=[parent_parser],\n aliases=[\"exp\"],\n description=append_doc_link(EXPERIMENTS_HELP, \"exp\"),\n formatter_class=argparse.RawDescriptionHelpFormatter,\n help=EXPERIMENTS_HELP,\n )\n\n experiments_subparsers = experiments_parser.add_subparsers(\n dest=\"cmd\",\n help=\"Use `dvc experiments CMD --help` to display \"\n \"command-specific help.\",\n )\n\n fix_subparsers(experiments_subparsers)\n\n EXPERIMENTS_SHOW_HELP = \"Print experiments.\"\n experiments_show_parser = experiments_subparsers.add_parser(\n \"show\",\n parents=[parent_parser],\n description=append_doc_link(EXPERIMENTS_SHOW_HELP, \"exp/show\"),\n help=EXPERIMENTS_SHOW_HELP,\n formatter_class=argparse.RawDescriptionHelpFormatter,\n )\n experiments_show_parser.add_argument(\n \"-a\",\n \"--all-branches\",\n action=\"store_true\",\n default=False,\n help=\"Show experiments derived from the tip of all Git branches.\",\n )\n experiments_show_parser.add_argument(\n \"-T\",\n \"--all-tags\",\n action=\"store_true\",\n default=False,\n help=\"Show experiments derived from all Git tags.\",\n )\n experiments_show_parser.add_argument(\n \"--all-commits\",\n action=\"store_true\",\n default=False,\n help=\"Show experiments derived from all Git commits.\",\n )\n experiments_show_parser.add_argument(\n \"--no-pager\",\n action=\"store_true\",\n default=False,\n help=\"Do not pipe output into a pager.\",\n )\n experiments_show_parser.add_argument(\n \"--include-metrics\",\n action=\"append\",\n default=[],\n help=\"Include the specified metrics in output table.\",\n metavar=\"\",\n )\n experiments_show_parser.add_argument(\n \"--exclude-metrics\",\n action=\"append\",\n default=[],\n help=\"Exclude the specified metrics from output table.\",\n metavar=\"\",\n )\n experiments_show_parser.add_argument(\n \"--include-params\",\n action=\"append\",\n default=[],\n help=\"Include the specified params in output table.\",\n metavar=\"\",\n )\n experiments_show_parser.add_argument(\n \"--exclude-params\",\n action=\"append\",\n default=[],\n help=\"Exclude the specified params from output table.\",\n metavar=\"\",\n )\n experiments_show_parser.add_argument(\n \"--sort-by\",\n help=\"Sort related experiments by the specified metric or param.\",\n metavar=\"\",\n )\n experiments_show_parser.add_argument(\n \"--sort-order\",\n help=\"Sort order to use with --sort-by.\",\n choices=(\"asc\", \"desc\"),\n default=\"asc\",\n )\n experiments_show_parser.add_argument(\n \"--no-timestamp\",\n action=\"store_true\",\n default=False,\n help=\"Do not show experiment timestamps.\",\n )\n experiments_show_parser.add_argument(\n \"--sha\",\n action=\"store_true\",\n default=False,\n help=\"Always show git commit SHAs instead of branch/tag names.\",\n )\n experiments_show_parser.add_argument(\n \"--show-json\",\n action=\"store_true\",\n default=False,\n help=\"Print output in JSON format instead of a human-readable table.\",\n )\n # ... other code", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_PathInfo.__str___PathInfo.relative_to.return.self___class___path_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/path_info.py_PathInfo.__str___PathInfo.relative_to.return.self___class___path_", "embedding": null, "metadata": {"file_path": "dvc/path_info.py", "file_name": "path_info.py", "file_type": "text/x-python", "category": "implementation", "start_line": 49, "end_line": 87, "span_ids": ["PathInfo:7", "PathInfo.fspath", "PathInfo.__str__", "PathInfo.__repr__", "PathInfo.isin", "PathInfo.relative_to", "PathInfo.__fspath__", "PathInfo.relpath"], "tokens": 360}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PathInfo(pathlib.PurePath, _BasePath):\n # Use __slots__ in PathInfo objects following PurePath implementation.\n # This makes objects smaller and speeds up attribute access.\n\n def __str__(self):\n path = self.__fspath__()\n return relpath(path)\n\n def __repr__(self):\n return \"{}: '{}'\".format(type(self).__name__, self)\n\n # This permits passing it to file utils directly in Python 3.6+\n def __fspath__(self):\n return pathlib.PurePath.__str__(self)\n\n @property\n def fspath(self):\n return self.__fspath__()\n\n url = fspath\n\n def relpath(self, other):\n return self.__class__(relpath(self, other))\n\n def isin(self, other):\n if isinstance(other, (str, bytes)):\n other = self.__class__(other)\n elif self.__class__ != other.__class__:\n return False\n # Use cached casefolded parts to compare paths\n n = len(other._cparts)\n return len(self._cparts) > n and self._cparts[:n] == other._cparts\n\n def relative_to(self, other): # pylint: disable=arguments-differ\n # pathlib relative_to raises exception when one path is not a direct\n # descendant of the other when os.path.relpath would return abspath.\n # For DVC PathInfo we only need the relpath behavior.\n # See: https://bugs.python.org/issue40358\n try:\n path = super().relative_to(other)\n except ValueError:\n path = relpath(self, other)\n return self.__class__(path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/init.py_logging_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/init.py_logging_", "embedding": null, "metadata": {"file_path": "dvc/repo/init.py", "file_name": "init.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 90, "span_ids": ["imports", "init"], "tokens": 603}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\n\nfrom dvc.config import Config\nfrom dvc.exceptions import InitError, InvalidArgumentError\nfrom dvc.ignore import init as init_dvcignore\nfrom dvc.repo import Repo\nfrom dvc.scm import SCM\nfrom dvc.scm.base import SCMError\nfrom dvc.utils import relpath\nfrom dvc.utils.fs import remove\n\nlogger = logging.getLogger(__name__)\n\n\ndef init(root_dir=os.curdir, no_scm=False, force=False, subdir=False):\n \"\"\"\n Creates an empty repo on the given directory -- basically a\n `.dvc` directory with subdirectories for configuration and cache.\n\n It should be tracked by a SCM or use the `--no-scm` flag.\n\n If the given directory is not empty, you must use the `--force`\n flag to override it.\n\n Args:\n root_dir: Path to repo's root directory.\n\n Returns:\n Repo instance.\n\n Raises:\n KeyError: Raises an exception.\n \"\"\"\n\n if no_scm and subdir:\n raise InvalidArgumentError(\n \"Cannot initialize repo with `--no-scm` and `--subdir`\"\n )\n\n root_dir = os.path.realpath(root_dir)\n dvc_dir = os.path.join(root_dir, Repo.DVC_DIR)\n\n try:\n scm = SCM(root_dir, search_parent_directories=subdir, no_scm=no_scm)\n except SCMError:\n raise InitError(\n f\"{root_dir} is not tracked by any supported SCM tool (e.g. Git). \"\n \"Use `--no-scm` if you don't want to use any SCM or \"\n \"`--subdir` if initializing inside a subdirectory of a parent SCM \"\n \"repository.\"\n )\n\n if scm.is_ignored(dvc_dir):\n raise InitError(\n f\"{dvc_dir} is ignored by your SCM tool. \\n\"\n \"Make sure that it's tracked, \"\n \"for example, by adding '!.dvc' to .gitignore.\"\n )\n\n if os.path.isdir(dvc_dir):\n if not force:\n raise InitError(f\"'{relpath(dvc_dir)}' exists. Use `-f` to force.\")\n\n remove(dvc_dir)\n\n os.mkdir(dvc_dir)\n\n config = Config.init(dvc_dir)\n\n if no_scm:\n with config.edit() as conf:\n conf[\"core\"][\"no_scm\"] = True\n\n dvcignore = init_dvcignore(root_dir)\n\n proj = Repo(root_dir)\n\n proj.plots.templates.init()\n\n scm.add(\n [config.files[\"repo\"], dvcignore, proj.plots.templates.templates_dir]\n )\n\n if scm.ignore_file:\n scm.add([os.path.join(dvc_dir, scm.ignore_file)])\n logger.info(\"\\nYou can now commit the changes to git.\\n\")\n\n return proj", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.run_Stage.run.if_not_dry_.if_not_no_commit_.self_commit_allow_missing": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.run_Stage.run.if_not_dry_.if_not_no_commit_.self_commit_allow_missing", "embedding": null, "metadata": {"file_path": "dvc/stage/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 484, "end_line": 514, "span_ids": ["Stage.run"], "tokens": 246}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Stage(params.StageParams):\n # pylint:disable=no-value-for-parameter\n\n @rwlocked(read=[\"deps\"], write=[\"outs\"])\n def run(\n self,\n dry=False,\n no_commit=False,\n force=False,\n allow_missing=False,\n **kwargs,\n ):\n if (self.cmd or self.is_import) and not self.frozen and not dry:\n self.remove_outs(ignore_remove=False, force=False)\n\n if not self.frozen and self.is_import:\n jobs = kwargs.get(\"jobs\", None)\n sync_import(self, dry, force, jobs)\n elif not self.frozen and self.cmd:\n run_stage(self, dry, force, **kwargs)\n else:\n args = (\n (\"outputs\", \"frozen \") if self.frozen else (\"data sources\", \"\")\n )\n logger.info(\"Verifying %s in %s%s\", *args, self)\n if not dry:\n check_missing_outputs(self)\n\n if not dry:\n if kwargs.get(\"checkpoint_func\", None):\n allow_missing = True\n self.save(allow_missing=allow_missing)\n if not no_commit:\n self.commit(allow_missing=allow_missing)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/oss.py__pylint_disable_abstract_OSS.should_test.return.False": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/oss.py__pylint_disable_abstract_OSS.should_test.return.False", "embedding": null, "metadata": {"file_path": "tests/remotes/oss.py", "file_name": "oss.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 34, "span_ids": ["OSS", "OSS.get_url", "OSS.should_test", "docstring"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# pylint:disable=abstract-method\nimport os\nimport uuid\n\nimport pytest\n\nfrom dvc.path_info import CloudURLInfo\nfrom dvc.utils import env2bool\n\nfrom .base import Base\n\nTEST_OSS_REPO_BUCKET = \"dvc-test\"\nEMULATOR_OSS_ENDPOINT = \"127.0.0.1:{port}\"\nEMULATOR_OSS_ACCESS_KEY_ID = \"AccessKeyID\"\nEMULATOR_OSS_ACCESS_KEY_SECRET = \"AccessKeySecret\"\n\n\nclass OSS(Base, CloudURLInfo):\n @staticmethod\n def get_url():\n return f\"oss://{TEST_OSS_REPO_BUCKET}/{uuid.uuid4()}\"\n\n @staticmethod\n def should_test():\n do_test = env2bool(\"DVC_TEST_OSS\", undefined=None)\n if do_test is not None:\n return do_test\n\n if os.getenv(\"OSS_ACCESS_KEY_ID\") and os.getenv(\n \"OSS_ACCESS_KEY_SECRET\"\n ):\n return True\n\n return False", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/oss.py_oss_server_oss_server.return.endpoint": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/oss.py_oss_server_oss_server.return.endpoint", "embedding": null, "metadata": {"file_path": "tests/remotes/oss.py", "file_name": "oss.py", "file_type": "text/x-python", "category": "implementation", "start_line": 37, "end_line": 59, "span_ids": ["oss_server"], "tokens": 162}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture(scope=\"session\")\ndef oss_server(test_config, docker_compose, docker_services):\n import oss2\n\n test_config.requires(\"oss\")\n port = docker_services.port_for(\"oss\", 8880)\n endpoint = EMULATOR_OSS_ENDPOINT.format(port=port)\n\n def _check():\n try:\n auth = oss2.Auth(\n EMULATOR_OSS_ACCESS_KEY_ID, EMULATOR_OSS_ACCESS_KEY_SECRET\n )\n oss2.Bucket(auth, endpoint, \"mybucket\").get_bucket_info()\n return True\n except oss2.exceptions.NoSuchBucket:\n return True\n except oss2.exceptions.OssError:\n return False\n\n docker_services.wait_until_responsive(timeout=30.0, pause=5, check=_check)\n\n return endpoint", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/oss.py_oss_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/oss.py_oss_", "embedding": null, "metadata": {"file_path": "tests/remotes/oss.py", "file_name": "oss.py", "file_type": "text/x-python", "category": "implementation", "start_line": 62, "end_line": 90, "span_ids": ["oss", "real_oss"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture\ndef oss(oss_server):\n url = OSS.get_url()\n ret = OSS(url)\n ret.config = {\n \"url\": url,\n \"oss_key_id\": EMULATOR_OSS_ACCESS_KEY_ID,\n \"oss_key_secret\": EMULATOR_OSS_ACCESS_KEY_SECRET,\n \"oss_endpoint\": oss_server,\n }\n return ret\n\n\n@pytest.fixture\ndef real_oss(test_config):\n test_config.requires(\"oss\")\n if not OSS.should_test():\n pytest.skip(\"no real OSS\")\n\n url = OSS.get_url()\n ret = OSS(url)\n ret.config = {\n \"url\": url,\n \"oss_key_id\": os.environ.get(\"OSS_ACCESS_KEY_ID\"),\n \"oss_key_secret\": os.environ.get(\"OSS_ACCESS_KEY_SECRET\"),\n \"oss_endpoint\": os.environ.get(\"OSS_ENDPOINT\"),\n }\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_connection.py_test_symlink_test_move.assert_not_os_path_exists": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_connection.py_test_symlink_test_move.assert_not_os_path_exists", "embedding": null, "metadata": {"file_path": "tests/unit/remote/ssh/test_connection.py", "file_name": "test_connection.py", "file_type": "text/x-python", "category": "test", "start_line": 108, "end_line": 142, "span_ids": ["test_copy", "test_symlink", "test_hardlink", "test_move"], "tokens": 249}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(\n platform.system() == \"Windows\",\n reason=\"sftp symlink is not supported on Windows\",\n)\ndef test_symlink(tmp_dir, ssh_connection):\n tmp_dir.gen(\"foo\", \"foo content\")\n ssh_connection.symlink(\"foo\", \"link\")\n assert System.is_symlink(\"link\")\n\n\n@pytest.mark.skipif(\n platform.system() == \"Windows\",\n reason=\"hardlink is temporarily not supported on Windows\",\n)\ndef test_hardlink(tmp_dir, ssh_connection):\n tmp_dir.gen(\"foo\", \"foo content\")\n ssh_connection.hardlink(\"foo\", \"link\")\n assert System.is_hardlink(\"link\")\n\n\n@pytest.mark.skipif(\n platform.system() == \"Windows\",\n reason=\"copy is temporarily not supported on Windows\",\n)\ndef test_copy(tmp_dir, ssh_connection):\n tmp_dir.gen(\"foo\", \"foo content\")\n ssh_connection.copy(\"foo\", \"link\")\n assert filecmp.cmp(\"foo\", \"link\")\n\n\ndef test_move(tmp_dir, ssh_connection):\n tmp_dir.gen(\"foo\", \"foo content\")\n ssh_connection.move(\"foo\", \"copy\")\n assert os.path.exists(\"copy\")\n assert not os.path.exists(\"foo\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_connection.py_test_escapes_filepaths_for_md5_calculation_test_escapes_filepaths_for_copy.ssh_connection_execute_as": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_connection.py_test_escapes_filepaths_for_md5_calculation_test_escapes_filepaths_for_copy.ssh_connection_execute_as", "embedding": null, "metadata": {"file_path": "tests/unit/remote/ssh/test_connection.py", "file_name": "test_connection.py", "file_type": "text/x-python", "category": "test", "start_line": 145, "end_line": 169, "span_ids": ["test_escapes_filepaths_for_md5_calculation", "test_escapes_filepaths_for_copy"], "tokens": 240}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"uname,md5command\", [(\"Linux\", \"md5sum\"), (\"Darwin\", \"md5\")]\n)\ndef test_escapes_filepaths_for_md5_calculation(\n ssh_connection, uname, md5command, mocker\n):\n fake_md5 = \"x\" * 32\n uname_mock = mocker.PropertyMock(return_value=uname)\n mocker.patch.object(SSHConnection, \"uname\", new_callable=uname_mock)\n ssh_connection.execute = mocker.Mock(return_value=fake_md5)\n ssh_connection.md5(SRC_PATH_WITH_SPECIAL_CHARACTERS)\n ssh_connection.execute.assert_called_with(\n f\"{md5command} {ESCAPED_SRC_PATH_WITH_SPECIAL_CHARACTERS}\"\n )\n\n\ndef test_escapes_filepaths_for_copy(ssh_connection, mocker):\n ssh_connection.execute = mocker.Mock()\n ssh_connection.copy(\n SRC_PATH_WITH_SPECIAL_CHARACTERS, DEST_PATH_WITH_SPECIAL_CHARACTERS\n )\n ssh_connection.execute.assert_called_with(\n f\"cp {ESCAPED_SRC_PATH_WITH_SPECIAL_CHARACTERS} \"\n + f\"{ESCAPED_DEST_PATH_WITH_SPECIAL_CHARACTERS}\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_connection.py_test_escapes_filepaths_for_reflink_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/ssh/test_connection.py_test_escapes_filepaths_for_reflink_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/ssh/test_connection.py", "file_name": "test_connection.py", "file_type": "text/x-python", "category": "test", "start_line": 172, "end_line": 200, "span_ids": ["test_escapes_filepaths_for_reflink", "test_escapes_filepaths_for_hardlink"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"uname,cp_command\", [(\"Linux\", \"cp --reflink\"), (\"Darwin\", \"cp -c\")]\n)\ndef test_escapes_filepaths_for_reflink(\n ssh_connection, uname, cp_command, mocker\n):\n uname_mock = mocker.PropertyMock(return_value=uname)\n mocker.patch.object(SSHConnection, \"uname\", new_callable=uname_mock)\n ssh_connection.execute = mocker.Mock()\n ssh_connection.reflink(\n SRC_PATH_WITH_SPECIAL_CHARACTERS, DEST_PATH_WITH_SPECIAL_CHARACTERS\n )\n ssh_connection.execute.assert_called_with(\n f\"{cp_command} \"\n + f\"{ESCAPED_SRC_PATH_WITH_SPECIAL_CHARACTERS} \"\n + f\"{ESCAPED_DEST_PATH_WITH_SPECIAL_CHARACTERS}\"\n )\n\n\ndef test_escapes_filepaths_for_hardlink(ssh_connection, mocker):\n ssh_connection.execute = mocker.Mock()\n ssh_connection.hardlink(\n SRC_PATH_WITH_SPECIAL_CHARACTERS, DEST_PATH_WITH_SPECIAL_CHARACTERS\n )\n ssh_connection.execute.assert_called_with(\n f\"ln {ESCAPED_SRC_PATH_WITH_SPECIAL_CHARACTERS} \"\n + f\"{ESCAPED_DEST_PATH_WITH_SPECIAL_CHARACTERS}\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_cache.py_test_shared_stage_cache_test_shared_stage_cache.assert__mode_cache_file_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/stage/test_cache.py_test_shared_stage_cache_test_shared_stage_cache.assert__mode_cache_file_", "embedding": null, "metadata": {"file_path": "tests/unit/stage/test_cache.py", "file_name": "test_cache.py", "file_type": "text/x-python", "category": "test", "start_line": 165, "end_line": 208, "span_ids": ["test_shared_stage_cache"], "tokens": 372}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_shared_stage_cache(tmp_dir, dvc, run_copy):\n import stat\n\n from dvc.cache import Cache\n\n tmp_dir.gen(\"foo\", \"foo\")\n\n with dvc.config.edit() as config:\n config[\"cache\"][\"shared\"] = \"group\"\n\n dvc.cache = Cache(dvc)\n\n run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n\n parent_cache_dir = os.path.join(dvc.stage_cache.cache_dir, \"88\",)\n cache_dir = os.path.join(\n parent_cache_dir,\n \"883395068439203a9de3d1e1649a16e9027bfd1ab5dab4f438d321c4a928b328\",\n )\n cache_file = os.path.join(\n cache_dir,\n \"e42b7ebb9bc5ac4bccab769c8d1338914dad25d7ffecc8671dbd4581bad4aa15\",\n )\n\n # sanity check\n assert os.path.isdir(cache_dir)\n assert os.listdir(cache_dir) == [os.path.basename(cache_file)]\n assert os.path.isfile(cache_file)\n\n def _mode(path):\n return stat.S_IMODE(os.stat(path).st_mode)\n\n if os.name == \"nt\":\n dir_mode = 0o777\n file_mode = 0o666\n else:\n dir_mode = 0o775\n file_mode = 0o664\n\n assert _mode(dvc.cache.local.cache_dir) == dir_mode\n assert _mode(dvc.stage_cache.cache_dir) == dir_mode\n assert _mode(parent_cache_dir) == dir_mode\n assert _mode(cache_dir) == dir_mode\n assert _mode(cache_file) == file_mode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_from_dataclasses_import_a_test_context_dict_ignores_keys_except_str.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_from_dataclasses_import_a_test_context_dict_ignores_keys_except_str.None_3", "embedding": null, "metadata": {"file_path": "tests/unit/test_context.py", "file_name": "test_context.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 47, "span_ids": ["imports", "test_context", "test_context_dict_ignores_keys_except_str"], "tokens": 268}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dataclasses import asdict\nfrom math import pi\nfrom unittest.mock import mock_open\n\nimport pytest\n\nfrom dvc.parsing import DEFAULT_PARAMS_FILE\nfrom dvc.parsing.context import (\n Context,\n CtxDict,\n CtxList,\n KeyNotInContext,\n MergeError,\n ParamsLoadError,\n Value,\n recurse_not_a_node,\n)\nfrom dvc.tree.local import LocalTree\nfrom dvc.utils import relpath\nfrom dvc.utils.serialize import dump_yaml, dumps_yaml\n\n\ndef test_context():\n context = Context({\"foo\": \"bar\"})\n assert context[\"foo\"] == Value(\"bar\")\n\n context = Context(foo=\"bar\")\n assert context[\"foo\"] == Value(\"bar\")\n\n context[\"foobar\"] = \"foobar\"\n assert context[\"foobar\"] == Value(\"foobar\")\n\n del context[\"foobar\"]\n assert \"foobar\" not in context\n assert \"foo\" in context\n\n with pytest.raises(KeyError):\n _ = context[\"foobar\"]\n\n\ndef test_context_dict_ignores_keys_except_str():\n c = Context({\"one\": 1, 3: 3})\n assert \"one\" in c\n assert 3 not in c\n\n c[3] = 3\n assert 3 not in c", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_context_list_test_context_list.None_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_context_list_test_context_list.None_4", "embedding": null, "metadata": {"file_path": "tests/unit/test_context.py", "file_name": "test_context.py", "file_type": "text/x-python", "category": "test", "start_line": 38, "end_line": 52, "span_ids": ["test_context_list"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_context_list():\n lst = [\"foo\", \"bar\", \"baz\"]\n context = Context(lst=lst)\n\n assert context[\"lst\"] == CtxList(lst)\n assert context[\"lst\"][0] == Value(\"foo\")\n del context[\"lst\"][-1]\n\n assert \"baz\" not in context\n\n with pytest.raises(IndexError):\n _ = context[\"lst\"][3]\n\n context[\"lst\"].insert(0, \"baz\")\n assert context[\"lst\"] == CtxList([\"baz\"] + lst[:2])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_context_setitem_getitem_test_context_setitem_getitem.with_pytest_raises_TypeEr.context_set_1_2_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_context_setitem_getitem_test_context_setitem_getitem.with_pytest_raises_TypeEr.context_set_1_2_3", "embedding": null, "metadata": {"file_path": "tests/unit/test_context.py", "file_name": "test_context.py", "file_type": "text/x-python", "category": "test", "start_line": 55, "end_line": 91, "span_ids": ["test_context_setitem_getitem"], "tokens": 327}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_context_setitem_getitem():\n context = Context()\n lst = [1, 2, \"three\", True, pi, b\"bytes\", None]\n context[\"list\"] = lst\n\n assert isinstance(context[\"list\"], CtxList)\n assert context[\"list\"] == CtxList(lst)\n for i, val in enumerate(lst):\n assert context[\"list\"][i] == Value(val)\n\n d = {\n \"foo\": \"foo\",\n \"bar\": \"bar\",\n \"list\": [\n {\"foo0\": \"foo0\", \"bar0\": \"bar0\"},\n {\"foo1\": \"foo1\", \"bar1\": \"bar1\"},\n ],\n }\n context[\"data\"] = d\n\n assert isinstance(context[\"data\"], CtxDict)\n assert context[\"data\"] == CtxDict(d)\n assert context[\"data\"][\"foo\"] == Value(\"foo\")\n assert context[\"data\"][\"bar\"] == Value(\"bar\")\n\n assert isinstance(context[\"data\"][\"list\"], CtxList)\n assert context[\"data\"][\"list\"] == CtxList(d[\"list\"])\n\n for i, val in enumerate(d[\"list\"]):\n c = context[\"data\"][\"list\"][i]\n assert isinstance(c, CtxDict)\n assert c == CtxDict(val)\n assert c[f\"foo{i}\"] == Value(f\"foo{i}\")\n assert c[f\"bar{i}\"] == Value(f\"bar{i}\")\n\n with pytest.raises(TypeError):\n context[\"set\"] = {1, 2, 3}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_loop_context_test_repr.assert_str_context_st": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_loop_context_test_repr.assert_str_context_st", "embedding": null, "metadata": {"file_path": "tests/unit/test_context.py", "file_name": "test_context.py", "file_type": "text/x-python", "category": "test", "start_line": 94, "end_line": 115, "span_ids": ["test_repr", "test_loop_context"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_loop_context():\n context = Context({\"foo\": \"foo\", \"bar\": \"bar\", \"lst\": [1, 2, 3]})\n\n assert list(context) == [\"foo\", \"bar\", \"lst\"]\n assert len(context) == 3\n\n assert list(context[\"lst\"]) == [Value(i) for i in [1, 2, 3]]\n assert len(context[\"lst\"]) == 3\n\n assert list(context.items()) == [\n (\"foo\", Value(\"foo\")),\n (\"bar\", Value(\"bar\")),\n (\"lst\", CtxList([1, 2, 3])),\n ]\n\n\ndef test_repr():\n data = {\"foo\": \"foo\", \"bar\": \"bar\", \"lst\": [1, 2, 3]}\n context = Context(data)\n\n assert repr(context) == repr(data)\n assert str(context) == str(data)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_select_test_select.for_i___in_enumerate_d_.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_select_test_select.for_i___in_enumerate_d_.None_1", "embedding": null, "metadata": {"file_path": "tests/unit/test_context.py", "file_name": "test_context.py", "file_type": "text/x-python", "category": "test", "start_line": 129, "end_line": 156, "span_ids": ["test_select"], "tokens": 274}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_select():\n context = Context(foo=\"foo\", bar=\"bar\", lst=[1, 2, 3])\n\n assert context.select(\"foo\") == Value(\"foo\")\n assert context.select(\"bar\") == Value(\"bar\")\n assert context.select(\"lst\") == CtxList([1, 2, 3])\n assert context.select(\"lst.0\") == Value(1)\n\n with pytest.raises(KeyNotInContext):\n context.select(\"baz\")\n\n d = {\n \"lst\": [\n {\"foo0\": \"foo0\", \"bar0\": \"bar0\"},\n {\"foo1\": \"foo1\", \"bar1\": \"bar1\"},\n ]\n }\n context = Context(d)\n assert context.select(\"lst\") == CtxList(d[\"lst\"])\n assert context.select(\"lst.0\") == CtxDict(d[\"lst\"][0])\n assert context.select(\"lst.1\") == CtxDict(d[\"lst\"][1])\n\n with pytest.raises(KeyNotInContext):\n context.select(\"lst.2\")\n\n for i, _ in enumerate(d[\"lst\"]):\n assert context.select(f\"lst.{i}.foo{i}\") == Value(f\"foo{i}\")\n assert context.select(f\"lst.{i}.bar{i}\") == Value(f\"bar{i}\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_merge_list_test_overwrite_with_setitem.assert_context_d_Va": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_merge_list_test_overwrite_with_setitem.assert_context_d_Va", "embedding": null, "metadata": {"file_path": "tests/unit/test_context.py", "file_name": "test_context.py", "file_type": "text/x-python", "category": "test", "start_line": 197, "end_line": 215, "span_ids": ["test_overwrite_with_setitem", "test_merge_list"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_merge_list():\n c1 = Context(lst=[1, 2, 3])\n with pytest.raises(MergeError):\n # cannot overwrite by default\n c1.merge_update({\"lst\": [10, 11, 12]})\n\n # lists are never merged\n c1.merge_update({\"lst\": [10, 11, 12]}, overwrite=True)\n node = c1.select(\"lst\")\n assert node == [10, 11, 12]\n assert isinstance(node, CtxList)\n assert node[0] == Value(10)\n\n\ndef test_overwrite_with_setitem():\n context = Context(foo=\"foo\", d={\"bar\": \"bar\", \"baz\": \"baz\"})\n context[\"d\"] = \"overwrite\"\n assert \"d\" in context\n assert context[\"d\"] == Value(\"overwrite\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_load_from_test_load_from.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_load_from_test_load_from.None_5", "embedding": null, "metadata": {"file_path": "tests/unit/test_context.py", "file_name": "test_context.py", "file_type": "text/x-python", "category": "test", "start_line": 219, "end_line": 257, "span_ids": ["test_load_from"], "tokens": 328}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_load_from(mocker):\n d = {\"x\": {\"y\": {\"z\": 5}, \"lst\": [1, 2, 3]}, \"foo\": \"foo\"}\n tree = mocker.Mock(\n open=mock_open(read_data=dumps_yaml(d)),\n **{\"exists.return_value\": True, \"isdir.return_value\": False},\n )\n file = \"params.yaml\"\n c = Context.load_from(tree, file)\n\n assert asdict(c[\"x\"].meta) == {\n \"source\": file,\n \"dpaths\": [\"x\"],\n \"local\": False,\n }\n assert asdict(c[\"foo\"].meta) == {\n \"source\": file,\n \"local\": False,\n \"dpaths\": [\"foo\"],\n }\n assert asdict(c[\"x\"][\"y\"].meta) == {\n \"source\": file,\n \"dpaths\": [\"x\", \"y\"],\n \"local\": False,\n }\n assert asdict(c[\"x\"][\"y\"][\"z\"].meta) == {\n \"source\": file,\n \"dpaths\": [\"x\", \"y\", \"z\"],\n \"local\": False,\n }\n assert asdict(c[\"x\"][\"lst\"].meta) == {\n \"source\": file,\n \"dpaths\": [\"x\", \"lst\"],\n \"local\": False,\n }\n assert asdict(c[\"x\"][\"lst\"][0].meta) == {\n \"source\": file,\n \"dpaths\": [\"x\", \"lst\", \"0\"],\n \"local\": False,\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_path_info.py_test_path_info_as_posix_test_path_info_as_posix.assert_PathInfo_path_as_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_path_info.py_test_path_info_as_posix_test_path_info_as_posix.assert_PathInfo_path_as_", "embedding": null, "metadata": {"file_path": "tests/unit/test_path_info.py", "file_name": "test_path_info.py", "file_type": "text/x-python", "category": "test", "start_line": 62, "end_line": 88, "span_ids": ["test_path_info_as_posix"], "tokens": 267}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"path, as_posix, osname\",\n [\n (\"/some/abs/path\", \"/some/abs/path\", \"posix\"),\n (\"some/rel/path\", \"some/rel/path\", \"posix\"),\n (\"../some/rel/path\", \"../some/rel/path\", \"posix\"),\n (\"windows\\\\relpath\", \"windows/relpath\", \"nt\"),\n (\"..\\\\windows\\\\rel\\\\path\", \"../windows/rel/path\", \"nt\"),\n # These ones are to test that no matter how layered this relpath is,\n # we don't accidentally round it over. E.g. how\n #\n # import os\n # os.chdir(\"/\")\n # os.path.relpath(\"../../path\")\n #\n # results in \"path\".\n (\"\\\\\".join([\"..\"] * TEST_DEPTH), \"/\".join([\"..\"] * TEST_DEPTH), \"nt\"),\n (\n \"/\".join([\"..\"] * TEST_DEPTH),\n \"/\".join([\"..\"] * TEST_DEPTH),\n \"posix\",\n ),\n ],\n)\ndef test_path_info_as_posix(mocker, path, as_posix, osname):\n mocker.patch(\"os.name\", osname)\n assert PathInfo(path).as_posix() == as_posix", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_path_info.py_test_url_replace_path_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_path_info.py_test_url_replace_path_", "embedding": null, "metadata": {"file_path": "tests/unit/test_path_info.py", "file_name": "test_path_info.py", "file_type": "text/x-python", "category": "test", "start_line": 91, "end_line": 120, "span_ids": ["test_relative_to_different_subpath", "test_url_replace_path"], "tokens": 211}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_url_replace_path():\n url = \"https://user@test.com/original/path;p=par?q=quer#frag\"\n\n u = HTTPURLInfo(url)\n new_u = u.replace(\"/new/path\")\n\n assert u.path == \"/original/path\"\n assert new_u.path == \"/new/path\"\n\n assert u.scheme == new_u.scheme\n assert u.host == new_u.host\n assert u.user == new_u.user\n assert u.params == new_u.params\n assert u.query == new_u.query\n assert u.fragment == new_u.fragment\n\n\n@pytest.mark.parametrize(\n \"p1, p2\",\n [\n (\"/foo/bar\", \"/baz\"),\n (\"/baz\", \"/foo/bar\"),\n (\"/foo/bar\", \"../baz\"),\n (\"../baz\", \"/foo/bar\"),\n ],\n)\ndef test_relative_to_different_subpath(p1, p2):\n expected = PathInfo(os.path.relpath(p1, p2))\n assert PathInfo(p1).relative_to(PathInfo(p2)) == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py_RemoteCacheRequiredError_MergeError.pass": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py_RemoteCacheRequiredError_MergeError.pass", "embedding": null, "metadata": {"file_path": "dvc/exceptions.py", "file_name": "exceptions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 308, "end_line": 340, "span_ids": ["NoOutputOrStageError", "RemoteCacheRequiredError.__init__", "NoOutputOrStageError.__init__", "MergeError", "RemoteCacheRequiredError", "IsADirectoryError"], "tokens": 209}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class RemoteCacheRequiredError(DvcException):\n def __init__(self, path_info):\n super().__init__(\n (\n \"Current operation was unsuccessful because '{}' requires \"\n \"existing cache on '{}' remote. See {} for information on how \"\n \"to set up remote cache.\"\n ).format(\n path_info,\n path_info.scheme,\n format_link(\"https://man.dvc.org/config#cache\"),\n )\n )\n\n\nclass IsADirectoryError(DvcException): # noqa,pylint:disable=redefined-builtin\n \"\"\"Raised when a file operation is requested on a directory.\"\"\"\n\n\nclass NoOutputOrStageError(DvcException):\n \"\"\"\n Raised when the target is neither an output nor a stage name in dvc.yaml\n \"\"\"\n\n def __init__(self, target, file):\n super().__init__(\n f\"'{target}' \"\n f\"does not exist as an output or a stage name in '{file}'\"\n )\n\n\nclass MergeError(DvcException):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py_CacheLinkError_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/exceptions.py_CacheLinkError_", "embedding": null, "metadata": {"file_path": "dvc/exceptions.py", "file_name": "exceptions.py", "file_type": "text/x-python", "category": "implementation", "start_line": 343, "end_line": 356, "span_ids": ["CacheLinkError", "CacheLinkError.__init__"], "tokens": 106}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CacheLinkError(DvcException):\n SUPPORT_LINK = \"See {} for more information.\".format(\n format_link(\n \"https://dvc.org/doc/user-guide/troubleshooting#cache-types\"\n )\n )\n\n def __init__(self, path_infos):\n msg = \"No possible cache link types for '{}'. {}\".format(\n \", \".join([str(path) for path in path_infos]), self.SUPPORT_LINK,\n )\n super().__init__(msg)\n self.path_infos = path_infos", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo._get_repo_dirs_Repo._get_repo_dirs.return.root_dir_dvc_dir_tmp_di": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo._get_repo_dirs_Repo._get_repo_dirs.return.root_dir_dvc_dir_tmp_di", "embedding": null, "metadata": {"file_path": "dvc/repo/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 96, "end_line": 129, "span_ids": ["Repo._get_repo_dirs"], "tokens": 255}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Repo:\n\n def _get_repo_dirs(\n self,\n root_dir: str = None,\n scm: Base = None,\n rev: str = None,\n uninitialized: bool = False,\n ):\n assert bool(scm) == bool(rev)\n\n from dvc.scm import SCM\n from dvc.scm.git import Git\n from dvc.utils.fs import makedirs\n\n dvc_dir = None\n tmp_dir = None\n try:\n tree = scm.get_tree(rev) if isinstance(scm, Git) and rev else None\n root_dir = self.find_root(root_dir, tree)\n dvc_dir = os.path.join(root_dir, self.DVC_DIR)\n tmp_dir = os.path.join(dvc_dir, \"tmp\")\n makedirs(tmp_dir, exist_ok=True)\n except NotDvcRepoError:\n if not uninitialized:\n raise\n\n try:\n scm = SCM(root_dir or os.curdir)\n except (SCMError, InvalidGitRepositoryError):\n scm = SCM(os.curdir, no_scm=True)\n\n assert isinstance(scm, Base)\n root_dir = scm.root_dir\n\n return root_dir, dvc_dir, tmp_dir", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.__init___Repo.__repr__.return.f_self___class_____name_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.__init___Repo.__repr__.return.f_self___class_____name_", "embedding": null, "metadata": {"file_path": "dvc/repo/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 124, "end_line": 214, "span_ids": ["Repo.__repr__", "Repo.tree_4", "Repo.tree", "Repo.scm", "Repo.experiments", "Repo.__init__"], "tokens": 668}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Repo:\n\n def __init__(\n self,\n root_dir=None,\n scm=None,\n rev=None,\n subrepos=False,\n uninitialized=False,\n config=None,\n ):\n from dvc.cache import Cache\n from dvc.data_cloud import DataCloud\n from dvc.lock import LockNoop, make_lock\n from dvc.repo.metrics import Metrics\n from dvc.repo.params import Params\n from dvc.repo.plots import Plots\n from dvc.repo.stage import StageLoad\n from dvc.stage.cache import StageCache\n from dvc.state import State, StateNoop\n from dvc.tree.local import LocalTree\n\n self.root_dir, self.dvc_dir, self.tmp_dir = self._get_repo_dirs(\n root_dir=root_dir, scm=scm, rev=rev, uninitialized=uninitialized\n )\n\n tree_kwargs = {\"use_dvcignore\": True, \"dvcignore_root\": self.root_dir}\n if scm:\n self.tree = scm.get_tree(rev, **tree_kwargs)\n else:\n self.tree = LocalTree(self, {\"url\": self.root_dir}, **tree_kwargs)\n\n self.config = Config(self.dvc_dir, tree=self.tree, config=config)\n self._scm = scm\n\n # used by RepoTree to determine if it should traverse subrepos\n self.subrepos = subrepos\n\n self.cache = Cache(self)\n self.cloud = DataCloud(self)\n self.stage = StageLoad(self)\n\n if scm or not self.dvc_dir:\n self.lock = LockNoop()\n self.state = StateNoop()\n else:\n self.lock = make_lock(\n os.path.join(self.tmp_dir, \"lock\"),\n tmp_dir=self.tmp_dir,\n hardlink_lock=self.config[\"core\"].get(\"hardlink_lock\", False),\n friendly=True,\n )\n\n # NOTE: storing state and link_state in the repository itself to\n # avoid any possible state corruption in 'shared cache dir'\n # scenario.\n self.state = State(self)\n self.stage_cache = StageCache(self)\n\n self._ignore()\n\n self.metrics = Metrics(self)\n self.plots = Plots(self)\n self.params = Params(self)\n self.stage_collection_error_handler = None\n self._lock_depth = 0\n\n @cached_property\n def scm(self):\n from dvc.scm import SCM\n\n no_scm = self.config[\"core\"].get(\"no_scm\", False)\n return self._scm if self._scm else SCM(self.root_dir, no_scm=no_scm)\n\n @cached_property\n def experiments(self):\n from dvc.repo.experiments import Experiments\n\n return Experiments(self)\n\n @property\n def tree(self) -> \"BaseTree\":\n return self._tree\n\n @tree.setter\n def tree(self, tree: \"BaseTree\"):\n self._tree = tree\n # Our graph cache is no longer valid, as it was based on the previous\n # tree.\n self._reset()\n\n def __repr__(self):\n return f\"{self.__class__.__name__}: '{self.root_dir}'\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.find_root_Repo.find_root.raise_NotDvcRepoError_mes": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.find_root_Repo.find_root.raise_NotDvcRepoError_mes", "embedding": null, "metadata": {"file_path": "dvc/repo/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 219, "end_line": 243, "span_ids": ["Repo.find_root"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Repo:\n\n @classmethod\n def find_root(cls, root=None, tree=None) -> str:\n root_dir = os.path.realpath(root or os.curdir)\n\n if tree:\n if tree.isdir(os.path.join(root_dir, cls.DVC_DIR)):\n return root_dir\n raise NotDvcRepoError(f\"'{root}' does not contain DVC directory\")\n\n if not os.path.isdir(root_dir):\n raise NotDvcRepoError(f\"directory '{root}' does not exist\")\n\n while True:\n dvc_dir = os.path.join(root_dir, cls.DVC_DIR)\n if os.path.isdir(dvc_dir):\n return root_dir\n if os.path.ismount(root_dir):\n break\n root_dir = os.path.dirname(root_dir)\n\n message = (\n \"you are not inside of a DVC repository \"\n \"(checked up to mount point '{}')\"\n ).format(root_dir)\n raise NotDvcRepoError(message)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/add.py__process_stages__process_stages.return.link_failures": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/add.py__process_stages__process_stages.return.link_failures", "embedding": null, "metadata": {"file_path": "dvc/repo/add.py", "file_name": "add.py", "file_type": "text/x-python", "category": "implementation", "start_line": 106, "end_line": 131, "span_ids": ["_process_stages"], "tokens": 142}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _process_stages(repo, stages, no_commit, pbar):\n link_failures = []\n\n with Tqdm(\n total=len(stages),\n desc=\"Processing\",\n unit=\"file\",\n disable=len(stages) == 1,\n ) as pbar_stages:\n for stage in stages:\n try:\n stage.save()\n except OutputDoesNotExistError:\n pbar.n -= 1\n raise\n\n try:\n if not no_commit:\n stage.commit()\n except CacheLinkError:\n link_failures.append(stage)\n\n Dvcfile(repo, stage.path).dump(stage)\n pbar_stages.update()\n\n return link_failures", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.dumpd_Stage.commit.if_link_failures_.raise_CacheLinkError_link": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.dumpd_Stage.commit.if_link_failures_.raise_CacheLinkError_link", "embedding": null, "metadata": {"file_path": "dvc/stage/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 397, "end_line": 460, "span_ids": ["Stage.compute_md5", "Stage.save_deps", "Stage.ignore_outs", "Stage.changed_entries", "Stage.dumpd", "Stage._changed_entries", "Stage._changed_stage_entry", "Stage.save", "Stage.save_outs", "Stage.commit"], "tokens": 428}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Stage(params.StageParams):\n # pylint:disable=no-value-for-parameter\n\n def dumpd(self):\n return get_dump(self)\n\n def compute_md5(self):\n # `dvc add`ed files don't need stage md5\n if self.is_data_source and not (self.is_import or self.is_repo_import):\n m = None\n else:\n m = compute_md5(self)\n logger.debug(f\"Computed {self} md5: '{m}'\")\n return m\n\n def save(self, allow_missing=False):\n self.save_deps()\n self.save_outs(allow_missing=allow_missing)\n self.md5 = self.compute_md5()\n\n self.repo.stage_cache.save(self)\n\n def save_deps(self):\n for dep in self.deps:\n dep.save()\n\n def save_outs(self, allow_missing=False):\n for out in self.outs:\n try:\n out.save()\n except OutputDoesNotExistError:\n if not (allow_missing or out.checkpoint):\n raise\n\n def ignore_outs(self):\n for out in self.outs:\n out.ignore()\n\n @staticmethod\n def _changed_entries(entries):\n return [str(entry) for entry in entries if entry.workspace_status()]\n\n def _changed_stage_entry(self):\n return f\"'md5' of {self} changed.\"\n\n def changed_entries(self):\n changed_deps = self._changed_entries(self.deps)\n changed_outs = self._changed_entries(self.outs)\n return (\n changed_deps,\n changed_outs,\n self._changed_stage_entry() if self.changed_stage() else None,\n )\n\n @rwlocked(write=[\"outs\"])\n def commit(self, allow_missing=False):\n link_failures = []\n for out in self.outs:\n try:\n out.commit()\n except OutputDoesNotExistError:\n if not (allow_missing or out.checkpoint):\n raise\n except CacheLinkError:\n link_failures.append(out.path_info)\n if link_failures:\n raise CacheLinkError(link_failures)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_get_baseline_test_get_baseline.None_6": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_get_baseline_test_get_baseline.None_6", "embedding": null, "metadata": {"file_path": "tests/func/experiments/test_experiments.py", "file_name": "test_experiments.py", "file_type": "text/x-python", "category": "test", "start_line": 196, "end_line": 221, "span_ids": ["test_get_baseline"], "tokens": 304}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_baseline(tmp_dir, scm, dvc, exp_stage):\n from dvc.repo.experiments.base import EXPS_STASH\n\n init_rev = scm.get_rev()\n assert dvc.experiments.get_baseline(init_rev) is None\n\n results = dvc.experiments.run(exp_stage.addressing, params=[\"foo=2\"])\n exp_rev = first(results)\n assert dvc.experiments.get_baseline(exp_rev) == init_rev\n\n dvc.experiments.run(exp_stage.addressing, params=[\"foo=3\"], queue=True)\n assert dvc.experiments.get_baseline(f\"{EXPS_STASH}@{{0}}\") == init_rev\n\n scm.add([\"dvc.yaml\", \"dvc.lock\", \"copy.py\", \"params.yaml\", \"metrics.yaml\"])\n scm.commit(\"promote exp\")\n promote_rev = scm.get_rev()\n assert dvc.experiments.get_baseline(promote_rev) is None\n\n results = dvc.experiments.run(exp_stage.addressing, params=[\"foo=4\"])\n exp_rev = first(results)\n assert dvc.experiments.get_baseline(exp_rev) == promote_rev\n\n dvc.experiments.run(exp_stage.addressing, params=[\"foo=5\"], queue=True)\n assert dvc.experiments.get_baseline(f\"{EXPS_STASH}@{{0}}\") == promote_rev\n print(\"stash 1\")\n assert dvc.experiments.get_baseline(f\"{EXPS_STASH}@{{1}}\") == init_rev", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestShouldPlaceStageInDataDirIfRepositoryBelowSymlink_TestShouldPlaceStageInDataDirIfRepositoryBelowSymlink.test.with_patch_object_.self_assertTrue_os_path_e": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_TestShouldPlaceStageInDataDirIfRepositoryBelowSymlink_TestShouldPlaceStageInDataDirIfRepositoryBelowSymlink.test.with_patch_object_.self_assertTrue_os_path_e", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 424, "end_line": 446, "span_ids": ["TestShouldPlaceStageInDataDirIfRepositoryBelowSymlink.test", "TestShouldPlaceStageInDataDirIfRepositoryBelowSymlink"], "tokens": 167}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestShouldPlaceStageInDataDirIfRepositoryBelowSymlink(TestDvc):\n def test(self):\n def is_symlink_true_below_dvc_root(path):\n if path == os.path.dirname(self.dvc.root_dir):\n return True\n return False\n\n with patch.object(\n System, \"is_symlink\", side_effect=is_symlink_true_below_dvc_root\n ):\n\n ret = main([\"add\", self.DATA])\n self.assertEqual(0, ret)\n\n stage_file_path_on_data_below_symlink = (\n os.path.basename(self.DATA) + DVC_FILE_SUFFIX\n )\n self.assertFalse(\n os.path.exists(stage_file_path_on_data_below_symlink)\n )\n\n stage_file_path = self.DATA + DVC_FILE_SUFFIX\n self.assertTrue(os.path.exists(stage_file_path))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_symlink_file_test_add_symlink_file.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_symlink_file_test_add_symlink_file.None_3", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 765, "end_line": 788, "span_ids": ["test_add_symlink_file"], "tokens": 305}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_add_symlink_file(tmp_dir, dvc):\n tmp_dir.gen({\"dir\": {\"bar\": \"bar\"}})\n\n (tmp_dir / \"dir\" / \"foo\").symlink_to(os.path.join(\".\", \"bar\"))\n\n dvc.add(os.path.join(\"dir\", \"foo\"))\n\n assert not (tmp_dir / \"foo.dvc\").exists()\n assert (tmp_dir / \"dir\" / \"foo.dvc\").exists()\n assert not (tmp_dir / \"dir\" / \"foo\").is_symlink()\n assert not (tmp_dir / \"dir\" / \"bar\").is_symlink()\n assert (tmp_dir / \"dir\" / \"foo\").read_text() == \"bar\"\n assert (tmp_dir / \"dir\" / \"bar\").read_text() == \"bar\"\n\n assert (tmp_dir / \".dvc\" / \"cache\").read_text() == {\n \"37\": {\"b51d194a7513e45b56f6524f2d51f2\": \"bar\"}\n }\n assert not (\n tmp_dir / \".dvc\" / \"cache\" / \"37\" / \"b51d194a7513e45b56f6524f2d51f2\"\n ).is_symlink()\n\n # Test that subsequent add succeeds\n # See https://github.com/iterative/dvc/issues/4654\n dvc.add(os.path.join(\"dir\", \"foo\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_symlink_dir_test_add_symlink_dir.with_pytest_raises_DvcExc.dvc_add_dir_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_symlink_dir_test_add_symlink_dir.with_pytest_raises_DvcExc.dvc_add_dir_", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 791, "end_line": 806, "span_ids": ["test_add_symlink_dir"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"external\", [True, False])\ndef test_add_symlink_dir(make_tmp_dir, tmp_dir, dvc, external):\n if external:\n data_dir = make_tmp_dir(\"data\")\n data_dir.gen({\"foo\": \"foo\"})\n target = os.fspath(data_dir)\n else:\n tmp_dir.gen({\"data\": {\"foo\": \"foo\"}})\n target = os.path.join(\".\", \"data\")\n\n tmp_dir.gen({\"data\": {\"foo\": \"foo\"}})\n\n (tmp_dir / \"dir\").symlink_to(target)\n\n with pytest.raises(DvcException):\n dvc.add(\"dir\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_file_in_symlink_dir_test_add_file_in_symlink_dir.with_pytest_raises_DvcExc.dvc_add_os_path_join_dir": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_file_in_symlink_dir_test_add_file_in_symlink_dir.with_pytest_raises_DvcExc.dvc_add_os_path_join_dir", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 809, "end_line": 822, "span_ids": ["test_add_file_in_symlink_dir"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"external\", [True, False])\ndef test_add_file_in_symlink_dir(make_tmp_dir, tmp_dir, dvc, external):\n if external:\n data_dir = make_tmp_dir(\"data\")\n data_dir.gen({\"dir\": {\"foo\": \"foo\"}})\n target = os.fspath(data_dir / \"dir\")\n else:\n tmp_dir.gen({\"data\": {\"foo\": \"foo\"}})\n target = os.path.join(\".\", \"data\")\n\n (tmp_dir / \"dir\").symlink_to(target)\n\n with pytest.raises(DvcException):\n dvc.add(os.path.join(\"dir\", \"foo\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_logging_test_get_repo_file.assert_tmp_dir_file_i": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_logging_test_get_repo_file.assert_tmp_dir_file_i", "embedding": null, "metadata": {"file_path": "tests/func/test_get.py", "file_name": "test_get.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 25, "span_ids": ["test_get_repo_file", "imports"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\n\nimport mock\nimport pytest\n\nfrom dvc.cache import Cache\nfrom dvc.exceptions import ConfirmRemoveError, PathMissingError\nfrom dvc.external_repo import IsADVCRepoError\nfrom dvc.main import main\nfrom dvc.repo import Repo\nfrom dvc.repo.get import GetDVCFileError\nfrom dvc.system import System\nfrom dvc.utils.fs import makedirs\nfrom tests.unit.tree.test_repo import make_subrepo\n\n\ndef test_get_repo_file(tmp_dir, erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\"file\", \"contents\", commit=\"create file\")\n\n Repo.get(os.fspath(erepo_dir), \"file\", \"file_imported\")\n\n assert os.path.isfile(\"file_imported\")\n assert (tmp_dir / \"file_imported\").read_text() == \"contents\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_repo_file_replace_without_confirmation_test_get_repo_file_replace_without_confirmation.assert_tmp_dir_file_i": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_repo_file_replace_without_confirmation_test_get_repo_file_replace_without_confirmation.assert_tmp_dir_file_i", "embedding": null, "metadata": {"file_path": "tests/func/test_get.py", "file_name": "test_get.py", "file_type": "text/x-python", "category": "test", "start_line": 28, "end_line": 41, "span_ids": ["test_get_repo_file_replace_without_confirmation"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_repo_file_replace_without_confirmation(tmp_dir, erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\"file\", \"contents\", commit=\"create file\")\n erepo_dir.dvc_gen(\n \"file2\", \"something different\", commit=\"create file2\"\n )\n\n Repo.get(os.fspath(erepo_dir), \"file\", \"file_imported\")\n # getting another file with a name that already exists in Repo.\n with pytest.raises(ConfirmRemoveError):\n Repo.get(os.fspath(erepo_dir), \"file2\", \"file_imported\")\n\n assert os.path.isfile(\"file_imported\")\n assert (tmp_dir / \"file_imported\").read_text() == \"contents\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_repo_file_replace_yes_test_get_repo_file_replace_yes.assert_tmp_dir_file_i": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_repo_file_replace_yes_test_get_repo_file_replace_yes.assert_tmp_dir_file_i", "embedding": null, "metadata": {"file_path": "tests/func/test_get.py", "file_name": "test_get.py", "file_type": "text/x-python", "category": "test", "start_line": 44, "end_line": 57, "span_ids": ["test_get_repo_file_replace_yes"], "tokens": 160}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_repo_file_replace_yes(tmp_dir, erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\"file\", \"contents\", commit=\"create file\")\n erepo_dir.dvc_gen(\n \"file2\", \"something different\", commit=\"create file2\"\n )\n\n Repo.get(os.fspath(erepo_dir), \"file\", \"file_imported\")\n # getting another file with a name that already exists in Repo.\n with mock.patch(\"dvc.prompt.confirm\", return_value=True):\n Repo.get(os.fspath(erepo_dir), \"file2\", \"file_imported\")\n\n assert os.path.isfile(\"file_imported\")\n assert (tmp_dir / \"file_imported\").read_text() == \"something different\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_repo_file_replace_no_test_get_repo_file_replace_no.assert_tmp_dir_file_i": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_repo_file_replace_no_test_get_repo_file_replace_no.assert_tmp_dir_file_i", "embedding": null, "metadata": {"file_path": "tests/func/test_get.py", "file_name": "test_get.py", "file_type": "text/x-python", "category": "test", "start_line": 60, "end_line": 74, "span_ids": ["test_get_repo_file_replace_no"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_repo_file_replace_no(tmp_dir, erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen(\"file\", \"contents\", commit=\"create file\")\n erepo_dir.dvc_gen(\n \"file2\", \"something different\", commit=\"create file2\"\n )\n\n Repo.get(os.fspath(erepo_dir), \"file\", \"file_imported\")\n # getting another file with a name that already exists in Repo.\n with mock.patch(\"dvc.prompt.confirm\", return_value=False):\n with pytest.raises(ConfirmRemoveError):\n Repo.get(os.fspath(erepo_dir), \"file2\", \"file_imported\")\n\n assert os.path.isfile(\"file_imported\")\n assert (tmp_dir / \"file_imported\").read_text() == \"contents\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_repo_dir_test_get_git_file.assert_tmp_dir_dst_re": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_get.py_test_get_repo_dir_test_get_git_file.assert_tmp_dir_dst_re", "embedding": null, "metadata": {"file_path": "tests/func/test_get.py", "file_name": "test_get.py", "file_type": "text/x-python", "category": "test", "start_line": 77, "end_line": 97, "span_ids": ["test_get_git_file", "test_get_repo_dir"], "tokens": 183}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_repo_dir(tmp_dir, erepo_dir):\n with erepo_dir.chdir():\n erepo_dir.dvc_gen({\"dir\": {\"file\": \"contents\"}}, commit=\"create dir\")\n\n Repo.get(os.fspath(erepo_dir), \"dir\", \"dir_imported\")\n\n assert (tmp_dir / \"dir_imported\").read_text() == {\"file\": \"contents\"}\n\n\n@pytest.mark.parametrize(\n \"erepo\", [pytest.lazy_fixture(\"git_dir\"), pytest.lazy_fixture(\"erepo_dir\")]\n)\ndef test_get_git_file(tmp_dir, erepo):\n src = \"some_file\"\n dst = \"some_file_imported\"\n\n erepo.scm_gen({src: \"hello\"}, commit=\"add a regular file\")\n\n Repo.get(os.fspath(erepo), src, dst)\n\n assert (tmp_dir / dst).read_text() == \"hello\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/gs.py_GCP_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/gs.py_GCP_", "embedding": null, "metadata": {"file_path": "tests/remotes/gs.py", "file_name": "gs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 25, "end_line": 110, "span_ids": ["GCP.exists", "GCP.is_dir", "gs", "GCP.mkdir", "GCP.write_text", "GCP.get_url", "GCP._get_storagepath", "GCP.config", "GCP.should_test", "GCP._bucket", "GCP.read_bytes", "GCP.read_text", "GCP.is_file", "GCP.write_bytes", "GCP", "GCP._gc", "GCP._blob"], "tokens": 488}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class GCP(Base, CloudURLInfo):\n @staticmethod\n def should_test():\n do_test = env2bool(\"DVC_TEST_GCP\", undefined=None)\n if do_test is not None:\n return do_test\n\n if not os.path.exists(TEST_GCP_CREDS_FILE):\n return False\n\n return True\n\n @cached_property\n def config(self):\n return {\n \"url\": self.url,\n \"credentialpath\": TEST_GCP_CREDS_FILE,\n }\n\n @staticmethod\n def _get_storagepath():\n return TEST_GCP_REPO_BUCKET + \"/\" + str(uuid.uuid4())\n\n @staticmethod\n def get_url():\n return \"gs://\" + GCP._get_storagepath()\n\n @property\n def _gc(self):\n from google.cloud.storage import Client\n\n return Client.from_service_account_json(TEST_GCP_CREDS_FILE)\n\n @property\n def _bucket(self):\n return self._gc.bucket(self.bucket)\n\n @property\n def _blob(self):\n return self._bucket.blob(self.path)\n\n def is_file(self):\n if self.path.endswith(\"/\"):\n return False\n\n return self._blob.exists()\n\n def is_dir(self):\n dir_path = self / \"\"\n return bool(list(self._bucket.list_blobs(prefix=dir_path.path)))\n\n def exists(self):\n return self.is_file() or self.is_dir()\n\n def mkdir(self, mode=0o777, parents=False, exist_ok=False):\n assert mode == 0o777\n assert parents\n assert not exist_ok\n\n def write_bytes(self, contents):\n assert isinstance(contents, bytes)\n self._blob.upload_from_string(contents)\n\n def write_text(self, contents, encoding=None, errors=None):\n if not encoding:\n encoding = locale.getpreferredencoding(False)\n assert errors is None\n self.write_bytes(contents.encode(encoding))\n\n def read_bytes(self):\n return self._blob.download_as_string()\n\n def read_text(self, encoding=None, errors=None):\n if not encoding:\n encoding = locale.getpreferredencoding(False)\n assert errors is None\n return self.read_bytes().decode(encoding)\n\n\n@pytest.fixture\ndef gs(test_config):\n test_config.requires(\"gs\")\n if not GCP.should_test():\n pytest.skip(\"no gs\")\n yield GCP(GCP.get_url())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_imp.py_from_dvc_cli_import_parse_test_import.m_assert_called_once_with": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_imp.py_from_dvc_cli_import_parse_test_import.m_assert_called_once_with", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_imp.py", "file_name": "test_imp.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 39, "span_ids": ["imports", "test_import"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.cli import parse_args\nfrom dvc.command.imp import CmdImport\n\n\ndef test_import(mocker):\n cli_args = parse_args(\n [\n \"import\",\n \"repo_url\",\n \"src\",\n \"--out\",\n \"out\",\n \"--file\",\n \"file\",\n \"--rev\",\n \"version\",\n \"--desc\",\n \"description\",\n \"--jobs\",\n \"3\",\n ]\n )\n assert cli_args.func == CmdImport\n\n cmd = cli_args.func(cli_args)\n m = mocker.patch.object(cmd.repo, \"imp\", autospec=True)\n\n assert cmd.run() == 0\n\n m.assert_called_once_with(\n \"repo_url\",\n path=\"src\",\n out=\"out\",\n fname=\"file\",\n rev=\"version\",\n no_exec=False,\n desc=\"description\",\n jobs=3,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_imp.py_test_import_no_exec_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_imp.py_test_import_no_exec_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_imp.py", "file_name": "test_imp.py", "file_type": "text/x-python", "category": "test", "start_line": 42, "end_line": 75, "span_ids": ["test_import_no_exec"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_import_no_exec(mocker):\n cli_args = parse_args(\n [\n \"import\",\n \"repo_url\",\n \"src\",\n \"--out\",\n \"out\",\n \"--file\",\n \"file\",\n \"--rev\",\n \"version\",\n \"--no-exec\",\n \"--desc\",\n \"description\",\n ]\n )\n\n cmd = cli_args.func(cli_args)\n m = mocker.patch.object(cmd.repo, \"imp\", autospec=True)\n\n assert cmd.run() == 0\n\n m.assert_called_once_with(\n \"repo_url\",\n path=\"src\",\n out=\"out\",\n fname=\"file\",\n rev=\"version\",\n no_exec=True,\n desc=\"description\",\n jobs=None,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_is_tracked_unicode_test_is_tracked_unicode.assert_not_scm_is_tracked": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_is_tracked_unicode_test_is_tracked_unicode.assert_not_scm_is_tracked", "embedding": null, "metadata": {"file_path": "tests/unit/scm/test_git.py", "file_name": "test_git.py", "file_type": "text/x-python", "category": "test", "start_line": 93, "end_line": 97, "span_ids": ["test_is_tracked_unicode"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_is_tracked_unicode(tmp_dir, scm):\n tmp_dir.scm_gen(\"\u1e6d\u1e5d\u1e01\u1e09\u1e35\u1e17\u1e0b\", \"tracked\", commit=\"add unicode\")\n tmp_dir.gen(\"\u1e73\u1e4b\u1e6d\u1e5d\u1e01\u1e09\u1e35\u1e17\u1e0b\", \"untracked\")\n assert scm.is_tracked(\"\u1e6d\u1e5d\u1e01\u1e09\u1e35\u1e17\u1e0b\")\n assert not scm.is_tracked(\"\u1e73\u1e4b\u1e6d\u1e5d\u1e01\u1e09\u1e35\u1e17\u1e0b\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_external_repo.py_test_subrepo_is_constructed_properly_test_subrepo_is_constructed_properly.with_external_repo_.if_root_is_dvc_.assert_repo_config_remot": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_external_repo.py_test_subrepo_is_constructed_properly_test_subrepo_is_constructed_properly.with_external_repo_.if_root_is_dvc_.assert_repo_config_remot", "embedding": null, "metadata": {"file_path": "tests/unit/test_external_repo.py", "file_name": "test_external_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 38, "end_line": 79, "span_ids": ["test_subrepo_is_constructed_properly"], "tokens": 365}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"root_is_dvc\", [False, True])\ndef test_subrepo_is_constructed_properly(\n tmp_dir, scm, mocker, make_tmp_dir, root_is_dvc\n):\n if root_is_dvc:\n make_subrepo(tmp_dir, scm)\n\n subrepo = tmp_dir / \"subrepo\"\n make_subrepo(subrepo, scm)\n local_cache = subrepo.dvc.cache.local.cache_dir\n\n tmp_dir.scm_gen(\"bar\", \"bar\", commit=\"add bar\")\n subrepo.dvc_gen(\"foo\", \"foo\", commit=\"add foo\")\n\n cache_dir = make_tmp_dir(\"temp-cache\")\n with external_repo(\n str(tmp_dir), cache_dir=str(cache_dir), cache_types=[\"symlink\"]\n ) as repo:\n spy = mocker.spy(repo, \"make_repo\")\n\n list(repo.repo_tree.walk(repo.root_dir)) # drain\n assert spy.call_count == 1\n subrepo = spy.return_value\n\n assert repo.url == str(tmp_dir)\n assert repo._cache_config[\"cache\"][\"dir\"] == str(cache_dir)\n assert repo.cache.local.cache_dir == str(cache_dir)\n assert subrepo.cache.local.cache_dir == str(cache_dir)\n\n assert repo._cache_config[\"cache\"][\"type\"] == [\"symlink\"]\n assert repo.cache.local.cache_types == [\"symlink\"]\n assert subrepo.cache.local.cache_types == [\"symlink\"]\n\n assert (\n subrepo.config[\"remote\"][\"auto-generated-upstream\"][\"url\"]\n == local_cache\n )\n if root_is_dvc:\n main_cache = tmp_dir.dvc.cache.local.cache_dir\n assert repo.config[\"remote\"][\"auto-generated-upstream\"][\n \"url\"\n ] == str(main_cache)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_external_repo.py_test_fetch_external_repo_jobs_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_external_repo.py_test_fetch_external_repo_jobs_", "embedding": null, "metadata": {"file_path": "tests/unit/test_external_repo.py", "file_name": "test_external_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 82, "end_line": 102, "span_ids": ["test_fetch_external_repo_jobs"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_fetch_external_repo_jobs(tmp_dir, scm, mocker, dvc, local_remote):\n tmp_dir.dvc_gen(\n {\n \"dir1\": {\n \"file1\": \"file1\",\n \"file2\": \"file2\",\n \"file3\": \"file3\",\n \"file4\": \"file4\",\n },\n },\n commit=\"init\",\n )\n\n dvc.push()\n\n with external_repo(str(tmp_dir)) as repo:\n spy = mocker.spy(repo.cloud, \"pull\")\n repo.fetch_external([\"dir1\"], jobs=3)\n run_jobs = tuple(spy.call_args_list[0])[1].get(\"jobs\")\n assert run_jobs == 3", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_interpolate.py_from_math_import_inf_pi_test_resolve_primitive_values.assert_context_resolve_te": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_interpolate.py_from_math_import_inf_pi_test_resolve_primitive_values.assert_context_resolve_te", "embedding": null, "metadata": {"file_path": "tests/unit/test_interpolate.py", "file_name": "test_interpolate.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 22, "span_ids": ["imports", "test_resolve_primitive_values"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from math import inf, pi\n\nimport pytest\n\nfrom dvc.parsing.context import Context, recurse_not_a_node\n\n\n@pytest.mark.parametrize(\n \"template, var\",\n [\n (\"${value}\", \"value\"),\n (\"${{item}}\", \"item\"),\n (\"${ item }\", \"item\"),\n (\"${{ value }}\", \"value\"),\n ],\n)\n@pytest.mark.parametrize(\n \"data\", [True, 12, pi, None, False, 0, \"0\", \"123\", \"Foobar\", \"\", inf, 3e4]\n)\ndef test_resolve_primitive_values(data, template, var):\n context = Context({var: data})\n assert context.resolve(template) == data", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_interpolate.py_test_escape_test_escape.assert_context_resolve_te": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_interpolate.py_test_escape_test_escape.assert_context_resolve_te", "embedding": null, "metadata": {"file_path": "tests/unit/test_interpolate.py", "file_name": "test_interpolate.py", "file_type": "text/x-python", "category": "test", "start_line": 25, "end_line": 44, "span_ids": ["test_escape"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"template, expected\",\n [\n (r\"\\${value}\", \"${value}\"),\n (r\"\\${{value}}\", \"${{value}}\"),\n (r\"\\${ value }\", \"${ value }\"),\n (r\"\\${{ value }}\", \"${{ value }}\"),\n (r\"\\${{ value }} days\", \"${{ value }} days\"),\n (r\"\\${ value } days\", \"${ value } days\"),\n (r\"Month of \\${value}\", \"Month of ${value}\"),\n (r\"May the \\${value} be with you\", \"May the ${value} be with you\"),\n (\n r\"Great shot kid, that was \\${value} in a ${value}\",\n \"Great shot kid, that was ${value} in a value\",\n ),\n ],\n)\ndef test_escape(template, expected, mocker):\n context = Context({\"value\": \"value\"})\n assert context.resolve(template) == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_interpolate.py_test_resolve_str_test_resolve_primitives_dict_access.assert_context_resolve_N": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_interpolate.py_test_resolve_str_test_resolve_primitives_dict_access.assert_context_resolve_N", "embedding": null, "metadata": {"file_path": "tests/unit/test_interpolate.py", "file_name": "test_interpolate.py", "file_type": "text/x-python", "category": "test", "start_line": 47, "end_line": 69, "span_ids": ["test_resolve_str", "test_resolve_primitives_dict_access"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_resolve_str():\n template = \"My name is ${last}, ${first} ${last}\"\n expected = \"My name is Bond, James Bond\"\n context = Context({\"first\": \"James\", \"last\": \"Bond\"})\n assert context.resolve(template) == expected\n\n\ndef test_resolve_primitives_dict_access():\n data = {\n \"dict\": {\n \"num\": 5,\n \"string\": \"foo\",\n \"nested\": {\"float\": pi, \"string\": \"bar\"},\n }\n }\n context = Context(data)\n\n assert context.resolve(\"${dict.num}\") == 5\n assert context.resolve(\"${dict.string}\") == \"foo\"\n assert context.resolve(\"${dict.nested.float}\") == pi\n assert context.resolve(\"${dict.nested.string}\") == \"bar\"\n\n assert context.resolve(\"Number ${dict.num}\") == \"Number 5\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/__init__.py__Manages_cache_of_a_DVC__get_cache.return.get_cloud_cache_tree_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/__init__.py__Manages_cache_of_a_DVC__get_cache.return.get_cloud_cache_tree_", "embedding": null, "metadata": {"file_path": "dvc/cache/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 28, "span_ids": ["_get_cache", "get_cloud_cache", "docstring"], "tokens": 134}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Manages cache of a DVC repo.\"\"\"\nfrom collections import defaultdict\n\nfrom ..scheme import Schemes\n\n\ndef get_cloud_cache(tree):\n from .base import CloudCache\n from .local import LocalCache\n from .ssh import SSHCache\n\n if tree.scheme == Schemes.LOCAL:\n return LocalCache(tree)\n\n if tree.scheme == Schemes.SSH:\n return SSHCache(tree)\n\n return CloudCache(tree)\n\n\ndef _get_cache(repo, settings):\n from ..tree import get_cloud_tree\n\n if not settings:\n return None\n\n tree = get_cloud_tree(repo, **settings)\n return get_cloud_cache(tree)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/__init__.py_Cache_Cache.by_scheme.yield_from_self__cache_it": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/__init__.py_Cache_Cache.by_scheme.yield_from_self__cache_it", "embedding": null, "metadata": {"file_path": "dvc/cache/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 31, "end_line": 80, "span_ids": ["Cache.__init__", "Cache.__getattr__", "Cache", "Cache.by_scheme"], "tokens": 308}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Cache:\n \"\"\"Class that manages cache locations of a DVC repo.\n\n Args:\n repo (dvc.repo.Repo): repo instance that this cache belongs to.\n \"\"\"\n\n CACHE_DIR = \"cache\"\n CLOUD_SCHEMES = [\n Schemes.S3,\n Schemes.GS,\n Schemes.SSH,\n Schemes.HDFS,\n Schemes.WEBHDFS,\n ]\n\n def __init__(self, repo):\n self.repo = repo\n self.config = config = repo.config[\"cache\"]\n self._cache = {}\n\n local = config.get(\"local\")\n\n if local:\n settings = {\"name\": local}\n elif \"dir\" not in config:\n settings = None\n else:\n from ..config import LOCAL_COMMON\n\n settings = {\"url\": config[\"dir\"]}\n for opt in LOCAL_COMMON.keys():\n if opt in config:\n settings[str(opt)] = config.get(opt)\n\n self._cache[Schemes.LOCAL] = _get_cache(repo, settings)\n\n for scheme in self.CLOUD_SCHEMES:\n remote = self.config.get(scheme)\n settings = {\"name\": remote} if remote else None\n self._cache[scheme] = _get_cache(repo, settings)\n\n def __getattr__(self, name):\n try:\n return self._cache[name]\n except KeyError as exc:\n raise AttributeError from exc\n\n def by_scheme(self):\n yield from self._cache.items()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_itertools_use_state.with_tree_state_.return.call_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_itertools_use_state.with_tree_state_.return.call_", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 40, "span_ids": ["imports", "DirCacheError.__init__", "DirCacheError", "use_state"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import itertools\nimport json\nimport logging\nfrom concurrent.futures import ThreadPoolExecutor\nfrom copy import copy\nfrom typing import Optional\n\nfrom funcy import decorator\nfrom shortuuid import uuid\n\nimport dvc.prompt as prompt\nfrom dvc.dir_info import DirInfo\nfrom dvc.exceptions import (\n CacheLinkError,\n CheckoutError,\n ConfirmRemoveError,\n DvcException,\n)\nfrom dvc.progress import Tqdm\nfrom dvc.remote.slow_link_detection import ( # type: ignore[attr-defined]\n slow_link_guard,\n)\n\nfrom ..tree.base import RemoteActionNotImplemented\n\nlogger = logging.getLogger(__name__)\n\n\nclass DirCacheError(DvcException):\n def __init__(self, hash_):\n super().__init__(\n f\"Failed to load dir cache for hash value: '{hash_}'.\"\n )\n\n\n@decorator\ndef use_state(call):\n tree = call._args[0].tree # pylint: disable=protected-access\n with tree.state:\n return call()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.load_dir_cache_CloudCache.load_dir_cache.return.DirInfo_from_list_d_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.load_dir_cache_CloudCache.load_dir_cache.return.DirInfo_from_list_d_", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 74, "end_line": 90, "span_ids": ["CloudCache.load_dir_cache"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n def load_dir_cache(self, hash_info):\n path_info = self.tree.hash_to_path_info(hash_info.value)\n\n try:\n with self.tree.open(path_info, \"r\") as fobj:\n d = json.load(fobj)\n except (ValueError, FileNotFoundError) as exc:\n raise DirCacheError(hash_info) from exc\n\n if not isinstance(d, list):\n logger.error(\n \"dir cache file format error '%s' [skipping the file]\",\n path_info,\n )\n d = []\n\n return DirInfo.from_list(d)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._changed_dir_cache_CloudCache.safe_remove.self_tree_remove_path_inf": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._changed_dir_cache_CloudCache.safe_remove.self_tree_remove_path_inf", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 377, "end_line": 420, "span_ids": ["CloudCache.changed_cache", "CloudCache._changed_dir_cache", "CloudCache.safe_remove", "CloudCache.already_cached"], "tokens": 286}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n def _changed_dir_cache(self, hash_info, path_info=None, filter_info=None):\n if self.changed_cache_file(hash_info):\n return True\n\n dir_info = self.get_dir_cache(hash_info)\n for entry_info, entry_hash in dir_info.items(path_info):\n if path_info and filter_info:\n if not entry_info.isin_or_eq(filter_info):\n continue\n\n if self.changed_cache_file(entry_hash):\n return True\n\n return False\n\n def changed_cache(self, hash_info, path_info=None, filter_info=None):\n if hash_info.isdir:\n return self._changed_dir_cache(\n hash_info, path_info=path_info, filter_info=filter_info\n )\n return self.changed_cache_file(hash_info)\n\n def already_cached(self, path_info):\n current = self.tree.get_hash(path_info)\n\n if not current:\n return False\n\n return not self.changed_cache(current)\n\n def safe_remove(self, path_info, force=False):\n if not self.tree.exists(path_info):\n return\n\n if not force and not self.already_cached(path_info):\n msg = (\n \"file '{}' is going to be removed.\"\n \" Are you sure you want to proceed?\".format(str(path_info))\n )\n\n if not prompt.confirm(msg):\n raise ConfirmRemoveError(str(path_info))\n\n self.tree.remove(path_info)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._checkout_CloudCache.set_dir_info.hash_info.nfiles.hash_info_dir_info_nfiles": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._checkout_CloudCache.set_dir_info.hash_info.nfiles.hash_info_dir_info_nfiles", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 564, "end_line": 640, "span_ids": ["CloudCache.get_hash", "CloudCache.set_dir_info", "CloudCache._get_dir_size", "CloudCache.merge", "CloudCache.get_files_number", "CloudCache._checkout"], "tokens": 482}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n def _checkout(\n self,\n path_info,\n hash_info,\n force=False,\n progress_callback=None,\n relink=False,\n filter_info=None,\n ):\n if not hash_info.isdir:\n return self._checkout_file(\n path_info, hash_info, force, progress_callback, relink\n )\n\n return self._checkout_dir(\n path_info, hash_info, force, progress_callback, relink, filter_info\n )\n\n def get_files_number(self, path_info, hash_info, filter_info):\n from funcy.py3 import ilen\n\n if not hash_info:\n return 0\n\n if not hash_info.isdir:\n return 1\n\n if not filter_info:\n return self.get_dir_cache(hash_info).nfiles\n\n return ilen(\n filter_info.isin_or_eq(path_info / relpath)\n for relpath, _ in self.get_dir_cache(hash_info).items()\n )\n\n def _get_dir_size(self, dir_info):\n try:\n return sum(\n self.tree.getsize(self.tree.hash_to_path_info(hi.value))\n for _, hi in dir_info.items()\n )\n except FileNotFoundError:\n return None\n\n def merge(self, ancestor_info, our_info, their_info):\n assert our_info\n assert their_info\n\n if ancestor_info:\n ancestor = self.get_dir_cache(ancestor_info)\n else:\n ancestor = DirInfo()\n\n our = self.get_dir_cache(our_info)\n their = self.get_dir_cache(their_info)\n\n merged = our.merge(ancestor, their)\n hash_info = self.save_dir_info(merged)\n hash_info.size = self._get_dir_size(merged)\n return hash_info\n\n @use_state\n def get_hash(self, tree, path_info):\n hash_info = tree.get_hash(path_info)\n if not hash_info.isdir:\n assert hash_info.name == self.tree.PARAM_CHECKSUM\n return hash_info\n\n hi = self.save_dir_info(hash_info.dir_info, hash_info)\n hi.size = hash_info.size\n return hi\n\n def set_dir_info(self, hash_info):\n assert hash_info.isdir\n\n hash_info.dir_info = self.get_dir_cache(hash_info)\n hash_info.nfiles = hash_info.dir_info.nfiles", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._list_paths_CloudCache._list_paths.if_progress_callback_.else_.yield_from_self_tree_walk": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._list_paths_CloudCache._list_paths.if_progress_callback_.else_.yield_from_self_tree_walk", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 642, "end_line": 657, "span_ids": ["CloudCache._list_paths"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n def _list_paths(self, prefix=None, progress_callback=None):\n if prefix:\n if len(prefix) > 2:\n path_info = self.tree.path_info / prefix[:2] / prefix[2:]\n else:\n path_info = self.tree.path_info / prefix[:2]\n prefix = True\n else:\n path_info = self.tree.path_info\n prefix = False\n if progress_callback:\n for file_info in self.tree.walk_files(path_info, prefix=prefix):\n progress_callback()\n yield file_info.path\n else:\n yield from self.tree.walk_files(path_info, prefix=prefix)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._path_to_hash_CloudCache._max_estimation_size.return.max_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._path_to_hash_CloudCache._max_estimation_size.return.max_", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 659, "end_line": 700, "span_ids": ["CloudCache._path_to_hash", "CloudCache._max_estimation_size", "CloudCache.list_hashes", "CloudCache._hashes_with_limit"], "tokens": 317}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n def _path_to_hash(self, path):\n parts = self.tree.PATH_CLS(path).parts[-2:]\n\n if not (len(parts) == 2 and parts[0] and len(parts[0]) == 2):\n raise ValueError(f\"Bad cache file path '{path}'\")\n\n return \"\".join(parts)\n\n def list_hashes(self, prefix=None, progress_callback=None):\n \"\"\"Iterate over hashes in this tree.\n\n If `prefix` is specified, only hashes which begin with `prefix`\n will be returned.\n \"\"\"\n for path in self._list_paths(prefix, progress_callback):\n try:\n yield self._path_to_hash(path)\n except ValueError:\n logger.debug(\n \"'%s' doesn't look like a cache file, skipping\", path\n )\n\n def _hashes_with_limit(self, limit, prefix=None, progress_callback=None):\n count = 0\n for hash_ in self.list_hashes(prefix, progress_callback):\n yield hash_\n count += 1\n if count > limit:\n logger.debug(\n \"`list_hashes()` returned max '{}' hashes, \"\n \"skipping remaining results\".format(limit)\n )\n return\n\n def _max_estimation_size(self, hashes):\n # Max remote size allowed for us to use traverse method\n return max(\n self.tree.TRAVERSE_THRESHOLD_SIZE,\n len(hashes)\n / self.tree.TRAVERSE_WEIGHT_MULTIPLIER\n * self.tree.LIST_OBJECT_PAGE_SIZE,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._estimate_remote_size_CloudCache._estimate_remote_size.return.remote_size_remote_hashe": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._estimate_remote_size_CloudCache._estimate_remote_size.return.remote_size_remote_hashe", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 702, "end_line": 735, "span_ids": ["CloudCache._estimate_remote_size"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n def _estimate_remote_size(self, hashes=None, name=None):\n \"\"\"Estimate tree size based on number of entries beginning with\n \"00...\" prefix.\n \"\"\"\n prefix = \"0\" * self.tree.TRAVERSE_PREFIX_LEN\n total_prefixes = pow(16, self.tree.TRAVERSE_PREFIX_LEN)\n if hashes:\n max_hashes = self._max_estimation_size(hashes)\n else:\n max_hashes = None\n\n with Tqdm(\n desc=\"Estimating size of \"\n + (f\"cache in '{name}'\" if name else \"remote cache\"),\n unit=\"file\",\n ) as pbar:\n\n def update(n=1):\n pbar.update(n * total_prefixes)\n\n if max_hashes:\n hashes = self._hashes_with_limit(\n max_hashes / total_prefixes, prefix, update\n )\n else:\n hashes = self.list_hashes(prefix, update)\n\n remote_hashes = set(hashes)\n if remote_hashes:\n remote_size = total_prefixes * len(remote_hashes)\n else:\n remote_size = total_prefixes\n logger.debug(f\"Estimated remote size: {remote_size} files\")\n return remote_size, remote_hashes", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.list_hashes_traverse_CloudCache.list_hashes_traverse.with_Tqdm_.with_ThreadPoolExecutor_.yield_from_itertools_chai": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.list_hashes_traverse_CloudCache.list_hashes_traverse.with_Tqdm_.with_ThreadPoolExecutor_.yield_from_itertools_chai", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 737, "end_line": 794, "span_ids": ["CloudCache.list_hashes_traverse"], "tokens": 522}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n def list_hashes_traverse(\n self, remote_size, remote_hashes, jobs=None, name=None\n ):\n \"\"\"Iterate over all hashes found in this tree.\n Hashes are fetched in parallel according to prefix, except in\n cases where the remote size is very small.\n\n All hashes from the remote (including any from the size\n estimation step passed via the `remote_hashes` argument) will be\n returned.\n\n NOTE: For large remotes the list of hashes will be very\n big(e.g. 100M entries, md5 for each is 32 bytes, so ~3200Mb list)\n and we don't really need all of it at the same time, so it makes\n sense to use a generator to gradually iterate over it, without\n keeping all of it in memory.\n \"\"\"\n num_pages = remote_size / self.tree.LIST_OBJECT_PAGE_SIZE\n if num_pages < 256 / self.tree.JOBS:\n # Fetching prefixes in parallel requires at least 255 more\n # requests, for small enough remotes it will be faster to fetch\n # entire cache without splitting it into prefixes.\n #\n # NOTE: this ends up re-fetching hashes that were already\n # fetched during remote size estimation\n traverse_prefixes = [None]\n initial = 0\n else:\n yield from remote_hashes\n initial = len(remote_hashes)\n traverse_prefixes = [f\"{i:02x}\" for i in range(1, 256)]\n if self.tree.TRAVERSE_PREFIX_LEN > 2:\n traverse_prefixes += [\n \"{0:0{1}x}\".format(i, self.tree.TRAVERSE_PREFIX_LEN)\n for i in range(\n 1, pow(16, self.tree.TRAVERSE_PREFIX_LEN - 2)\n )\n ]\n with Tqdm(\n desc=\"Querying \"\n + (f\"cache in '{name}'\" if name else \"remote cache\"),\n total=remote_size,\n initial=initial,\n unit=\"file\",\n ) as pbar:\n\n def list_with_update(prefix):\n return list(\n self.list_hashes(\n prefix=prefix, progress_callback=pbar.update\n )\n )\n\n with ThreadPoolExecutor(\n max_workers=jobs or self.tree.JOBS\n ) as executor:\n in_remote = executor.map(list_with_update, traverse_prefixes,)\n yield from itertools.chain.from_iterable(in_remote)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.all_CloudCache.all.return.self_list_hashes_traverse": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.all_CloudCache.all.return.self_list_hashes_traverse", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 796, "end_line": 814, "span_ids": ["CloudCache.all"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n def all(self, jobs=None, name=None):\n \"\"\"Iterate over all hashes in this tree.\n\n Hashes will be fetched in parallel threads according to prefix\n (except for small remotes) and a progress bar will be displayed.\n \"\"\"\n logger.debug(\n \"Fetching all hashes from '{}'\".format(\n name if name else \"remote cache\"\n )\n )\n\n if not self.tree.CAN_TRAVERSE:\n return self.list_hashes()\n\n remote_size, remote_hashes = self._estimate_remote_size(name=name)\n return self.list_hashes_traverse(\n remote_size, remote_hashes, jobs, name\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._remove_unpacked_dir_CloudCache.gc.return.removed": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache._remove_unpacked_dir_CloudCache.gc.return.removed", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 816, "end_line": 837, "span_ids": ["CloudCache._remove_unpacked_dir", "CloudCache.gc"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n def _remove_unpacked_dir(self, hash_):\n pass\n\n def gc(self, used, jobs=None):\n removed = False\n # hashes must be sorted to ensure we always remove .dir files first\n for hash_ in sorted(\n self.all(jobs, str(self.tree.path_info)),\n key=self.tree.is_dir_hash,\n reverse=True,\n ):\n if hash_ in used:\n continue\n path_info = self.tree.hash_to_path_info(hash_)\n if self.tree.is_dir_hash(hash_):\n # backward compatibility\n # pylint: disable=protected-access\n self._remove_unpacked_dir(hash_)\n self.tree.remove(path_info)\n removed = True\n\n return removed", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.list_hashes_exists_CloudCache.list_hashes_exists.with_Tqdm_.with_ThreadPoolExecutor_.return.ret": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.list_hashes_exists_CloudCache.list_hashes_exists.with_Tqdm_.with_ThreadPoolExecutor_.return.ret", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 839, "end_line": 864, "span_ids": ["CloudCache.list_hashes_exists"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n def list_hashes_exists(self, hashes, jobs=None, name=None):\n \"\"\"Return list of the specified hashes which exist in this tree.\n Hashes will be queried individually.\n \"\"\"\n logger.debug(\n \"Querying {} hashes via object_exists\".format(len(hashes))\n )\n with Tqdm(\n desc=\"Querying \"\n + (\"cache in \" + name if name else \"remote cache\"),\n total=len(hashes),\n unit=\"file\",\n ) as pbar:\n\n def exists_with_progress(path_info):\n ret = self.tree.exists(path_info)\n pbar.update_msg(str(path_info))\n return ret\n\n with ThreadPoolExecutor(\n max_workers=jobs or self.tree.JOBS\n ) as executor:\n path_infos = map(self.tree.hash_to_path_info, hashes)\n in_remote = executor.map(exists_with_progress, path_infos)\n ret = list(itertools.compress(hashes, in_remote))\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.hashes_exist_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/base.py_CloudCache.hashes_exist_", "embedding": null, "metadata": {"file_path": "dvc/cache/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 866, "end_line": 938, "span_ids": ["CloudCache.hashes_exist"], "tokens": 716}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CloudCache:\n\n def hashes_exist(self, hashes, jobs=None, name=None):\n \"\"\"Check if the given hashes are stored in the remote.\n\n There are two ways of performing this check:\n\n - Traverse method: Get a list of all the files in the remote\n (traversing the cache directory) and compare it with\n the given hashes. Cache entries will be retrieved in parallel\n threads according to prefix (i.e. entries starting with, \"00...\",\n \"01...\", and so on) and a progress bar will be displayed.\n\n - Exists method: For each given hash, run the `exists`\n method and filter the hashes that aren't on the remote.\n This is done in parallel threads.\n It also shows a progress bar when performing the check.\n\n The reason for such an odd logic is that most of the remotes\n take much shorter time to just retrieve everything they have under\n a certain prefix (e.g. s3, gs, ssh, hdfs). Other remotes that can\n check if particular file exists much quicker, use their own\n implementation of hashes_exist (see ssh, local).\n\n Which method to use will be automatically determined after estimating\n the size of the remote cache, and comparing the estimated size with\n len(hashes). To estimate the size of the remote cache, we fetch\n a small subset of cache entries (i.e. entries starting with \"00...\").\n Based on the number of entries in that subset, the size of the full\n cache can be estimated, since the cache is evenly distributed according\n to hash.\n\n Returns:\n A list with hashes that were found in the remote\n \"\"\"\n # Remotes which do not use traverse prefix should override\n # hashes_exist() (see ssh, local)\n assert self.tree.TRAVERSE_PREFIX_LEN >= 2\n\n hashes = set(hashes)\n if len(hashes) == 1 or not self.tree.CAN_TRAVERSE:\n remote_hashes = self.list_hashes_exists(hashes, jobs, name)\n return remote_hashes\n\n # Max remote size allowed for us to use traverse method\n remote_size, remote_hashes = self._estimate_remote_size(hashes, name)\n\n traverse_pages = remote_size / self.tree.LIST_OBJECT_PAGE_SIZE\n # For sufficiently large remotes, traverse must be weighted to account\n # for performance overhead from large lists/sets.\n # From testing with S3, for remotes with 1M+ files, object_exists is\n # faster until len(hashes) is at least 10k~100k\n if remote_size > self.tree.TRAVERSE_THRESHOLD_SIZE:\n traverse_weight = (\n traverse_pages * self.tree.TRAVERSE_WEIGHT_MULTIPLIER\n )\n else:\n traverse_weight = traverse_pages\n if len(hashes) < traverse_weight:\n logger.debug(\n \"Large remote ('{}' hashes < '{}' traverse weight), \"\n \"using object_exists for remaining hashes\".format(\n len(hashes), traverse_weight\n )\n )\n return list(hashes & remote_hashes) + self.list_hashes_exists(\n hashes - remote_hashes, jobs, name\n )\n\n logger.debug(\"Querying '{}' hashes via traverse\".format(len(hashes)))\n remote_hashes = set(\n self.list_hashes_traverse(remote_size, remote_hashes, jobs, name)\n )\n return list(hashes & set(remote_hashes))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/local.py_logging_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/local.py_logging_", "embedding": null, "metadata": {"file_path": "dvc/cache/local.py", "file_name": "local.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 92, "span_ids": ["LocalCache.cache_dir", "LocalCache.already_cached", "LocalCache._remove_unpacked_dir", "LocalCache.__init__", "LocalCache._verify_link", "imports", "LocalCache", "LocalCache.hash_to_path", "LocalCache.cache_path", "LocalCache.hashes_exist", "LocalCache._list_paths", "LocalCache.cache_dir_1"], "tokens": 638}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\n\nfrom funcy import cached_property\n\nfrom dvc.hash_info import HashInfo\nfrom dvc.path_info import PathInfo\nfrom dvc.progress import Tqdm\n\nfrom ..tree.local import LocalTree\nfrom ..utils.fs import walk_files\nfrom .base import CloudCache\n\nlogger = logging.getLogger(__name__)\n\n\nclass LocalCache(CloudCache):\n DEFAULT_CACHE_TYPES = [\"reflink\", \"copy\"]\n CACHE_MODE = LocalTree.CACHE_MODE\n UNPACKED_DIR_SUFFIX = \".unpacked\"\n\n def __init__(self, tree):\n super().__init__(tree)\n self.cache_dir = tree.config.get(\"url\")\n\n @property\n def cache_dir(self):\n return self.tree.path_info.fspath if self.tree.path_info else None\n\n @cache_dir.setter\n def cache_dir(self, value):\n self.tree.path_info = PathInfo(value) if value else None\n\n @cached_property\n def cache_path(self):\n return os.path.abspath(self.cache_dir)\n\n def hash_to_path(self, hash_):\n # NOTE: `self.cache_path` is already normalized so we can simply use\n # `os.sep` instead of `os.path.join`. This results in this helper\n # being ~5.5 times faster.\n return f\"{self.cache_path}{os.sep}{hash_[0:2]}{os.sep}{hash_[2:]}\"\n\n def hashes_exist(\n self, hashes, jobs=None, name=None\n ): # pylint: disable=unused-argument\n return [\n hash_\n for hash_ in Tqdm(\n hashes,\n unit=\"file\",\n desc=\"Querying \"\n + (\"cache in \" + name if name else \"local cache\"),\n )\n if not self.changed_cache_file(\n HashInfo(self.tree.PARAM_CHECKSUM, hash_)\n )\n ]\n\n def already_cached(self, path_info):\n assert path_info.scheme in [\"\", \"local\"]\n\n return super().already_cached(path_info)\n\n def _verify_link(self, path_info, link_type):\n if link_type == \"hardlink\" and self.tree.getsize(path_info) == 0:\n return\n\n super()._verify_link(path_info, link_type)\n\n def _list_paths(self, prefix=None, progress_callback=None):\n assert self.tree.path_info is not None\n if prefix:\n path_info = self.tree.path_info / prefix[:2]\n if not self.tree.exists(path_info):\n return\n else:\n path_info = self.tree.path_info\n # NOTE: use utils.fs walk_files since tree.walk_files will not follow\n # symlinks\n if progress_callback:\n for path in walk_files(path_info):\n progress_callback()\n yield path\n else:\n yield from walk_files(path_info)\n\n def _remove_unpacked_dir(self, hash_):\n info = self.tree.hash_to_path_info(hash_)\n path_info = info.with_name(info.name + self.UNPACKED_DIR_SUFFIX)\n self.tree.remove(path_info)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/ssh.py_errno_SSHCache.batch_exists.with_self_tree_ssh_path_i.return.results": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/ssh.py_errno_SSHCache.batch_exists.with_self_tree_ssh_path_i.return.results", "embedding": null, "metadata": {"file_path": "dvc/cache/ssh.py", "file_name": "ssh.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 42, "span_ids": ["imports", "SSHCache.batch_exists", "SSHCache"], "tokens": 252}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import errno\nimport itertools\nimport logging\nimport posixpath\nfrom concurrent.futures import ThreadPoolExecutor\n\nfrom dvc.progress import Tqdm\nfrom dvc.utils import to_chunks\n\nfrom .base import CloudCache\n\nlogger = logging.getLogger(__name__)\n\n\nclass SSHCache(CloudCache):\n def batch_exists(self, path_infos, callback):\n def _exists(chunk_and_channel):\n chunk, channel = chunk_and_channel\n ret = []\n for path in chunk:\n try:\n channel.stat(path)\n ret.append(True)\n except OSError as exc:\n if exc.errno != errno.ENOENT:\n raise\n ret.append(False)\n callback(path)\n return ret\n\n with self.tree.ssh(path_infos[0]) as ssh:\n channels = ssh.open_max_sftp_channels()\n max_workers = len(channels)\n\n with ThreadPoolExecutor(max_workers=max_workers) as executor:\n paths = [path_info.path for path_info in path_infos]\n chunks = to_chunks(paths, num_chunks=max_workers)\n chunks_and_channels = zip(chunks, channels)\n outcome = executor.map(_exists, chunks_and_channels)\n results = list(itertools.chain.from_iterable(outcome))\n\n return results", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/ssh.py_SSHCache.hashes_exist_SSHCache.hashes_exist.with_Tqdm_.with_ThreadPoolExecutor_.return.ret": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/ssh.py_SSHCache.hashes_exist_SSHCache.hashes_exist.with_Tqdm_.with_ThreadPoolExecutor_.return.ret", "embedding": null, "metadata": {"file_path": "dvc/cache/ssh.py", "file_name": "ssh.py", "file_type": "text/x-python", "category": "implementation", "start_line": 44, "end_line": 74, "span_ids": ["SSHCache.hashes_exist"], "tokens": 277}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SSHCache(CloudCache):\n\n def hashes_exist(self, hashes, jobs=None, name=None):\n \"\"\"This is older implementation used in remote/base.py\n We are reusing it in RemoteSSH, because SSH's batch_exists proved to be\n faster than current approach (relying on exists(path_info)) applied in\n remote/base.\n \"\"\"\n if not self.tree.CAN_TRAVERSE:\n return list(set(hashes) & set(self.all()))\n\n # possibly prompt for credentials before \"Querying\" progress output\n self.tree.ensure_credentials()\n\n with Tqdm(\n desc=\"Querying \"\n + (\"cache in \" + name if name else \"remote cache\"),\n total=len(hashes),\n unit=\"file\",\n ) as pbar:\n\n def exists_with_progress(chunks):\n return self.batch_exists(chunks, callback=pbar.update_msg)\n\n with ThreadPoolExecutor(\n max_workers=jobs or self.tree.JOBS\n ) as executor:\n path_infos = [self.tree.hash_to_path_info(x) for x in hashes]\n chunks = to_chunks(path_infos, num_chunks=self.tree.JOBS)\n results = executor.map(exists_with_progress, chunks)\n in_remote = itertools.chain.from_iterable(results)\n ret = list(itertools.compress(hashes, in_remote))\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/ssh.py_SSHCache._list_paths_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/cache/ssh.py_SSHCache._list_paths_", "embedding": null, "metadata": {"file_path": "dvc/cache/ssh.py", "file_name": "ssh.py", "file_type": "text/x-python", "category": "implementation", "start_line": 76, "end_line": 91, "span_ids": ["SSHCache._list_paths"], "tokens": 126}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class SSHCache(CloudCache):\n\n def _list_paths(self, prefix=None, progress_callback=None):\n if prefix:\n root = posixpath.join(self.tree.path_info.path, prefix[:2])\n else:\n root = self.tree.path_info.path\n with self.tree.ssh(self.tree.path_info) as ssh:\n if prefix and not ssh.exists(root):\n return\n # If we simply return an iterator then with above closes instantly\n if progress_callback:\n for path in ssh.walk_files(root):\n progress_callback()\n yield path\n else:\n yield from ssh.walk_files(root)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/dag.py_argparse__transform.return.nx_relabel_nodes_G__rela": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/dag.py_argparse__transform.return.nx_relabel_nodes_G__rela", "embedding": null, "metadata": {"file_path": "dvc/command/dag.py", "file_name": "dag.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 60, "span_ids": ["_show_dot", "_collect_targets", "_show_ascii", "imports", "_transform"], "tokens": 325}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\n\nfrom dvc.command.base import CmdBase, append_doc_link\nfrom dvc.stage import Stage\n\nlogger = logging.getLogger(__name__)\n\n\ndef _show_ascii(G):\n from dvc.dagascii import draw\n from dvc.repo.graph import get_pipelines\n\n pipelines = get_pipelines(G)\n\n ret = []\n for pipeline in pipelines:\n ret.append(draw(pipeline.nodes, pipeline.edges))\n\n return \"\\n\".join(ret)\n\n\ndef _show_dot(G):\n import io\n\n from networkx.drawing.nx_pydot import write_dot\n\n dot_file = io.StringIO()\n write_dot(G, dot_file)\n return dot_file.getvalue()\n\n\ndef _collect_targets(repo, target, outs):\n if not target:\n return []\n\n pairs = repo.stage.collect_granular(target)\n if not outs:\n return [stage.addressing for stage, _ in pairs]\n\n targets = []\n for stage, info in pairs:\n if not info:\n targets.extend([str(out) for out in stage.outs])\n continue\n\n for out in repo.outs_trie.itervalues(prefix=info.parts): # noqa: B301\n targets.extend(str(out))\n\n return targets\n\n\ndef _transform(repo, outs):\n import networkx as nx\n\n def _relabel(node) -> str:\n return node.addressing if isinstance(node, Stage) else str(node)\n\n G = repo.outs_graph if outs else repo.graph\n return nx.relabel_nodes(G, _relabel, copy=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/dag.py__filter__filter.return.H": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/dag.py__filter__filter.return.H", "embedding": null, "metadata": {"file_path": "dvc/command/dag.py", "file_name": "dag.py", "file_type": "text/x-python", "category": "implementation", "start_line": 63, "end_line": 84, "span_ids": ["_filter"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _filter(G, targets, full):\n import networkx as nx\n\n if not targets:\n return G\n\n H = G.copy()\n if not full:\n descendants = set()\n for target in targets:\n descendants.update(nx.descendants(G, target))\n descendants.add(target)\n H.remove_nodes_from(set(G.nodes()) - descendants)\n\n undirected = H.to_undirected()\n connected = set()\n for target in targets:\n connected.update(nx.node_connected_component(undirected, target))\n\n H.remove_nodes_from(set(H.nodes()) - connected)\n\n return H", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/dag.py__build_CmdDAG.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/dag.py__build_CmdDAG.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/dag.py", "file_name": "dag.py", "file_type": "text/x-python", "category": "implementation", "start_line": 87, "end_line": 109, "span_ids": ["CmdDAG", "CmdDAG.run", "_build"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _build(repo, target=None, full=False, outs=False):\n targets = _collect_targets(repo, target, outs)\n G = _transform(repo, outs)\n return _filter(G, targets, full)\n\n\nclass CmdDAG(CmdBase):\n def run(self):\n G = _build(\n self.repo,\n target=self.args.target,\n full=self.args.full,\n outs=self.args.outs,\n )\n\n if self.args.dot:\n logger.info(_show_dot(G))\n else:\n from dvc.utils.pager import pager\n\n pager(_show_ascii(G))\n\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_CmdExperimentsGC_CmdExperimentsGC.run.return.0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py_CmdExperimentsGC_CmdExperimentsGC.run.return.0", "embedding": null, "metadata": {"file_path": "dvc/command/experiments.py", "file_name": "experiments.py", "file_type": "text/x-python", "category": "implementation", "start_line": 468, "end_line": 515, "span_ids": ["CmdExperimentsGC.run", "CmdExperimentsGC"], "tokens": 335}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class CmdExperimentsGC(CmdRepro):\n def run(self):\n _raise_error_if_all_disabled(\n all_branches=self.args.all_branches,\n all_tags=self.args.all_tags,\n all_commits=self.args.all_commits,\n workspace=self.args.workspace,\n )\n\n msg = \"This will remove all experiments except those derived from \"\n\n msg += \"the workspace\"\n if self.args.all_commits:\n msg += \" and all git commits\"\n elif self.args.all_branches and self.args.all_tags:\n msg += \" and all git branches and tags\"\n elif self.args.all_branches:\n msg += \" and all git branches\"\n elif self.args.all_tags:\n msg += \" and all git tags\"\n msg += \" of the current repo.\"\n if self.args.queued:\n msg += \" Run queued experiments will be preserved.\"\n if self.args.queued:\n msg += \" Run queued experiments will be removed.\"\n\n logger.warning(msg)\n\n msg = \"Are you sure you want to proceed?\"\n if not self.args.force and not prompt.confirm(msg):\n return 1\n\n removed = self.repo.experiments.gc(\n all_branches=self.args.all_branches,\n all_tags=self.args.all_tags,\n all_commits=self.args.all_commits,\n workspace=self.args.workspace,\n queued=self.args.queued,\n )\n\n if removed:\n logger.info(\n f\"Removed {removed} experiments. To remove unused cache files \"\n \"use 'dvc gc'.\"\n )\n else:\n logger.info(\"No experiments to remove.\")\n return 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__add_run_common_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/experiments.py__add_run_common_", "embedding": null, "metadata": {"file_path": "dvc/command/experiments.py", "file_name": "experiments.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1065, "end_line": 1115, "span_ids": ["_add_run_common"], "tokens": 300}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _add_run_common(parser):\n \"\"\"Add common args for 'exp run' and 'exp resume'.\"\"\"\n # inherit arguments from `dvc repro`\n add_repro_arguments(parser)\n parser.add_argument(\n \"-n\",\n \"--name\",\n default=None,\n help=(\n \"Human-readable experiment name. If not specified, a name will \"\n \"be auto-generated.\"\n ),\n metavar=\"\",\n )\n parser.add_argument(\n \"--params\",\n action=\"append\",\n default=[],\n help=\"Use the specified param values when reproducing pipelines.\",\n metavar=\"[:]\",\n )\n parser.add_argument(\n \"--queue\",\n action=\"store_true\",\n default=False,\n help=\"Stage this experiment in the run queue for future execution.\",\n )\n parser.add_argument(\n \"--run-all\",\n action=\"store_true\",\n default=False,\n help=\"Execute all experiments in the run queue.\",\n )\n parser.add_argument(\n \"-j\",\n \"--jobs\",\n type=int,\n help=\"Run the specified number of experiments at a time in parallel.\",\n metavar=\"\",\n )\n parser.add_argument(\n \"--temp\",\n action=\"store_true\",\n dest=\"tmp_dir\",\n help=(\n \"Run this experiment in a separate temporary directory instead of \"\n \"your workspace. Only applies when running a single experiment \"\n \"without --queue.\"\n ),\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_Config._load_paths_Config._load_paths.return.Config__map_dirs_conf_re": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_Config._load_paths_Config._load_paths.return.Config__map_dirs_conf_re", "embedding": null, "metadata": {"file_path": "dvc/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 382, "end_line": 397, "span_ids": ["Config._load_paths"], "tokens": 122}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Config(dict):\n\n @staticmethod\n def _load_paths(conf, filename):\n abs_conf_dir = os.path.abspath(os.path.dirname(filename))\n\n def resolve(path):\n if os.path.isabs(path) or re.match(r\"\\w+://\", path):\n return path\n\n # on windows convert slashes to backslashes\n # to have path compatible with abs_conf_dir\n if os.path.sep == \"\\\\\" and \"/\" in path:\n path = path.replace(\"/\", \"\\\\\")\n\n return RelPath(os.path.join(abs_conf_dir, path))\n\n return Config._map_dirs(conf, resolve)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_Config._to_relpath_Config._save_paths.return.Config__map_dirs_conf_re": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/config.py_Config._to_relpath_Config._save_paths.return.Config__map_dirs_conf_re", "embedding": null, "metadata": {"file_path": "dvc/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 399, "end_line": 414, "span_ids": ["Config._to_relpath", "Config._save_paths"], "tokens": 116}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Config(dict):\n\n @staticmethod\n def _to_relpath(conf_dir, path):\n if re.match(r\"\\w+://\", path):\n return path\n\n if isinstance(path, RelPath) or not os.path.isabs(path):\n path = relpath(path, conf_dir)\n\n return PathInfo(path).as_posix()\n\n @staticmethod\n def _save_paths(conf, filename):\n conf_dir = os.path.dirname(filename)\n rel = partial(Config._to_relpath, conf_dir)\n\n return Config._map_dirs(conf, rel)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/data_cloud.py_DataCloud._init_remote_DataCloud.push.return.remote_push_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/data_cloud.py_DataCloud._init_remote_DataCloud.push.return.remote_push_", "embedding": null, "metadata": {"file_path": "dvc/data_cloud.py", "file_name": "data_cloud.py", "file_type": "text/x-python", "category": "implementation", "start_line": 47, "end_line": 70, "span_ids": ["DataCloud.push", "DataCloud._init_remote"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DataCloud:\n\n def _init_remote(self, name):\n return get_remote(self.repo, name=name)\n\n def push(\n self, cache, jobs=None, remote=None, show_checksums=False,\n ):\n \"\"\"Push data items in a cloud-agnostic way.\n\n Args:\n cache (NamedCache): named checksums to push to the cloud.\n jobs (int): number of jobs that can be running simultaneously.\n remote (dvc.remote.base.BaseRemote): optional remote to push to.\n By default remote from core.remote config option is used.\n show_checksums (bool): show checksums instead of file names in\n information messages.\n \"\"\"\n remote = self.get_remote(remote, \"push\")\n\n return remote.push(\n self.repo.cache.local,\n cache,\n jobs=jobs,\n show_checksums=show_checksums,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/data_cloud.py_DataCloud.pull_DataCloud.pull.return.remote_pull_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/data_cloud.py_DataCloud.pull_DataCloud.pull.return.remote_pull_", "embedding": null, "metadata": {"file_path": "dvc/data_cloud.py", "file_name": "data_cloud.py", "file_type": "text/x-python", "category": "implementation", "start_line": 72, "end_line": 92, "span_ids": ["DataCloud.pull"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DataCloud:\n\n def pull(\n self, cache, jobs=None, remote=None, show_checksums=False,\n ):\n \"\"\"Pull data items in a cloud-agnostic way.\n\n Args:\n cache (NamedCache): named checksums to pull from the cloud.\n jobs (int): number of jobs that can be running simultaneously.\n remote (dvc.remote.base.BaseRemote): optional remote to pull from.\n By default remote from core.remote config option is used.\n show_checksums (bool): show checksums instead of file names in\n information messages.\n \"\"\"\n remote = self.get_remote(remote, \"pull\")\n\n return remote.pull(\n self.repo.cache.local,\n cache,\n jobs=jobs,\n show_checksums=show_checksums,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/base.py_from_typing_import_Type_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/base.py_from_typing_import_Type_", "embedding": null, "metadata": {"file_path": "dvc/dependency/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 34, "span_ids": ["DependencyDoesNotExistError", "DependencyDoesNotExistError.__init__", "DependencyIsNotFileOrDirError", "imports", "DependencyIsStageFileError.__init__", "BaseDependency.update", "BaseDependency", "DependencyIsStageFileError", "DependencyIsNotFileOrDirError.__init__"], "tokens": 220}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from typing import Type\n\nfrom dvc.exceptions import DvcException\n\n\nclass DependencyDoesNotExistError(DvcException):\n def __init__(self, path):\n msg = f\"dependency '{path}' does not exist\"\n super().__init__(msg)\n\n\nclass DependencyIsNotFileOrDirError(DvcException):\n def __init__(self, path):\n msg = f\"dependency '{path}' is not a file or directory\"\n super().__init__(msg)\n\n\nclass DependencyIsStageFileError(DvcException):\n def __init__(self, path):\n super().__init__(f\"Stage file '{path}' cannot be a dependency.\")\n\n\nclass BaseDependency:\n IS_DEPENDENCY = True\n\n DoesNotExistError = DependencyDoesNotExistError # type: Type[DvcException]\n IsNotFileOrDirError = (\n DependencyIsNotFileOrDirError\n ) # type: Type[DvcException]\n IsStageFileError = DependencyIsStageFileError # type: Type[DvcException]\n\n def update(self, rev=None):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/webhdfs.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dependency/webhdfs.py__", "embedding": null, "metadata": {"file_path": "dvc/dependency/webhdfs.py", "file_name": "webhdfs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 7, "span_ids": ["WebHDFSDependency", "imports"], "tokens": 39}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.dependency.base import BaseDependency\nfrom dvc.output.webhdfs import WebHDFSOutput\n\n\nclass WebHDFSDependency(BaseDependency, WebHDFSOutput):\n pass", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dir_info.py_posixpath__merge.return.patch_our_diff_their_di": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dir_info.py_posixpath__merge.return.patch_our_diff_their_di", "embedding": null, "metadata": {"file_path": "dvc/dir_info.py", "file_name": "dir_info.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 44, "span_ids": ["_merge", "imports", "_diff"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import posixpath\nfrom operator import itemgetter\n\nfrom pygtrie import Trie\n\nfrom .hash_info import HashInfo\n\n\ndef _diff(ancestor, other, allow_removed=False):\n from dictdiffer import diff\n\n from dvc.exceptions import MergeError\n\n allowed = [\"add\"]\n if allow_removed:\n allowed.append(\"remove\")\n\n result = list(diff(ancestor, other))\n for typ, _, _ in result:\n if typ not in allowed:\n raise MergeError(\n \"unable to auto-merge directories with diff that contains \"\n f\"'{typ}'ed files\"\n )\n return result\n\n\ndef _merge(ancestor, our, their):\n import copy\n\n from dictdiffer import patch\n\n our_diff = _diff(ancestor, our)\n if not our_diff:\n return copy.deepcopy(their)\n\n their_diff = _diff(ancestor, their)\n if not their_diff:\n return copy.deepcopy(our)\n\n # make sure there are no conflicting files\n _diff(our, their, allow_removed=True)\n\n return patch(our_diff + their_diff, ancestor)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dir_info.py_DirInfo_DirInfo.from_list.return.ret": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dir_info.py_DirInfo_DirInfo.from_list.return.ret", "embedding": null, "metadata": {"file_path": "dvc/dir_info.py", "file_name": "dir_info.py", "file_type": "text/x-python", "category": "implementation", "start_line": 47, "end_line": 82, "span_ids": ["DirInfo", "DirInfo.size", "DirInfo.nfiles", "DirInfo.from_list", "DirInfo.items", "DirInfo.__init__"], "tokens": 227}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DirInfo:\n PARAM_RELPATH = \"relpath\"\n\n def __init__(self):\n self.trie = Trie()\n\n @property\n def size(self):\n try:\n return sum(\n hash_info.size\n for _, hash_info in self.trie.iteritems() # noqa: B301\n )\n except TypeError:\n return None\n\n @property\n def nfiles(self):\n return len(self.trie)\n\n def items(self, path_info=None):\n for key, hash_info in self.trie.iteritems(): # noqa: B301\n path = posixpath.sep.join(key)\n if path_info is not None:\n path = path_info / path\n yield path, hash_info\n\n @classmethod\n def from_list(cls, lst):\n ret = DirInfo()\n for _entry in lst:\n entry = _entry.copy()\n relpath = entry.pop(cls.PARAM_RELPATH)\n parts = tuple(relpath.split(posixpath.sep))\n ret.trie[parts] = HashInfo.from_dict(entry)\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dir_info.py_DirInfo.to_list_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dir_info.py_DirInfo.to_list_", "embedding": null, "metadata": {"file_path": "dvc/dir_info.py", "file_name": "dir_info.py", "file_type": "text/x-python", "category": "implementation", "start_line": 84, "end_line": 103, "span_ids": ["DirInfo.to_list", "DirInfo.merge"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DirInfo:\n\n def to_list(self):\n # Sorting the list by path to ensure reproducibility\n return sorted(\n (\n {\n # NOTE: not using hash_info.to_dict() because we don't want\n # size/nfiles fields at this point.\n hash_info.name: hash_info.value,\n self.PARAM_RELPATH: posixpath.sep.join(parts),\n }\n for parts, hash_info in self.trie.iteritems() # noqa: B301\n ),\n key=itemgetter(self.PARAM_RELPATH),\n )\n\n def merge(self, ancestor, their):\n merged = DirInfo()\n merged.trie = _merge(ancestor.trie, self.trie, their.trie)\n return merged", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_PipelineFile_PipelineFile._check_if_parametrized.if_stage_raw_data_paramet.raise_ParametrizedDumpErr": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_PipelineFile_PipelineFile._check_if_parametrized.if_stage_raw_data_paramet.raise_ParametrizedDumpErr", "embedding": null, "metadata": {"file_path": "dvc/dvcfile.py", "file_name": "dvcfile.py", "file_type": "text/x-python", "category": "implementation", "start_line": 176, "end_line": 207, "span_ids": ["PipelineFile._check_if_parametrized", "PipelineFile._dump_lockfile", "PipelineFile._lockfile", "PipelineFile", "PipelineFile.dump"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PipelineFile(FileMixin):\n \"\"\"Abstraction for pipelines file, .yaml + .lock combined.\"\"\"\n\n from dvc.schema import COMPILED_MULTI_STAGE_SCHEMA as SCHEMA\n\n @property\n def _lockfile(self):\n return Lockfile(self.repo, os.path.splitext(self.path)[0] + \".lock\")\n\n def dump(\n self, stage, update_pipeline=True, update_lock=True, **kwargs\n ): # pylint: disable=arguments-differ\n \"\"\"Dumps given stage appropriately in the dvcfile.\"\"\"\n from dvc.stage import PipelineStage\n\n assert isinstance(stage, PipelineStage)\n if self.verify:\n check_dvc_filename(self.path)\n\n if update_pipeline and not stage.is_data_source:\n self._dump_pipeline_file(stage)\n\n if update_lock:\n self._dump_lockfile(stage)\n\n def _dump_lockfile(self, stage):\n self._lockfile.dump(stage)\n\n @staticmethod\n def _check_if_parametrized(stage):\n if stage.raw_data.parametrized:\n raise ParametrizedDumpError(f\"cannot dump a parametrized {stage}\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_PipelineFile.stage_PipelineFile.merge.raise_NotImplementedError": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/dvcfile.py_PipelineFile.stage_PipelineFile.merge.raise_NotImplementedError", "embedding": null, "metadata": {"file_path": "dvc/dvcfile.py", "file_name": "dvcfile.py", "file_type": "text/x-python", "category": "implementation", "start_line": 234, "end_line": 275, "span_ids": ["PipelineFile.stage", "PipelineFile.stages", "PipelineFile.remove_stage", "PipelineFile.merge", "PipelineFile.remove"], "tokens": 254}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class PipelineFile(FileMixin):\n\n @property\n def stage(self):\n raise DvcException(\n \"PipelineFile has multiple stages. Please specify it's name.\"\n )\n\n @property\n def stages(self):\n data, _ = self._load()\n lockfile_data = self._lockfile.load()\n return StageLoader(self, data, lockfile_data)\n\n def remove(self, force=False):\n if not force:\n logger.warning(\"Cannot remove pipeline file.\")\n return\n\n super().remove()\n self._lockfile.remove()\n\n def remove_stage(self, stage):\n self._lockfile.remove_stage(stage)\n if not self.exists():\n return\n\n with open(self.path, \"r\") as f:\n d = parse_yaml_for_update(f.read(), self.path)\n\n self.validate(d, self.path)\n if stage.name not in d.get(\"stages\", {}):\n return\n\n logger.debug(\"Removing '%s' from '%s'\", stage.name, self.path)\n del d[\"stages\"][stage.name]\n\n if d[\"stages\"]:\n dump_yaml(self.path, d)\n else:\n super().remove()\n\n def merge(self, ancestor, other):\n raise NotImplementedError", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/hash_info.py_from_collections_import_O_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/hash_info.py_from_collections_import_O_", "embedding": null, "metadata": {"file_path": "dvc/hash_info.py", "file_name": "hash_info.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 53, "span_ids": ["HashInfo.to_dict", "HashInfo.isdir", "imports", "HashInfo.from_dict", "HashInfo", "HashInfo.__bool__"], "tokens": 321}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from collections import OrderedDict\nfrom dataclasses import dataclass, field\nfrom typing import Dict, Optional\n\nHASH_DIR_SUFFIX = \".dir\"\n\nDirInfo = Dict[str, str]\n\n\n@dataclass\nclass HashInfo:\n PARAM_SIZE = \"size\"\n PARAM_NFILES = \"nfiles\"\n\n name: Optional[str]\n value: Optional[str]\n dir_info: Optional[DirInfo] = field(default=None, compare=False)\n size: Optional[int] = field(default=None, compare=False)\n nfiles: Optional[int] = field(default=None, compare=False)\n\n def __bool__(self):\n return bool(self.value)\n\n @classmethod\n def from_dict(cls, d):\n _d = d.copy() if d else {}\n size = _d.pop(cls.PARAM_SIZE, None)\n nfiles = _d.pop(cls.PARAM_NFILES, None)\n\n if not _d:\n return cls(None, None)\n\n ((name, value),) = _d.items()\n return cls(name, value, size=size, nfiles=nfiles)\n\n def to_dict(self):\n ret = OrderedDict()\n if not self:\n return ret\n\n ret[self.name] = self.value\n if self.size is not None:\n ret[self.PARAM_SIZE] = self.size\n if self.nfiles is not None:\n ret[self.PARAM_NFILES] = self.nfiles\n return ret\n\n @property\n def isdir(self):\n if not self:\n return False\n return self.value.endswith(HASH_DIR_SUFFIX)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/info.py__get_caches__get_remotes.return._join_schemes_or_No": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/info.py__get_caches__get_remotes.return._join_schemes_or_No", "embedding": null, "metadata": {"file_path": "dvc/info.py", "file_name": "info.py", "file_type": "text/x-python", "category": "implementation", "start_line": 70, "end_line": 87, "span_ids": ["_get_caches", "_get_remotes"], "tokens": 104}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _get_caches(cache):\n caches = (\n cache_type\n for cache_type, cache_instance in cache.by_scheme()\n if cache_instance\n )\n\n # Caches will be always non-empty including the local cache\n return \", \".join(caches)\n\n\ndef _get_remotes(config):\n schemes = (\n get_tree_cls(get_tree_config(config, name=remote)).scheme\n for remote in config[\"remote\"]\n )\n\n return \", \".join(schemes) or \"None\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/main.py__Main_entry_point_for_d_debug.try_.except_Exception_.raise": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/main.py__Main_entry_point_for_d_debug.try_.except_Exception_.raise", "embedding": null, "metadata": {"file_path": "dvc/main.py", "file_name": "main.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 55, "span_ids": ["profile", "debug", "docstring"], "tokens": 293}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Main entry point for dvc CLI.\"\"\"\n\nimport errno\nimport logging\nfrom contextlib import contextmanager\n\nfrom dvc import analytics\nfrom dvc.cli import parse_args\nfrom dvc.config import ConfigError\nfrom dvc.exceptions import DvcException, DvcParserError, NotDvcRepoError\nfrom dvc.external_repo import clean_repos\nfrom dvc.logger import FOOTER, disable_other_loggers\nfrom dvc.tree.pool import close_pools\nfrom dvc.utils import error_link\n\n# Workaround for CPython bug. See [1] and [2] for more info.\n# [1] https://github.com/aws/aws-cli/blob/1.16.277/awscli/clidriver.py#L55\n# [2] https://bugs.python.org/issue29288\n\n\"\".encode(\"idna\")\n\nlogger = logging.getLogger(\"dvc\")\n\n\n@contextmanager\ndef profile(enable, dump):\n if not enable:\n yield\n return\n\n import cProfile\n\n prof = cProfile.Profile()\n prof.enable()\n\n yield\n\n prof.disable()\n if not dump:\n prof.print_stats(sort=\"cumtime\")\n return\n prof.dump_stats(dump)\n\n\n@contextmanager\ndef debug(enable):\n try:\n yield\n return\n except Exception:\n if enable:\n import pdb # noqa: T100\n\n pdb.post_mortem()\n raise", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_BaseOutput.dumpd_BaseOutput.dumpd.return.ret": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/base.py_BaseOutput.dumpd_BaseOutput.dumpd.return.ret", "embedding": null, "metadata": {"file_path": "dvc/output/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 309, "end_line": 344, "span_ids": ["BaseOutput.dumpd"], "tokens": 210}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseOutput:\n\n def dumpd(self):\n ret = copy(self.hash_info.to_dict())\n ret[self.PARAM_PATH] = self.def_path\n\n if self.IS_DEPENDENCY:\n return ret\n\n if self.desc:\n ret[self.PARAM_DESC] = self.desc\n\n if not self.use_cache:\n ret[self.PARAM_CACHE] = self.use_cache\n\n if isinstance(self.metric, dict):\n if (\n self.PARAM_METRIC_XPATH in self.metric\n and not self.metric[self.PARAM_METRIC_XPATH]\n ):\n del self.metric[self.PARAM_METRIC_XPATH]\n\n if self.metric:\n ret[self.PARAM_METRIC] = self.metric\n\n if self.plot:\n ret[self.PARAM_PLOT] = self.plot\n\n if self.persist:\n ret[self.PARAM_PERSIST] = self.persist\n\n if self.checkpoint:\n ret[self.PARAM_CHECKPOINT] = self.checkpoint\n\n if self.isexec:\n ret[self.PARAM_ISEXEC] = self.isexec\n\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/webhdfs.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/output/webhdfs.py__", "embedding": null, "metadata": {"file_path": "dvc/output/webhdfs.py", "file_name": "webhdfs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 8, "span_ids": ["imports", "WebHDFSOutput"], "tokens": 40}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.output.base import BaseOutput\n\nfrom ..tree.webhdfs import WebHDFSTree\n\n\nclass WebHDFSOutput(BaseOutput):\n TREE_CLS = WebHDFSTree", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_MergeError_MergeError.__init__.super___init___": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_MergeError_MergeError.__init__.super___init___", "embedding": null, "metadata": {"file_path": "dvc/parsing/context.py", "file_name": "context.py", "file_type": "text/x-python", "category": "implementation", "start_line": 36, "end_line": 51, "span_ids": ["MergeError.__init__", "MergeError"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class MergeError(ContextError):\n def __init__(self, key, new, into):\n self.key = key\n if not isinstance(into[key], Node) or not isinstance(new, Node):\n super().__init__(\n f\"cannot merge '{key}' as it already exists in {into}\"\n )\n return\n\n preexisting = into[key].meta.source\n new_src = new.meta.source\n path = new.meta.path()\n super().__init__(\n f\"cannot redefine '{path}' from '{new_src}'\"\n f\" as it already exists in '{preexisting}'\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Meta_Meta.path.return._join_self_dpaths_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Meta_Meta.path.return._join_self_dpaths_", "embedding": null, "metadata": {"file_path": "dvc/parsing/context.py", "file_name": "context.py", "file_type": "text/x-python", "category": "implementation", "start_line": 75, "end_line": 92, "span_ids": ["Meta.__str__", "Meta.path", "Meta.update_path", "Meta"], "tokens": 121}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@dataclass\nclass Meta:\n source: Optional[str] = None\n dpaths: List[str] = field(default_factory=list)\n local: bool = True\n\n @staticmethod\n def update_path(meta: \"Meta\", path: Union[str, int]):\n dpaths = meta.dpaths[:] + [str(path)]\n return replace(meta, dpaths=dpaths)\n\n def __str__(self):\n string = self.source or \"\"\n string += \":\" + self.path()\n return string\n\n def path(self):\n return \".\".join(self.dpaths)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py__default_meta_PRIMITIVES._int_float_str_bytes_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py__default_meta_PRIMITIVES._int_float_str_bytes_", "embedding": null, "metadata": {"file_path": "dvc/parsing/context.py", "file_name": "context.py", "file_type": "text/x-python", "category": "implementation", "start_line": 117, "end_line": 152, "span_ids": ["Value.__repr__", "Node.value", "Value.value", "Value.__str__", "Node", "_default_meta", "impl:5", "Value.get_sources", "Value", "Node.get_sources"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _default_meta():\n return Meta(source=None)\n\n\nclass Node:\n def get_sources(self):\n raise NotImplementedError\n\n @property\n @abstractmethod\n def value(self):\n pass\n\n\n@dataclass\nclass Value(Node):\n _value: Any\n meta: Meta = field(\n compare=False, default_factory=_default_meta, repr=False\n )\n\n def __repr__(self):\n return repr(self._value)\n\n def __str__(self) -> str:\n return str(self._value)\n\n def get_sources(self):\n return {self.meta.source: self.meta.path()}\n\n @property\n def value(self):\n return self._value\n\n\nPRIMITIVES = (int, float, str, bytes, bool)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Container_Container._convert_with_meta.if_value_is_None_or_isins.else_.raise_TypeError_msg_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Container_Container._convert_with_meta.if_value_is_None_or_isins.else_.raise_TypeError_msg_", "embedding": null, "metadata": {"file_path": "dvc/parsing/context.py", "file_name": "context.py", "file_type": "text/x-python", "category": "implementation", "start_line": 133, "end_line": 161, "span_ids": ["Container.__init__", "Container._convert", "Container._convert_with_meta", "Container"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Container(Node, ABC):\n meta: Meta\n data: Union[list, dict]\n _key_transform = staticmethod(identity)\n\n def __init__(self, meta=None) -> None:\n self.meta = meta or _default_meta()\n\n def _convert(self, key, value):\n meta = Meta.update_path(self.meta, key)\n return self._convert_with_meta(value, meta)\n\n @staticmethod\n def _convert_with_meta(value, meta: Meta = None):\n if value is None or isinstance(value, PRIMITIVES):\n assert meta\n return Value(value, meta=meta)\n elif isinstance(value, Node):\n return value\n elif isinstance(value, (list, dict)):\n assert meta\n container = CtxDict if isinstance(value, dict) else CtxList\n return container(value, meta=meta)\n else:\n msg = (\n \"Unsupported value of type \"\n f\"'{type(value).__name__}' in '{meta}'\"\n )\n raise TypeError(msg)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Container.__repr___Container.__eq__.return.container_o_self": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Container.__repr___Container.__eq__.return.container_o_self", "embedding": null, "metadata": {"file_path": "dvc/parsing/context.py", "file_name": "context.py", "file_type": "text/x-python", "category": "implementation", "start_line": 163, "end_line": 185, "span_ids": ["Container.__getitem__", "Container.__setitem__", "Container.__len__", "Container.__delitem__", "Container.__eq__", "Container.__repr__", "Container.__iter__"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Container(Node, ABC):\n\n def __repr__(self):\n return repr(self.data)\n\n def __getitem__(self, key):\n return self.data[key]\n\n def __setitem__(self, key, value):\n self.data[key] = self._convert(key, value)\n\n def __delitem__(self, key):\n del self.data[key]\n\n def __len__(self):\n return len(self.data)\n\n def __iter__(self):\n return iter(self.data)\n\n def __eq__(self, o):\n container = type(self)\n if isinstance(o, container):\n return o.data == self.data\n return container(o) == self", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Container.select_Container.get_sources.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Container.select_Container.get_sources.return._", "embedding": null, "metadata": {"file_path": "dvc/parsing/context.py", "file_name": "context.py", "file_type": "text/x-python", "category": "implementation", "start_line": 187, "end_line": 209, "span_ids": ["Container.get_sources", "Container.select"], "tokens": 151}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Container(Node, ABC):\n\n def select(self, key: str):\n index, *rems = key.split(sep=\".\", maxsplit=1)\n index = index.strip()\n index = self._key_transform(index)\n try:\n d = self[index]\n except LookupError as exc:\n raise ValueError(\n f\"Could not find '{index}' in {self.data}\"\n ) from exc\n\n if not rems:\n return d\n\n rem = rems[0]\n if not isinstance(d, Container):\n raise ValueError(\n f\"{index} is a primitive value, cannot get '{rem}'\"\n )\n return d.select(rem)\n\n def get_sources(self):\n return {}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Context.select_Context.select.return.node_value_if_unwrap_else": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/context.py_Context.select_Context.select.return.node_value_if_unwrap_else", "embedding": null, "metadata": {"file_path": "dvc/parsing/context.py", "file_name": "context.py", "file_type": "text/x-python", "category": "implementation", "start_line": 324, "end_line": 346, "span_ids": ["Context.select"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Context(CtxDict):\n\n def select(\n self, key: str, unwrap=False\n ): # pylint: disable=arguments-differ\n \"\"\"Select the item using key, similar to `__getitem__`\n but can track the usage of the data on interpolation\n as well and can get from nested data structure by using\n \".\" separated key (eg: \"key1.key2.key3\")\n\n Args:\n key: key to select value from\n unwrap: Convert CtxList/CtxDict/Value items to it's original data\n Defaults to False. Note that the default is different from\n `resolve`.\n \"\"\"\n normalized = normalize_key(key)\n try:\n node = super().select(normalized)\n except ValueError as exc:\n raise KeyNotInContext(key) from exc\n\n assert isinstance(node, Node)\n self._track_data(node)\n return node.value if unwrap else node", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/interpolate.py_str_interpolate_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/interpolate.py_str_interpolate_", "embedding": null, "metadata": {"file_path": "dvc/parsing/interpolate.py", "file_name": "interpolate.py", "file_type": "text/x-python", "category": "implementation", "start_line": 144, "end_line": 171, "span_ids": ["is_exact_string", "str_interpolate"], "tokens": 228}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def str_interpolate(\n template: str,\n matches: \"List[Match]\",\n context: \"Context\",\n skip_checks: bool = False,\n):\n from .context import PRIMITIVES\n\n index, buf = 0, \"\"\n for match in matches:\n start, end = match.span(0)\n expr = get_expression(match, skip_checks=skip_checks)\n value = context.select(expr, unwrap=True)\n if value is not None and not isinstance(value, PRIMITIVES):\n raise ParseError(\n f\"Cannot interpolate data of type '{type(value).__name__}'\"\n )\n buf += template[index:start] + to_str(value)\n index = end\n buf += template[index:]\n # regex already backtracks and avoids any `${` starting with\n # backslashes(`\\`). We just need to replace those by `${`.\n return buf.replace(r\"\\${\", BRACE_OPEN)\n\n\ndef is_exact_string(src: str, matches: \"List[Match]\"):\n return len(matches) == 1 and src == matches[0].group(0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_errno_STATUS_MAP._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_errno_STATUS_MAP._", "embedding": null, "metadata": {"file_path": "dvc/remote/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 28, "span_ids": ["imports"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import errno\nimport hashlib\nimport logging\nfrom concurrent.futures import ThreadPoolExecutor, as_completed\nfrom functools import partial, wraps\n\nfrom funcy import concat\n\nfrom dvc.exceptions import DownloadError, UploadError\nfrom dvc.hash_info import HashInfo\n\nfrom ..progress import Tqdm\nfrom .index import RemoteIndex, RemoteIndexNoop\n\nlogger = logging.getLogger(__name__)\n\nSTATUS_OK = 1\nSTATUS_MISSING = 2\nSTATUS_NEW = 3\nSTATUS_DELETED = 4\n\nSTATUS_MAP = {\n # (local_exists, remote_exists)\n (True, True): STATUS_OK,\n (False, False): STATUS_MISSING,\n (True, False): STATUS_NEW,\n (False, True): STATUS_DELETED,\n}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py__log_exceptions_index_locked.return.wrapper": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py__log_exceptions_index_locked.return.wrapper", "embedding": null, "metadata": {"file_path": "dvc/remote/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 31, "end_line": 58, "span_ids": ["index_locked", "_log_exceptions"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _log_exceptions(func, operation):\n @wraps(func)\n def wrapper(from_info, to_info, *args, **kwargs):\n try:\n func(from_info, to_info, *args, **kwargs)\n return 0\n except Exception as exc: # pylint: disable=broad-except\n # NOTE: this means we ran out of file descriptors and there is no\n # reason to try to proceed, as we will hit this error anyways.\n # pylint: disable=no-member\n if isinstance(exc, OSError) and exc.errno == errno.EMFILE:\n raise\n\n logger.exception(\n \"failed to %s '%s' to '%s'\", operation, from_info, to_info\n )\n return 1\n\n return wrapper\n\n\ndef index_locked(f):\n @wraps(f)\n def wrapper(obj, *args, **kwargs):\n with obj.index:\n return f(obj, *args, **kwargs)\n\n return wrapper", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote_Remote.gc.return.removed": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote_Remote.gc.return.removed", "embedding": null, "metadata": {"file_path": "dvc/remote/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 61, "end_line": 100, "span_ids": ["Remote.gc", "Remote.__init__", "Remote", "Remote.__repr__"], "tokens": 237}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Remote:\n \"\"\"Cloud remote class.\n\n Provides methods for indexing and garbage collecting trees which contain\n DVC remotes.\n \"\"\"\n\n INDEX_CLS = RemoteIndex\n\n def __init__(self, tree):\n from dvc.cache import get_cloud_cache\n\n self.tree = tree\n self.repo = tree.repo\n self.cache = get_cloud_cache(self.tree)\n\n config = tree.config\n url = config.get(\"url\")\n if url:\n index_name = hashlib.sha256(url.encode(\"utf-8\")).hexdigest()\n self.index = self.INDEX_CLS(\n self.repo, index_name, dir_suffix=self.tree.CHECKSUM_DIR_SUFFIX\n )\n else:\n self.index = RemoteIndexNoop()\n\n def __repr__(self):\n return \"{class_name}: '{path_info}'\".format(\n class_name=type(self).__name__,\n path_info=self.tree.path_info or \"No path\",\n )\n\n @index_locked\n def gc(self, *args, **kwargs):\n removed = self.cache.gc(*args, **kwargs)\n\n if removed:\n self.index.clear()\n\n return removed", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote.status_Remote.hashes_exist.return.indexed_hashes_self_cac": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote.status_Remote.hashes_exist.return.indexed_hashes_self_cac", "embedding": null, "metadata": {"file_path": "dvc/remote/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 102, "end_line": 132, "span_ids": ["Remote.status", "Remote.hashes_exist"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Remote:\n\n @index_locked\n def status(\n self,\n cache,\n named_cache,\n jobs=None,\n show_checksums=False,\n download=False,\n log_missing=True,\n ):\n # Return flattened dict containing all status info\n dir_status, file_status, _ = self._status(\n cache,\n named_cache,\n jobs=jobs,\n show_checksums=show_checksums,\n download=download,\n log_missing=log_missing,\n )\n return dict(dir_status, **file_status)\n\n def hashes_exist(self, hashes, **kwargs):\n hashes = set(hashes)\n indexed_hashes = set(self.index.intersection(hashes))\n hashes -= indexed_hashes\n indexed_hashes = list(indexed_hashes)\n logger.debug(\"Matched '{}' indexed hashes\".format(len(indexed_hashes)))\n if not hashes:\n return indexed_hashes\n\n return indexed_hashes + self.cache.hashes_exist(list(hashes), **kwargs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote._status_Remote._status.return.self__make_status_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote._status_Remote._status.return.self__make_status_", "embedding": null, "metadata": {"file_path": "dvc/remote/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 134, "end_line": 186, "span_ids": ["Remote._status"], "tokens": 400}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Remote:\n\n def _status(\n self,\n cache,\n named_cache,\n jobs=None,\n show_checksums=False,\n download=False,\n log_missing=True,\n ):\n \"\"\"Return a tuple of (dir_status_info, file_status_info, dir_contents).\n\n dir_status_info contains status for .dir files, file_status_info\n contains status for all other files, and dir_contents is a dict of\n {dir_hash: set(file_hash, ...)} which can be used to map\n a .dir file to its file contents.\n \"\"\"\n logger.debug(f\"Preparing to collect status from {self.tree.path_info}\")\n md5s = set(named_cache.scheme_keys(cache.tree.scheme))\n\n logger.debug(\"Collecting information from local cache...\")\n local_exists = frozenset(\n cache.hashes_exist(md5s, jobs=jobs, name=cache.cache_dir)\n )\n\n # This is a performance optimization. We can safely assume that,\n # if the resources that we want to fetch are already cached,\n # there's no need to check the remote storage for the existence of\n # those files.\n if download and local_exists == md5s:\n remote_exists = local_exists\n else:\n logger.debug(\"Collecting information from remote cache...\")\n remote_exists = set()\n dir_md5s = set(named_cache.dir_keys(cache.tree.scheme))\n if dir_md5s:\n remote_exists.update(\n self._indexed_dir_hashes(cache, named_cache, dir_md5s)\n )\n md5s.difference_update(remote_exists)\n if md5s:\n remote_exists.update(\n self.hashes_exist(\n md5s, jobs=jobs, name=str(self.tree.path_info)\n )\n )\n return self._make_status(\n cache,\n named_cache,\n show_checksums,\n local_exists,\n remote_exists,\n log_missing,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote._make_status_Remote._make_status.return.dir_status_file_status_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote._make_status_Remote._make_status.return.dir_status_file_status_", "embedding": null, "metadata": {"file_path": "dvc/remote/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 188, "end_line": 221, "span_ids": ["Remote._make_status"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Remote:\n\n def _make_status(\n self,\n cache,\n named_cache,\n show_checksums,\n local_exists,\n remote_exists,\n log_missing,\n ):\n def make_names(hash_, names):\n return {\"name\": hash_ if show_checksums else \" \".join(names)}\n\n dir_status = {}\n file_status = {}\n dir_contents = {}\n for hash_, item in named_cache[cache.tree.scheme].items():\n if item.children:\n dir_status[hash_] = make_names(hash_, item.names)\n dir_contents[hash_] = set()\n for child_hash, child in item.children.items():\n file_status[child_hash] = make_names(\n child_hash, child.names\n )\n dir_contents[hash_].add(child_hash)\n else:\n file_status[hash_] = make_names(hash_, item.names)\n\n self._fill_statuses(dir_status, local_exists, remote_exists)\n self._fill_statuses(file_status, local_exists, remote_exists)\n\n if log_missing:\n self._log_missing_caches(dict(dir_status, **file_status))\n\n return dir_status, file_status, dir_contents", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote._indexed_dir_hashes_Remote._indexed_dir_hashes.for_dir_hash_in_dir_exist.yield_from_file_hashes": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote._indexed_dir_hashes_Remote._indexed_dir_hashes.for_dir_hash_in_dir_exist.yield_from_file_hashes", "embedding": null, "metadata": {"file_path": "dvc/remote/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 223, "end_line": 258, "span_ids": ["Remote._indexed_dir_hashes"], "tokens": 297}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Remote:\n\n def _indexed_dir_hashes(self, cache, named_cache, dir_md5s):\n # Validate our index by verifying all indexed .dir hashes\n # still exist on the remote\n indexed_dirs = set(self.index.dir_hashes())\n indexed_dir_exists = set()\n if indexed_dirs:\n indexed_dir_exists.update(\n self.cache.list_hashes_exists(indexed_dirs)\n )\n missing_dirs = indexed_dirs.difference(indexed_dir_exists)\n if missing_dirs:\n logger.debug(\n \"Remote cache missing indexed .dir hashes '{}', \"\n \"clearing remote index\".format(\", \".join(missing_dirs))\n )\n self.index.clear()\n\n # Check if non-indexed (new) dir hashes exist on remote\n dir_exists = dir_md5s.intersection(indexed_dir_exists)\n dir_exists.update(self.cache.list_hashes_exists(dir_md5s - dir_exists))\n\n # If .dir hash exists on the remote, assume directory contents\n # still exists on the remote\n for dir_hash in dir_exists:\n file_hashes = list(\n named_cache.child_keys(cache.tree.scheme, dir_hash)\n )\n if dir_hash not in self.index:\n logger.debug(\n \"Indexing new .dir '{}' with '{}' nested files\".format(\n dir_hash, len(file_hashes)\n )\n )\n self.index.update([dir_hash], file_hashes)\n yield dir_hash\n yield from file_hashes", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote._fill_statuses_Remote._get_plans.return._from_infos_to_infos_na": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote._fill_statuses_Remote._get_plans.return._from_infos_to_infos_na", "embedding": null, "metadata": {"file_path": "dvc/remote/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 260, "end_line": 294, "span_ids": ["Remote._fill_statuses", "Remote._get_plans"], "tokens": 264}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Remote:\n\n @staticmethod\n def _fill_statuses(hash_info_dir, local_exists, remote_exists):\n # Using sets because they are way faster for lookups\n local = set(local_exists)\n remote = set(remote_exists)\n\n for md5, info in hash_info_dir.items():\n status = STATUS_MAP[(md5 in local, md5 in remote)]\n info[\"status\"] = status\n\n def _get_plans(self, cache_obj, download, status_info, status):\n cache = []\n path_infos = []\n names = []\n hashes = []\n missing = []\n for md5, info in Tqdm(\n status_info.items(), desc=\"Analysing status\", unit=\"file\"\n ):\n if info[\"status\"] == status:\n cache.append(cache_obj.tree.hash_to_path_info(md5))\n path_infos.append(self.tree.hash_to_path_info(md5))\n names.append(info[\"name\"])\n hashes.append(md5)\n elif info[\"status\"] == STATUS_MISSING:\n missing.append(md5)\n\n if download:\n to_infos = cache\n from_infos = path_infos\n else:\n to_infos = path_infos\n from_infos = cache\n\n return (from_infos, to_infos, names, hashes), missing", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote._process_Remote._process.return.len_dir_plans_0_len_f": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote._process_Remote._process.return.len_dir_plans_0_len_f", "embedding": null, "metadata": {"file_path": "dvc/remote/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 296, "end_line": 414, "span_ids": ["Remote._process"], "tokens": 804}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Remote:\n\n def _process(\n self,\n cache,\n named_cache,\n jobs=None,\n show_checksums=False,\n download=False,\n ):\n logger.debug(\n \"Preparing to {} '{}'\".format(\n \"download data from\" if download else \"upload data to\",\n self.tree.path_info,\n )\n )\n\n if download:\n func = partial(\n _log_exceptions(self.tree.download, \"download\"),\n dir_mode=cache.tree.dir_mode,\n file_mode=cache.tree.file_mode,\n )\n status = STATUS_DELETED\n desc = \"Downloading\"\n else:\n func = _log_exceptions(self.tree.upload, \"upload\")\n status = STATUS_NEW\n desc = \"Uploading\"\n\n if jobs is None:\n jobs = self.tree.JOBS\n\n dir_status, file_status, dir_contents = self._status(\n cache,\n named_cache,\n jobs=jobs,\n show_checksums=show_checksums,\n download=download,\n )\n\n dir_plans, _ = self._get_plans(cache, download, dir_status, status)\n file_plans, missing_files = self._get_plans(\n cache, download, file_status, status\n )\n\n total = len(dir_plans[0]) + len(file_plans[0])\n if total == 0:\n return 0\n\n with Tqdm(total=total, unit=\"file\", desc=desc) as pbar:\n func = pbar.wrap_fn(func)\n with ThreadPoolExecutor(max_workers=jobs) as executor:\n if download:\n from_infos, to_infos, names, _ = (\n d + f for d, f in zip(dir_plans, file_plans)\n )\n fails = sum(\n executor.map(func, from_infos, to_infos, names)\n )\n else:\n # for uploads, push files first, and any .dir files last\n\n file_futures = {}\n for from_info, to_info, name, hash_ in zip(*file_plans):\n file_futures[hash_] = executor.submit(\n func, from_info, to_info, name\n )\n dir_futures = {}\n for from_info, to_info, name, dir_hash in zip(*dir_plans):\n # if for some reason a file contained in this dir is\n # missing both locally and in the remote, we want to\n # push whatever file content we have, but should not\n # push .dir file\n for file_hash in missing_files:\n if file_hash in dir_contents[dir_hash]:\n logger.debug(\n \"directory '%s' contains missing files,\"\n \"skipping .dir file upload\",\n name,\n )\n break\n else:\n wait_futures = {\n future\n for file_hash, future in file_futures.items()\n if file_hash in dir_contents[dir_hash]\n }\n dir_futures[dir_hash] = executor.submit(\n self._dir_upload,\n func,\n wait_futures,\n from_info,\n to_info,\n name,\n )\n fails = sum(\n future.result()\n for future in concat(\n file_futures.values(), dir_futures.values()\n )\n )\n\n if fails:\n if download:\n self.index.clear()\n raise DownloadError(fails)\n raise UploadError(fails)\n\n if not download:\n # index successfully pushed dirs\n for dir_hash, future in dir_futures.items():\n if future.result() == 0:\n file_hashes = dir_contents[dir_hash]\n logger.debug(\n \"Indexing pushed dir '{}' with \"\n \"'{}' nested files\".format(dir_hash, len(file_hashes))\n )\n self.index.update([dir_hash], file_hashes)\n\n return len(dir_plans[0]) + len(file_plans[0])", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote._dir_upload_Remote.push.return.self__process_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote._dir_upload_Remote.push.return.self__process_", "embedding": null, "metadata": {"file_path": "dvc/remote/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 416, "end_line": 438, "span_ids": ["Remote.push", "Remote._dir_upload"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Remote:\n\n @staticmethod\n def _dir_upload(func, futures, from_info, to_info, name):\n for future in as_completed(futures):\n if future.result():\n # do not upload this .dir file if any file in this\n # directory failed to upload\n logger.debug(\n \"failed to upload full contents of '{}', \"\n \"aborting .dir file upload\".format(name)\n )\n logger.error(f\"failed to upload '{from_info}' to '{to_info}'\")\n return 1\n return func(from_info, to_info, name)\n\n @index_locked\n def push(self, cache, named_cache, jobs=None, show_checksums=False):\n return self._process(\n cache,\n named_cache,\n jobs=jobs,\n show_checksums=show_checksums,\n download=False,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote.pull_Remote.pull.return.ret": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote.pull_Remote.pull.return.ret", "embedding": null, "metadata": {"file_path": "dvc/remote/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 440, "end_line": 464, "span_ids": ["Remote.pull"], "tokens": 184}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Remote:\n\n @index_locked\n def pull(self, cache, named_cache, jobs=None, show_checksums=False):\n ret = self._process(\n cache,\n named_cache,\n jobs=jobs,\n show_checksums=show_checksums,\n download=True,\n )\n\n if not self.tree.verify:\n with cache.tree.state:\n for checksum in named_cache.scheme_keys(\"local\"):\n cache_file = cache.tree.hash_to_path_info(checksum)\n if cache.tree.exists(cache_file):\n # We can safely save here, as existing corrupted files\n # will be removed upon status, while files corrupted\n # during download will not be moved from tmp_file\n # (see `BaseTree.download()`)\n hash_info = HashInfo(\n cache.tree.PARAM_CHECKSUM, checksum\n )\n cache.tree.state.save(cache_file, hash_info)\n\n return ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote._log_missing_caches_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/base.py_Remote._log_missing_caches_", "embedding": null, "metadata": {"file_path": "dvc/remote/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 466, "end_line": 483, "span_ids": ["Remote._log_missing_caches"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Remote:\n\n @staticmethod\n def _log_missing_caches(hash_info_dict):\n missing_caches = [\n (md5, info)\n for md5, info in hash_info_dict.items()\n if info[\"status\"] == STATUS_MISSING\n ]\n if missing_caches:\n missing_desc = \"\\n\".join(\n \"name: {}, md5: {}\".format(info[\"name\"], md5)\n for md5, info in missing_caches\n )\n msg = (\n \"Some of the cache files do not exist neither locally \"\n \"nor on remote. Missing cache files:\\n{}\".format(missing_desc)\n )\n logger.warning(msg)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/slow_link_detection.py__type_ignore_this.message._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/remote/slow_link_detection.py__type_ignore_this.message._", "embedding": null, "metadata": {"file_path": "dvc/remote/slow_link_detection.py", "file_name": "slow_link_detection.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 23, "span_ids": ["docstring"], "tokens": 153}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# type: ignore\nimport logging\nimport sys\nimport time\nfrom functools import wraps\n\nimport colorama\n\nlogger = logging.getLogger(__name__)\nthis = sys.modules[__name__]\n\nthis.timeout_seconds = 10.0\nthis.already_displayed = False\nthis.message = (\n \"You can cut execution time considerably by using a different \"\n \"`cache.type` configuration.\\n\"\n \"See {blue}https://dvc.org/doc/commands-reference/config#cache{reset} \"\n \"for more information.\\n\"\n \"To disable this message, run:\\n\"\n \"`dvc config cache.slow_link_warning false`\".format(\n blue=colorama.Fore.BLUE, reset=colorama.Fore.RESET\n )\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo_Repo.get_url.staticmethod__get_url_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo_Repo.get_url.staticmethod__get_url_", "embedding": null, "metadata": {"file_path": "dvc/repo/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 65, "end_line": 94, "span_ids": ["Repo"], "tokens": 266}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Repo:\n DVC_DIR = \".dvc\"\n\n from dvc.repo.add import add\n from dvc.repo.brancher import brancher\n from dvc.repo.checkout import checkout\n from dvc.repo.commit import commit\n from dvc.repo.destroy import destroy\n from dvc.repo.diff import diff\n from dvc.repo.fetch import fetch\n from dvc.repo.freeze import freeze, unfreeze\n from dvc.repo.gc import gc\n from dvc.repo.get import get as _get\n from dvc.repo.get_url import get_url as _get_url\n from dvc.repo.imp import imp\n from dvc.repo.imp_url import imp_url\n from dvc.repo.install import install\n from dvc.repo.ls import ls as _ls\n from dvc.repo.move import move\n from dvc.repo.pull import pull\n from dvc.repo.push import push\n from dvc.repo.remove import remove\n from dvc.repo.reproduce import reproduce\n from dvc.repo.run import run\n from dvc.repo.status import status\n from dvc.repo.update import update\n\n ls = staticmethod(_ls)\n get = staticmethod(_get)\n get_url = staticmethod(_get_url)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.check_modified_graph_Repo.check_modified_graph.if_not_getattr_self__sk.build_graph_self_stages_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.check_modified_graph_Repo.check_modified_graph.if_not_getattr_self__sk.build_graph_self_stages_", "embedding": null, "metadata": {"file_path": "dvc/repo/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 292, "end_line": 307, "span_ids": ["Repo.check_modified_graph"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Repo:\n\n def check_modified_graph(self, new_stages):\n \"\"\"Generate graph including the new stage to check for errors\"\"\"\n # Building graph might be costly for the ones with many DVC-files,\n # so we provide this undocumented hack to skip it. See [1] for\n # more details. The hack can be used as:\n #\n # repo = Repo(...)\n # repo._skip_graph_checks = True\n # repo.add(...)\n #\n # A user should care about not duplicating outs and not adding cycles,\n # otherwise DVC might have an undefined behaviour.\n #\n # [1] https://github.com/iterative/dvc/issues/2671\n if not getattr(self, \"_skip_graph_checks\", False):\n build_graph(self.stages + new_stages)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/__init__.py_Experiments._update_params_Experiments._update_params.self_scm_add_list_params_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/__init__.py_Experiments._update_params_Experiments._update_params.self_scm_add_list_params_", "embedding": null, "metadata": {"file_path": "dvc/repo/experiments/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 308, "end_line": 327, "span_ids": ["Experiments._update_params"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Experiments:\n\n def _update_params(self, params: dict):\n \"\"\"Update experiment params files with the specified values.\"\"\"\n from benedict import benedict\n\n from dvc.utils.serialize import MODIFIERS\n\n logger.debug(\"Using experiment params '%s'\", params)\n\n for params_fname in params:\n path = PathInfo(params_fname)\n suffix = path.suffix.lower()\n modify_data = MODIFIERS[suffix]\n with modify_data(path, tree=self.repo.tree) as data:\n benedict(data).merge(params[params_fname], overwrite=True)\n\n # Force params file changes to be staged in git\n # Otherwise in certain situations the changes to params file may be\n # ignored when we `git stash` them since mtime is used to determine\n # whether the file is dirty\n self.scm.add(list(params.keys()))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/__init__.py_Experiments._resume_checkpoint_Experiments._get_last_checkpoint.raise_DvcException_No_ex": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/__init__.py_Experiments._resume_checkpoint_Experiments._get_last_checkpoint.raise_DvcException_No_ex", "embedding": null, "metadata": {"file_path": "dvc/repo/experiments/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 389, "end_line": 452, "span_ids": ["Experiments._resume_checkpoint", "Experiments._get_last_checkpoint"], "tokens": 437}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Experiments:\n\n def _resume_checkpoint(\n self, *args, checkpoint_resume: Optional[str] = None, **kwargs,\n ):\n \"\"\"Resume an existing (checkpoint) experiment.\n\n Experiment will be reproduced and checked out into the user's\n workspace.\n \"\"\"\n assert checkpoint_resume\n\n if checkpoint_resume == self.LAST_CHECKPOINT:\n # Continue from most recently committed checkpoint\n resume_rev = self._get_last_checkpoint()\n else:\n resume_rev = self.scm.resolve_rev(checkpoint_resume)\n\n allow_multiple = \"params\" in kwargs\n branch: Optional[str] = self.get_branch_by_rev(\n resume_rev, allow_multiple=allow_multiple\n )\n if not branch:\n raise DvcException(\n \"Could not find checkpoint experiment \"\n f\"'{checkpoint_resume}'\"\n )\n\n last_applied = self.scm.get_ref(EXEC_APPLY)\n if resume_rev != last_applied:\n if last_applied is None:\n msg = \"Current workspace does not contain an experiment. \"\n else:\n msg = (\n f\"Checkpoint '{checkpoint_resume[:7]}' does not match the \"\n \"most recently applied experiment in your workspace \"\n f\"('{last_applied[:7]}').\"\n )\n\n raise DvcException(\n f\"{msg}\\n\"\n \"To resume this experiment run:\\n\\n\"\n f\"\\tdvc exp apply {checkpoint_resume[:7]}\\n\\n\"\n \"And then retry this 'dvc exp res' command.\"\n )\n\n baseline_rev = self._get_baseline(branch)\n logger.debug(\n \"Resume from checkpoint '%s' with baseline '%s'\",\n checkpoint_resume,\n baseline_rev,\n )\n\n return self._stash_exp(\n *args,\n resume_rev=resume_rev,\n baseline_rev=baseline_rev,\n branch=branch,\n **kwargs,\n )\n\n def _get_last_checkpoint(self):\n rev = self.scm.get_ref(EXEC_CHECKPOINT)\n if rev:\n return rev\n raise DvcException(\"No existing checkpoint experiment to continue\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/gc.py_logging_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/experiments/gc.py_logging_", "embedding": null, "metadata": {"file_path": "dvc/repo/experiments/gc.py", "file_name": "gc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 49, "span_ids": ["gc", "imports"], "tokens": 285}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nfrom typing import Optional\n\nfrom dvc.repo import locked\n\nfrom .utils import exp_refs\n\nlogger = logging.getLogger(__name__)\n\n\n@locked\ndef gc(\n repo,\n all_branches: Optional[bool] = False,\n all_tags: Optional[bool] = False,\n all_commits: Optional[bool] = False,\n workspace: Optional[bool] = False,\n queued: Optional[bool] = False,\n):\n keep_revs = set(\n repo.brancher(\n all_branches=all_branches,\n all_tags=all_tags,\n all_commits=all_commits,\n sha_only=True,\n )\n )\n if workspace:\n keep_revs.add(repo.scm.get_rev())\n\n if not keep_revs:\n return 0\n\n removed = 0\n for ref_info in exp_refs(repo.scm):\n if ref_info.baseline_sha not in keep_revs:\n repo.scm.remove_ref(str(ref_info))\n removed += 1\n\n delete_stashes = []\n for _, entry in repo.experiments.stash_revs.items():\n if not queued or entry.baseline_rev not in keep_revs:\n delete_stashes.append(entry.index)\n for index in sorted(delete_stashes, reverse=True):\n repo.experiments.stash.drop(index)\n removed += len(delete_stashes)\n\n return removed", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/gc.py_logging_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/gc.py_logging_", "embedding": null, "metadata": {"file_path": "dvc/repo/gc.py", "file_name": "gc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 90, "span_ids": ["gc", "imports", "_raise_error_if_all_disabled"], "tokens": 527}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\n\nfrom dvc.cache import NamedCache\nfrom dvc.exceptions import InvalidArgumentError\n\nfrom ..scheme import Schemes\nfrom . import locked\n\nlogger = logging.getLogger(__name__)\n\n\ndef _raise_error_if_all_disabled(**kwargs):\n if not any(kwargs.values()):\n raise InvalidArgumentError(\n \"Either of `-w|--workspace`, `-a|--all-branches`, `-T|--all-tags` \"\n \"`--all-experiments` or `--all-commits` needs to be set.\"\n )\n\n\n@locked\ndef gc(\n self,\n all_branches=False,\n cloud=False,\n remote=None,\n with_deps=False,\n all_tags=False,\n all_commits=False,\n all_experiments=False,\n force=False,\n jobs=None,\n repos=None,\n workspace=False,\n):\n\n # require `workspace` to be true to come into effect.\n # assume `workspace` to be enabled if any of `all_tags`, `all_commits`,\n # `all_experiments` or `all_branches` are enabled.\n _raise_error_if_all_disabled(\n workspace=workspace,\n all_tags=all_tags,\n all_commits=all_commits,\n all_branches=all_branches,\n all_experiments=all_experiments,\n )\n\n from contextlib import ExitStack\n\n from dvc.repo import Repo\n\n if not repos:\n repos = []\n all_repos = [Repo(path) for path in repos]\n\n with ExitStack() as stack:\n for repo in all_repos:\n stack.enter_context(repo.lock)\n stack.enter_context(repo.state)\n\n used = NamedCache()\n for repo in all_repos + [self]:\n used.update(\n repo.used_cache(\n all_branches=all_branches,\n with_deps=with_deps,\n all_tags=all_tags,\n all_commits=all_commits,\n all_experiments=all_experiments,\n remote=remote,\n force=force,\n jobs=jobs,\n )\n )\n\n for scheme, cache in self.cache.by_scheme():\n if not cache:\n continue\n\n removed = cache.gc(set(used.scheme_keys(scheme)), jobs=jobs)\n if not removed:\n logger.info(f\"No unused '{scheme}' cache to remove.\")\n\n if not cloud:\n return\n\n remote = self.cloud.get_remote(remote, \"gc -c\")\n removed = remote.gc(set(used.scheme_keys(Schemes.LOCAL)), jobs=jobs)\n if not removed:\n logger.info(\"No unused cache to remove from remote.\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/graph.py_build_graph_build_graph.return.G": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/graph.py_build_graph_build_graph.return.G", "embedding": null, "metadata": {"file_path": "dvc/repo/graph.py", "file_name": "graph.py", "file_type": "text/x-python", "category": "implementation", "start_line": 31, "end_line": 101, "span_ids": ["build_graph"], "tokens": 488}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def build_graph(stages, outs_trie=None):\n \"\"\"Generate a graph by using the given stages on the given directory\n\n The nodes of the graph are the stage's path relative to the root.\n\n Edges are created when the output of one stage is used as a\n dependency in other stage.\n\n The direction of the edges goes from the stage to its dependency:\n\n For example, running the following:\n\n $ dvc run -o A \"echo A > A\"\n $ dvc run -d A -o B \"echo B > B\"\n $ dvc run -d B -o C \"echo C > C\"\n\n Will create the following graph:\n\n ancestors <--\n |\n C.dvc -> B.dvc -> A.dvc\n | |\n | --> descendants\n |\n ------- pipeline ------>\n |\n v\n (weakly connected components)\n\n Args:\n stages (list): used to build a graph from\n\n Raises:\n OutputDuplicationError: two outputs with the same path\n StagePathAsOutputError: stage inside an output directory\n OverlappingOutputPathsError: output inside output directory\n CyclicGraphError: resulting graph has cycles\n \"\"\"\n import networkx as nx\n\n from dvc.exceptions import StagePathAsOutputError\n\n from ..path_info import PathInfo\n from .trie import build_outs_trie\n\n G = nx.DiGraph()\n\n # Use trie to efficiently find overlapping outs and deps\n outs_trie = outs_trie or build_outs_trie(stages)\n\n for stage in stages:\n out = outs_trie.shortest_prefix(PathInfo(stage.path).parts).value\n if out:\n raise StagePathAsOutputError(stage, str(out))\n\n # Building graph\n G.add_nodes_from(stages)\n for stage in stages:\n for dep in stage.deps:\n if dep.path_info is None:\n continue\n\n dep_key = dep.path_info.parts\n overlapping = [n.value for n in outs_trie.prefixes(dep_key)]\n if outs_trie.has_subtrie(dep_key):\n overlapping.extend(outs_trie.values(prefix=dep_key))\n\n G.add_edges_from((stage, out.stage) for out in overlapping)\n check_acyclic(G)\n\n return G", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/graph.py__NOTE_using_stage_graph_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/graph.py__NOTE_using_stage_graph_", "embedding": null, "metadata": {"file_path": "dvc/repo/graph.py", "file_name": "graph.py", "file_type": "text/x-python", "category": "implementation", "start_line": 128, "end_line": 150, "span_ids": ["build_outs_graph", "build_graph"], "tokens": 189}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# NOTE: using stage graph instead of just list of stages to make sure that it\n# has already passed all the sanity checks like cycles/overlapping outputs and\n# so on.\ndef build_outs_graph(graph, outs_trie):\n import networkx as nx\n\n G = nx.DiGraph()\n\n G.add_nodes_from(outs_trie.values())\n for stage in graph.nodes():\n for dep in stage.deps:\n if dep.path_info is None:\n # RepoDependency don't have a path_info\n continue\n dep_key = dep.path_info.parts\n overlapping = [n.value for n in outs_trie.prefixes(dep_key)]\n if outs_trie.has_subtrie(dep_key):\n overlapping.extend(outs_trie.values(prefix=dep_key))\n\n for from_out in stage.outs:\n G.add_edges_from((from_out, out) for out in overlapping)\n return G", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py_Plots.render_Plots.render.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py_Plots.render_Plots.render.return.result", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 71, "end_line": 96, "span_ids": ["Plots.render"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Plots:\n\n @staticmethod\n def render(data, revs=None, props=None, templates=None):\n \"\"\"Renders plots\"\"\"\n props = props or {}\n\n # Merge data by plot file and apply overriding props\n plots = _prepare_plots(data, revs, props)\n\n result = {}\n for datafile, desc in plots.items():\n try:\n result[datafile] = _render(\n datafile, desc[\"data\"], desc[\"props\"], templates\n )\n except PlotParsingError as e:\n logger.debug(\n \"failed to read '%s' on '%s'\",\n e.path,\n e.revision,\n exc_info=True,\n )\n\n if not any(result.values()):\n raise NoMetricsParsedError(\"plots\")\n\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py_Plots.show_Plots._unset.for_prop_in_props_.out_plot_pop_prop_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py_Plots.show_Plots._unset.for_prop_in_props_.out_plot_pop_prop_", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 99, "end_line": 132, "span_ids": ["Plots.show", "Plots._unset", "Plots.diff"], "tokens": 265}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Plots:\n\n def show(self, targets=None, revs=None, props=None, templates=None):\n\n data = self.collect(targets, revs)\n\n # If any mentioned plot doesn't have any data then that's an error\n targets = [targets] if isinstance(targets, str) else targets or []\n for target in targets:\n rpath = relpath(target, self.repo.root_dir)\n if not any(\"data\" in d[rpath] for d in data.values()):\n raise MetricDoesNotExistError([target])\n\n # No data at all is a special error with a special message\n if not data:\n raise NoMetricsFoundError(\"plots\", \"--plots/--plots-no-cache\")\n\n if templates is None:\n templates = self.templates\n return self.render(data, revs, props, templates)\n\n def diff(self, *args, **kwargs):\n from .diff import diff\n\n return diff(self.repo, *args, **kwargs)\n\n @staticmethod\n def _unset(out, props):\n missing = list(set(props) - set(out.plot.keys()))\n if missing:\n raise PropsNotFoundError(\n f\"display properties {missing} not found in plot '{out}'\"\n )\n\n for prop in props:\n out.plot.pop(prop)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py_Plots.modify_Plots.templates.return.PlotTemplates_self_repo_d": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/__init__.py_Plots.modify_Plots.templates.return.PlotTemplates_self_repo_d", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 134, "end_line": 168, "span_ids": ["Plots.modify", "Plots.templates"], "tokens": 217}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Plots:\n\n def modify(self, path, props=None, unset=None):\n from dvc.dvcfile import Dvcfile\n\n props = props or {}\n template = props.get(\"template\")\n if template:\n self.templates.get_template(template)\n\n (out,) = self.repo.find_outs_by_path(path)\n if not out.plot and unset is not None:\n raise NotAPlotError(out)\n\n # This out will become a plot unless it is one already\n if not isinstance(out.plot, dict):\n out.plot = {}\n\n if unset:\n self._unset(out, unset)\n\n out.plot.update(props)\n\n # Empty dict will move it to non-plots\n if not out.plot:\n out.plot = True\n\n out.verify_metric()\n\n dvcfile = Dvcfile(self.repo, out.stage.path)\n dvcfile.dump(out.stage, update_lock=False)\n\n @cached_property\n def templates(self):\n from .template import PlotTemplates\n\n return PlotTemplates(self.repo.dvc_dir)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_NormalizedConfusionTemplate_NormalizedConfusionTemplate.DEFAULT_CONTENT._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/plots/template.py_NormalizedConfusionTemplate_NormalizedConfusionTemplate.DEFAULT_CONTENT._", "embedding": null, "metadata": {"file_path": "dvc/repo/plots/template.py", "file_name": "template.py", "file_type": "text/x-python", "category": "implementation", "start_line": 217, "end_line": 300, "span_ids": ["NormalizedConfusionTemplate"], "tokens": 556}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class NormalizedConfusionTemplate(Template):\n DEFAULT_NAME = \"confusion_normalized\"\n DEFAULT_CONTENT = {\n \"$schema\": \"https://vega.github.io/schema/vega-lite/v4.json\",\n \"data\": {\"values\": Template.anchor(\"data\")},\n \"title\": Template.anchor(\"title\"),\n \"facet\": {\"field\": \"rev\", \"type\": \"nominal\"},\n \"spec\": {\n \"transform\": [\n {\n \"aggregate\": [{\"op\": \"count\", \"as\": \"xy_count\"}],\n \"groupby\": [Template.anchor(\"y\"), Template.anchor(\"x\")],\n },\n {\n \"impute\": \"xy_count\",\n \"groupby\": [\"rev\", Template.anchor(\"y\")],\n \"key\": Template.anchor(\"x\"),\n \"value\": 0,\n },\n {\n \"impute\": \"xy_count\",\n \"groupby\": [\"rev\", Template.anchor(\"x\")],\n \"key\": Template.anchor(\"y\"),\n \"value\": 0,\n },\n {\n \"joinaggregate\": [\n {\"op\": \"sum\", \"field\": \"xy_count\", \"as\": \"sum_y\"}\n ],\n \"groupby\": [Template.anchor(\"y\")],\n },\n {\n \"calculate\": \"datum.xy_count / datum.sum_y\",\n \"as\": \"percent_of_y\",\n },\n ],\n \"encoding\": {\n \"x\": {\n \"field\": Template.anchor(\"x\"),\n \"type\": \"nominal\",\n \"sort\": \"ascending\",\n \"title\": Template.anchor(\"x_label\"),\n },\n \"y\": {\n \"field\": Template.anchor(\"y\"),\n \"type\": \"nominal\",\n \"sort\": \"ascending\",\n \"title\": Template.anchor(\"y_label\"),\n },\n },\n \"layer\": [\n {\n \"mark\": \"rect\",\n \"width\": 300,\n \"height\": 300,\n \"encoding\": {\n \"color\": {\n \"field\": \"percent_of_y\",\n \"type\": \"quantitative\",\n \"title\": \"\",\n \"scale\": {\"domain\": [0, 1]},\n }\n },\n },\n {\n \"mark\": \"text\",\n \"encoding\": {\n \"text\": {\n \"field\": \"percent_of_y\",\n \"type\": \"quantitative\",\n \"format\": \".2f\",\n },\n \"color\": {\n \"condition\": {\n \"test\": \"datum.percent_of_y > 0.5\",\n \"value\": \"white\",\n },\n \"value\": \"black\",\n },\n },\n },\n ],\n },\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/reproduce.py__reproduce_stages__reproduce_stages.return.result": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/reproduce.py__reproduce_stages__reproduce_stages.return.result", "embedding": null, "metadata": {"file_path": "dvc/repo/reproduce.py", "file_name": "reproduce.py", "file_type": "text/x-python", "category": "implementation", "start_line": 123, "end_line": 200, "span_ids": ["_reproduce_stages"], "tokens": 599}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _reproduce_stages(\n G, stages, downstream=False, single_item=False, on_unchanged=None, **kwargs\n):\n r\"\"\"Derive the evaluation of the given node for the given graph.\n\n When you _reproduce a stage_, you want to _evaluate the descendants_\n to know if it make sense to _recompute_ it. A post-ordered search\n will give us an order list of the nodes we want.\n\n For example, let's say that we have the following pipeline:\n\n E\n / \\\n D F\n / \\ \\\n B C G\n \\ /\n A\n\n The derived evaluation of D would be: [A, B, C, D]\n\n In case that `downstream` option is specified, the desired effect\n is to derive the evaluation starting from the given stage up to the\n ancestors. However, the `networkx.ancestors` returns a set, without\n any guarantee of any order, so we are going to reverse the graph and\n use a reverse post-ordered search using the given stage as a starting\n point.\n\n E A\n / \\ / \\\n D F B C G\n / \\ \\ --- reverse --> \\ / /\n B C G D F\n \\ / \\ /\n A E\n\n The derived evaluation of _downstream_ B would be: [B, D, E]\n \"\"\"\n steps = _get_steps(G, stages, downstream, single_item)\n\n force_downstream = kwargs.pop(\"force_downstream\", False)\n result = []\n unchanged = []\n # `ret` is used to add a cosmetic newline.\n ret = []\n checkpoint_func = kwargs.pop(\"checkpoint_func\", None)\n for stage in steps:\n if ret:\n logger.info(\"\")\n\n if checkpoint_func:\n kwargs[\"checkpoint_func\"] = partial(\n _repro_callback, checkpoint_func, unchanged\n )\n\n try:\n ret = _reproduce_stage(stage, **kwargs)\n\n if len(ret) == 0:\n unchanged.extend([stage])\n elif force_downstream:\n # NOTE: we are walking our pipeline from the top to the\n # bottom. If one stage is changed, it will be reproduced,\n # which tells us that we should force reproducing all of\n # the other stages down below, even if their direct\n # dependencies didn't change.\n kwargs[\"force\"] = True\n\n if ret:\n result.extend(ret)\n except CheckpointKilledError:\n raise\n except Exception as exc:\n raise ReproductionError(stage.relpath) from exc\n\n if on_unchanged is not None:\n on_unchanged(unchanged)\n return result", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/trie.py_from_funcy_import_first_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/trie.py_from_funcy_import_first_", "embedding": null, "metadata": {"file_path": "dvc/repo/trie.py", "file_name": "trie.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 43, "span_ids": ["imports", "build_outs_trie"], "tokens": 291}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from funcy import first\nfrom pygtrie import Trie\n\nfrom dvc.exceptions import OutputDuplicationError, OverlappingOutputPathsError\n\n\ndef build_outs_trie(stages):\n outs = Trie()\n\n for stage in filter(bool, stages): # bug? not using it later\n for out in stage.outs:\n out_key = out.path_info.parts\n\n # Check for dup outs\n if out_key in outs:\n dup_stages = [stage, outs[out_key].stage]\n raise OutputDuplicationError(str(out), dup_stages)\n\n # Check for overlapping outs\n if outs.has_subtrie(out_key):\n parent = out\n overlapping = first(outs.values(prefix=out_key))\n else:\n parent = outs.shortest_prefix(out_key).value\n overlapping = out\n if parent and overlapping:\n msg = (\n \"The output paths:\\n'{}'('{}')\\n'{}'('{}')\\n\"\n \"overlap and are thus in the same tracked directory.\\n\"\n \"To keep reproducibility, outputs should be in separate \"\n \"tracked directories or tracked individually.\"\n ).format(\n str(parent),\n parent.stage.addressing,\n str(overlapping),\n overlapping.stage.addressing,\n )\n raise OverlappingOutputPathsError(parent, overlapping, msg)\n\n outs[out_key] = out\n\n return outs", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage_Stage.is_checkpoint.return.any_out_checkpoint_for_ou": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage_Stage.is_checkpoint.return.any_out_checkpoint_for_ou", "embedding": null, "metadata": {"file_path": "dvc/stage/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 112, "end_line": 246, "span_ids": ["Stage.__str__", "Stage.__repr__", "Stage.__init__", "Stage.is_checkpoint", "Stage.__hash__", "Stage.is_callback", "Stage.addressing", "Stage.is_data_source", "Stage.path", "Stage.dvcfile_3", "Stage", "Stage.relpath", "Stage.path_1", "Stage.is_repo_import", "Stage.path_in_repo", "Stage.__eq__", "Stage.dvcfile", "Stage.is_import"], "tokens": 846}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Stage(params.StageParams):\n # pylint:disable=no-value-for-parameter\n # rwlocked() confuses pylint\n\n def __init__(\n self,\n repo,\n path=None,\n cmd=None,\n wdir=os.curdir,\n deps=None,\n outs=None,\n md5=None,\n locked=False, # backward compatibility\n frozen=False,\n always_changed=False,\n stage_text=None,\n dvcfile=None,\n desc=None,\n meta=None,\n ):\n if deps is None:\n deps = []\n if outs is None:\n outs = []\n\n self.repo = repo\n self._path = path\n self.cmd = cmd\n self.wdir = wdir\n self.outs = outs\n self.deps = deps\n self.md5 = md5\n self.frozen = locked or frozen\n self.always_changed = always_changed\n self._stage_text = stage_text\n self._dvcfile = dvcfile\n self.desc = desc\n self.meta = meta\n self.raw_data = RawData()\n\n @property\n def path(self) -> str:\n return self._path\n\n @path.setter\n def path(self, path: str):\n self._path = path\n self.__dict__.pop(\"path_in_repo\", None)\n self.__dict__.pop(\"relpath\", None)\n\n @property\n def dvcfile(self):\n if self.path and self._dvcfile and self.path == self._dvcfile.path:\n return self._dvcfile\n\n if not self.path:\n raise DvcException(\n \"Stage does not have any path set \"\n \"and is detached from dvcfile.\"\n )\n\n from dvc.dvcfile import Dvcfile\n\n self._dvcfile = Dvcfile(self.repo, self.path)\n return self._dvcfile\n\n @dvcfile.setter\n def dvcfile(self, dvcfile):\n self._dvcfile = dvcfile\n\n def __repr__(self):\n return f\"Stage: '{self.addressing}'\"\n\n def __str__(self):\n return f\"stage: '{self.addressing}'\"\n\n @property\n def addressing(self) -> str:\n \"\"\"\n Useful for alternative presentations where we don't need\n `Stage:` prefix.\n \"\"\"\n return self.relpath if self.path else \"No path\"\n\n def __hash__(self):\n return hash(self.path_in_repo)\n\n def __eq__(self, other):\n return (\n self.__class__ == other.__class__\n and self.repo is other.repo\n and self.path_in_repo == other.path_in_repo\n )\n\n @cached_property\n def path_in_repo(self):\n return relpath(self.path, self.repo.root_dir)\n\n @cached_property\n def relpath(self):\n return relpath(self.path)\n\n @property\n def is_data_source(self):\n \"\"\"Whether the DVC-file was created with `dvc add` or `dvc import`\"\"\"\n return self.cmd is None\n\n @property\n def is_callback(self):\n \"\"\"\n A callback stage is always considered as changed,\n so it runs on every `dvc repro` call.\n \"\"\"\n return not self.is_data_source and len(self.deps) == 0\n\n @property\n def is_import(self):\n \"\"\"Whether the DVC-file was created with `dvc import`.\"\"\"\n return not self.cmd and len(self.deps) == 1 and len(self.outs) == 1\n\n @property\n def is_repo_import(self):\n if not self.is_import:\n return False\n\n return isinstance(self.deps[0], dependency.RepoDependency)\n\n @property\n def is_checkpoint(self):\n \"\"\"\n A stage containing checkpoint outs is always considered as changed\n since the checkpoint out is a circular dependency.\n \"\"\"\n return any(out.checkpoint for out in self.outs)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.changed_deps_Stage.remove.if_purge_.self_dvcfile_remove_stage": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.changed_deps_Stage.remove.if_purge_.self_dvcfile_remove_stage", "embedding": null, "metadata": {"file_path": "dvc/stage/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 254, "end_line": 342, "span_ids": ["Stage.changed_deps", "Stage.remove_outs", "Stage.changed_stage", "Stage.unprotect_outs", "Stage.remove", "Stage.changed_outs", "Stage.changed", "Stage.ignore_remove_outs", "Stage._changed_deps"], "tokens": 564}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Stage(params.StageParams):\n # pylint:disable=no-value-for-parameter\n\n def changed_deps(self):\n if self.frozen:\n return False\n\n if self.is_callback:\n logger.debug(\n \"%s has a command but no dependencies\", self.addressing\n )\n return True\n\n if self.always_changed or self.is_checkpoint:\n return True\n\n return self._changed_deps()\n\n def _changed_deps(self):\n for dep in self.deps:\n status = dep.status()\n if status:\n logger.debug(\n \"Dependency '{dep}' of {stage} changed because it is \"\n \"'{status}'.\".format(\n dep=dep, stage=self, status=status[str(dep)]\n )\n )\n return True\n return False\n\n def changed_outs(self):\n for out in self.outs:\n status = out.status()\n if status:\n logger.debug(\n \"Output '{out}' of {stage} changed because it is \"\n \"'{status}'\".format(\n out=out, stage=self, status=status[str(out)]\n )\n )\n return True\n\n return False\n\n def changed_stage(self):\n changed = self.md5 != self.compute_md5()\n if changed:\n logger.debug(self._changed_stage_entry())\n return changed\n\n @rwlocked(read=[\"deps\", \"outs\"])\n def changed(self):\n is_changed = (\n # Short-circuit order: stage md5 is fast,\n # deps are expected to change\n self.changed_stage()\n or self.changed_deps()\n or self.changed_outs()\n )\n if is_changed:\n logger.debug(\"%s changed.\", self)\n return is_changed\n\n @rwlocked(write=[\"outs\"])\n def remove_outs(self, ignore_remove=False, force=False):\n \"\"\"Used mainly for `dvc remove --outs` and :func:`Stage.reproduce`.\"\"\"\n for out in self.outs:\n if (out.persist or out.checkpoint) and not force:\n out.unprotect()\n continue\n\n logger.debug(f\"Removing output '{out}' of {self}.\")\n out.remove(ignore_remove=ignore_remove)\n\n def unprotect_outs(self):\n for out in self.outs:\n out.unprotect()\n\n def ignore_remove_outs(self):\n for out in self.outs:\n out.ignore_remove()\n\n @rwlocked(write=[\"outs\"])\n def remove(self, force=False, remove_outs=True, purge=True):\n if remove_outs:\n self.remove_outs(ignore_remove=True, force=force)\n else:\n self.unprotect_outs()\n self.ignore_remove_outs()\n if purge:\n self.dvcfile.remove_stage(self)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/loader.py_logging_logger.logging_getLogger___name_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/loader.py_logging_logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "dvc/stage/loader.py", "file_name": "loader.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 18, "span_ids": ["imports"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nfrom collections.abc import Mapping\nfrom copy import deepcopy\nfrom itertools import chain\n\nfrom funcy import cached_property, get_in, lcat, once, project\n\nfrom dvc import dependency, output\nfrom dvc.hash_info import HashInfo\nfrom dvc.parsing import FOREACH_KWD, JOIN, DataResolver, EntryNotFound\nfrom dvc.path_info import PathInfo\n\nfrom . import PipelineStage, Stage, loads_from\nfrom .exceptions import StageNameUnspecified, StageNotFound\nfrom .params import StageParams\nfrom .utils import fill_stage_dependencies, resolve_paths\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/loader.py_StageLoader.fill_from_lock_StageLoader.fill_from_lock.for_key_item_in_items_.item.hash_info.HashInfo_from_dict_info_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/loader.py_StageLoader.fill_from_lock_StageLoader.fill_from_lock.for_key_item_in_items_.item.hash_info.HashInfo_from_dict_info_", "embedding": null, "metadata": {"file_path": "dvc/stage/loader.py", "file_name": "loader.py", "file_type": "text/x-python", "category": "implementation", "start_line": 40, "end_line": 65, "span_ids": ["StageLoader.fill_from_lock"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StageLoader(Mapping):\n\n @staticmethod\n def fill_from_lock(stage, lock_data=None):\n \"\"\"Fill values for params, checksums for outs and deps from lock.\"\"\"\n if not lock_data:\n return\n\n assert isinstance(lock_data, dict)\n items = chain(\n ((StageParams.PARAM_DEPS, dep) for dep in stage.deps),\n ((StageParams.PARAM_OUTS, out) for out in stage.outs),\n )\n\n checksums = {\n key: {item[\"path\"]: item for item in lock_data.get(key, {})}\n for key in [StageParams.PARAM_DEPS, StageParams.PARAM_OUTS]\n }\n for key, item in items:\n path = item.def_path\n if isinstance(item, dependency.ParamsDependency):\n item.fill_values(get_in(lock_data, [stage.PARAM_PARAMS, path]))\n continue\n info = get_in(checksums, [key, path], {})\n info = info.copy()\n info.pop(\"path\", None)\n item.isexec = info.pop(\"isexec\", None)\n item.hash_info = HashInfo.from_dict(info)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/run.py__checkpoint_run__checkpoint_run.while_True_.if_done_wait_1_.return": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/run.py__checkpoint_run__checkpoint_run.while_True_.if_done_wait_1_.return", "embedding": null, "metadata": {"file_path": "dvc/stage/run.py", "file_name": "run.py", "file_type": "text/x-python", "category": "implementation", "start_line": 151, "end_line": 168, "span_ids": ["_checkpoint_run"], "tokens": 138}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _checkpoint_run(stage, callback_func, done, proc, killed):\n \"\"\"Run callback_func whenever checkpoint signal file is present.\"\"\"\n signal_path = os.path.join(stage.repo.tmp_dir, CHECKPOINT_SIGNAL_FILE)\n while True:\n if os.path.exists(signal_path):\n try:\n _run_callback(stage, callback_func)\n except Exception: # pylint: disable=broad-except\n logger.exception(\n \"Error generating checkpoint, %s will be aborted\", stage\n )\n _kill(proc)\n killed.set()\n finally:\n logger.debug(\"Remove checkpoint signal file\")\n os.remove(signal_path)\n if done.wait(1):\n return", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/run.py__kill_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/run.py__kill_", "embedding": null, "metadata": {"file_path": "dvc/stage/run.py", "file_name": "run.py", "file_type": "text/x-python", "category": "implementation", "start_line": 171, "end_line": 190, "span_ids": ["_run_callback", "_kill_nt", "_kill"], "tokens": 136}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _kill(proc):\n if os.name == \"nt\":\n return _kill_nt(proc)\n proc.terminate()\n proc.wait()\n\n\ndef _kill_nt(proc):\n # windows stages are spawned with shell=True, proc is the shell process and\n # not the actual stage process - we have to kill the entire tree\n subprocess.call([\"taskkill\", \"/F\", \"/T\", \"/PID\", str(proc.pid)])\n\n\n@relock_repo\ndef _run_callback(stage, callback_func):\n stage.save(allow_missing=True)\n stage.commit(allow_missing=True)\n logger.debug(\"Running checkpoint callback for stage '%s'\", stage)\n callback_func()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/serialize.py_from_collections_import_O_sort_by_path.partial_sorted_key_attrg": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/serialize.py_from_collections_import_O_sort_by_path.partial_sorted_key_attrg", "embedding": null, "metadata": {"file_path": "dvc/stage/serialize.py", "file_name": "serialize.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 35, "span_ids": ["imports"], "tokens": 225}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from collections import OrderedDict\nfrom functools import partial\nfrom operator import attrgetter\nfrom typing import TYPE_CHECKING, List, no_type_check\n\nfrom funcy import post_processing\n\nfrom dvc.dependency import ParamsDependency\nfrom dvc.output import BaseOutput\nfrom dvc.utils.collections import apply_diff\nfrom dvc.utils.serialize import parse_yaml_for_update\n\nfrom .params import StageParams\nfrom .utils import resolve_wdir, split_params_deps\n\nif TYPE_CHECKING:\n from dvc.stage import PipelineStage, Stage\n\nPARAM_PARAMS = ParamsDependency.PARAM_PARAMS\nPARAM_PATH = ParamsDependency.PARAM_PATH\n\nPARAM_DEPS = StageParams.PARAM_DEPS\nPARAM_OUTS = StageParams.PARAM_OUTS\n\nPARAM_CACHE = BaseOutput.PARAM_CACHE\nPARAM_METRIC = BaseOutput.PARAM_METRIC\nPARAM_PLOT = BaseOutput.PARAM_PLOT\nPARAM_PERSIST = BaseOutput.PARAM_PERSIST\nPARAM_CHECKPOINT = BaseOutput.PARAM_CHECKPOINT\nPARAM_DESC = BaseOutput.PARAM_DESC\n\nDEFAULT_PARAMS_FILE = ParamsDependency.DEFAULT_PARAMS_FILE\n\n\nsort_by_path = partial(sorted, key=attrgetter(\"def_path\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/serialize.py__get_flags__serialize_outs.return.outs_metrics_plots": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/serialize.py__get_flags__serialize_outs.return.outs_metrics_plots", "embedding": null, "metadata": {"file_path": "dvc/stage/serialize.py", "file_name": "serialize.py", "file_type": "text/x-python", "category": "implementation", "start_line": 38, "end_line": 70, "span_ids": ["_serialize_outs", "_get_flags", "_serialize_out"], "tokens": 234}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@post_processing(OrderedDict)\ndef _get_flags(out):\n if out.desc:\n yield PARAM_DESC, out.desc\n if not out.use_cache:\n yield PARAM_CACHE, False\n if out.checkpoint:\n yield PARAM_CHECKPOINT, True\n if out.persist:\n yield PARAM_PERSIST, True\n if out.plot and isinstance(out.plot, dict):\n # notice `out.plot` is not sorted\n # `out.plot` is in the same order as is in the file when read\n # and, should be dumped as-is without any sorting\n yield from out.plot.items()\n\n\ndef _serialize_out(out):\n flags = _get_flags(out)\n return out.def_path if not flags else {out.def_path: flags}\n\n\n@no_type_check\ndef _serialize_outs(outputs: List[BaseOutput]):\n outs, metrics, plots = [], [], []\n for out in sort_by_path(outputs):\n bucket = outs\n if out.plot:\n bucket = plots\n elif out.metric:\n bucket = metrics\n bucket.append(_serialize_out(out))\n return outs, metrics, plots", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State.get_State.get.return.HashInfo_md5_value_si": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/state.py_State.get_State.get.return.HashInfo_md5_value_si", "embedding": null, "metadata": {"file_path": "dvc/state.py", "file_name": "state.py", "file_type": "text/x-python", "category": "implementation", "start_line": 426, "end_line": 458, "span_ids": ["State.get"], "tokens": 276}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class State(StateBase):\n\n def get(self, path_info):\n \"\"\"Gets the hash for the specified path info. Hash will be\n retrieved from the state database if available.\n\n Args:\n path_info (dict): path info to get the hash for.\n\n Returns:\n HashInfo or None: hash for the specified path info or None if it\n doesn't exist in the state database.\n \"\"\"\n assert isinstance(path_info, str) or path_info.scheme == \"local\"\n path = os.fspath(path_info)\n\n # NOTE: use os.path.exists instead of LocalTree.exists\n # because it uses lexists() and will return True for broken\n # symlinks that we cannot stat() in get_mtime_and_size\n if not os.path.exists(path):\n return None\n\n actual_mtime, actual_size = get_mtime_and_size(path, self.tree)\n actual_inode = get_inode(path)\n\n existing_record = self.get_state_record_for_inode(actual_inode)\n if not existing_record:\n return None\n\n mtime, size, value, _ = existing_record\n if self._file_metadata_changed(actual_mtime, mtime, actual_size, size):\n return None\n\n self._update_state_record_timestamp_for_inode(actual_inode)\n return HashInfo(\"md5\", value, size=int(actual_size))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/__init__.py_posixpath_get_tree_config.return._resolve_remote_refs_conf": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/__init__.py_posixpath_get_tree_config.return._resolve_remote_refs_conf", "embedding": null, "metadata": {"file_path": "dvc/tree/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 48, "span_ids": ["get_tree_config", "imports", "get_tree_cls"], "tokens": 292}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import posixpath\nfrom urllib.parse import urlparse\n\nfrom .azure import AzureTree\nfrom .gdrive import GDriveTree\nfrom .gs import GSTree\nfrom .hdfs import HDFSTree\nfrom .http import HTTPTree\nfrom .https import HTTPSTree\nfrom .local import LocalTree\nfrom .oss import OSSTree\nfrom .s3 import S3Tree\nfrom .ssh import SSHTree\nfrom .webdav import WebDAVTree\nfrom .webdavs import WebDAVSTree\nfrom .webhdfs import WebHDFSTree\n\nTREES = [\n AzureTree,\n GDriveTree,\n GSTree,\n HDFSTree,\n HTTPTree,\n HTTPSTree,\n S3Tree,\n SSHTree,\n OSSTree,\n WebDAVTree,\n WebDAVSTree,\n WebHDFSTree\n # NOTE: LocalTree is the default\n]\n\n\ndef get_tree_cls(remote_conf):\n for tree_cls in TREES:\n if tree_cls.supported(remote_conf):\n return tree_cls\n return LocalTree\n\n\ndef get_tree_config(config, **kwargs):\n name = kwargs.get(\"name\")\n if name:\n remote_conf = config[\"remote\"][name.lower()]\n else:\n remote_conf = kwargs\n return _resolve_remote_refs(config, remote_conf)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_logging_use_state.with_tree_state_.return.call_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_logging_use_state.with_tree_state_.return.call_", "embedding": null, "metadata": {"file_path": "dvc/tree/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 45, "span_ids": ["RemoteMissingDepsError", "imports", "use_state", "RemoteCmdError", "RemoteActionNotImplemented", "RemoteCmdError.__init__", "RemoteActionNotImplemented.__init__"], "tokens": 314}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nfrom concurrent.futures import ThreadPoolExecutor, as_completed\nfrom functools import partial\nfrom multiprocessing import cpu_count\nfrom typing import Any, ClassVar, Dict, Optional\nfrom urllib.parse import urlparse\n\nfrom funcy import cached_property, decorator\n\nfrom dvc.dir_info import DirInfo\nfrom dvc.exceptions import DvcException, DvcIgnoreInCollectedDirError\nfrom dvc.ignore import DvcIgnore\nfrom dvc.path_info import URLInfo\nfrom dvc.progress import Tqdm\nfrom dvc.state import StateNoop\nfrom dvc.utils import tmp_fname\nfrom dvc.utils.fs import makedirs, move\nfrom dvc.utils.http import open_url\n\nlogger = logging.getLogger(__name__)\n\n\nclass RemoteCmdError(DvcException):\n def __init__(self, remote, cmd, ret, err):\n super().__init__(\n \"{remote} command '{cmd}' finished with non-zero return code\"\n \" {ret}': {err}\".format(remote=remote, cmd=cmd, ret=ret, err=err)\n )\n\n\nclass RemoteActionNotImplemented(DvcException):\n def __init__(self, action, scheme):\n m = f\"{action} is not supported for {scheme} remotes\"\n super().__init__(m)\n\n\nclass RemoteMissingDepsError(DvcException):\n pass\n\n\n@decorator\ndef use_state(call):\n tree = call._args[0] # pylint: disable=protected-access\n with tree.state:\n return call()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree._collect_dir_BaseTree._collect_dir.return.dir_info": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree._collect_dir_BaseTree._collect_dir.return.dir_info", "embedding": null, "metadata": {"file_path": "dvc/tree/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 306, "end_line": 334, "span_ids": ["BaseTree._collect_dir"], "tokens": 256}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseTree:\n\n def _collect_dir(self, path_info, **kwargs):\n\n file_infos = set()\n\n for fname in self.walk_files(path_info, **kwargs):\n if DvcIgnore.DVCIGNORE_FILE == fname.name:\n raise DvcIgnoreInCollectedDirError(fname.parent)\n\n file_infos.add(fname)\n\n hash_infos = {fi: self.state.get(fi) for fi in file_infos}\n not_in_state = {fi for fi, hi in hash_infos.items() if hi is None}\n\n new_hash_infos = self._calculate_hashes(not_in_state)\n hash_infos.update(new_hash_infos)\n\n dir_info = DirInfo()\n for fi, hi in hash_infos.items():\n # NOTE: this is lossy transformation:\n # \"hey\\there\" -> \"hey/there\"\n # \"hey/there\" -> \"hey/there\"\n # The latter is fine filename on Windows, which\n # will transform to dir/file on back transform.\n #\n # Yes, this is a BUG, as long as we permit \"/\" in\n # filenames on Windows and \"\\\" on Unix\n dir_info.trie[fi.relative_to(path_info).parts] = hi\n\n return dir_info", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree._download_file_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/base.py_BaseTree._download_file_", "embedding": null, "metadata": {"file_path": "dvc/tree/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 446, "end_line": 461, "span_ids": ["BaseTree._download_file"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseTree:\n\n def _download_file(\n self, from_info, to_info, name, no_progress_bar, file_mode, dir_mode\n ):\n makedirs(to_info.parent, exist_ok=True, mode=dir_mode)\n\n logger.debug(\"Downloading '%s' to '%s'\", from_info, to_info)\n name = name or to_info.name\n\n tmp_file = tmp_fname(to_info)\n\n self._download( # noqa, pylint: disable=no-member\n from_info, tmp_file, name=name, no_progress_bar=no_progress_bar\n )\n\n move(tmp_file, to_info, mode=file_mode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/dvc.py_DvcTree.exists_DvcTree._add_dir.for_key_in_out_dir_cache_.trie_base_key_None": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/dvc.py_DvcTree.exists_DvcTree._add_dir.for_key_in_out_dir_cache_.trie_base_key_None", "embedding": null, "metadata": {"file_path": "dvc/tree/dvc.py", "file_name": "dvc.py", "file_type": "text/x-python", "category": "implementation", "start_line": 109, "end_line": 167, "span_ids": ["DvcTree.exists", "DvcTree.isfile", "DvcTree.isdir", "DvcTree._fetch_dir", "DvcTree.check_isdir", "DvcTree._add_dir"], "tokens": 397}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DvcTree(BaseTree):\n\n def exists(self, path): # pylint: disable=arguments-differ\n try:\n self.metadata(path)\n return True\n except FileNotFoundError:\n return False\n\n def isdir(self, path): # pylint: disable=arguments-differ\n try:\n meta = self.metadata(path)\n return meta.isdir\n except FileNotFoundError:\n return False\n\n def check_isdir(self, path_info, outs):\n if len(outs) != 1:\n return True\n\n out = outs[0]\n if not out.is_dir_checksum:\n return out.path_info != path_info\n if out.path_info == path_info:\n return True\n\n try:\n self._get_granular_hash(path_info, out)\n return False\n except FileNotFoundError:\n return True\n\n def isfile(self, path): # pylint: disable=arguments-differ\n try:\n meta = self.metadata(path)\n return meta.isfile\n except FileNotFoundError:\n return False\n\n def _fetch_dir(\n self, out, filter_info=None, download_callback=None, **kwargs\n ):\n # pull dir cache if needed\n out.get_dir_cache(**kwargs)\n\n # pull dir contents if needed\n if self.fetch and out.changed_cache(filter_info=filter_info):\n used_cache = out.get_used_cache(filter_info=filter_info)\n downloaded = self.repo.cloud.pull(used_cache, **kwargs)\n if download_callback:\n download_callback(downloaded)\n\n def _add_dir(self, top, trie, out, **kwargs):\n if not self.fetch and not self.stream:\n return\n\n self._fetch_dir(out, filter_info=top, **kwargs)\n\n base = out.path_info.parts\n for key in out.dir_cache.trie.iterkeys(): # noqa: B301\n trie[base + key] = None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/hdfs.py_HDFSTree._group_HDFSTree.get_file_hash.return.hash_info": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/hdfs.py_HDFSTree._group_HDFSTree.get_file_hash.return.hash_info", "embedding": null, "metadata": {"file_path": "dvc/tree/hdfs.py", "file_name": "hdfs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 210, "end_line": 230, "span_ids": ["HDFSTree._group", "HDFSTree.get_file_hash"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class HDFSTree(BaseTree):\n\n @staticmethod\n def _group(regex, s, gname):\n match = re.match(regex, s)\n assert match is not None\n return match.group(gname)\n\n def get_file_hash(self, path_info):\n # NOTE: pyarrow doesn't support checksum, so we need to use hadoop\n regex = r\".*\\t.*\\t(?P.*)\"\n stdout = self.hadoop_fs(\n f\"checksum {path_info.url}\", user=path_info.user\n )\n hash_info = HashInfo(\n self.PARAM_CHECKSUM, self._group(regex, stdout, \"checksum\"),\n )\n\n with self.hdfs(path_info) as hdfs:\n file_info = hdfs.get_file_info(path_info.path)\n hash_info.size = file_info.size\n\n return hash_info", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree.is_hardlink_LocalTree.chmod.try_.except_OSError_as_exc_.if_actual_mode_.raise": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree.is_hardlink_LocalTree.chmod.try_.except_OSError_as_exc_.if_actual_mode_.raise", "embedding": null, "metadata": {"file_path": "dvc/tree/local.py", "file_name": "local.py", "file_type": "text/x-python", "category": "implementation", "start_line": 227, "end_line": 254, "span_ids": ["LocalTree.chmod", "LocalTree.is_hardlink", "LocalTree.reflink"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LocalTree(BaseTree):\n\n @staticmethod\n def is_hardlink(path_info):\n return System.is_hardlink(path_info)\n\n def reflink(self, from_info, to_info):\n tmp_info = to_info.parent / tmp_fname(to_info.name)\n System.reflink(from_info, tmp_info)\n # NOTE: reflink has its own separate inode, so you can set permissions\n # that are different from the source.\n os.chmod(tmp_info, self.file_mode)\n os.rename(tmp_info, to_info)\n\n def chmod(self, path_info, mode):\n try:\n os.chmod(path_info, mode)\n except OSError as exc:\n # There is nothing we need to do in case of a read-only file system\n if exc.errno == errno.EROFS:\n return\n\n # In shared cache scenario, we might not own the cache file, so we\n # need to check if cache file is already protected.\n if exc.errno not in [errno.EPERM, errno.EACCES]:\n raise\n\n actual = stat.S_IMODE(os.stat(path_info).st_mode)\n if actual != mode:\n raise", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree._unprotect_file_LocalTree._unprotect_file.os_chmod_path_self_file_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree._unprotect_file_LocalTree._unprotect_file.os_chmod_path_self_file_", "embedding": null, "metadata": {"file_path": "dvc/tree/local.py", "file_name": "local.py", "file_type": "text/x-python", "category": "implementation", "start_line": 256, "end_line": 277, "span_ids": ["LocalTree._unprotect_file"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LocalTree(BaseTree):\n\n def _unprotect_file(self, path):\n if System.is_symlink(path) or System.is_hardlink(path):\n logger.debug(\"Unprotecting '%s'\", path)\n tmp = os.path.join(os.path.dirname(path), \".\" + uuid())\n\n # The operations order is important here - if some application\n # would access the file during the process of copyfile then it\n # would get only the part of file. So, at first, the file should be\n # copied with the temporary name, and then original file should be\n # replaced by new.\n copyfile(path, tmp, name=\"Unprotecting '{}'\".format(relpath(path)))\n remove(path)\n os.rename(tmp, path)\n\n else:\n logger.debug(\n \"Skipping copying for '%s', since it is not \"\n \"a symlink or a hardlink.\",\n path,\n )\n\n os.chmod(path, self.file_mode)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree._unprotect_dir_LocalTree.getsize.return.os_path_getsize_path_info": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree._unprotect_dir_LocalTree.getsize.return.os_path_getsize_path_info", "embedding": null, "metadata": {"file_path": "dvc/tree/local.py", "file_name": "local.py", "file_type": "text/x-python", "category": "implementation", "start_line": 279, "end_line": 315, "span_ids": ["LocalTree.is_protected", "LocalTree.get_file_hash", "LocalTree.protect", "LocalTree.unprotect", "LocalTree._unprotect_dir", "LocalTree.getsize"], "tokens": 241}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LocalTree(BaseTree):\n\n def _unprotect_dir(self, path):\n for fname in self.walk_files(path):\n self._unprotect_file(fname)\n\n def unprotect(self, path_info):\n if not os.path.exists(path_info):\n raise DvcException(\n f\"can't unprotect non-existing data '{path_info}'\"\n )\n\n if os.path.isdir(path_info):\n self._unprotect_dir(path_info)\n else:\n self._unprotect_file(path_info)\n\n def protect(self, path_info):\n self.chmod(path_info, self.CACHE_MODE)\n\n def is_protected(self, path_info):\n try:\n mode = os.stat(path_info).st_mode\n except FileNotFoundError:\n return False\n\n return stat.S_IMODE(mode) == self.CACHE_MODE\n\n def get_file_hash(self, path_info):\n hash_info = HashInfo(self.PARAM_CHECKSUM, file_md5(path_info)[0],)\n\n if hash_info:\n hash_info.size = os.path.getsize(path_info)\n\n return hash_info\n\n @staticmethod\n def getsize(path_info):\n return os.path.getsize(path_info)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree._upload_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/local.py_LocalTree._upload_", "embedding": null, "metadata": {"file_path": "dvc/tree/local.py", "file_name": "local.py", "file_type": "text/x-python", "category": "implementation", "start_line": 323, "end_line": 355, "span_ids": ["LocalTree._download", "LocalTree._reset", "LocalTree._upload"], "tokens": 197}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class LocalTree(BaseTree):\n\n def _upload(\n self,\n from_file,\n to_info,\n name=None,\n no_progress_bar=False,\n file_mode=None,\n **_kwargs,\n ):\n makedirs(to_info.parent, exist_ok=True)\n\n tmp_file = tmp_fname(to_info)\n copyfile(\n from_file, tmp_file, name=name, no_progress_bar=no_progress_bar\n )\n\n if file_mode is not None:\n self.chmod(tmp_file, file_mode)\n else:\n self.protect(tmp_file)\n os.replace(tmp_file, to_info)\n\n @staticmethod\n def _download(\n from_info, to_file, name=None, no_progress_bar=False, **_kwargs\n ):\n copyfile(\n from_info, to_file, no_progress_bar=no_progress_bar, name=name\n )\n\n def _reset(self):\n return self.__dict__.pop(\"dvcignore\", None)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_logging_RepoFactory.Union_Callable_str_Re": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/repo.py_logging_RepoFactory.Union_Callable_str_Re", "embedding": null, "metadata": {"file_path": "dvc/tree/repo.py", "file_name": "repo.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 27, "span_ids": ["imports"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nimport stat\nimport threading\nfrom contextlib import suppress\nfrom itertools import takewhile\nfrom typing import TYPE_CHECKING, Callable, Optional, Tuple, Type, Union\n\nfrom funcy import lfilter, wrap_with\n\nfrom dvc.dvcfile import is_valid_filename\nfrom dvc.hash_info import HashInfo\nfrom dvc.path_info import PathInfo\nfrom dvc.utils import file_md5, is_exec\nfrom dvc.utils.collections import PathStringTrie\nfrom dvc.utils.fs import copy_fobj_to_file, makedirs\n\nfrom ._metadata import Metadata\nfrom .base import BaseTree\nfrom .dvc import DvcTree\n\nif TYPE_CHECKING:\n from dvc.repo import Repo\n\nlogger = logging.getLogger(__name__)\n\nRepoFactory = Union[Callable[[str], \"Repo\"], Type[\"Repo\"]]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webhdfs.py_logging_update_pbar.return.update": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webhdfs.py_logging_update_pbar.return.update", "embedding": null, "metadata": {"file_path": "dvc/tree/webhdfs.py", "file_name": "webhdfs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 28, "span_ids": ["imports", "update_pbar"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nimport threading\nfrom contextlib import contextmanager\nfrom urllib.parse import urlparse\n\nfrom funcy import cached_property, wrap_prop\n\nfrom dvc.hash_info import HashInfo\nfrom dvc.path_info import CloudURLInfo\nfrom dvc.progress import Tqdm\nfrom dvc.scheme import Schemes\n\nfrom .base import BaseTree\n\nlogger = logging.getLogger(__name__)\n\n\ndef update_pbar(pbar, total):\n \"\"\"Update pbar to accept the two arguments passed by hdfs\"\"\"\n\n def update(_, bytes_transfered):\n if bytes_transfered == -1:\n pbar.update_to(total)\n return\n pbar.update_to(bytes_transfered)\n\n return update", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webhdfs.py_WebHDFSTree_WebHDFSTree.__init__.self.alias.config_get_webhdfs_alias": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webhdfs.py_WebHDFSTree_WebHDFSTree.__init__.self.alias.config_get_webhdfs_alias", "embedding": null, "metadata": {"file_path": "dvc/tree/webhdfs.py", "file_name": "webhdfs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 31, "end_line": 58, "span_ids": ["WebHDFSTree.__init__", "WebHDFSTree"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class WebHDFSTree(BaseTree):\n scheme = Schemes.WEBHDFS\n PATH_CLS = CloudURLInfo\n REQUIRES = {\"hdfs\": \"hdfs\"}\n PARAM_CHECKSUM = \"checksum\"\n\n def __init__(self, repo, config):\n super().__init__(repo, config)\n\n self.path_info = None\n url = config.get(\"url\")\n if not url:\n return\n\n parsed = urlparse(url)\n user = parsed.username or config.get(\"user\")\n\n self.path_info = self.PATH_CLS.from_parts(\n scheme=\"webhdfs\",\n host=parsed.hostname,\n user=user,\n port=parsed.port,\n path=parsed.path,\n )\n\n self.hdfscli_config = config.get(\"hdfscli_config\")\n self.token = config.get(\"webhdfs_token\")\n self.alias = config.get(\"webhdfs_alias\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webhdfs.py_WebHDFSTree.hdfs_client_WebHDFSTree.hdfs_client.return.client": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webhdfs.py_WebHDFSTree.hdfs_client_WebHDFSTree.hdfs_client.return.client", "embedding": null, "metadata": {"file_path": "dvc/tree/webhdfs.py", "file_name": "webhdfs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 60, "end_line": 91, "span_ids": ["WebHDFSTree.hdfs_client"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class WebHDFSTree(BaseTree):\n\n @wrap_prop(threading.Lock())\n @cached_property\n def hdfs_client(self):\n import hdfs\n\n logger.debug(\"URL: %s\", self.path_info)\n logger.debug(\"HDFSConfig: %s\", self.hdfscli_config)\n\n try:\n return hdfs.config.Config(self.hdfscli_config).get_client(\n self.alias\n )\n except hdfs.util.HdfsError as exc:\n exc_msg = str(exc)\n errors = (\n \"No alias specified\",\n \"Invalid configuration file\",\n f\"Alias {self.alias} not found\",\n )\n if not any(err in exc_msg for err in errors):\n raise\n\n http_url = f\"http://{self.path_info.host}:{self.path_info.port}\"\n\n if self.token is not None:\n client = hdfs.TokenClient(http_url, token=self.token, root=\"/\")\n else:\n client = hdfs.InsecureClient(\n http_url, user=self.path_info.user, root=\"/\"\n )\n\n return client", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webhdfs.py_WebHDFSTree.open_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/tree/webhdfs.py_WebHDFSTree.open_", "embedding": null, "metadata": {"file_path": "dvc/tree/webhdfs.py", "file_name": "webhdfs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 93, "end_line": 165, "span_ids": ["WebHDFSTree.walk_files", "WebHDFSTree.open", "WebHDFSTree.get_file_hash", "WebHDFSTree.move", "WebHDFSTree._upload", "WebHDFSTree.copy", "WebHDFSTree.remove", "WebHDFSTree.exists", "WebHDFSTree._download"], "tokens": 568}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class WebHDFSTree(BaseTree):\n\n @contextmanager\n def open(self, path_info, mode=\"r\", encoding=None):\n assert mode in {\"r\", \"rt\", \"rb\"}\n\n with self.hdfs_client.read(\n path_info.path, encoding=encoding\n ) as reader:\n yield reader.read()\n\n def walk_files(self, path_info, **kwargs):\n if not self.exists(path_info):\n return\n\n root = path_info.path\n for path, _, files in self.hdfs_client.walk(root):\n for file_ in files:\n path = os.path.join(path, file_)\n yield path_info.replace(path=path)\n\n def remove(self, path_info):\n if path_info.scheme != self.scheme:\n raise NotImplementedError\n\n self.hdfs_client.delete(path_info.path)\n\n def exists(self, path_info, use_dvcignore=True):\n assert not isinstance(path_info, list)\n assert path_info.scheme == \"webhdfs\"\n\n status = self.hdfs_client.status(path_info.path, strict=False)\n return status is not None\n\n def get_file_hash(self, path_info):\n checksum = self.hdfs_client.checksum(path_info.path)\n hash_info = HashInfo(self.PARAM_CHECKSUM, checksum[\"bytes\"])\n\n hash_info.size = self.hdfs_client.status(path_info.path)[\"length\"]\n return hash_info\n\n def copy(self, from_info, to_info, **_kwargs):\n with self.hdfs_client.read(from_info.path) as reader:\n content = reader.read()\n self.hdfs_client.write(to_info.path, data=content)\n\n def move(self, from_info, to_info, mode=None):\n self.hdfs_client.makedirs(to_info.parent.path)\n self.hdfs_client.rename(from_info.path, to_info.path)\n\n def _upload(\n self, from_file, to_info, name=None, no_progress_bar=False, **_kwargs\n ):\n total = os.path.getsize(from_file)\n with Tqdm(\n desc=name, total=total, disable=no_progress_bar, bytes=True\n ) as pbar:\n self.hdfs_client.upload(\n to_info.path,\n from_file,\n overwrite=True,\n progress=update_pbar(pbar, total),\n )\n\n def _download(\n self, from_info, to_file, name=None, no_progress_bar=False, **_kwargs\n ):\n total = self.hdfs_client.status(from_info.path)[\"length\"]\n with Tqdm(\n desc=name, total=total, disable=no_progress_bar, bytes=True\n ) as pbar:\n self.hdfs_client.download(\n from_info.path, to_file, progress=update_pbar(pbar, total)\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/types.py__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/types.py__", "embedding": null, "metadata": {"file_path": "dvc/types.py", "file_name": "types.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 13, "span_ids": ["imports"], "tokens": 78}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from typing import TYPE_CHECKING, Optional, Union\n\nfrom dvc.path_info import PathInfo, URLInfo\n\nif TYPE_CHECKING:\n from os import PathLike\n\nStrPath = Union[str, \"PathLike[str]\"]\nDvcPath = Union[PathInfo, URLInfo]\nAnyPath = Union[str, DvcPath, StrPath]\n\nOptStr = Optional[str]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py_tmp_fname_colorize.return._style_color_message_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py_tmp_fname_colorize.return._style_color_message_", "embedding": null, "metadata": {"file_path": "dvc/utils/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 230, "end_line": 262, "span_ids": ["current_timestamp", "tmp_fname", "colorize"], "tokens": 198}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def tmp_fname(fname):\n \"\"\" Temporary name for a partial download \"\"\"\n return os.fspath(fname) + \".\" + uuid() + \".tmp\"\n\n\ndef current_timestamp():\n return int(nanotime.timestamp(time.time()))\n\n\ndef colorize(message, color=None, style=None):\n \"\"\"Returns a message in a specified color.\"\"\"\n if not color:\n return message\n\n styles = {\n \"dim\": colorama.Style.DIM,\n \"bold\": colorama.Style.BRIGHT,\n }\n\n colors = {\n \"green\": colorama.Fore.GREEN,\n \"yellow\": colorama.Fore.YELLOW,\n \"blue\": colorama.Fore.BLUE,\n \"red\": colorama.Fore.RED,\n \"magenta\": colorama.Fore.MAGENTA,\n }\n\n return \"{style}{color}{message}{reset}\".format(\n style=styles.get(style, \"\"),\n color=colors.get(color, \"\"),\n message=message,\n reset=colorama.Style.RESET_ALL,\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/setup.py_install_requires_ssh_gssapi._paramiko_invoke_gssapi_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/setup.py_install_requires_ssh_gssapi._paramiko_invoke_gssapi_", "embedding": null, "metadata": {"file_path": "setup.py", "file_name": "setup.py", "file_type": "text/x-python", "category": "implementation", "start_line": 48, "end_line": 110, "span_ids": ["impl:15", "impl:17"], "tokens": 786}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "install_requires = [\n \"ply>=3.9\", # See https://github.com/pyinstaller/pyinstaller/issues/1945\n \"colorama>=0.3.9\",\n \"configobj>=5.0.6\",\n \"gitpython>3\",\n \"dulwich>=0.20.15\",\n \"pygit2>=1.4.0\",\n \"setuptools>=34.0.0\",\n \"nanotime>=0.5.2\",\n \"pyasn1>=0.4.1\",\n \"voluptuous>=0.11.7\",\n \"jsonpath-ng>=1.5.1\",\n \"requests>=2.22.0\",\n \"grandalf==0.6\",\n \"distro>=1.3.0\",\n \"appdirs>=1.4.3\",\n \"ruamel.yaml>=0.16.1\",\n \"toml>=0.10.1\",\n \"funcy>=1.14\",\n \"pathspec>=0.6.0\",\n \"shortuuid>=0.5.0\",\n \"tqdm>=4.45.0,<5\",\n \"packaging>=19.0\",\n \"zc.lockfile>=1.2.1\",\n \"flufl.lock>=3.2,<4\",\n \"win-unicode-console>=0.5; sys_platform == 'win32'\",\n \"pywin32>=225; sys_platform == 'win32'\",\n \"networkx>=2.1\",\n \"pydot>=1.2.4\",\n \"speedcopy>=2.0.1; python_version < '3.8' and sys_platform == 'win32'\",\n \"dataclasses==0.7; python_version < '3.7'\",\n \"flatten_dict>=0.3.0,<1\",\n \"tabulate>=0.8.7\",\n \"pygtrie==2.3.2\",\n \"dpath>=2.0.1,<3\",\n \"shtab>=1.3.2,<2\",\n \"rich>=3.0.5\",\n \"dictdiffer>=0.8.1\",\n \"python-benedict>=0.21.1\",\n \"pyparsing==2.4.7\",\n \"typing_extensions>=3.7.4\",\n]\n\n\n# Extra dependencies for remote integrations\n\ngs = [\"google-cloud-storage==1.19.0\"]\ngdrive = [\"pydrive2>=1.6.3\", \"six >= 1.13.0\"]\ns3 = [\"boto3>=1.9.201\"]\nazure = [\"azure-storage-blob>=12.0\", \"knack\"]\n# https://github.com/Legrandin/pycryptodome/issues/465\noss = [\"oss2==2.6.1\", \"pycryptodome<3.9.9\"]\nssh = [\"paramiko[invoke]>=2.7.0\"]\n\n# Remove the env marker if/when pyarrow is available for Python3.9\nhdfs = [\"pyarrow>=2.0.0; python_version < '3.9'\"]\nwebhdfs = [\"hdfs==2.5.8\"]\nwebdav = [\"webdavclient3>=3.14.5\"]\n# gssapi should not be included in all_remotes, because it doesn't have wheels\n# for linux and mac, so it will fail to compile if user doesn't have all the\n# requirements, including kerberos itself. Once all the wheels are available,\n# we can start shipping it by default.\nssh_gssapi = [\"paramiko[invoke,gssapi]>=2.7.0\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/setup.py_all_remotes_tests_requirements._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/setup.py_all_remotes_tests_requirements._", "embedding": null, "metadata": {"file_path": "setup.py", "file_name": "setup.py", "file_type": "text/x-python", "category": "implementation", "start_line": 110, "end_line": 152, "span_ids": ["impl:17"], "tokens": 446}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "all_remotes = gs + s3 + azure + ssh + oss + gdrive + hdfs + webhdfs + webdav\n\n# Extra dependecies to run tests\ntests_requirements = [\n \"wheel>=0.31.1\",\n # Test requirements:\n \"pytest>=6.0.1\",\n \"pytest-cov\",\n \"pytest-docker>=0.7.2\",\n \"pytest-timeout>=1.3.3\",\n \"pytest-cov>=2.6.1\",\n \"pytest-xdist>=1.26.1\",\n \"pytest-mock==1.11.2\",\n \"pytest-lazy-fixture\",\n \"pytest-tap\",\n \"flaky>=3.5.3\",\n \"mock>=3.0.0\",\n \"xmltodict>=0.11.0\",\n \"awscli>=1.16.297\",\n \"google-compute-engine==2.8.13\",\n \"Pygments\", # required by collective.checkdocs,\n \"collective.checkdocs\",\n \"psutil\",\n \"pydocstyle<4.0\",\n \"jaraco.windows==3.9.2\",\n \"mock-ssh-server>=0.8.2\",\n \"moto==1.3.16.dev122\",\n # moto's indirect dependency that is causing problems with flufl.lock's\n # dependency (atpublic). See https://github.com/iterative/dvc/pull/4853\n \"aws-sam-translator<1.29.0\",\n # for moto's indirect dependency.\n # See https://github.com/iterative/dvc/pull/4879\n \"urllib3<1.26.0\",\n \"rangehttpserver==1.2.0\",\n \"beautifulsoup4==4.4.0\",\n \"pylint==2.5.3\",\n \"pylint-pytest>=0.3.0\",\n \"pylint-plugin-utils\",\n \"wget\",\n \"filelock\",\n \"mypy\",\n \"wsgidav\",\n]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/setup.py_setup__": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/setup.py_setup__", "embedding": null, "metadata": {"file_path": "setup.py", "file_name": "setup.py", "file_type": "text/x-python", "category": "implementation", "start_line": 160, "end_line": 201, "span_ids": ["impl:41"], "tokens": 351}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "setup(\n name=\"dvc\",\n version=version,\n description=\"Git for data scientists - manage your code and data together\",\n long_description=open(\"README.rst\", \"r\", encoding=\"UTF-8\").read(),\n author=\"Dmitry Petrov\",\n author_email=\"dmitry@dvc.org\",\n download_url=\"https://github.com/iterative/dvc\",\n license=\"Apache License 2.0\",\n install_requires=install_requires,\n extras_require={\n \"all\": all_remotes,\n \"gs\": gs,\n \"gdrive\": gdrive,\n \"s3\": s3,\n \"azure\": azure,\n \"oss\": oss,\n \"ssh\": ssh,\n \"ssh_gssapi\": ssh_gssapi,\n \"hdfs\": hdfs,\n \"webhdfs\": webhdfs,\n \"webdav\": webdav,\n \"tests\": tests_requirements,\n },\n keywords=\"data-science data-version-control machine-learning git\"\n \" developer-tools reproducibility collaboration ai\",\n python_requires=\">=3.6\",\n classifiers=[\n \"Development Status :: 4 - Beta\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.6\",\n \"Programming Language :: Python :: 3.7\",\n \"Programming Language :: Python :: 3.8\",\n ],\n packages=find_packages(exclude=[\"tests\"]),\n include_package_data=True,\n url=\"http://dvc.org\",\n entry_points={\"console_scripts\": [\"dvc = dvc.main:main\"]},\n cmdclass={\"build_py\": build_py},\n zip_safe=False,\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/conftest.py_os__get_opt.return.f_action_remote_name": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/conftest.py_os__get_opt.return.f_action_remote_name", "embedding": null, "metadata": {"file_path": "tests/conftest.py", "file_name": "conftest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 55, "span_ids": ["reset_loglevel", "imports", "_close_pools", "_get_opt"], "tokens": 336}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nfrom contextlib import suppress\n\nimport pytest\n\nfrom .dir_helpers import * # noqa, pylint: disable=wildcard-import\nfrom .remotes import * # noqa, pylint: disable=wildcard-import\n\n# Prevent updater and analytics from running their processes\nos.environ[\"DVC_TEST\"] = \"true\"\n# Ensure progress output even when not outputting to raw sys.stderr console\nos.environ[\"DVC_IGNORE_ISATTY\"] = \"true\"\n\nREMOTES = {\n # remote: enabled_by_default?\n \"azure\": False,\n \"gdrive\": False,\n \"gs\": False,\n \"hdfs\": False,\n \"http\": True,\n \"oss\": False,\n \"s3\": True,\n \"ssh\": True,\n \"webdav\": True,\n}\n\n\n@pytest.fixture(autouse=True)\ndef reset_loglevel(request, caplog):\n \"\"\"\n Use it to ensure log level at the start of each test\n regardless of dvc.logger.setup(), Repo configs or whatever.\n \"\"\"\n ini_opt = None\n with suppress(ValueError):\n ini_opt = request.config.getini(\"log_level\")\n\n level = request.config.getoption(\"--log-level\") or ini_opt\n if level:\n with caplog.at_level(level.upper(), logger=\"dvc\"):\n yield\n else:\n yield\n\n\n@pytest.fixture(scope=\"session\", autouse=True)\ndef _close_pools():\n from dvc.tree.pool import close_pools\n\n yield\n close_pools()\n\n\ndef _get_opt(remote_name, action):\n return f\"--{action}-{remote_name}\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/conftest.py_pytest_addoption_pytest_addoption.for_remote_name_in_REMOTE.for_action_in_enable_.parser_addoption_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/conftest.py_pytest_addoption_pytest_addoption.for_remote_name_in_REMOTE.for_action_in_enable_.parser_addoption_", "embedding": null, "metadata": {"file_path": "tests/conftest.py", "file_name": "conftest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 58, "end_line": 82, "span_ids": ["pytest_addoption"], "tokens": 228}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def pytest_addoption(parser):\n \"\"\"Adds remote-related flags to selectively disable/enable for tests\n Eg: If some remotes, eg: ssh is enabled to be tested for by default\n (see above `REMOTES`), then, `--disable-ssh` flag is added. If remotes\n like `hdfs` are disabled by default, `--enable-hdfs` is added to make them\n run.\n\n You can also make everything run-by-default with `--all` flag, which takes\n precedence on all previous `--enable-*`/`--disable-*` flags.\n \"\"\"\n parser.addoption(\n \"--all\",\n action=\"store_true\",\n default=False,\n help=\"Test all of the remotes, unless other flags also supplied\",\n )\n for remote_name in REMOTES:\n for action in (\"enable\", \"disable\"):\n opt = _get_opt(remote_name, action)\n parser.addoption(\n opt,\n action=\"store_true\",\n default=None,\n help=f\"{action} tests for {remote_name}\",\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/conftest.py_DVCTestConfig_test_config.return.request_config_dvc_config": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/conftest.py_DVCTestConfig_test_config.return.request_config_dvc_config", "embedding": null, "metadata": {"file_path": "tests/conftest.py", "file_name": "conftest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 85, "end_line": 110, "span_ids": ["DVCTestConfig.requires", "DVCTestConfig.__init__", "pytest_runtest_setup", "test_config", "DVCTestConfig.apply_marker", "DVCTestConfig"], "tokens": 164}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DVCTestConfig:\n def __init__(self):\n self.enabled_remotes = set()\n\n def requires(self, remote_name):\n if remote_name not in REMOTES or remote_name in self.enabled_remotes:\n return\n\n pytest.skip(f\"{remote_name} tests not enabled through CLI\")\n\n def apply_marker(self, marker):\n self.requires(marker.name)\n\n\ndef pytest_runtest_setup(item):\n # Apply test markers to skip tests selectively\n # NOTE: this only works on individual tests,\n # for fixture, use `test_config` fixture and\n # run `test_config.requires(remote_name)`.\n for marker in item.iter_markers():\n item.config.dvc_config.apply_marker(marker)\n\n\n@pytest.fixture(scope=\"session\")\ndef test_config(request):\n return request.config.dvc_config", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/conftest.py_pytest_configure_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/conftest.py_pytest_configure_", "embedding": null, "metadata": {"file_path": "tests/conftest.py", "file_name": "conftest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 113, "end_line": 141, "span_ids": ["pytest_configure"], "tokens": 205}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def pytest_configure(config):\n config.dvc_config = DVCTestConfig()\n\n for remote_name in REMOTES:\n config.addinivalue_line(\n \"markers\", f\"{remote_name}: mark test as requiring {remote_name}\"\n )\n\n enabled_remotes = config.dvc_config.enabled_remotes\n if config.getoption(\"--all\"):\n enabled_remotes.update(REMOTES)\n else:\n default_enabled = {k for k, v in REMOTES.items() if v}\n enabled_remotes.update(default_enabled)\n\n for remote_name in REMOTES:\n enabled_opt = _get_opt(remote_name, \"enable\")\n disabled_opt = _get_opt(remote_name, \"disable\")\n\n enabled = config.getoption(enabled_opt)\n disabled = config.getoption(disabled_opt)\n if disabled and enabled:\n continue # default behavior if both flags are supplied\n\n if disabled:\n enabled_remotes.discard(remote_name)\n if enabled:\n enabled_remotes.add(remote_name)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/conftest.py_from_textwrap_import_dede_CHECKPOINT_SCRIPT.CHECKPOINT_SCRIPT_FORMAT_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/conftest.py_from_textwrap_import_dede_CHECKPOINT_SCRIPT.CHECKPOINT_SCRIPT_FORMAT_", "embedding": null, "metadata": {"file_path": "tests/func/experiments/conftest.py", "file_name": "conftest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 41, "span_ids": ["imports"], "tokens": 230}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from textwrap import dedent\n\nimport pytest\n\nfrom tests.func.test_repro_multistage import COPY_SCRIPT\n\nCHECKPOINT_SCRIPT_FORMAT = dedent(\n \"\"\"\\\n import os\n import sys\n import shutil\n from time import sleep\n\n from dvc.api import make_checkpoint\n\n checkpoint_file = {}\n checkpoint_iterations = int({})\n if os.path.exists(checkpoint_file):\n with open(checkpoint_file) as fobj:\n try:\n value = int(fobj.read())\n except ValueError:\n value = 0\n else:\n with open(checkpoint_file, \"w\"):\n pass\n value = 0\n\n shutil.copyfile({}, {})\n\n if os.getenv(\"DVC_CHECKPOINT\"):\n for _ in range(checkpoint_iterations):\n value += 1\n with open(checkpoint_file, \"w\") as fobj:\n fobj.write(str(value))\n make_checkpoint()\n\"\"\"\n)\nCHECKPOINT_SCRIPT = CHECKPOINT_SCRIPT_FORMAT.format(\n \"sys.argv[1]\", \"sys.argv[2]\", \"sys.argv[3]\", \"sys.argv[4]\"\n)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/conftest.py_exp_stage_exp_stage.return.stage": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/conftest.py_exp_stage_exp_stage.return.stage", "embedding": null, "metadata": {"file_path": "tests/func/experiments/conftest.py", "file_name": "conftest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 44, "end_line": 66, "span_ids": ["exp_stage"], "tokens": 135}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture\ndef exp_stage(tmp_dir, scm, dvc):\n tmp_dir.gen(\"copy.py\", COPY_SCRIPT)\n tmp_dir.gen(\"params.yaml\", \"foo: 1\")\n stage = dvc.run(\n cmd=\"python copy.py params.yaml metrics.yaml\",\n metrics_no_cache=[\"metrics.yaml\"],\n params=[\"foo\"],\n name=\"copy-file\",\n deps=[\"copy.py\"],\n )\n scm.add(\n [\n \"dvc.yaml\",\n \"dvc.lock\",\n \"copy.py\",\n \"params.yaml\",\n \"metrics.yaml\",\n \".gitignore\",\n ]\n )\n scm.commit(\"init\")\n return stage", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/conftest.py_checkpoint_stage_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/conftest.py_checkpoint_stage_", "embedding": null, "metadata": {"file_path": "tests/func/experiments/conftest.py", "file_name": "conftest.py", "file_type": "text/x-python", "category": "implementation", "start_line": 69, "end_line": 85, "span_ids": ["checkpoint_stage"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture\ndef checkpoint_stage(tmp_dir, scm, dvc):\n tmp_dir.gen(\"checkpoint.py\", CHECKPOINT_SCRIPT)\n tmp_dir.gen(\"params.yaml\", \"foo: 1\")\n stage = dvc.run(\n cmd=\"python checkpoint.py foo 5 params.yaml metrics.yaml\",\n metrics_no_cache=[\"metrics.yaml\"],\n params=[\"foo\"],\n checkpoints=[\"foo\"],\n deps=[\"checkpoint.py\"],\n no_exec=True,\n name=\"checkpoint-file\",\n )\n scm.add([\"dvc.yaml\", \"checkpoint.py\", \"params.yaml\", \".gitignore\"])\n scm.commit(\"init\")\n return stage", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_checkpoints.py_test_resume_branch_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_checkpoints.py_test_resume_branch_", "embedding": null, "metadata": {"file_path": "tests/func/experiments/test_checkpoints.py", "file_name": "test_checkpoints.py", "file_type": "text/x-python", "category": "test", "start_line": 153, "end_line": 212, "span_ids": ["test_resume_branch"], "tokens": 457}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"workspace\", [True, False])\ndef test_resume_branch(tmp_dir, scm, dvc, checkpoint_stage, workspace):\n results = dvc.experiments.run(\n checkpoint_stage.addressing, params=[\"foo=2\"], tmp_dir=not workspace\n )\n branch_rev = first(results)\n if not workspace:\n dvc.experiments.apply(branch_rev)\n\n results = dvc.experiments.run(\n checkpoint_stage.addressing,\n checkpoint_resume=branch_rev,\n tmp_dir=not workspace,\n )\n checkpoint_a = first(results)\n if not workspace:\n dvc.experiments.apply(checkpoint_a, force=True)\n\n with pytest.raises(DvcException):\n results = dvc.experiments.run(\n checkpoint_stage.addressing,\n checkpoint_resume=branch_rev,\n params=[\"foo=100\"],\n tmp_dir=not workspace,\n )\n\n dvc.experiments.apply(branch_rev, force=True)\n results = dvc.experiments.run(\n checkpoint_stage.addressing,\n checkpoint_resume=branch_rev,\n params=[\"foo=100\"],\n tmp_dir=not workspace,\n )\n checkpoint_b = first(results)\n\n for rev in dvc.brancher([checkpoint_a]):\n if rev == \"workspace\":\n continue\n tree = dvc.repo_tree\n with tree.open(tmp_dir / \"foo\") as fobj:\n assert fobj.read().strip() == \"10\"\n with tree.open(tmp_dir / \"metrics.yaml\") as fobj:\n assert fobj.read().strip() == \"foo: 2\"\n\n for rev in dvc.brancher([checkpoint_b]):\n if rev == \"workspace\":\n continue\n tree = dvc.repo_tree\n with tree.open(tmp_dir / \"foo\") as fobj:\n assert fobj.read().strip() == \"10\"\n with tree.open(tmp_dir / \"metrics.yaml\") as fobj:\n assert fobj.read().strip() == \"foo: 100\"\n\n with pytest.raises(MultipleBranchError):\n dvc.experiments.get_branch_by_rev(branch_rev)\n\n assert branch_rev == dvc.experiments.scm.gitpython.repo.git.merge_base(\n checkpoint_a, checkpoint_b\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_file_permissions_test_file_permissions.assert_stat_S_IMODE_os_st": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_file_permissions_test_file_permissions.assert_stat_S_IMODE_os_st", "embedding": null, "metadata": {"file_path": "tests/func/experiments/test_experiments.py", "file_name": "test_experiments.py", "file_type": "text/x-python", "category": "test", "start_line": 24, "end_line": 33, "span_ids": ["test_file_permissions"], "tokens": 114}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(os.name == \"nt\", reason=\"Not supported for Windows.\")\ndef test_file_permissions(tmp_dir, scm, dvc, exp_stage, mocker):\n mode = 0o755\n os.chmod(tmp_dir / \"copy.py\", mode)\n scm.add([\"copy.py\"])\n scm.commit(\"set exec\")\n\n tmp_dir.gen(\"params.yaml\", \"foo: 2\")\n dvc.experiments.run(exp_stage.addressing)\n assert stat.S_IMODE(os.stat(tmp_dir / \"copy.py\").st_mode) == mode", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_failed_exp_test_failed_exp.with_caplog_at_level_logg.assert_Failed_to_reprodu": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_experiments.py_test_failed_exp_test_failed_exp.with_caplog_at_level_logg.assert_Failed_to_reprodu", "embedding": null, "metadata": {"file_path": "tests/func/experiments/test_experiments.py", "file_name": "test_experiments.py", "file_type": "text/x-python", "category": "test", "start_line": 88, "end_line": 99, "span_ids": ["test_failed_exp"], "tokens": 107}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_failed_exp(tmp_dir, scm, dvc, exp_stage, mocker, caplog):\n from dvc.exceptions import ReproductionError\n\n tmp_dir.gen(\"params.yaml\", \"foo: 2\")\n\n mocker.patch(\n \"concurrent.futures.Future.exception\",\n return_value=ReproductionError(exp_stage.relpath),\n )\n with caplog.at_level(logging.ERROR):\n dvc.experiments.run(exp_stage.addressing, tmp_dir=True)\n assert \"Failed to reproduce experiment\" in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_gc.py_pytest_test_workspace.assert_removed_expecte": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_gc.py_pytest_test_workspace.assert_removed_expecte", "embedding": null, "metadata": {"file_path": "tests/func/experiments/test_gc.py", "file_name": "test_gc.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 25, "span_ids": ["imports", "test_workspace"], "tokens": 207}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\nfrom funcy import first\n\nfrom tests.func.test_repro_multistage import COPY_SCRIPT\n\n\n@pytest.mark.parametrize(\"queued, expected\", [(True, 0), (False, 1)])\ndef test_workspace(tmp_dir, scm, dvc, queued, expected):\n tmp_dir.gen(\"copy.py\", COPY_SCRIPT)\n tmp_dir.gen(\"params.yaml\", \"foo: 1\")\n\n stage = dvc.run(\n cmd=\"python copy.py params.yaml metrics.yaml\",\n metrics_no_cache=[\"metrics.yaml\"],\n params=[\"foo\"],\n name=\"foo\",\n )\n scm.add([\"dvc.yaml\", \"dvc.lock\", \"copy.py\", \"params.yaml\", \"metrics.yaml\"])\n scm.commit(\"v1\")\n\n dvc.experiments.run(stage.addressing, params=[\"foo=2\"])\n dvc.experiments.run(stage.addressing, params=[\"foo=3\"], queue=True)\n\n removed = dvc.experiments.gc(workspace=True, queued=queued)\n assert removed == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_gc.py_test_all_commits_test_all_commits.assert_removed_expecte": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_gc.py_test_all_commits_test_all_commits.assert_removed_expecte", "embedding": null, "metadata": {"file_path": "tests/func/experiments/test_gc.py", "file_name": "test_gc.py", "file_type": "text/x-python", "category": "test", "start_line": 28, "end_line": 54, "span_ids": ["test_all_commits"], "tokens": 277}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"queued, expected\", [(True, 0), (False, 2)])\ndef test_all_commits(tmp_dir, scm, dvc, queued, expected):\n tmp_dir.gen(\"copy.py\", COPY_SCRIPT)\n tmp_dir.gen(\"params.yaml\", \"foo: 1\")\n\n stage = dvc.run(\n cmd=\"python copy.py params.yaml metrics.yaml\",\n metrics_no_cache=[\"metrics.yaml\"],\n params=[\"foo\"],\n name=\"foo\",\n )\n scm.add([\"dvc.yaml\", \"dvc.lock\", \"copy.py\", \"params.yaml\", \"metrics.yaml\"])\n scm.commit(\"v1\")\n\n results = dvc.experiments.run(stage.addressing, params=[\"foo=2\"])\n exp_rev = first(results)\n dvc.experiments.run(stage.addressing, params=[\"foo=3\"], queue=True)\n\n dvc.experiments.apply(exp_rev, force=True)\n scm.add([\"dvc.yaml\", \"dvc.lock\", \"copy.py\", \"params.yaml\", \"metrics.yaml\"])\n scm.commit(\"v2\")\n\n dvc.experiments.run(stage.addressing, params=[\"foo=4\"])\n dvc.experiments.run(stage.addressing, params=[\"foo=5\"], queue=True)\n\n removed = dvc.experiments.gc(all_commits=True, queued=queued)\n assert removed == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_gc.py_test_all_branches_test_all_branches.assert_removed_expecte": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_gc.py_test_all_branches_test_all_branches.assert_removed_expecte", "embedding": null, "metadata": {"file_path": "tests/func/experiments/test_gc.py", "file_name": "test_gc.py", "file_type": "text/x-python", "category": "test", "start_line": 57, "end_line": 90, "span_ids": ["test_all_branches"], "tokens": 336}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"queued, expected\", [(True, 2), (False, 3)])\ndef test_all_branches(tmp_dir, scm, dvc, queued, expected):\n tmp_dir.gen(\"copy.py\", COPY_SCRIPT)\n tmp_dir.gen(\"params.yaml\", \"foo: 1\")\n\n stage = dvc.run(\n cmd=\"python copy.py params.yaml metrics.yaml\",\n metrics_no_cache=[\"metrics.yaml\"],\n params=[\"foo\"],\n name=\"foo\",\n )\n scm.add([\"dvc.yaml\", \"dvc.lock\", \"copy.py\", \"params.yaml\", \"metrics.yaml\"])\n scm.commit(\"v1\")\n\n results = dvc.experiments.run(stage.addressing, params=[\"foo=2\"])\n exp_rev = first(results)\n dvc.experiments.run(stage.addressing, params=[\"foo=3\"], queue=True)\n\n dvc.experiments.apply(exp_rev, force=True)\n scm.add([\"dvc.yaml\", \"dvc.lock\", \"copy.py\", \"params.yaml\", \"metrics.yaml\"])\n scm.commit(\"v2\")\n\n scm.branch(\"branch\")\n\n results = dvc.experiments.run(stage.addressing, params=[\"foo=4\"])\n dvc.experiments.run(stage.addressing, params=[\"foo=5\"], queue=True)\n exp_rev = first(results)\n\n dvc.experiments.apply(exp_rev, force=True)\n scm.add([\"dvc.yaml\", \"dvc.lock\", \"copy.py\", \"params.yaml\", \"metrics.yaml\"])\n scm.commit(\"v3\")\n\n removed = dvc.experiments.gc(all_branches=True, queued=queued)\n assert removed == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_gc.py_test_all_tags_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_gc.py_test_all_tags_", "embedding": null, "metadata": {"file_path": "tests/func/experiments/test_gc.py", "file_name": "test_gc.py", "file_type": "text/x-python", "category": "test", "start_line": 93, "end_line": 121, "span_ids": ["test_all_tags"], "tokens": 283}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"queued, expected\", [(True, 2), (False, 3)])\ndef test_all_tags(tmp_dir, scm, dvc, queued, expected):\n tmp_dir.gen(\"copy.py\", COPY_SCRIPT)\n tmp_dir.gen(\"params.yaml\", \"foo: 1\")\n\n stage = dvc.run(\n cmd=\"python copy.py params.yaml metrics.yaml\",\n metrics_no_cache=[\"metrics.yaml\"],\n params=[\"foo\"],\n name=\"foo\",\n )\n scm.add([\"dvc.yaml\", \"dvc.lock\", \"copy.py\", \"params.yaml\", \"metrics.yaml\"])\n scm.commit(\"v1\")\n\n results = dvc.experiments.run(stage.addressing, params=[\"foo=2\"])\n exp_rev = first(results)\n dvc.experiments.run(stage.addressing, params=[\"foo=3\"], queue=True)\n\n dvc.experiments.apply(exp_rev, force=True)\n scm.add([\"dvc.yaml\", \"dvc.lock\", \"copy.py\", \"params.yaml\", \"metrics.yaml\"])\n scm.commit(\"v2\")\n scm.tag(\"tag-v2\")\n\n dvc.experiments.run(stage.addressing, params=[\"foo=4\"])\n dvc.experiments.run(stage.addressing, params=[\"foo=5\"], queue=True)\n\n removed = dvc.experiments.gc(all_tags=True, queued=queued)\n assert removed == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_show.py_test_show_queued_test_show_queued.None_5": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/experiments/test_show.py_test_show_queued_test_show_queued.None_5", "embedding": null, "metadata": {"file_path": "tests/func/experiments/test_show.py", "file_name": "test_show.py", "file_type": "text/x-python", "category": "test", "start_line": 54, "end_line": 81, "span_ids": ["test_show_queued"], "tokens": 271}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_show_queued(tmp_dir, scm, dvc, exp_stage):\n from dvc.repo.experiments.base import EXPS_STASH\n\n baseline_rev = scm.get_rev()\n\n dvc.experiments.run(exp_stage.addressing, params=[\"foo=2\"], queue=True)\n exp_rev = dvc.experiments.scm.resolve_rev(f\"{EXPS_STASH}@{{0}}\")\n\n results = dvc.experiments.show()[baseline_rev]\n assert len(results) == 2\n exp = results[exp_rev]\n assert exp[\"queued\"]\n assert exp[\"params\"][\"params.yaml\"] == {\"foo\": 2}\n\n # test that only queued experiments for the current baseline are returned\n tmp_dir.gen(\"foo\", \"foo\")\n scm.add([\"foo\"])\n scm.commit(\"new commit\")\n new_rev = scm.get_rev()\n\n dvc.experiments.run(exp_stage.addressing, params=[\"foo=3\"], queue=True)\n exp_rev = dvc.experiments.scm.resolve_rev(f\"{EXPS_STASH}@{{0}}\")\n\n results = dvc.experiments.show()[new_rev]\n assert len(results) == 2\n exp = results[exp_rev]\n assert exp[\"queued\"]\n assert exp[\"params\"][\"params.yaml\"] == {\"foo\": 3}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_filtered_files_in_dir_test_add_filtered_files_in_dir.for_stage_in_stages_.assert_stage_outs_0_def_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_filtered_files_in_dir_test_add_filtered_files_in_dir.for_stage_in_stages_.assert_stage_outs_0_def_", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 193, "end_line": 261, "span_ids": ["test_add_filtered_files_in_dir"], "tokens": 591}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"target, expected_def_paths, expected_rel_paths\",\n [\n (\n os.path.join(\"dir\", \"subdir\", \"subdata*\"),\n [\"subdata\", \"subdata123\"],\n [\n os.path.join(\"dir\", \"subdir\", \"subdata\") + \".dvc\",\n os.path.join(\"dir\", \"subdir\", \"subdata123\") + \".dvc\",\n ],\n ),\n (\n os.path.join(\"dir\", \"subdir\", \"?subdata\"),\n [\"esubdata\", \"isubdata\"],\n [\n os.path.join(\"dir\", \"subdir\", \"esubdata\") + \".dvc\",\n os.path.join(\"dir\", \"subdir\", \"isubdata\") + \".dvc\",\n ],\n ),\n (\n os.path.join(\"dir\", \"subdir\", \"[aiou]subdata\"),\n [\"isubdata\"],\n [os.path.join(\"dir\", \"subdir\", \"isubdata\") + \".dvc\"],\n ),\n (\n os.path.join(\"dir\", \"**\", \"subdata*\"),\n [\"subdata\", \"subdata123\", \"subdata4\", \"subdata5\"],\n [\n os.path.join(\"dir\", \"subdir\", \"subdata\") + \".dvc\",\n os.path.join(\"dir\", \"subdir\", \"subdata123\") + \".dvc\",\n os.path.join(\"dir\", \"anotherdir\", \"subdata4\") + \".dvc\",\n os.path.join(\"dir\", \"subdata5\") + \".dvc\",\n ],\n ),\n ],\n)\ndef test_add_filtered_files_in_dir(\n tmp_dir, dvc, target, expected_def_paths, expected_rel_paths\n):\n tmp_dir.gen(\n {\n \"dir\": {\n \"subdir\": {\n \"subdata\": \"subdata content\",\n \"esubdata\": \"extra subdata content\",\n \"isubdata\": \"i subdata content\",\n \"subdata123\": \"subdata content 123\",\n },\n \"anotherdir\": {\n \"subdata4\": \"subdata 4 content\",\n \"esubdata\": \"extra 2 subdata content\",\n },\n \"subdata5\": \"subdata 5 content\",\n }\n }\n )\n\n stages = dvc.add(target, glob=True)\n\n assert len(stages) == len(expected_def_paths)\n for stage in stages:\n assert stage is not None\n assert len(stage.deps) == 0\n assert len(stage.outs) == 1\n assert stage.relpath in expected_rel_paths\n\n # Current dir should not be taken into account\n assert stage.wdir == os.path.dirname(stage.path)\n assert stage.outs[0].def_path in expected_def_paths", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cache.py_TestCacheLoadBadDirCache_TestCacheLoadBadDirCache.test.self_assertEqual_dir_info": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_cache.py_TestCacheLoadBadDirCache_TestCacheLoadBadDirCache.test.self_assertEqual_dir_info", "embedding": null, "metadata": {"file_path": "tests/func/test_cache.py", "file_name": "test_cache.py", "file_type": "text/x-python", "category": "test", "start_line": 45, "end_line": 68, "span_ids": ["TestCacheLoadBadDirCache._do_test", "TestCacheLoadBadDirCache.test", "TestCacheLoadBadDirCache"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestCacheLoadBadDirCache(TestDvc):\n def _do_test(self, ret):\n self.assertTrue(isinstance(ret, list))\n self.assertEqual(len(ret), 0)\n\n def test(self):\n dir_hash = \"123.dir\"\n fname = os.fspath(\n self.dvc.cache.local.tree.hash_to_path_info(dir_hash)\n )\n self.create(fname, \"not,json\")\n with pytest.raises(DirCacheError):\n self.dvc.cache.local.load_dir_cache(HashInfo(\"md5\", dir_hash))\n\n dir_hash = \"234.dir\"\n fname = os.fspath(\n self.dvc.cache.local.tree.hash_to_path_info(dir_hash)\n )\n self.create(fname, '{\"a\": \"b\"}')\n dir_info = self.dvc.cache.local.load_dir_cache(\n HashInfo(\"md5\", dir_hash)\n )\n self.assertTrue(isinstance(dir_info, DirInfo))\n self.assertEqual(dir_info.nfiles, 0)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_dvcfile_dump_preserves_desc_test_dvcfile_dump_preserves_desc.None_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_dvcfile_dump_preserves_desc_test_dvcfile_dump_preserves_desc.None_4", "embedding": null, "metadata": {"file_path": "tests/func/test_dvcfile.py", "file_name": "test_dvcfile.py", "file_type": "text/x-python", "category": "test", "start_line": 326, "end_line": 344, "span_ids": ["test_dvcfile_dump_preserves_desc"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_dvcfile_dump_preserves_desc(tmp_dir, dvc, run_copy):\n tmp_dir.gen(\"foo\", \"foo\")\n stage_desc = \"test stage description\"\n out_desc = \"test out description\"\n\n stage = run_copy(\"foo\", \"bar\", name=\"run_copy\", desc=stage_desc)\n dvcfile = stage.dvcfile\n\n data = dvcfile._load()[0]\n data[\"stages\"][\"run_copy\"][\"outs\"][0] = {\"bar\": {\"desc\": out_desc}}\n dump_yaml(dvcfile.path, data)\n\n assert stage.desc == stage_desc\n stage.outs[0].desc = out_desc\n dvcfile.dump(stage)\n loaded = dvcfile._load()[0]\n assert loaded == data\n assert loaded[\"stages\"][\"run_copy\"][\"desc\"] == stage_desc\n assert loaded[\"stages\"][\"run_copy\"][\"outs\"][0][\"bar\"][\"desc\"] == out_desc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_dvcfile_dump_preserves_comments_test_dvcfile_dump_preserves_comments.assert_dvcfile__load_1_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_dvcfile_dump_preserves_comments_test_dvcfile_dump_preserves_comments.assert_dvcfile__load_1_", "embedding": null, "metadata": {"file_path": "tests/func/test_dvcfile.py", "file_name": "test_dvcfile.py", "file_type": "text/x-python", "category": "test", "start_line": 347, "end_line": 363, "span_ids": ["test_dvcfile_dump_preserves_comments"], "tokens": 146}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_dvcfile_dump_preserves_comments(tmp_dir, dvc):\n text = textwrap.dedent(\n \"\"\"\\\n stages:\n generate-foo:\n cmd: echo foo > foo\n # This copies 'foo' text to 'foo' file.\n outs:\n - foo\"\"\"\n )\n tmp_dir.gen(\"dvc.yaml\", text)\n stage = dvc.stage.load_one(name=\"generate-foo\")\n stage.outs[0].use_cache = False\n dvcfile = stage.dvcfile\n\n dvcfile.dump(stage)\n assert dvcfile._load()[1] == (text + \":\\n\\tcache: false\\n\".expandtabs())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_dvcfile_try_dumping_parametrized_stage_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_dvcfile.py_test_dvcfile_try_dumping_parametrized_stage_", "embedding": null, "metadata": {"file_path": "tests/func/test_dvcfile.py", "file_name": "test_dvcfile.py", "file_type": "text/x-python", "category": "test", "start_line": 366, "end_line": 386, "span_ids": ["test_dvcfile_try_dumping_parametrized_stage"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"data, name\",\n [\n ({\"build-us\": {\"cmd\": \"echo ${foo}\"}}, \"build-us\"),\n (\n {\"build\": {\"foreach\": [\"us\", \"gb\"], \"do\": {\"cmd\": \"echo ${foo}\"}}},\n \"build@us\",\n ),\n ],\n)\ndef test_dvcfile_try_dumping_parametrized_stage(tmp_dir, dvc, data, name):\n dump_yaml(\"dvc.yaml\", {\"stages\": data, \"vars\": [{\"foo\": \"foobar\"}]})\n\n stage = dvc.stage.load_one(name=name)\n dvcfile = stage.dvcfile\n\n with pytest.raises(ParametrizedDumpError) as exc:\n dvcfile.dump(stage)\n\n assert str(exc.value) == f\"cannot dump a parametrized stage: '{name}'\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_test_dvc_formatting_retained__format_dvc_line.if_cache_in_line_or_m.else_.return.line": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repro.py_test_dvc_formatting_retained__format_dvc_line.if_cache_in_line_or_m.else_.return.line", "embedding": null, "metadata": {"file_path": "tests/func/test_repro.py", "file_name": "test_repro.py", "file_type": "text/x-python", "category": "test", "start_line": 1169, "end_line": 1207, "span_ids": ["_format_dvc_line", "test_dvc_formatting_retained"], "tokens": 370}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_dvc_formatting_retained(tmp_dir, dvc, run_copy):\n tmp_dir.dvc_gen(\"foo\", \"foo content\")\n stage = run_copy(\n \"foo\", \"foo_copy\", fname=\"foo_copy.dvc\", single_stage=True\n )\n stage_path = tmp_dir / stage.relpath\n\n # Add comments and custom formatting to DVC-file\n lines = list(map(_format_dvc_line, stage_path.read_text().splitlines()))\n lines.insert(0, \"# Starting comment\")\n stage_text = \"\".join(line + \"\\n\" for line in lines)\n stage_path.write_text(stage_text)\n\n # Rewrite data source and repro\n (tmp_dir / \"foo\").write_text(\"new foo\")\n dvc.reproduce(\"foo_copy.dvc\", force=True)\n\n def _hide_md5(text):\n return re.sub(r\"\\b[a-f0-9]{32}\\b\", \"\", text)\n\n def _hide_size(text):\n return re.sub(r\"size: [0-9]*\\b\", \"size: \", text)\n\n def _mask(text):\n return _hide_size(_hide_md5(text))\n\n assert _mask(stage_text) == _mask(stage_path.read_text())\n\n\ndef _format_dvc_line(line):\n # Add line comment for all cache and md5 keys\n if \"cache:\" in line or \"md5:\" in line:\n return line + \" # line comment\"\n # Format command as one word per line\n elif line.startswith(\"cmd: \"):\n pre, command = line.split(None, 1)\n return pre + \" >\\n\" + \"\\n\".join(\" \" + s for s in command.split())\n else:\n return line", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_desc_is_preserved_test_desc_is_preserved.assert_new_data_outs_0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage.py_test_desc_is_preserved_test_desc_is_preserved.assert_new_data_outs_0", "embedding": null, "metadata": {"file_path": "tests/func/test_stage.py", "file_name": "test_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 184, "end_line": 200, "span_ids": ["test_desc_is_preserved"], "tokens": 150}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_desc_is_preserved(tmp_dir, dvc):\n (stage,) = tmp_dir.dvc_gen(\"foo\", \"foo content\")\n\n data = load_yaml(stage.path)\n stage_desc = \"test stage description\"\n out_desc = \"test out description\"\n data[\"desc\"] = stage_desc\n data[\"outs\"][0][\"desc\"] = out_desc\n dump_yaml(stage.path, data)\n\n dvcfile = SingleStageFile(dvc, stage.path)\n new_stage = dvcfile.stage\n dvcfile.dump(new_stage)\n\n new_data = load_yaml(stage.path)\n assert new_data[\"desc\"] == stage_desc\n assert new_data[\"outs\"][0][\"desc\"] == out_desc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_test_repotree_walk_fetch_test_repotree_walk_fetch.for___hi_in_out_dir_cach.assert_os_path_exists_dvc": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_tree.py_test_repotree_walk_fetch_test_repotree_walk_fetch.for___hi_in_out_dir_cach.assert_os_path_exists_dvc", "embedding": null, "metadata": {"file_path": "tests/func/test_tree.py", "file_name": "test_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 190, "end_line": 203, "span_ids": ["test_repotree_walk_fetch"], "tokens": 141}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_repotree_walk_fetch(tmp_dir, dvc, scm, local_remote):\n out = tmp_dir.dvc_gen({\"dir\": {\"foo\": \"foo\"}}, commit=\"init\")[0].outs[0]\n dvc.push()\n remove(dvc.cache.local.cache_dir)\n remove(tmp_dir / \"dir\")\n\n tree = RepoTree(dvc, fetch=True)\n for _, _, _ in tree.walk(\"dir\"):\n pass\n\n assert os.path.exists(out.cache_path)\n for _, hi in out.dir_cache.items():\n assert hi.name == out.tree.PARAM_CHECKSUM\n assert os.path.exists(dvc.cache.local.tree.hash_to_path_info(hi.value))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/hdfs.py_hdfs_server_hdfs.yield_HDFS_url_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/hdfs.py_hdfs_server_hdfs.yield_HDFS_url_", "embedding": null, "metadata": {"file_path": "tests/remotes/hdfs.py", "file_name": "hdfs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 133, "end_line": 160, "span_ids": ["hdfs_server", "hdfs"], "tokens": 244}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture(scope=\"session\")\ndef hdfs_server(hadoop, docker_compose, docker_services):\n import pyarrow.fs\n\n port = docker_services.port_for(\"hdfs\", 8020)\n web_port = docker_services.port_for(\"hdfs\", 50070)\n\n def _check():\n try:\n # NOTE: just connecting or even opening something is not enough,\n # we need to make sure that we are able to write something.\n conn = pyarrow.fs.HadoopFileSystem(\"hdfs://127.0.0.1\", port)\n with conn.open_output_stream(str(uuid.uuid4())) as fobj:\n fobj.write(b\"test\")\n return True\n except (pyarrow.ArrowException, OSError):\n return False\n\n docker_services.wait_until_responsive(timeout=30.0, pause=5, check=_check)\n\n return {\"hdfs\": port, \"webhdfs\": web_port}\n\n\n@pytest.fixture\ndef hdfs(hdfs_server):\n port = hdfs_server[\"hdfs\"]\n url = f\"hdfs://127.0.0.1:{port}/{uuid.uuid4()}\"\n yield HDFS(url)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/hdfs.py_WebHDFS_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/hdfs.py_WebHDFS_", "embedding": null, "metadata": {"file_path": "tests/remotes/hdfs.py", "file_name": "hdfs.py", "file_type": "text/x-python", "category": "implementation", "start_line": 152, "end_line": 209, "span_ids": ["WebHDFS.read_bytes", "WebHDFS.is_dir", "WebHDFS.exists", "WebHDFS._webhdfs", "WebHDFS.write_text", "WebHDFS", "WebHDFS.read_text", "WebHDFS.mkdir", "WebHDFS.write_bytes", "WebHDFS.is_file", "webhdfs"], "tokens": 452}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class WebHDFS(Base, URLInfo): # pylint: disable=abstract-method\n @contextmanager\n def _webhdfs(self):\n from hdfs import InsecureClient\n\n client = InsecureClient(f\"http://{self.host}:{self.port}\", self.user)\n yield client\n\n def is_file(self):\n with self._webhdfs() as _hdfs:\n return _hdfs.status(self.path)[\"type\"] == \"FILE\"\n\n def is_dir(self):\n with self._webhdfs() as _hdfs:\n return _hdfs.status(self.path)[\"type\"] == \"DIRECTORY\"\n\n def exists(self):\n with self._webhdfs() as _hdfs:\n return _hdfs.status(self.path, strict=False) is not None\n\n def mkdir(self, mode=0o777, parents=False, exist_ok=False):\n assert mode == 0o777\n assert parents\n assert not exist_ok\n\n with self._webhdfs() as _hdfs:\n # NOTE: hdfs.makekdirs always creates parents\n _hdfs.makedirs(self.path, permission=mode)\n\n def write_bytes(self, contents):\n with self._webhdfs() as _hdfs:\n with _hdfs.write(self.path, overwrite=True) as writer:\n writer.write(contents)\n\n def write_text(self, contents, encoding=None, errors=None):\n if not encoding:\n encoding = locale.getpreferredencoding(False)\n assert errors is None\n self.write_bytes(contents.encode(encoding))\n\n def read_bytes(self):\n with self._webhdfs() as _hdfs:\n with _hdfs.read(self.path) as reader:\n return reader.read()\n\n def read_text(self, encoding=None, errors=None):\n if not encoding:\n encoding = locale.getpreferredencoding(False)\n assert errors is None\n return self.read_bytes().decode(encoding)\n\n\n@pytest.fixture\ndef webhdfs(hdfs_server):\n port = hdfs_server[\"webhdfs\"]\n url = f\"webhdfs://127.0.0.1:{port}/{uuid.uuid4()}\"\n yield WebHDFS(url)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/webdav.py__pylint_disable_abstract_Webdav.write_text.Path_self_path_write_tex": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/webdav.py__pylint_disable_abstract_Webdav.write_text.Path_self_path_write_tex", "embedding": null, "metadata": {"file_path": "tests/remotes/webdav.py", "file_name": "webdav.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 32, "span_ids": ["Webdav.mkdir", "Webdav", "Webdav.get_url", "docstring", "Webdav.write_bytes", "Webdav.write_text"], "tokens": 230}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# pylint:disable=abstract-method\nimport os\nfrom pathlib import Path\nfrom wsgiref.simple_server import make_server\n\nimport pytest\nfrom funcy import first\nfrom wsgidav.wsgidav_app import WsgiDAVApp\n\nfrom dvc.path_info import WebDAVURLInfo\nfrom dvc.utils.fs import makedirs\nfrom tests.utils.httpd import run_server_on_thread\n\nfrom .base import Base\n\nAUTH = {\"user1\": {\"password\": \"password1\"}}\n\n\nclass Webdav(Base, WebDAVURLInfo):\n @staticmethod\n def get_url(port): # pylint: disable=arguments-differ\n return f\"webdav://localhost:{port}\"\n\n def mkdir(self, mode=0o777, parents=False, exist_ok=False):\n assert parents\n makedirs(self.path, exist_ok=exist_ok)\n\n def write_bytes(self, contents):\n Path(self.path).write_bytes(contents)\n\n def write_text(self, contents, encoding=None, errors=None):\n Path(self.path).write_text(contents, encoding=encoding, errors=errors)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/webdav.py_webdav_server_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/remotes/webdav.py_webdav_server_", "embedding": null, "metadata": {"file_path": "tests/remotes/webdav.py", "file_name": "webdav.py", "file_type": "text/x-python", "category": "implementation", "start_line": 35, "end_line": 63, "span_ids": ["webdav", "webdav_server"], "tokens": 201}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture\ndef webdav_server(test_config, tmp_path_factory):\n test_config.requires(\"webdav\")\n\n host, port = \"localhost\", 0\n directory = os.fspath(tmp_path_factory.mktemp(\"http\"))\n dirmap = {\"/\": directory}\n\n app = WsgiDAVApp(\n {\n \"host\": host,\n \"port\": port,\n \"provider_mapping\": dirmap,\n \"simple_dc\": {\"user_mapping\": {\"*\": AUTH}},\n }\n )\n server = make_server(host, port, app)\n with run_server_on_thread(server) as httpd:\n yield httpd\n\n\n@pytest.fixture\ndef webdav(webdav_server):\n url = Webdav.get_url(webdav_server.server_port)\n ret = Webdav(url)\n user, secrets = first(AUTH.items())\n ret.config = {\"url\": url, \"user\": user, **secrets}\n yield ret", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_add.py_from_dvc_cli_import_parse_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_add.py_from_dvc_cli_import_parse_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 36, "span_ids": ["test_add", "imports"], "tokens": 165}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.cli import parse_args\nfrom dvc.command.add import CmdAdd\n\n\ndef test_add(mocker, dvc):\n cli_args = parse_args(\n [\n \"add\",\n \"--recursive\",\n \"--no-commit\",\n \"--external\",\n \"--glob\",\n \"--file\",\n \"file\",\n \"--desc\",\n \"stage description\",\n \"data\",\n ]\n )\n assert cli_args.func == CmdAdd\n\n cmd = cli_args.func(cli_args)\n m = mocker.patch.object(cmd.repo, \"add\", autospec=True)\n\n assert cmd.run() == 0\n\n m.assert_called_once_with(\n [\"data\"],\n recursive=True,\n no_commit=True,\n glob=True,\n fname=\"file\",\n external=True,\n desc=\"stage description\",\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_dag.py_repo_repo.return.dvc": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_dag.py_repo_repo.return.dvc", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_dag.py", "file_name": "test_dag.py", "file_type": "text/x-python", "category": "test", "start_line": 25, "end_line": 45, "span_ids": ["repo"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture\ndef repo(tmp_dir, dvc):\n tmp_dir.dvc_gen(\"a\", \"a\")\n tmp_dir.dvc_gen(\"b\", \"b\")\n\n dvc.run(\n no_exec=True, deps=[\"a\", \"c\"], outs=[\"d\", \"e\"], cmd=\"cmd1\", name=\"1\"\n )\n dvc.run(\n no_exec=True, deps=[\"b\", \"c\"], outs=[\"f\", \"g\"], cmd=\"cmd2\", name=\"2\"\n )\n dvc.run(\n no_exec=True,\n deps=[\"a\", \"b\", \"c\"],\n outs=[\"h\", \"i\"],\n cmd=\"cmd3\",\n name=\"3\",\n )\n dvc.run(no_exec=True, deps=[\"a\", \"h\"], outs=[\"j\"], cmd=\"cmd4\", name=\"4\")\n\n return dvc", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_dag.py__NOTE_granular_or_not__test_build_full_outs.assert_set_G_edges_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_dag.py__NOTE_granular_or_not__test_build_full_outs.assert_set_G_edges_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_dag.py", "file_name": "test_dag.py", "file_type": "text/x-python", "category": "test", "start_line": 83, "end_line": 100, "span_ids": ["test_build_full", "test_build_full_outs"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "# NOTE: granular or not, full outs DAG should be the same\n@pytest.mark.parametrize(\"granular\", [True, False])\ndef test_build_full_outs(repo, granular):\n target = \"h\" if granular else \"3\"\n G = _build(repo, target=target, outs=True, full=True)\n assert set(G.nodes()) == {\"j\", \"i\", \"d\", \"b\", \"g\", \"f\", \"e\", \"a\", \"h\"}\n assert set(G.edges()) == {\n (\"d\", \"a\"),\n (\"e\", \"a\"),\n (\"f\", \"b\"),\n (\"g\", \"b\"),\n (\"h\", \"a\"),\n (\"h\", \"b\"),\n (\"i\", \"a\"),\n (\"i\", \"b\"),\n (\"j\", \"a\"),\n (\"j\", \"h\"),\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_dag.py_test_show_ascii_test_show_ascii.assert_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_dag.py_test_show_ascii_test_show_ascii.assert_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_dag.py", "file_name": "test_dag.py", "file_type": "text/x-python", "category": "test", "start_line": 103, "end_line": 122, "span_ids": ["test_show_ascii"], "tokens": 279}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_show_ascii(repo):\n assert [\n line.rstrip() for line in _show_ascii(repo.graph).splitlines()\n ] == [\n \" +----------------+ +----------------+\", # noqa: E501\n \" | stage: 'a.dvc' | | stage: 'b.dvc' |\", # noqa: E501\n \" *+----------------+**** +----------------+\", # noqa: E501\n \" ***** * ***** *** ***\", # noqa: E501\n \" **** * ***** ** **\", # noqa: E501\n \" *** * *** ** **\", # noqa: E501\n \"+------------+ ** +------------+ +------------+\", # noqa: E501\n \"| stage: '1' | ** | stage: '3' | | stage: '2' |\", # noqa: E501\n \"+------------+ *** +------------+ +------------+\", # noqa: E501\n \" ** ***\",\n \" ** **\",\n \" ** **\",\n \" +------------+\",\n \" | stage: '4' |\",\n \" +------------+\",\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_experiments.py_test_experiments_run_test_experiments_run.cmd_repo_experiments_run_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_experiments.py_test_experiments_run_test_experiments_run.cmd_repo_experiments_run_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_experiments.py", "file_name": "test_experiments.py", "file_type": "text/x-python", "category": "test", "start_line": 86, "end_line": 106, "span_ids": ["test_experiments_run"], "tokens": 156}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"args, resume\", [([\"exp\", \"run\"], None), ([\"exp\", \"resume\"], \":last\")]\n)\ndef test_experiments_run(dvc, scm, mocker, args, resume):\n default_arguments = {\n \"params\": [],\n \"name\": None,\n \"queue\": False,\n \"run_all\": False,\n \"jobs\": None,\n \"checkpoint_resume\": resume,\n \"tmp_dir\": False,\n }\n\n default_arguments.update(repro_arguments)\n\n cmd = CmdExperimentsRun(parse_args(args))\n mocker.patch.object(cmd.repo, \"reproduce\")\n mocker.patch.object(cmd.repo.experiments, \"run\")\n cmd.run()\n cmd.repo.experiments.run.assert_called_with(**default_arguments)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_imp_url.py_test_failed_import_url_test_failed_import_url.with_caplog_at_level_logg.assert_expected_error_in_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_imp_url.py_test_failed_import_url_test_failed_import_url.with_caplog_at_level_logg.assert_expected_error_in_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_imp_url.py", "file_name": "test_imp_url.py", "file_type": "text/x-python", "category": "test", "start_line": 24, "end_line": 37, "span_ids": ["test_failed_import_url"], "tokens": 145}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_failed_import_url(mocker, caplog):\n cli_args = parse_args([\"import-url\", \"http://somesite.com/file_name\"])\n assert cli_args.func == CmdImportUrl\n\n cmd = cli_args.func(cli_args)\n mocker.patch.object(cmd.repo, \"imp_url\", side_effect=DvcException(\"error\"))\n with caplog.at_level(logging.ERROR, logger=\"dvc\"):\n assert cmd.run() == 1\n expected_error = (\n \"failed to import http://somesite.com/file_name. \"\n \"You could also try downloading it manually, and \"\n \"adding it with `dvc add`.\"\n )\n assert expected_error in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_imp_url.py_test_import_url_no_exec_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/command/test_imp_url.py_test_import_url_no_exec_", "embedding": null, "metadata": {"file_path": "tests/unit/command/test_imp_url.py", "file_name": "test_imp_url.py", "file_type": "text/x-python", "category": "test", "start_line": 40, "end_line": 62, "span_ids": ["test_import_url_no_exec"], "tokens": 120}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_import_url_no_exec(mocker):\n cli_args = parse_args(\n [\n \"import-url\",\n \"--no-exec\",\n \"src\",\n \"out\",\n \"--file\",\n \"file\",\n \"--desc\",\n \"description\",\n ]\n )\n\n cmd = cli_args.func(cli_args)\n m = mocker.patch.object(cmd.repo, \"imp_url\", autospec=True)\n\n assert cmd.run() == 0\n\n m.assert_called_once_with(\n \"src\", out=\"out\", fname=\"file\", no_exec=True, desc=\"description\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_http.py_test_http_method_test_http_method.assert_isinstance_tree__a": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_http.py_test_http_method_test_http_method.assert_isinstance_tree__a", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_http.py", "file_name": "test_http.py", "file_type": "text/x-python", "category": "test", "start_line": 108, "end_line": 127, "span_ids": ["test_http_method"], "tokens": 131}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_http_method(dvc):\n from requests.auth import HTTPBasicAuth\n\n user = \"username\"\n password = \"password\"\n auth = HTTPBasicAuth(user, password)\n config = {\n \"url\": \"http://example.com/\",\n \"path_info\": \"file.html\",\n \"auth\": \"basic\",\n \"user\": user,\n \"password\": password,\n \"method\": \"PUT\",\n }\n\n tree = HTTPTree(dvc, config)\n\n assert tree._auth_method() == auth\n assert tree.method == \"PUT\"\n assert isinstance(tree._auth_method(), HTTPBasicAuth)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_http.py_test_exists_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_http.py_test_exists_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_http.py", "file_name": "test_http.py", "file_type": "text/x-python", "category": "test", "start_line": 130, "end_line": 156, "span_ids": ["test_exists"], "tokens": 157}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_exists(mocker):\n import io\n\n import requests\n\n from dvc.path_info import URLInfo\n\n res = requests.Response()\n # need to add `raw`, as `exists()` fallbacks to a streaming GET requests\n # on HEAD request failure.\n res.raw = io.StringIO(\"foo\")\n\n tree = HTTPTree(None, {})\n mocker.patch.object(tree, \"request\", return_value=res)\n\n url = URLInfo(\"https://example.org/file.txt\")\n\n res.status_code = 200\n assert tree.exists(url) is True\n\n res.status_code = 404\n assert tree.exists(url) is False\n\n res.status_code = 403\n with pytest.raises(HTTPError):\n tree.exists(url)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_webdav.py_pytest_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_webdav.py_pytest_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_webdav.py", "file_name": "test_webdav.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 46, "span_ids": ["test_password", "test_userurl", "test_init", "imports", "test_user"], "tokens": 274}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.tree.webdav import WebDAVTree\n\n# Test configuration\nurl = \"webdavs://example.com/public.php/webdav\"\nuser = \"username\"\nuserurl = f\"webdavs://{user}@example.com/public.php/webdav\"\npassword = \"password\"\n\n\n# Test minimum requiered configuration (url)\ndef test_init(dvc):\n config = {\"url\": url}\n tree = WebDAVTree(dvc, config)\n\n assert tree.path_info == url\n\n\n# Test username from configuration\n@pytest.mark.parametrize(\n \"config\", [{\"url\": url, \"user\": user}, {\"url\": userurl}]\n)\ndef test_user(dvc, config):\n tree = WebDAVTree(dvc, config)\n\n assert tree.user == user\n\n\n# Test username extraction from url\ndef test_userurl(dvc):\n config = {\"url\": userurl}\n tree = WebDAVTree(dvc, config)\n\n assert tree.path_info == userurl\n assert tree.user == user\n assert tree.path_info.user == user\n\n\n# test password from config\ndef test_password(dvc):\n config = {\"url\": url, \"user\": user, \"password\": password}\n tree = WebDAVTree(dvc, config)\n\n assert tree.password == password", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_webhdfs.py_from_dvc_tree_webhdfs_imp_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/remote/test_webhdfs.py_from_dvc_tree_webhdfs_imp_", "embedding": null, "metadata": {"file_path": "tests/unit/remote/test_webhdfs.py", "file_name": "test_webhdfs.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 25, "span_ids": ["test_init", "imports"], "tokens": 190}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.tree.webhdfs import WebHDFSTree\n\nuser = \"test\"\nwebhdfs_token = \"token\"\nwebhdfs_alias = \"alias-name\"\nhdfscli_config = \"path/to/cli/config\"\n\n\ndef test_init(dvc):\n url = \"webhdfs://test@127.0.0.1:50070\"\n config = {\n \"url\": url,\n \"webhdfs_token\": webhdfs_token,\n \"webhdfs_alias\": webhdfs_alias,\n \"hdfscli_config\": hdfscli_config,\n \"user\": user,\n }\n\n tree = WebHDFSTree(dvc, config)\n assert tree.path_info == url\n assert tree.token == webhdfs_token\n assert tree.alias == webhdfs_alias\n assert tree.path_info.user == user\n assert tree.hdfscli_config == hdfscli_config", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_select_unwrap_test_select_unwrap.assert_node_1_2_3_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_select_unwrap_test_select_unwrap.assert_node_1_2_3_", "embedding": null, "metadata": {"file_path": "tests/unit/test_context.py", "file_name": "test_context.py", "file_type": "text/x-python", "category": "test", "start_line": 159, "end_line": 172, "span_ids": ["test_select_unwrap"], "tokens": 155}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_select_unwrap():\n context = Context({\"dct\": {\"foo\": \"bar\"}}, lst=[1, 2, 3], foo=\"foo\")\n\n assert context.select(\"dct.foo\", unwrap=True) == \"bar\"\n assert context.select(\"lst.0\", unwrap=True) == 1\n assert context.select(\"foo\", unwrap=True) == \"foo\"\n\n node = context.select(\"dct\", unwrap=True)\n assert isinstance(node, dict) and recurse_not_a_node(node)\n assert node == {\"foo\": \"bar\"}\n\n node = context.select(\"lst\", unwrap=True)\n assert isinstance(node, list) and recurse_not_a_node(node)\n assert node == [1, 2, 3]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_merge_dict_test_merge_dict.assert_node_layers_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_merge_dict_test_merge_dict.assert_node_layers_", "embedding": null, "metadata": {"file_path": "tests/unit/test_context.py", "file_name": "test_context.py", "file_type": "text/x-python", "category": "test", "start_line": 175, "end_line": 194, "span_ids": ["test_merge_dict"], "tokens": 195}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_merge_dict():\n d1 = {\"Train\": {\"us\": {\"lr\": 10}}}\n d2 = {\"Train\": {\"us\": {\"layers\": 100}}}\n\n c1 = Context(d1)\n c2 = Context(d2)\n\n c1.merge_update(c2)\n assert c1.select(\"Train.us\") == CtxDict(lr=10, layers=100)\n\n with pytest.raises(MergeError):\n # cannot overwrite by default\n c1.merge_update({\"Train\": {\"us\": {\"lr\": 15}}})\n\n c1.merge_update({\"Train\": {\"us\": {\"lr\": 15}}}, overwrite=True)\n node = c1.select(\"Train.us\")\n assert node == {\"lr\": 15, \"layers\": 100}\n assert isinstance(node, CtxDict)\n assert node[\"lr\"] == Value(15)\n assert node[\"layers\"] == Value(100)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_node_value_test_node_value.assert_context_foo_val": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_node_value_test_node_value.assert_context_foo_val", "embedding": null, "metadata": {"file_path": "tests/unit/test_context.py", "file_name": "test_context.py", "file_type": "text/x-python", "category": "test", "start_line": 378, "end_line": 402, "span_ids": ["test_node_value"], "tokens": 242}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_node_value():\n d = {\"dct\": {\"foo\": \"bar\"}, \"lst\": [1, 2, 3], \"foo\": \"foo\"}\n context = Context(d)\n assert isinstance(context, (Context, CtxDict))\n assert isinstance(context[\"dct\"], CtxDict)\n assert isinstance(context[\"lst\"], CtxList)\n assert isinstance(context[\"foo\"], Value)\n assert isinstance(context[\"dct\"][\"foo\"], Value)\n assert isinstance(context[\"lst\"][0], Value)\n\n assert context.value == d\n assert recurse_not_a_node(context.value)\n assert isinstance(context.value[\"dct\"], dict)\n assert isinstance(context.value[\"lst\"], list)\n assert isinstance(context.value[\"foo\"], str)\n assert isinstance(context.value[\"dct\"][\"foo\"], str)\n assert isinstance(context.value[\"lst\"][0], int)\n\n assert isinstance(context[\"dct\"].value, dict)\n assert context[\"dct\"][\"foo\"].value == \"bar\"\n\n assert isinstance(context[\"lst\"].value, list)\n assert context[\"lst\"][1].value == 2\n\n assert context[\"foo\"].value == \"foo\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_resolve_resolves_dict_keys_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_context.py_test_resolve_resolves_dict_keys_", "embedding": null, "metadata": {"file_path": "tests/unit/test_context.py", "file_name": "test_context.py", "file_type": "text/x-python", "category": "test", "start_line": 410, "end_line": 445, "span_ids": ["test_resolve_resolves_dict_keys", "test_resolve_resolves_boolean_value", "test_load_from_raises_if_file_is_directory", "test_load_from_raises_if_file_not_exist"], "tokens": 273}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_resolve_resolves_dict_keys():\n d = {\"dct\": {\"foo\": \"foobar\", \"persist\": True}}\n\n context = Context(d)\n assert context.resolve({\"${dct.foo}\": {\"persist\": \"${dct.persist}\"}}) == {\n \"foobar\": {\"persist\": True}\n }\n\n\ndef test_resolve_resolves_boolean_value():\n d = {\"enabled\": True, \"disabled\": False}\n context = Context(d)\n\n assert context.resolve_str(\"${enabled}\") is True\n assert context.resolve_str(\"${disabled}\") is False\n\n assert context.resolve_str(\"--flag ${enabled}\") == \"--flag true\"\n assert context.resolve_str(\"--flag ${disabled}\") == \"--flag false\"\n\n\ndef test_load_from_raises_if_file_not_exist(tmp_dir, dvc):\n with pytest.raises(ParamsLoadError) as exc_info:\n Context.load_from(dvc.tree, tmp_dir / DEFAULT_PARAMS_FILE)\n\n assert str(exc_info.value) == \"'params.yaml' does not exist\"\n\n\ndef test_load_from_raises_if_file_is_directory(tmp_dir, dvc):\n data_dir = tmp_dir / \"data\"\n data_dir.mkdir()\n\n with pytest.raises(ParamsLoadError) as exc_info:\n Context.load_from(dvc.tree, data_dir)\n\n assert str(exc_info.value) == \"'data' is a directory\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dir_info.py_from_operator_import_item_test_list.assert_dir_info_to_list_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dir_info.py_from_operator_import_item_test_list.assert_dir_info_to_list_", "embedding": null, "metadata": {"file_path": "tests/unit/test_dir_info.py", "file_name": "test_dir_info.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 58, "span_ids": ["imports", "test_list"], "tokens": 565}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from operator import itemgetter\n\nimport pytest\nfrom pygtrie import Trie\n\nfrom dvc.dir_info import DirInfo, _merge\nfrom dvc.hash_info import HashInfo\nfrom dvc.path_info import PosixPathInfo, WindowsPathInfo\n\n\n@pytest.mark.parametrize(\n \"lst, trie_dict\",\n [\n ([], {}),\n (\n [\n {\"md5\": \"def\", \"relpath\": \"zzz\"},\n {\"md5\": \"123\", \"relpath\": \"foo\"},\n {\"md5\": \"abc\", \"relpath\": \"aaa\"},\n {\"md5\": \"456\", \"relpath\": \"bar\"},\n ],\n {\n (\"zzz\",): HashInfo(\"md5\", \"def\"),\n (\"foo\",): HashInfo(\"md5\", \"123\"),\n (\"bar\",): HashInfo(\"md5\", \"456\"),\n (\"aaa\",): HashInfo(\"md5\", \"abc\"),\n },\n ),\n (\n [\n {\"md5\": \"123\", \"relpath\": \"dir/b\"},\n {\"md5\": \"456\", \"relpath\": \"dir/z\"},\n {\"md5\": \"789\", \"relpath\": \"dir/a\"},\n {\"md5\": \"abc\", \"relpath\": \"b\"},\n {\"md5\": \"def\", \"relpath\": \"a\"},\n {\"md5\": \"ghi\", \"relpath\": \"z\"},\n {\"md5\": \"jkl\", \"relpath\": \"dir/subdir/b\"},\n {\"md5\": \"mno\", \"relpath\": \"dir/subdir/z\"},\n {\"md5\": \"pqr\", \"relpath\": \"dir/subdir/a\"},\n ],\n {\n (\"dir\", \"b\"): HashInfo(\"md5\", \"123\"),\n (\"dir\", \"z\"): HashInfo(\"md5\", \"456\"),\n (\"dir\", \"a\"): HashInfo(\"md5\", \"789\"),\n (\"b\",): HashInfo(\"md5\", \"abc\"),\n (\"a\",): HashInfo(\"md5\", \"def\"),\n (\"z\",): HashInfo(\"md5\", \"ghi\"),\n (\"dir\", \"subdir\", \"b\"): HashInfo(\"md5\", \"jkl\"),\n (\"dir\", \"subdir\", \"z\"): HashInfo(\"md5\", \"mno\"),\n (\"dir\", \"subdir\", \"a\"): HashInfo(\"md5\", \"pqr\"),\n },\n ),\n ],\n)\ndef test_list(lst, trie_dict):\n dir_info = DirInfo.from_list(lst)\n assert dir_info.trie == Trie(trie_dict)\n assert dir_info.to_list() == sorted(lst, key=itemgetter(\"relpath\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dir_info.py_test_size_test_size.assert_dir_info_size_s": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dir_info.py_test_size_test_size.assert_dir_info_size_s", "embedding": null, "metadata": {"file_path": "tests/unit/test_dir_info.py", "file_name": "test_dir_info.py", "file_type": "text/x-python", "category": "test", "start_line": 61, "end_line": 88, "span_ids": ["test_size"], "tokens": 231}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"trie_dict, size\",\n [\n ({}, 0),\n (\n {\n (\"a\",): HashInfo(\"md5\", \"abc\", size=1),\n (\"b\",): HashInfo(\"md5\", \"def\", size=2),\n (\"c\",): HashInfo(\"md5\", \"ghi\", size=3),\n (\"dir\", \"foo\"): HashInfo(\"md5\", \"jkl\", size=4),\n (\"dir\", \"bar\"): HashInfo(\"md5\", \"mno\", size=5),\n (\"dir\", \"baz\"): HashInfo(\"md5\", \"pqr\", size=6),\n },\n 21,\n ),\n (\n {\n (\"a\",): HashInfo(\"md5\", \"abc\", size=1),\n (\"b\",): HashInfo(\"md5\", \"def\", size=None),\n },\n None,\n ),\n ],\n)\ndef test_size(trie_dict, size):\n dir_info = DirInfo()\n dir_info.trie = Trie(trie_dict)\n assert dir_info.size == size", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dir_info.py_test_nfiles_test_nfiles.assert_dir_info_nfiles_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dir_info.py_test_nfiles_test_nfiles.assert_dir_info_nfiles_", "embedding": null, "metadata": {"file_path": "tests/unit/test_dir_info.py", "file_name": "test_dir_info.py", "file_type": "text/x-python", "category": "test", "start_line": 91, "end_line": 118, "span_ids": ["test_nfiles"], "tokens": 237}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"trie_dict, nfiles\",\n [\n ({}, 0),\n (\n {\n (\"a\",): HashInfo(\"md5\", \"abc\", size=1),\n (\"b\",): HashInfo(\"md5\", \"def\", size=2),\n (\"c\",): HashInfo(\"md5\", \"ghi\", size=3),\n (\"dir\", \"foo\"): HashInfo(\"md5\", \"jkl\", size=4),\n (\"dir\", \"bar\"): HashInfo(\"md5\", \"mno\", size=5),\n (\"dir\", \"baz\"): HashInfo(\"md5\", \"pqr\", size=6),\n },\n 6,\n ),\n (\n {\n (\"a\",): HashInfo(\"md5\", \"abc\", size=1),\n (\"b\",): HashInfo(\"md5\", \"def\", size=None),\n },\n 2,\n ),\n ],\n)\ndef test_nfiles(trie_dict, nfiles):\n dir_info = DirInfo()\n dir_info.trie = Trie(trie_dict)\n assert dir_info.nfiles == nfiles", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dir_info.py_test_items_test_items.assert_list_dir_info_item": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dir_info.py_test_items_test_items.assert_list_dir_info_item", "embedding": null, "metadata": {"file_path": "tests/unit/test_dir_info.py", "file_name": "test_dir_info.py", "file_type": "text/x-python", "category": "test", "start_line": 121, "end_line": 154, "span_ids": ["test_items"], "tokens": 359}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"trie_dict, items\",\n [\n ({}, []),\n (\n {\n (\"a\",): HashInfo(\"md5\", \"abc\"),\n (\"b\",): HashInfo(\"md5\", \"def\"),\n (\"c\",): HashInfo(\"md5\", \"ghi\"),\n (\"dir\", \"foo\"): HashInfo(\"md5\", \"jkl\"),\n (\"dir\", \"bar\"): HashInfo(\"md5\", \"mno\"),\n (\"dir\", \"baz\"): HashInfo(\"md5\", \"pqr\"),\n (\"dir\", \"subdir\", \"1\"): HashInfo(\"md5\", \"stu\"),\n (\"dir\", \"subdir\", \"2\"): HashInfo(\"md5\", \"vwx\"),\n (\"dir\", \"subdir\", \"3\"): HashInfo(\"md5\", \"yz\"),\n },\n [\n (\"a\", HashInfo(\"md5\", \"abc\")),\n (\"b\", HashInfo(\"md5\", \"def\")),\n (\"c\", HashInfo(\"md5\", \"ghi\")),\n (\"dir/foo\", HashInfo(\"md5\", \"jkl\")),\n (\"dir/bar\", HashInfo(\"md5\", \"mno\")),\n (\"dir/baz\", HashInfo(\"md5\", \"pqr\")),\n (\"dir/subdir/1\", HashInfo(\"md5\", \"stu\")),\n (\"dir/subdir/2\", HashInfo(\"md5\", \"vwx\")),\n (\"dir/subdir/3\", HashInfo(\"md5\", \"yz\")),\n ],\n ),\n ],\n)\ndef test_items(trie_dict, items):\n dir_info = DirInfo()\n dir_info.trie = Trie(trie_dict)\n assert list(dir_info.items()) == items", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dir_info.py_test_items_with_path_test_items_with_path.assert_list_dir_info_item": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dir_info.py_test_items_with_path_test_items_with_path.assert_list_dir_info_item", "embedding": null, "metadata": {"file_path": "tests/unit/test_dir_info.py", "file_name": "test_dir_info.py", "file_type": "text/x-python", "category": "test", "start_line": 157, "end_line": 202, "span_ids": ["test_items_with_path"], "tokens": 375}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"path_info, trie_dict, items\",\n [\n (PosixPathInfo(), {}, []),\n (WindowsPathInfo(), {}, []),\n (\n PosixPathInfo(\"/some/path\"),\n {\n (\"a\",): HashInfo(\"md5\", \"abc\"),\n (\"dir\", \"foo\"): HashInfo(\"md5\", \"jkl\"),\n (\"dir\", \"sub\", \"1\"): HashInfo(\"md5\", \"stu\"),\n },\n [\n (PosixPathInfo(\"/some/path/a\"), HashInfo(\"md5\", \"abc\")),\n (PosixPathInfo(\"/some/path/dir/foo\"), HashInfo(\"md5\", \"jkl\")),\n (\n PosixPathInfo(\"/some/path/dir/sub/1\"),\n HashInfo(\"md5\", \"stu\"),\n ),\n ],\n ),\n (\n WindowsPathInfo(\"C:\\\\some\\\\path\"),\n {\n (\"a\",): HashInfo(\"md5\", \"abc\"),\n (\"dir\", \"foo\"): HashInfo(\"md5\", \"jkl\"),\n (\"dir\", \"sub\", \"1\"): HashInfo(\"md5\", \"stu\"),\n },\n [\n (WindowsPathInfo(\"C:\\\\some\\\\path\\\\a\"), HashInfo(\"md5\", \"abc\")),\n (\n WindowsPathInfo(\"C:\\\\some\\\\path\\\\dir\\\\foo\"),\n HashInfo(\"md5\", \"jkl\"),\n ),\n (\n WindowsPathInfo(\"C:\\\\some\\\\path\\\\dir\\\\sub\\\\1\"),\n HashInfo(\"md5\", \"stu\"),\n ),\n ],\n ),\n ],\n)\ndef test_items_with_path(path_info, trie_dict, items):\n dir_info = DirInfo()\n dir_info.trie = Trie(trie_dict)\n assert list(dir_info.items(path_info)) == items", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dir_info.py_test_merge_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_dir_info.py_test_merge_", "embedding": null, "metadata": {"file_path": "tests/unit/test_dir_info.py", "file_name": "test_dir_info.py", "file_type": "text/x-python", "category": "test", "start_line": 205, "end_line": 274, "span_ids": ["test_merge"], "tokens": 566}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"ancestor_dict, our_dict, their_dict, merged_dict\",\n [\n ({}, {}, {}, {}),\n (\n {(\"foo\",): HashInfo(\"md5\", \"123\")},\n {\n (\"foo\",): HashInfo(\"md5\", \"123\"),\n (\"bar\",): HashInfo(\"md5\", \"345\"),\n },\n {\n (\"foo\",): HashInfo(\"md5\", \"123\"),\n (\"baz\",): HashInfo(\"md5\", \"678\"),\n },\n {\n (\"foo\",): HashInfo(\"md5\", \"123\"),\n (\"bar\",): HashInfo(\"md5\", \"345\"),\n (\"baz\",): HashInfo(\"md5\", \"678\"),\n },\n ),\n (\n {\n (\"common\",): HashInfo(\"md5\", \"123\"),\n (\"subdir\", \"foo\"): HashInfo(\"md5\", \"345\"),\n },\n {\n (\"common\",): HashInfo(\"md5\", \"123\"),\n (\"subdir\", \"foo\"): HashInfo(\"md5\", \"345\"),\n (\"subdir\", \"bar\"): HashInfo(\"md5\", \"678\"),\n },\n {\n (\"common\",): HashInfo(\"md5\", \"123\"),\n (\"subdir\", \"foo\"): HashInfo(\"md5\", \"345\"),\n (\"subdir\", \"baz\"): HashInfo(\"md5\", \"91011\"),\n },\n {\n (\"common\",): HashInfo(\"md5\", \"123\"),\n (\"subdir\", \"foo\"): HashInfo(\"md5\", \"345\"),\n (\"subdir\", \"bar\"): HashInfo(\"md5\", \"678\"),\n (\"subdir\", \"baz\"): HashInfo(\"md5\", \"91011\"),\n },\n ),\n (\n {},\n {(\"foo\",): HashInfo(\"md5\", \"123\")},\n {(\"bar\",): HashInfo(\"md5\", \"456\")},\n {\n (\"foo\",): HashInfo(\"md5\", \"123\"),\n (\"bar\",): HashInfo(\"md5\", \"456\"),\n },\n ),\n (\n {},\n {},\n {(\"bar\",): HashInfo(\"md5\", \"123\")},\n {(\"bar\",): HashInfo(\"md5\", \"123\")},\n ),\n (\n {},\n {(\"bar\",): HashInfo(\"md5\", \"123\")},\n {},\n {(\"bar\",): HashInfo(\"md5\", \"123\")},\n ),\n ],\n)\ndef test_merge(ancestor_dict, our_dict, their_dict, merged_dict):\n actual = _merge(Trie(ancestor_dict), Trie(our_dict), Trie(their_dict))\n expected = Trie(merged_dict)\n assert actual == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_info.py_test_info_in_subdir_test_remotes_empty.assert_Remotes_None_in": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_info.py_test_info_in_subdir_test_remotes_empty.assert_Remotes_None_in", "embedding": null, "metadata": {"file_path": "tests/unit/test_info.py", "file_name": "test_info.py", "file_type": "text/x-python", "category": "test", "start_line": 35, "end_line": 73, "span_ids": ["test_remotes_empty", "test_caches", "test_info_in_broken_git_repo", "test_info_in_subdir"], "tokens": 310}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_info_in_subdir(tmp_dir, scm, caplog):\n dvc_subdir = tmp_dir / \"subdir\"\n dvc_subdir.mkdir()\n\n with dvc_subdir.chdir():\n dvc_subdir.init(scm=False, dvc=True)\n with dvc_subdir.dvc.config.edit() as conf:\n del conf[\"core\"][\"no_scm\"]\n\n dvc_info = get_dvc_info()\n\n assert \"Repo: dvc (subdir), git\" in dvc_info\n\n\ndef test_info_in_broken_git_repo(tmp_dir, dvc, scm, caplog):\n shutil.rmtree(dvc.scm.dir)\n dvc_info = get_dvc_info()\n\n assert \"Repo: dvc, git (broken)\" in dvc_info\n\n\ndef test_caches(tmp_dir, dvc, caplog):\n tmp_dir.add_remote(\n name=\"sshcache\", url=\"ssh://example.com/path\", default=False\n )\n with tmp_dir.dvc.config.edit() as conf:\n conf[\"cache\"][\"ssh\"] = \"sshcache\"\n\n dvc_info = get_dvc_info()\n\n # Order of cache types is runtime dependent\n assert re.search(\"Caches: (local, ssh|ssh, local)\", dvc_info)\n\n\ndef test_remotes_empty(tmp_dir, dvc, caplog):\n # No remotes are configured\n dvc_info = get_dvc_info()\n\n assert \"Remotes: None\" in dvc_info", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_info.py_test_remotes_test_fs_info_in_repo.assert_re_search_r_Worksp": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_info.py_test_remotes_test_fs_info_in_repo.assert_re_search_r_Worksp", "embedding": null, "metadata": {"file_path": "tests/unit/test_info.py", "file_name": "test_info.py", "file_type": "text/x-python", "category": "test", "start_line": 76, "end_line": 94, "span_ids": ["test_remotes", "test_fs_info_in_repo"], "tokens": 191}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_remotes(tmp_dir, dvc, caplog):\n tmp_dir.add_remote(name=\"server\", url=\"ssh://localhost\", default=False)\n tmp_dir.add_remote(\n name=\"r1\", url=\"azure://example.com/path\", default=False\n )\n tmp_dir.add_remote(name=\"r2\", url=\"remote://server/path\", default=False)\n\n dvc_info = get_dvc_info()\n\n assert re.search(\"Remotes: (ssh, azure|azure, ssh)\", dvc_info)\n\n\n@pytest.mark.skipif(psutil is None, reason=\"No psutil.\")\ndef test_fs_info_in_repo(tmp_dir, dvc, caplog):\n os.mkdir(dvc.cache.local.cache_dir)\n dvc_info = get_dvc_info()\n\n assert re.search(r\"Cache directory: .* on .*\", dvc_info)\n assert re.search(r\"Workspace directory: .* on .*\", dvc_info)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_interpolate.py_test_resolve_primitives_list_access_test_resolve_primitives_list_access.None_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_interpolate.py_test_resolve_primitives_list_access_test_resolve_primitives_list_access.None_4", "embedding": null, "metadata": {"file_path": "tests/unit/test_interpolate.py", "file_name": "test_interpolate.py", "file_type": "text/x-python", "category": "test", "start_line": 73, "end_line": 90, "span_ids": ["test_resolve_primitives_list_access"], "tokens": 148}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_resolve_primitives_list_access():\n context = Context(\n {\n \"dict\": [\n {\"f\": \"f\"},\n {\"fo\": \"fo\"},\n {\"foo\": \"foo\"},\n {\"foo\": [\"f\", \"o\", \"o\"]},\n ]\n }\n )\n\n assert context.resolve(\"${dict[0].f}\") == \"f\"\n assert context.resolve(\"${dict[1].fo}\") == \"fo\"\n assert context.resolve(\"${dict[2].foo}\") == \"foo\"\n assert context.resolve(\"${dict[3].foo[0]}\") == \"f\"\n\n assert context.resolve(\"${ dict.1.fo}${dict.3.foo.1}bar\") == \"foobar\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_interpolate.py_test_resolve_collection_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/test_interpolate.py_test_resolve_collection_", "embedding": null, "metadata": {"file_path": "tests/unit/test_interpolate.py", "file_name": "test_interpolate.py", "file_type": "text/x-python", "category": "test", "start_line": 92, "end_line": 111, "span_ids": ["test_resolve_unicode", "test_resolve_collection"], "tokens": 214}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_resolve_collection():\n from tests.func.parsing import (\n CONTEXT_DATA,\n RESOLVED_DVC_YAML_DATA,\n TEMPLATED_DVC_YAML_DATA,\n )\n\n context = Context(CONTEXT_DATA)\n resolved = context.resolve(TEMPLATED_DVC_YAML_DATA)\n assert resolved == RESOLVED_DVC_YAML_DATA\n assert recurse_not_a_node(resolved)\n\n\ndef test_resolve_unicode():\n context = Context({\"\u0928\u0947\u092a\u093e\u0932\u0940\": {\"\u091a\u093f\u092f\u093e\": [\"\u091a\u093f\", \"\u092f\u093e\"]}})\n assert context.resolve_str(\"${\u0928\u0947\u092a\u093e\u0932\u0940.\u091a\u093f\u092f\u093e[0]}${\u0928\u0947\u092a\u093e\u0932\u0940.\u091a\u093f\u092f\u093e[1]}\") == \"\u091a\u093f\u092f\u093e\"\n assert (\n context.resolve_str(\"${\u0928\u0947\u092a\u093e\u0932\u0940[\u091a\u093f\u092f\u093e][0]}${\u0928\u0947\u092a\u093e\u0932\u0940[\u091a\u093f\u092f\u093e][1]}\") == \"\u091a\u093f\u092f\u093e\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_get_hash_dirty_file_test_get_hash_dirty_dir.assert_actual_dir_info_nf": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo.py_test_get_hash_dirty_file_test_get_hash_dirty_dir.assert_actual_dir_info_nf", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 545, "end_line": 563, "span_ids": ["test_get_hash_dirty_file", "test_get_hash_dirty_dir"], "tokens": 215}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_hash_dirty_file(tmp_dir, dvc):\n tmp_dir.dvc_gen(\"file\", \"file\")\n (tmp_dir / \"file\").write_text(\"something\")\n\n tree = RepoTree(dvc)\n actual = tree.get_hash(PathInfo(tmp_dir) / \"file\")\n expected = HashInfo(\"md5\", \"8c7dd922ad47494fc02c388e12c00eac\")\n assert actual == expected\n\n\ndef test_get_hash_dirty_dir(tmp_dir, dvc):\n tmp_dir.dvc_gen({\"dir\": {\"foo\": \"foo\", \"bar\": \"bar\"}})\n (tmp_dir / \"dir\" / \"baz\").write_text(\"baz\")\n\n tree = RepoTree(dvc)\n actual = tree.get_hash(PathInfo(tmp_dir) / \"dir\")\n expected = HashInfo(\"md5\", \"ba75a2162ca9c29acecb7957105a0bc2.dir\")\n assert actual == expected\n assert actual.dir_info.nfiles == 3", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo_metadata.py_pytest_repo_tree.yield_RepoTree_dvc_fetch": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_repo_metadata.py_pytest_repo_tree.yield_RepoTree_dvc_fetch", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_repo_metadata.py", "file_name": "test_repo_metadata.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 40, "span_ids": ["imports", "repo_tree"], "tokens": 297}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import pytest\n\nfrom dvc.path_info import PathInfo\nfrom dvc.tree.repo import RepoTree\nfrom tests.unit.tree.test_repo import make_subrepo\n\n\n@pytest.fixture\ndef repo_tree(tmp_dir, dvc, scm):\n fs_structure = {\n \"models\": { # mixed dvc + git directory\n \"train.py\": \"train dot py\",\n \"test.py\": \"test dot py\",\n },\n \"README.md\": \"my little project\", # file\n \"src\": { # repo-only directory\n \"utils\": {\n \"__init__.py\": \"\",\n \"serve_model.py\": \"# this will serve a model `soon`\",\n }\n },\n }\n dvc_structure = {\n \"data\": { # dvc only directory\n \"raw\": {\n \"raw-1.csv\": \"one, dot, csv\",\n \"raw-2.csv\": \"two, dot, csv\",\n },\n \"processed\": {\n \"processed-1.csv\": \"1, dot, csv\",\n \"processed-2.csv\": \"2, dot, csv\",\n },\n },\n \"models/transform.pickle\": \"model model\", # file\n }\n\n tmp_dir.scm_gen(fs_structure, commit=\"repo init\")\n tmp_dir.dvc_gen(dvc_structure, commit=\"use dvc\")\n\n yield RepoTree(dvc, fetch=True, subrepos=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_tree.py_os_test_get_cloud_tree.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_tree.py_os_test_get_cloud_tree.None_2", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_tree.py", "file_name": "test_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 24, "span_ids": ["imports", "test_get_cloud_tree"], "tokens": 196}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import os\nimport stat\n\nimport pytest\n\nfrom dvc.config import ConfigError\nfrom dvc.path_info import CloudURLInfo, PathInfo\nfrom dvc.tree import LocalTree, get_cloud_tree\n\n\ndef test_get_cloud_tree(tmp_dir, dvc):\n tmp_dir.add_remote(name=\"base\", url=\"s3://bucket/path\", default=False)\n tmp_dir.add_remote(name=\"first\", url=\"remote://base/first\", default=False)\n tmp_dir.add_remote(\n name=\"second\", url=\"remote://first/second\", default=False\n )\n\n base = CloudURLInfo(\"s3://bucket/path\")\n first = base / \"first\"\n second = first / \"second\"\n\n assert get_cloud_tree(dvc, name=\"base\").path_info == base\n assert get_cloud_tree(dvc, name=\"first\").path_info == first\n assert get_cloud_tree(dvc, name=\"second\").path_info == second", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_tree.py_test_get_cloud_tree_validate_test_get_cloud_tree_validate.with_pytest_raises_Config.get_cloud_tree_dvc_name_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_tree.py_test_get_cloud_tree_validate_test_get_cloud_tree_validate.with_pytest_raises_Config.get_cloud_tree_dvc_name_", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_tree.py", "file_name": "test_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 27, "end_line": 51, "span_ids": ["test_get_cloud_tree_validate"], "tokens": 194}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_cloud_tree_validate(tmp_dir, dvc):\n tmp_dir.add_remote(\n name=\"base\", url=\"ssh://example.com/path\", default=False\n )\n tmp_dir.add_remote(\n name=\"first\",\n config={\"url\": \"remote://base/first\", \"type\": \"symlink\"},\n default=False,\n )\n tmp_dir.add_remote(\n name=\"second\",\n config={\"url\": \"remote://first/second\", \"oss_key_id\": \"mykey\"},\n default=False,\n )\n\n assert get_cloud_tree(dvc, name=\"base\").config == {\n \"url\": \"ssh://example.com/path\"\n }\n assert get_cloud_tree(dvc, name=\"first\").config == {\n \"url\": \"ssh://example.com/path/first\",\n \"type\": [\"symlink\"],\n }\n\n with pytest.raises(ConfigError):\n get_cloud_tree(dvc, name=\"second\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_tree.py_test_upload_file_mode_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/tree/test_tree.py_test_upload_file_mode_", "embedding": null, "metadata": {"file_path": "tests/unit/tree/test_tree.py", "file_name": "test_tree.py", "file_type": "text/x-python", "category": "test", "start_line": 54, "end_line": 67, "span_ids": ["test_upload_file_mode"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.skipif(os.name == \"nt\", reason=\"Not supported for Windows.\")\n@pytest.mark.parametrize(\n \"mode, expected\", [(None, LocalTree.CACHE_MODE), (0o777, 0o777)],\n)\ndef test_upload_file_mode(tmp_dir, mode, expected):\n tmp_dir.gen(\"src\", \"foo\")\n src = PathInfo(tmp_dir / \"src\")\n dest = PathInfo(tmp_dir / \"dest\")\n tree = LocalTree(None, {\"url\": os.fspath(tmp_dir)})\n tree.upload(src, dest, file_mode=mode)\n assert (tmp_dir / \"dest\").exists()\n assert (tmp_dir / \"dest\").read_text() == \"foo\"\n assert stat.S_IMODE(os.stat(dest).st_mode) == expected", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/utils/httpd.py_run_server_on_thread_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/utils/httpd.py_run_server_on_thread_", "embedding": null, "metadata": {"file_path": "tests/utils/httpd.py", "file_name": "httpd.py", "file_type": "text/x-python", "category": "implementation", "start_line": 93, "end_line": 125, "span_ids": ["StaticFileServer.__exit__", "StaticFileServer.__init__", "StaticFileServer.__enter__", "run_server_on_thread", "StaticFileServer"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@contextmanager\ndef run_server_on_thread(server):\n thread = threading.Thread(target=server.serve_forever)\n thread.daemon = True\n thread.start()\n\n yield server\n\n server.socket.close()\n server.shutdown()\n server.server_close()\n\n\nclass StaticFileServer:\n _lock = threading.Lock()\n\n def __init__(self, directory):\n from functools import partial\n\n addr = (\"localhost\", 0)\n req = partial(TestRequestHandler, directory=directory)\n server = HTTPServer(addr, req)\n self.runner = run_server_on_thread(server)\n\n # pylint: disable=no-member\n def __enter__(self):\n self._lock.acquire()\n return self.runner.__enter__()\n\n def __exit__(self, *args):\n self.runner.__exit__(*args)\n self._lock.release()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/__init__.py_logging__format_preamble.return.f_failed_to_parse_msg_i": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/parsing/__init__.py_logging__format_preamble.return.f_failed_to_parse_msg_i", "embedding": null, "metadata": {"file_path": "dvc/parsing/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 56, "span_ids": ["imports", "ResolveError", "_format_preamble", "EntryNotFound"], "tokens": 298}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nfrom collections.abc import Mapping, Sequence\nfrom copy import deepcopy\nfrom typing import TYPE_CHECKING, Any, Dict, NamedTuple, Union\n\nfrom funcy import cached_property, collecting, first, isa, join, reraise\n\nfrom dvc.dependency.param import ParamsDependency\nfrom dvc.exceptions import DvcException\nfrom dvc.parsing.interpolate import ParseError\nfrom dvc.path_info import PathInfo\nfrom dvc.utils import relpath\n\nfrom .context import (\n Context,\n ContextError,\n KeyNotInContext,\n MergeError,\n Node,\n VarsAlreadyLoaded,\n)\nfrom .interpolate import (\n check_recursive_parse_errors,\n is_interpolated_string,\n recurse,\n to_str,\n)\n\nif TYPE_CHECKING:\n from dvc.repo import Repo\n\nlogger = logging.getLogger(__name__)\n\nSTAGES_KWD = \"stages\"\nVARS_KWD = \"vars\"\nWDIR_KWD = \"wdir\"\nDEFAULT_PARAMS_FILE = ParamsDependency.DEFAULT_PARAMS_FILE\nPARAMS_KWD = \"params\"\nFOREACH_KWD = \"foreach\"\nDO_KWD = \"do\"\n\nDEFAULT_SENTINEL = object()\n\nJOIN = \"@\"\n\n\nclass ResolveError(DvcException):\n pass\n\n\nclass EntryNotFound(DvcException):\n pass\n\n\ndef _format_preamble(msg, path, spacing=\" \"):\n return f\"failed to parse {msg} in '{path}':{spacing}\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.find_dvc_dir_Repo._ignore.self_scm_ignore_list_flis": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/__init__.py_Repo.find_dvc_dir_Repo._ignore.self_scm_ignore_list_flis", "embedding": null, "metadata": {"file_path": "dvc/repo/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 241, "end_line": 265, "span_ids": ["Repo.find_dvc_dir", "Repo._ignore", "Repo.init", "Repo.unprotect"], "tokens": 181}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Repo:\n\n @classmethod\n def find_dvc_dir(cls, root=None):\n root_dir = cls.find_root(root)\n return os.path.join(root_dir, cls.DVC_DIR)\n\n @staticmethod\n def init(root_dir=os.curdir, no_scm=False, force=False, subdir=False):\n from dvc.repo.init import init\n\n init(root_dir=root_dir, no_scm=no_scm, force=force, subdir=subdir)\n return Repo(root_dir)\n\n def unprotect(self, target):\n return self.cache.local.tree.unprotect(PathInfo(target))\n\n def _ignore(self):\n flist = [\n self.config.files[\"local\"],\n self.tmp_dir,\n ]\n\n if path_isin(self.cache.local.cache_dir, self.root_dir):\n flist += [self.cache.local.cache_dir]\n\n self.scm.ignore_list(flist)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/checkout.py__collect_pairs__collect_pairs.return.pairs": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/checkout.py__collect_pairs__collect_pairs.return.pairs", "embedding": null, "metadata": {"file_path": "dvc/repo/checkout.py", "file_name": "checkout.py", "file_type": "text/x-python", "category": "implementation", "start_line": 46, "end_line": 71, "span_ids": ["_collect_pairs"], "tokens": 154}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _collect_pairs(\n self: \"Repo\", targets, with_deps: bool, recursive: bool\n) -> Set[\"StageInfo\"]:\n from dvc.stage.exceptions import (\n StageFileBadNameError,\n StageFileDoesNotExistError,\n )\n\n pairs: Set[\"StageInfo\"] = set()\n for target in targets:\n try:\n pairs.update(\n self.stage.collect_granular(\n target, with_deps=with_deps, recursive=recursive\n )\n )\n except (\n StageFileDoesNotExistError,\n StageFileBadNameError,\n NoOutputOrStageError,\n ) as exc:\n if not target:\n raise\n raise CheckoutErrorSuggestGit(target) from exc\n\n return pairs", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/graph.py_from_typing_import_TYPE_C_collect_inside_path.return._stage_for_stage_in_stage": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/graph.py_from_typing_import_TYPE_C_collect_inside_path.return._stage_for_stage_in_stage", "embedding": null, "metadata": {"file_path": "dvc/repo/graph.py", "file_name": "graph.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 52, "span_ids": ["imports", "get_pipelines", "check_acyclic", "collect_inside_path", "get_pipeline", "collect_pipeline"], "tokens": 325}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from typing import TYPE_CHECKING, Iterator, List, Set\n\nfrom dvc.utils.fs import path_isin\n\nif TYPE_CHECKING:\n from networkx import DiGraph\n\n from dvc.stage import Stage\n\n\ndef check_acyclic(graph: \"DiGraph\") -> None:\n import networkx as nx\n\n from dvc.exceptions import CyclicGraphError\n\n try:\n edges = nx.find_cycle(graph, orientation=\"original\")\n except nx.NetworkXNoCycle:\n return\n\n stages: Set[\"Stage\"] = set()\n for from_node, to_node, _ in edges:\n stages.add(from_node)\n stages.add(to_node)\n\n raise CyclicGraphError(list(stages))\n\n\ndef get_pipeline(pipelines, node):\n found = [i for i in pipelines if i.has_node(node)]\n assert len(found) == 1\n return found[0]\n\n\ndef get_pipelines(G):\n import networkx as nx\n\n return [G.subgraph(c).copy() for c in nx.weakly_connected_components(G)]\n\n\ndef collect_pipeline(stage: \"Stage\", graph: \"DiGraph\") -> Iterator[\"Stage\"]:\n import networkx as nx\n\n pipeline = get_pipeline(get_pipelines(graph), stage)\n return nx.dfs_postorder_nodes(pipeline, stage)\n\n\ndef collect_inside_path(path: str, graph: \"DiGraph\") -> List[\"Stage\"]:\n import networkx as nx\n\n stages = nx.dfs_postorder_nodes(graph)\n return [stage for stage in stages if path_isin(stage.path, path)]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/stage.py_fnmatch__maybe_collect_from_dvc_yaml.return._collect_with_deps_stages": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/stage.py_fnmatch__maybe_collect_from_dvc_yaml.return._collect_with_deps_stages", "embedding": null, "metadata": {"file_path": "dvc/repo/stage.py", "file_name": "stage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 55, "span_ids": ["_maybe_collect_from_dvc_yaml", "impl:4", "_collect_with_deps", "imports", "StageInfo"], "tokens": 369}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import fnmatch\nimport logging\nimport os\nimport typing\nfrom contextlib import suppress\nfrom typing import Iterable, List, NamedTuple, Optional, Set, Tuple\n\nfrom dvc.dvcfile import PIPELINE_FILE, Dvcfile, is_valid_filename\nfrom dvc.exceptions import (\n DvcException,\n NoOutputOrStageError,\n OutputNotFoundError,\n)\nfrom dvc.path_info import PathInfo\nfrom dvc.repo.graph import collect_inside_path, collect_pipeline\nfrom dvc.stage.exceptions import StageFileDoesNotExistError, StageNotFound\nfrom dvc.utils import parse_target, relpath\n\nlogger = logging.getLogger(__name__)\n\nif typing.TYPE_CHECKING:\n from networkx import DiGraph\n\n from dvc.repo import Repo\n from dvc.stage import Stage\n from dvc.stage.loader import StageLoader\n from dvc.types import OptStr\n\n\nclass StageInfo(NamedTuple):\n stage: \"Stage\"\n filter_info: Optional[PathInfo] = None\n\n\nStageList = List[\"Stage\"]\nStageIter = Iterable[\"Stage\"]\nStageSet = Set[\"Stage\"]\n\n\ndef _collect_with_deps(stages: StageList, graph: \"DiGraph\") -> StageSet:\n res: StageSet = set()\n for stage in stages:\n res.update(collect_pipeline(stage, graph=graph))\n return res\n\n\ndef _maybe_collect_from_dvc_yaml(\n loader: \"StageLoad\", target, with_deps: bool, **load_kwargs,\n) -> StageIter:\n\n stages: StageList = []\n if loader.tree.exists(PIPELINE_FILE):\n with suppress(StageNotFound):\n stages = loader.load_all(PIPELINE_FILE, target, **load_kwargs)\n return _collect_with_deps(stages, loader.graph) if with_deps else stages", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/stage.py__collect_specific_target__collect_specific_target.return._file_name": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/stage.py__collect_specific_target__collect_specific_target.return._file_name", "embedding": null, "metadata": {"file_path": "dvc/repo/stage.py", "file_name": "stage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 54, "end_line": 81, "span_ids": ["_collect_specific_target"], "tokens": 289}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def _collect_specific_target(\n loader: \"StageLoad\",\n target: str,\n with_deps: bool,\n recursive: bool,\n accept_group: bool,\n) -> Tuple[StageIter, \"OptStr\", \"OptStr\"]:\n # Optimization: do not collect the graph for a specific target\n file, name = parse_target(target)\n\n # if the target has a file, we can load directly from it.\n if not file:\n # but, if there's no file, parsing is ambiguous as it can be a\n # stage name in `dvc.yaml` file or an output. We prioritize\n # `dvc.yaml` stage name here. If it exists, then we move on.\n # else, we assume it's a output name in the `collect_granular()` below\n msg = \"Checking if stage '%s' is in '%s'\"\n logger.debug(msg, target, PIPELINE_FILE)\n if not (recursive and loader.tree.isdir(target)):\n stages = _maybe_collect_from_dvc_yaml(\n loader, target, with_deps, accept_group=accept_group,\n )\n if stages:\n return stages, file, name\n elif not with_deps and is_valid_filename(file):\n stages = loader.load_all(file, name, accept_group=accept_group)\n return stages, file, name\n return [], file, name", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/stage.py_StageLoad_StageLoad._get_keys.return._name_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/stage.py_StageLoad_StageLoad._get_keys.return._name_", "embedding": null, "metadata": {"file_path": "dvc/repo/stage.py", "file_name": "stage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 84, "end_line": 143, "span_ids": ["StageLoad.from_target", "StageLoad.__init__", "StageLoad._get_group_keys", "StageLoad.get_target", "StageLoad._get_filepath", "StageLoad", "StageLoad._get_keys"], "tokens": 410}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StageLoad:\n def __init__(self, repo: \"Repo\") -> None:\n self.repo = repo\n\n def from_target(\n self, target: str, accept_group: bool = False, glob: bool = False,\n ) -> StageList:\n \"\"\"\n Returns a list of stage from the provided target.\n (see load method below for further details)\n \"\"\"\n path, name = parse_target(target, isa_glob=glob)\n return self.load_all(\n path=path, name=name, accept_group=accept_group, glob=glob,\n )\n\n def get_target(self, target: str) -> \"Stage\":\n \"\"\"\n Returns a stage from the provided target.\n (see load_one method for further details)\n \"\"\"\n path, name = parse_target(target)\n return self.load_one(path=path, name=name)\n\n @staticmethod\n def _get_filepath(path: str = None, name: str = None) -> str:\n if path:\n return path\n\n path = PIPELINE_FILE\n logger.debug(\"Assuming '%s' to be a stage inside '%s'\", name, path)\n return path\n\n @staticmethod\n def _get_group_keys(stages: \"StageLoader\", group: str) -> Iterable[str]:\n from dvc.parsing import JOIN\n\n for key in stages:\n assert isinstance(key, str)\n if key.startswith(f\"{group}{JOIN}\"):\n yield key\n\n def _get_keys(\n self,\n stages: \"StageLoader\",\n name: str = None,\n accept_group: bool = False,\n glob: bool = False,\n ) -> Iterable[str]:\n\n assert not (accept_group and glob)\n\n if not name:\n return stages.keys()\n\n if accept_group and stages.is_foreach_generated(name):\n return self._get_group_keys(stages, name)\n elif glob:\n return fnmatch.filter(stages.keys(), name)\n return [name]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/stage.py_StageLoad.load_all_StageLoad.load_all.return._stages_key_for_key_in_k": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/stage.py_StageLoad.load_all_StageLoad.load_all.return._stages_key_for_key_in_k", "embedding": null, "metadata": {"file_path": "dvc/repo/stage.py", "file_name": "stage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 145, "end_line": 175, "span_ids": ["StageLoad.load_all"], "tokens": 276}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StageLoad:\n\n def load_all(\n self,\n path: str = None,\n name: str = None,\n accept_group: bool = False,\n glob: bool = False,\n ) -> StageList:\n \"\"\"Load a list of stages from a file.\n\n Args:\n path: if not provided, default `dvc.yaml` is assumed.\n name: required for `dvc.yaml` files, ignored for `.dvc` files.\n accept_group: if true, all of the the stages generated from `name`\n foreach are returned.\n glob: if true, `name` is considered as a glob, which is\n used to filter list of stages from the given `path`.\n \"\"\"\n from dvc.stage.loader import SingleStageLoader, StageLoader\n\n path = self._get_filepath(path, name)\n dvcfile = Dvcfile(self.repo, path)\n # `dvcfile.stages` is not cached\n stages = dvcfile.stages # type: ignore\n\n if isinstance(stages, SingleStageLoader):\n stage = stages[name]\n return [stage]\n\n assert isinstance(stages, StageLoader)\n keys = self._get_keys(stages, name, accept_group, glob)\n return [stages[key] for key in keys]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/stage.py_StageLoad.load_one_StageLoad.graph.return.self_repo_graph": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/stage.py_StageLoad.load_one_StageLoad.graph.return.self_repo_graph", "embedding": null, "metadata": {"file_path": "dvc/repo/stage.py", "file_name": "stage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 177, "end_line": 205, "span_ids": ["StageLoad.load_one", "StageLoad.load_file", "StageLoad.graph", "StageLoad.load_glob", "StageLoad.tree"], "tokens": 231}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StageLoad:\n\n def load_one(self, path: str = None, name: str = None) -> \"Stage\":\n \"\"\"Load a single stage from a file.\n\n Args:\n path: if not provided, default `dvc.yaml` is assumed.\n name: required for `dvc.yaml` files, ignored for `.dvc` files.\n \"\"\"\n path = self._get_filepath(path, name)\n dvcfile = Dvcfile(self.repo, path)\n\n stages = dvcfile.stages # type: ignore\n\n return stages[name]\n\n def load_file(self, path: str = None) -> StageList:\n \"\"\"Load all of the stages from a file.\"\"\"\n return self.load_all(path)\n\n def load_glob(self, path: str, expr: str = None):\n \"\"\"Load stages from `path`, filtered with `expr` provided.\"\"\"\n return self.load_all(path, expr, glob=True)\n\n @property\n def tree(self):\n return self.repo.tree\n\n @property\n def graph(self) -> \"DiGraph\":\n return self.repo.graph", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/stage.py_StageLoad.collect_StageLoad.collect.return._collect_with_deps_stages": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/repo/stage.py_StageLoad.collect_StageLoad.collect.return._collect_with_deps_stages", "embedding": null, "metadata": {"file_path": "dvc/repo/stage.py", "file_name": "stage.py", "file_type": "text/x-python", "category": "implementation", "start_line": 207, "end_line": 257, "span_ids": ["StageLoad.collect"], "tokens": 520}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StageLoad:\n\n def collect(\n self,\n target: str = None,\n with_deps: bool = False,\n recursive: bool = False,\n graph: \"DiGraph\" = None,\n accept_group: bool = False,\n glob: bool = False,\n ) -> StageIter:\n \"\"\"Collect list of stages from the provided target.\n\n Args:\n target: if not provided, all of the stages in the graph are\n returned.\n Target can be:\n - a stage name in the `dvc.yaml` file.\n - a path to `dvc.yaml` or `.dvc` file.\n - in case of a stage to a dvc.yaml file in a different\n directory than current working directory, it can be a path\n to dvc.yaml file, followed by a colon `:`, followed by stage\n name (eg: `../dvc.yaml:build`).\n - in case of `recursive`, it can be a path to a directory.\n - in case of `accept_group`, it can be a group name of\n `foreach` generated stage.\n - in case of `glob`, it can be a wildcard pattern to match\n stages. Example: `build*` for stages in `dvc.yaml` file, or\n `../dvc.yaml:build*` for stages in dvc.yaml in a different\n directory.\n Note that, glob only applies for the stage name, not to the\n file, so `**/dvc.yaml:build*` is not possible.\n with_deps: if true, the stages including their dependencies are\n returned.\n recursive: if true and if `target` is a directory, all of the\n stages inside that directory is returned.\n graph: graph to use. Defaults to `repo.graph`.\n accept_group: if true, all of the `foreach` generated stages of\n the specified target is returned.\n glob: Use `target` as a pattern to match stages in a file.\n \"\"\"\n if not target:\n return list(graph) if graph else self.repo.stages\n\n if recursive and self.repo.tree.isdir(target):\n path = os.path.abspath(target)\n return collect_inside_path(path, graph or self.graph)\n\n stages = self.from_target(target, accept_group=accept_group, glob=glob)\n if not with_deps:\n return stages\n\n return _collect_with_deps(stages, graph or self.graph)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/__init__.py__Manages_Git__logger.logging_getLogger___name_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/__init__.py__Manages_Git__logger.logging_getLogger___name_", "embedding": null, "metadata": {"file_path": "dvc/scm/git/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 26, "span_ids": ["docstring"], "tokens": 177}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"Manages Git.\"\"\"\n\nimport logging\nimport os\nimport shlex\nfrom collections import OrderedDict\nfrom contextlib import contextmanager\nfrom functools import partialmethod\nfrom typing import Iterable, List, Optional, Set\n\nfrom funcy import cached_property, first\nfrom pathspec.patterns import GitWildMatchPattern\n\nfrom dvc.exceptions import GitHookAlreadyExistsError\nfrom dvc.scm.base import Base, FileNotInRepoError, RevError\nfrom dvc.utils import relpath\nfrom dvc.utils.fs import path_isin\nfrom dvc.utils.serialize import modify_yaml\n\nfrom .backend.base import NoGitBackendError\nfrom .backend.dulwich import DulwichBackend\nfrom .backend.gitpython import GitPythonBackend\nfrom .backend.pygit2 import Pygit2Backend\nfrom .stash import Stash\n\nlogger = logging.getLogger(__name__)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/__init__.py_Git.install_Git.install.with_modify_yaml_config_p.if_entry_not_in_config_r.config_repos_append_en": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/__init__.py_Git.install_Git.install.with_modify_yaml_config_p.if_entry_not_in_config_r.config_repos_append_en", "embedding": null, "metadata": {"file_path": "dvc/scm/git/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 331, "end_line": 367, "span_ids": ["Git.install"], "tokens": 251}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Git(Base):\n\n def install(self, use_pre_commit_tool=False):\n self._install_merge_driver()\n\n if not use_pre_commit_tool:\n self._verify_dvc_hooks()\n self._install_hook(\"post-checkout\")\n self._install_hook(\"pre-commit\")\n self._install_hook(\"pre-push\")\n return\n\n config_path = os.path.join(self.root_dir, \".pre-commit-config.yaml\")\n with modify_yaml(config_path) as config:\n entry = {\n \"repo\": \"https://github.com/iterative/dvc\",\n \"rev\": \"master\",\n \"hooks\": [\n {\n \"id\": \"dvc-pre-commit\",\n \"language_version\": \"python3\",\n \"stages\": [\"commit\"],\n },\n {\n \"id\": \"dvc-pre-push\",\n \"language_version\": \"python3\",\n \"stages\": [\"push\"],\n },\n {\n \"id\": \"dvc-post-checkout\",\n \"language_version\": \"python3\",\n \"stages\": [\"post-checkout\"],\n \"always_run\": True,\n },\n ],\n }\n\n if entry not in config[\"repos\"]:\n config[\"repos\"].append(entry)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/__init__.py_Git.detach_head_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/__init__.py_Git.detach_head_", "embedding": null, "metadata": {"file_path": "dvc/scm/git/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 371, "end_line": 421, "span_ids": ["Git.stash_workspace", "Git.detach_head"], "tokens": 345}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Git(Base):\n\n @contextmanager\n def detach_head(self, rev: Optional[str] = None):\n \"\"\"Context manager for performing detached HEAD SCM operations.\n\n Detaches and restores HEAD similar to interactive git rebase.\n Restore is equivalent to 'reset --soft', meaning the caller is\n is responsible for preserving & restoring working tree state\n (i.e. via stash) when applicable.\n\n Yields revision of detached head.\n \"\"\"\n if not rev:\n rev = \"HEAD\"\n orig_head = self.get_ref(\"HEAD\", follow=False)\n logger.debug(\"Detaching HEAD at '%s'\", rev)\n self.checkout(rev, detach=True)\n try:\n yield self.get_ref(\"HEAD\")\n finally:\n prefix = self.LOCAL_BRANCH_PREFIX\n if orig_head.startswith(prefix):\n symbolic = True\n name = orig_head[len(prefix) :]\n else:\n symbolic = False\n name = orig_head\n self.set_ref(\n \"HEAD\",\n orig_head,\n symbolic=symbolic,\n message=f\"dvc: Restore HEAD to '{name}'\",\n )\n logger.debug(\"Restore HEAD to '%s'\", name)\n self.reset()\n\n @contextmanager\n def stash_workspace(self, **kwargs):\n \"\"\"Stash and restore any workspace changes.\n\n Yields revision of the stash commit. Yields None if there were no\n changes to stash.\n \"\"\"\n logger.debug(\"Stashing workspace\")\n rev = self.stash.push(**kwargs)\n try:\n yield rev\n finally:\n if rev:\n logger.debug(\"Restoring stashed workspace\")\n self.stash.pop()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/base.py_BaseGitBackend.get_ref_BaseGitBackend.get_refs_containing._Iterate_over_all_git_r": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/base.py_BaseGitBackend.get_ref_BaseGitBackend.get_refs_containing._Iterate_over_all_git_r", "embedding": null, "metadata": {"file_path": "dvc/scm/git/backend/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 153, "end_line": 188, "span_ids": ["BaseGitBackend.remove_ref", "BaseGitBackend.iter_refs", "BaseGitBackend.get_ref", "BaseGitBackend.get_refs_containing", "BaseGitBackend.iter_remote_refs"], "tokens": 281}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseGitBackend(ABC):\n\n @abstractmethod\n def get_ref(\n self, name: str, follow: Optional[bool] = True\n ) -> Optional[str]:\n \"\"\"Return the value of specified ref.\n\n If follow is false, symbolic refs will not be dereferenced.\n Returns None if the ref does not exist.\n \"\"\"\n\n @abstractmethod\n def remove_ref(self, name: str, old_ref: Optional[str] = None):\n \"\"\"Remove the specified git ref.\n\n If old_ref is specified, ref will only be removed if it currently\n equals old_ref.\n \"\"\"\n\n @abstractmethod\n def iter_refs(self, base: Optional[str] = None):\n \"\"\"Iterate over all refs in this git repo.\n\n If base is specified, only refs which begin with base will be yielded.\n \"\"\"\n\n @abstractmethod\n def iter_remote_refs(self, url: str, base: Optional[str] = None):\n \"\"\"Iterate over all refs in the specified remote Git repo.\n\n If base is specified, only refs which begin with base will be yielded.\n URL can be a named Git remote or URL.\n \"\"\"\n\n @abstractmethod\n def get_refs_containing(self, rev: str, pattern: Optional[str] = None):\n \"\"\"Iterate over all git refs containing the specfied revision.\"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/base.py_BaseGitBackend.push_refspec_BaseGitBackend.push_refspec._Push_refspec_to_a_remo": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/base.py_BaseGitBackend.push_refspec_BaseGitBackend.push_refspec._Push_refspec_to_a_remo", "embedding": null, "metadata": {"file_path": "dvc/scm/git/backend/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 190, "end_line": 214, "span_ids": ["BaseGitBackend.push_refspec"], "tokens": 223}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseGitBackend(ABC):\n\n @abstractmethod\n def push_refspec(\n self,\n url: str,\n src: Optional[str],\n dest: str,\n force: bool = False,\n on_diverged: Optional[Callable[[str, str], bool]] = None,\n ):\n \"\"\"Push refspec to a remote Git repo.\n\n Args:\n url: Git remote name or absolute Git URL.\n src: Local refspec. If src ends with \"/\" it will be treated as a\n prefix, and all refs inside src will be pushed using dest\n as destination refspec prefix. If src is None, dest will be\n deleted from the remote.\n dest: Remote refspec.\n force: If True, remote refs will be overwritten.\n on_diverged: Callback function which will be called if local ref\n and remote have diverged and force is False. If the callback\n returns True the remote ref will be overwritten.\n Callback will be of the form:\n on_diverged(local_refname, remote_sha)\n \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/base.py_BaseGitBackend.fetch_refspecs_BaseGitBackend.fetch_refspecs._Fetch_refspecs_from_a_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/base.py_BaseGitBackend.fetch_refspecs_BaseGitBackend.fetch_refspecs._Fetch_refspecs_from_a_", "embedding": null, "metadata": {"file_path": "dvc/scm/git/backend/base.py", "file_name": "base.py", "file_type": "text/x-python", "category": "implementation", "start_line": 216, "end_line": 237, "span_ids": ["BaseGitBackend.fetch_refspecs"], "tokens": 193}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class BaseGitBackend(ABC):\n\n @abstractmethod\n def fetch_refspecs(\n self,\n url: str,\n refspecs: Iterable[str],\n force: Optional[bool] = False,\n on_diverged: Optional[Callable[[str, str], bool]] = None,\n ):\n \"\"\"Fetch refspecs from a remote Git repo.\n\n Args:\n url: Remote repo Git URL (Note this must be a Git URL and not\n a remote name).\n refspecs: Iterable containing refspecs to fetch.\n Note that this will not match subkeys.\n force: If True, local refs will be overwritten.\n on_diverged: Callback function which will be called if local ref\n and remote have diverged and force is False. If the callback\n returns True the local ref will be overwritten.\n Callback will be of the form:\n on_diverged(local_refname, remote_sha)\n \"\"\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/dulwich.py_DulwichBackend.set_ref_DulwichBackend.set_ref.if_not_self_repo_refs_set.raise_SCMError_f_Failed_t": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/dulwich.py_DulwichBackend.set_ref_DulwichBackend.set_ref.if_not_self_repo_refs_set.raise_SCMError_f_Failed_t", "embedding": null, "metadata": {"file_path": "dvc/scm/git/backend/dulwich.py", "file_name": "dulwich.py", "file_type": "text/x-python", "category": "implementation", "start_line": 227, "end_line": 246, "span_ids": ["DulwichBackend.set_ref"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DulwichBackend(BaseGitBackend):\n\n def set_ref(\n self,\n name: str,\n new_ref: str,\n old_ref: Optional[str] = None,\n message: Optional[str] = None,\n symbolic: Optional[bool] = False,\n ):\n name_b = os.fsencode(name)\n new_ref_b = os.fsencode(new_ref)\n old_ref_b = os.fsencode(old_ref) if old_ref else None\n message_b = message.encode(\"utf-8\") if message else None\n if symbolic:\n return self.repo.refs.set_symbolic_ref(\n name_b, new_ref_b, message=message_b\n )\n if not self.repo.refs.set_if_equals(\n name_b, old_ref_b, new_ref_b, message=message_b\n ):\n raise SCMError(f\"Failed to set '{name}'\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/dulwich.py_DulwichBackend.fetch_refspecs_DulwichBackend.fetch_refspecs.for_lh_rh___in_fetch_.self_repo_refs_rh_fetc": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/backend/dulwich.py_DulwichBackend.fetch_refspecs_DulwichBackend.fetch_refspecs.for_lh_rh___in_fetch_.self_repo_refs_rh_fetc", "embedding": null, "metadata": {"file_path": "dvc/scm/git/backend/dulwich.py", "file_name": "dulwich.py", "file_type": "text/x-python", "category": "implementation", "start_line": 392, "end_line": 463, "span_ids": ["DulwichBackend.fetch_refspecs"], "tokens": 471}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class DulwichBackend(BaseGitBackend):\n\n def fetch_refspecs(\n self,\n url: str,\n refspecs: Iterable[str],\n force: Optional[bool] = False,\n on_diverged: Optional[Callable[[str, str], bool]] = None,\n ):\n from dulwich.client import get_transport_and_path\n from dulwich.objectspec import parse_reftuples\n from dulwich.porcelain import (\n DivergedBranches,\n check_diverged,\n get_remote_repo,\n )\n\n fetch_refs = []\n\n def determine_wants(remote_refs):\n fetch_refs.extend(\n parse_reftuples(\n remote_refs,\n self.repo.refs,\n [os.fsencode(refspec) for refspec in refspecs],\n force=force,\n )\n )\n return [\n remote_refs[lh]\n for (lh, _, _) in fetch_refs\n if remote_refs[lh] not in self.repo.object_store\n ]\n\n try:\n _remote, location = get_remote_repo(self.repo, url)\n client, path = get_transport_and_path(location)\n except Exception as exc:\n raise SCMError(\n f\"'{url}' is not a valid Git remote or URL\"\n ) from exc\n\n with Tqdm(\n desc=\"Fetching git refs\", bar_format=self.BAR_FMT_NOTOTAL\n ) as pbar:\n\n def progress(msg_b):\n msg = msg_b.decode(\"ascii\").strip()\n pbar.update_msg(msg)\n pbar.refresh()\n logger.trace(msg)\n\n fetch_result = client.fetch(\n path,\n self.repo,\n progress=progress,\n determine_wants=determine_wants,\n )\n for (lh, rh, _) in fetch_refs:\n try:\n if rh in self.repo.refs:\n check_diverged(\n self.repo, self.repo.refs[rh], fetch_result.refs[lh]\n )\n except DivergedBranches:\n if not force:\n overwrite = False\n if on_diverged:\n overwrite = on_diverged(\n os.fsdecode(rh), os.fsdecode(fetch_result.refs[lh])\n )\n if not overwrite:\n continue\n self.repo.refs[rh] = fetch_result.refs[lh]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/stash.py__git_stash_convenience__Stash.list.return.list_iter_self_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/stash.py__git_stash_convenience__Stash.list.return.list_iter_self_", "embedding": null, "metadata": {"file_path": "dvc/scm/git/stash.py", "file_name": "stash.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 32, "span_ids": ["Stash.__len__", "Stash.__iter__", "Stash", "Stash.list", "Stash.__getitem__", "docstring", "Stash.__init__"], "tokens": 163}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "\"\"\"git stash convenience wrapper.\"\"\"\n\nimport logging\nimport os\nfrom typing import Optional\n\nfrom dvc.scm.base import SCMError\nfrom dvc.utils.fs import remove\n\nlogger = logging.getLogger(__name__)\n\n\nclass Stash:\n \"\"\"Wrapper for representing any arbitrary Git stash ref.\"\"\"\n\n DEFAULT_STASH = \"refs/stash\"\n\n def __init__(self, scm, ref: Optional[str] = None):\n self.ref = ref if ref else self.DEFAULT_STASH\n self.scm = scm\n\n def __iter__(self):\n yield from self.scm._stash_iter(self.ref)\n\n def __len__(self):\n return len(self.list())\n\n def __getitem__(self, index):\n return self.list()[index]\n\n def list(self):\n return list(iter(self))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/stash.py_Stash.drop_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/scm/git/stash.py_Stash.drop_", "embedding": null, "metadata": {"file_path": "dvc/scm/git/stash.py", "file_name": "stash.py", "file_type": "text/x-python", "category": "implementation", "start_line": 61, "end_line": 80, "span_ids": ["Stash.drop", "Stash.clear"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Stash:\n\n def drop(self, index: int = 0):\n ref = \"{0}@{{{1}}}\".format(self.ref, index)\n if index < 0 or index >= len(self):\n raise SCMError(f\"Invalid stash ref '{ref}'\")\n logger.debug(\"Dropping '%s'\", ref)\n self.scm.reflog_delete(ref, updateref=True, rewrite=True)\n\n # if we removed the last reflog entry, delete the ref and reflog\n if len(self) == 0:\n self.scm.remove_ref(self.ref)\n parts = self.ref.split(\"/\")\n reflog = os.path.join(self.scm.root_dir, \".git\", \"logs\", *parts)\n if os.path.exists(reflog):\n remove(reflog)\n\n def clear(self):\n logger.debug(\"Clear stash '%s'\", self.ref)\n for _ in range(len(self)):\n self.drop()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_logging_INVALID_STAGENAME_CHARS.set_string_punctuation_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_logging_INVALID_STAGENAME_CHARS.set_string_punctuation_", "embedding": null, "metadata": {"file_path": "dvc/stage/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 41, "span_ids": ["imports"], "tokens": 225}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import logging\nimport os\nimport string\nfrom collections import defaultdict\nfrom dataclasses import dataclass\nfrom typing import Optional\n\nfrom funcy import cached_property, project\n\nimport dvc.dependency as dependency\nimport dvc.prompt as prompt\nfrom dvc.exceptions import (\n CacheLinkError,\n CheckoutError,\n DvcException,\n MergeError,\n)\nfrom dvc.output.base import OutputDoesNotExistError\nfrom dvc.utils import relpath\n\nfrom . import params\nfrom .decorators import rwlocked\nfrom .exceptions import StageUpdateError\nfrom .imports import sync_import, update_import\nfrom .run import run_stage\nfrom .utils import (\n check_circular_dependency,\n check_duplicated_arguments,\n check_missing_outputs,\n check_no_externals,\n check_stage_path,\n compute_md5,\n fill_stage_dependencies,\n fill_stage_outputs,\n get_dump,\n stage_dump_eq,\n)\n\nlogger = logging.getLogger(__name__)\n# Disallow all punctuation characters except hyphen and underscore\nINVALID_STAGENAME_CHARS = set(string.punctuation) - {\"_\", \"-\"}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_loads_from_RawData.generated_from.None": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_loads_from_RawData.generated_from.None", "embedding": null, "metadata": {"file_path": "dvc/stage/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 44, "end_line": 69, "span_ids": ["RawData", "loads_from"], "tokens": 130}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def loads_from(cls, repo, path, wdir, data):\n kw = {\n \"repo\": repo,\n \"path\": path,\n \"wdir\": wdir,\n **project(\n data,\n [\n Stage.PARAM_CMD,\n Stage.PARAM_LOCKED,\n Stage.PARAM_FROZEN,\n Stage.PARAM_ALWAYS_CHANGED,\n Stage.PARAM_MD5,\n Stage.PARAM_DESC,\n Stage.PARAM_META,\n \"name\",\n ],\n ),\n }\n return cls(**kw)\n\n\n@dataclass\nclass RawData:\n parametrized: bool = False\n generated_from: Optional[str] = None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.update_Stage.reload.return.self_dvcfile_stage": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.update_Stage.reload.return.self_dvcfile_stage", "embedding": null, "metadata": {"file_path": "dvc/stage/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 366, "end_line": 388, "span_ids": ["Stage.can_be_skipped", "Stage.reload", "Stage.update"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Stage(params.StageParams):\n # pylint:disable=no-value-for-parameter\n\n def update(self, rev=None):\n if not (self.is_repo_import or self.is_import):\n raise StageUpdateError(self.relpath)\n update_import(self, rev=rev)\n\n @property\n def can_be_skipped(self):\n if not self.dvcfile.exists():\n return False\n\n has_persist_outs = any(out.persist for out in self.outs)\n if has_persist_outs:\n logger.warning(\"Build cache is ignored when persisting outputs.\")\n return False\n\n if self.is_cached and not self.is_callback and not self.always_changed:\n logger.info(\"Stage is cached, skipping\")\n return True\n\n return False\n\n def reload(self):\n return self.dvcfile.stage", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.is_cached_Stage.is_cached.return.True": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/__init__.py_Stage.is_cached_Stage.is_cached.return.True", "embedding": null, "metadata": {"file_path": "dvc/stage/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 390, "end_line": 414, "span_ids": ["Stage.is_cached"], "tokens": 200}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class Stage(params.StageParams):\n # pylint:disable=no-value-for-parameter\n\n @property\n def is_cached(self):\n \"\"\"Checks if this stage has been already ran and stored\"\"\"\n old = self.reload()\n if old.changed_outs():\n return False\n\n # NOTE: need to save checksums for deps in order to compare them\n # with what is written in the old stage.\n self.save_deps()\n if not stage_dump_eq(Stage, old.dumpd(), self.dumpd()):\n return False\n\n # NOTE: committing to prevent potential data duplication. For example\n #\n # $ dvc config cache.type hardlink\n # $ echo foo > foo\n # $ dvc add foo\n # $ rm -f foo\n # $ echo foo > foo\n # $ dvc add foo # should replace foo with a link to cache\n #\n old.commit()\n\n return True", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/loader.py_StageLoader.__getitem___StageLoader.is_foreach_generated.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/loader.py_StageLoader.__getitem___StageLoader.is_foreach_generated.return._", "embedding": null, "metadata": {"file_path": "dvc/stage/loader.py", "file_name": "loader.py", "file_type": "text/x-python", "category": "implementation", "start_line": 106, "end_line": 151, "span_ids": ["StageLoader.__len__", "StageLoader.__contains__", "StageLoader.__getitem__", "StageLoader.is_foreach_generated", "StageLoader.__iter__"], "tokens": 336}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class StageLoader(Mapping):\n\n def __getitem__(self, name):\n if not name:\n raise StageNameUnspecified(self.dvcfile)\n\n try:\n resolved_data = self.resolver.resolve_one(name)\n except EntryNotFound:\n raise StageNotFound(self.dvcfile, name)\n\n if self.lockfile_data and name not in self.lockfile_data:\n self.lockfile_needs_update()\n logger.trace( # type: ignore[attr-defined]\n \"No lock entry found for '%s:%s'\", self.dvcfile.relpath, name,\n )\n\n resolved_stage = resolved_data[name]\n stage = self.load_stage(\n self.dvcfile,\n name,\n resolved_stage,\n self.lockfile_data.get(name, {}),\n )\n\n stage.tracked_vars = self.resolver.tracked_vars.get(name, {})\n group, *keys = name.rsplit(JOIN, maxsplit=1)\n if group and keys and name not in self.stages_data:\n stage.raw_data.generated_from = group\n\n stage.raw_data.parametrized = (\n self.stages_data.get(name, {}) != resolved_stage\n )\n return stage\n\n def __iter__(self):\n return iter(self.resolver.get_keys())\n\n def __len__(self):\n return len(self.resolver.get_keys())\n\n def __contains__(self, name):\n return self.resolver.has_key(name) # noqa: W601\n\n def is_foreach_generated(self, name: str):\n return (\n name in self.stages_data and FOREACH_KWD in self.stages_data[name]\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/serialize.py_to_single_stage_lockfile_to_single_stage_lockfile.return.res": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/serialize.py_to_single_stage_lockfile_to_single_stage_lockfile.return.res", "embedding": null, "metadata": {"file_path": "dvc/stage/serialize.py", "file_name": "serialize.py", "file_type": "text/x-python", "category": "implementation", "start_line": 144, "end_line": 172, "span_ids": ["to_single_stage_lockfile"], "tokens": 182}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def to_single_stage_lockfile(stage: \"Stage\") -> dict:\n assert stage.cmd\n\n def _dumpd(item):\n ret = [\n (item.PARAM_PATH, item.def_path),\n *item.hash_info.to_dict().items(),\n ]\n\n if item.isexec:\n ret.append((item.PARAM_ISEXEC, True))\n\n return OrderedDict(ret)\n\n res = OrderedDict([(\"cmd\", stage.cmd)])\n params, deps = split_params_deps(stage)\n deps, outs = [\n [_dumpd(item) for item in sort_by_path(items)]\n for items in [deps, stage.outs]\n ]\n params = _serialize_params_values(params)\n if deps:\n res[PARAM_DEPS] = deps\n if params:\n res[PARAM_PARAMS] = params\n if outs:\n res[PARAM_OUTS] = outs\n\n return res", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/serialize.py_to_lockfile_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/stage/serialize.py_to_lockfile_", "embedding": null, "metadata": {"file_path": "dvc/stage/serialize.py", "file_name": "serialize.py", "file_type": "text/x-python", "category": "implementation", "start_line": 172, "end_line": 192, "span_ids": ["to_single_stage_file", "to_lockfile"], "tokens": 180}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def to_lockfile(stage: \"PipelineStage\") -> dict:\n assert stage.name\n return {stage.name: to_single_stage_lockfile(stage)}\n\n\ndef to_single_stage_file(stage: \"Stage\"):\n state = stage.dumpd()\n\n # When we load a stage we parse yaml with a fast parser, which strips\n # off all the comments and formatting. To retain those on update we do\n # a trick here:\n # - reparse the same yaml text with a slow but smart ruamel yaml parser\n # - apply changes to a returned structure\n # - serialize it\n text = stage._stage_text # noqa, pylint: disable=protected-access\n if text is not None:\n saved_state = parse_yaml_for_update(text, stage.path)\n apply_diff(state, saved_state)\n state = saved_state\n return state", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py_resolve_paths_error_link.return.format_link_f_https_err": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py_resolve_paths_error_link.return.format_link_f_https_err", "embedding": null, "metadata": {"file_path": "dvc/utils/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 362, "end_line": 410, "span_ids": ["error_link", "format_link", "resolve_paths"], "tokens": 353}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def resolve_paths(repo, out):\n from urllib.parse import urlparse\n\n from ..dvcfile import DVC_FILE_SUFFIX\n from ..exceptions import DvcException\n from ..path_info import PathInfo\n from ..system import System\n from .fs import contains_symlink_up_to\n\n abspath = PathInfo(os.path.abspath(out))\n dirname = os.path.dirname(abspath)\n base = os.path.basename(os.path.normpath(out))\n\n scheme = urlparse(out).scheme\n if os.name == \"nt\" and scheme == abspath.drive[0].lower():\n # urlparse interprets windows drive letters as URL scheme\n scheme = \"\"\n\n if scheme or not abspath.isin_or_eq(repo.root_dir):\n wdir = os.getcwd()\n elif contains_symlink_up_to(dirname, repo.root_dir) or (\n os.path.isdir(abspath) and System.is_symlink(abspath)\n ):\n msg = (\n \"Cannot add files inside symlinked directories to DVC. \"\n \"See {} for more information.\"\n ).format(\n format_link(\n \"https://dvc.org/doc/user-guide/troubleshooting#add-symlink\"\n )\n )\n raise DvcException(msg)\n else:\n wdir = dirname\n out = base\n\n path = os.path.join(wdir, base + DVC_FILE_SUFFIX)\n\n return (path, wdir, out)\n\n\ndef format_link(link):\n return \"<{blue}{link}{nc}>\".format(\n blue=colorama.Fore.CYAN, link=link, nc=colorama.Fore.RESET\n )\n\n\ndef error_link(name):\n return format_link(f\"https://error.dvc.org/{name}\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py_parse_target_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/utils/__init__.py_parse_target_", "embedding": null, "metadata": {"file_path": "dvc/utils/__init__.py", "file_name": "__init__.py", "file_type": "text/x-python", "category": "implementation", "start_line": 413, "end_line": 479, "span_ids": ["parse_target", "glob_targets", "is_exec"], "tokens": 427}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def parse_target(\n target: str, default: str = None, isa_glob: bool = False\n) -> Tuple[Optional[str], Optional[str]]:\n from dvc.dvcfile import PIPELINE_FILE, PIPELINE_LOCK, is_valid_filename\n from dvc.exceptions import DvcException\n from dvc.parsing import JOIN\n\n if not target:\n return None, None\n\n default = default or PIPELINE_FILE\n if isa_glob:\n path, _, glob = target.rpartition(\":\")\n return path or default, glob or None\n\n # look for first \"@\", so as not to assume too much about stage name\n # eg: it might contain \":\" in a generated stages from dict which might\n # affect further parsing with the regex.\n group, _, key = target.partition(JOIN)\n match = TARGET_REGEX.match(group)\n\n if not match:\n return target, None\n\n path, name = (\n match.group(\"path\"),\n match.group(\"name\"),\n )\n\n if name and key:\n name += f\"{JOIN}{key}\"\n\n if path:\n if os.path.basename(path) == PIPELINE_LOCK:\n raise DvcException(\n \"Did you mean: `{}`?\".format(\n target.replace(\".lock\", \".yaml\", 1)\n )\n )\n if not name:\n ret = (target, None)\n return ret if is_valid_filename(target) else ret[::-1]\n\n if not path:\n logger.trace( # type: ignore[attr-defined]\n \"Assuming file to be '%s'\", default\n )\n\n return path or default, name\n\n\ndef is_exec(mode):\n return bool(mode & (stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH))\n\n\ndef glob_targets(targets, glob=True, recursive=True):\n if not glob:\n return targets\n\n from glob import iglob\n\n return [\n exp_target\n for target in targets\n for exp_target in iglob(target, recursive=recursive)\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_with_cache_link_error_test_add_with_cache_link_error.assert_tmp_dir_dvc_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_with_cache_link_error_test_add_with_cache_link_error.assert_tmp_dir_dvc_", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 911, "end_line": 925, "span_ids": ["test_add_with_cache_link_error"], "tokens": 161}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_add_with_cache_link_error(tmp_dir, dvc, mocker, caplog):\n tmp_dir.gen(\"foo\", \"foo\")\n\n mocker.patch.object(\n dvc.cache.local, \"_do_link\", side_effect=DvcException(\"link failed\")\n )\n with caplog.at_level(logging.WARNING, logger=\"dvc\"):\n dvc.add(\"foo\")\n assert \"reconfigure cache types\" in caplog.text\n\n assert not (tmp_dir / \"foo\").exists()\n assert (tmp_dir / \"foo.dvc\").exists()\n assert (tmp_dir / \".dvc\" / \"cache\").read_text() == {\n \"ac\": {\"bd18db4cc2f85cedef654fccc4a4d8\": \"foo\"}\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_preserve_meta_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_add.py_test_add_preserve_meta_", "embedding": null, "metadata": {"file_path": "tests/func/test_add.py", "file_name": "test_add.py", "file_type": "text/x-python", "category": "test", "start_line": 949, "end_line": 975, "span_ids": ["test_add_preserve_meta"], "tokens": 179}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_add_preserve_meta(tmp_dir, dvc):\n text = textwrap.dedent(\n \"\"\"\\\n # top comment\n desc: top desc\n outs:\n - path: foo # out comment\n desc: out desc\n meta: some metadata\n \"\"\"\n )\n tmp_dir.gen(\"foo.dvc\", text)\n\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n assert (tmp_dir / \"foo.dvc\").read_text() == textwrap.dedent(\n \"\"\"\\\n # top comment\n desc: top desc\n outs:\n - path: foo # out comment\n desc: out desc\n md5: acbd18db4cc2f85cedef654fccc4a4d8\n size: 3\n meta: some metadata\n \"\"\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkout_for_external_outputs_test_checkout_for_external_outputs.assert_file_path_read_tex": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_checkout.py_test_checkout_for_external_outputs_test_checkout_for_external_outputs.assert_file_path_read_tex", "embedding": null, "metadata": {"file_path": "tests/func/test_checkout.py", "file_name": "test_checkout.py", "file_type": "text/x-python", "category": "test", "start_line": 756, "end_line": 777, "span_ids": ["test_checkout_for_external_outputs"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"workspace\", [pytest.lazy_fixture(\"s3\")], indirect=True\n)\ndef test_checkout_for_external_outputs(tmp_dir, dvc, workspace):\n workspace.gen(\"foo\", \"foo\")\n\n file_path = workspace / \"foo\"\n dvc.add(\"remote://workspace/foo\")\n\n remote = dvc.cloud.get_remote(\"workspace\")\n remote.tree.remove(file_path)\n assert not file_path.exists()\n\n stats = dvc.checkout(force=True)\n assert stats == {**empty_checkout, \"added\": [str(file_path)]}\n assert file_path.exists()\n\n workspace.gen(\"foo\", \"foo\\nfoo\")\n\n stats = dvc.checkout(force=True)\n assert stats == {**empty_checkout, \"modified\": [str(file_path)]}\n assert file_path.read_text() == \"foo\"", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_test_import_url_dir_test_import_url_dir.assert_dvc_status_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_test_import_url_dir_test_import_url_dir.assert_dvc_status_", "embedding": null, "metadata": {"file_path": "tests/func/test_import_url.py", "file_name": "test_import_url.py", "file_type": "text/x-python", "category": "test", "start_line": 146, "end_line": 210, "span_ids": ["test_import_url_dir"], "tokens": 690}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"workspace, stage_md5, dir_md5\",\n [\n (\n pytest.lazy_fixture(\"local_cloud\"),\n \"dc24e1271084ee317ac3c2656fb8812b\",\n \"b6dcab6ccd17ca0a8bf4a215a37d14cc.dir\",\n ),\n (\n pytest.lazy_fixture(\"s3\"),\n \"2aa17f8daa26996b3f7a4cf8888ac9ac\",\n \"ec602a6ba97b2dd07bd6d2cd89674a60.dir\",\n ),\n (\n pytest.lazy_fixture(\"gs\"),\n \"dc24e1271084ee317ac3c2656fb8812b\",\n \"b6dcab6ccd17ca0a8bf4a215a37d14cc.dir\",\n ),\n (\n pytest.lazy_fixture(\"hdfs\"),\n \"ec0943f83357f702033c98e70b853c8c\",\n \"e6dcd267966dc628d732874f94ef4280.dir\",\n ),\n pytest.param(\n pytest.lazy_fixture(\"ssh\"),\n \"dc24e1271084ee317ac3c2656fb8812b\",\n \"b6dcab6ccd17ca0a8bf4a215a37d14cc.dir\",\n marks=pytest.mark.skipif(\n os.name == \"nt\", reason=\"disabled on windows\"\n ),\n ),\n ],\n indirect=[\"workspace\"],\n)\ndef test_import_url_dir(tmp_dir, dvc, workspace, stage_md5, dir_md5):\n workspace.gen({\"dir\": {\"file\": \"file\", \"subdir\": {\"subfile\": \"subfile\"}}})\n\n # remove external cache to make sure that we don't need it to import dirs\n with dvc.config.edit() as conf:\n del conf[\"cache\"]\n dvc.cache = Cache(dvc)\n\n assert not (tmp_dir / \"dir\").exists() # sanity check\n dvc.imp_url(\"remote://workspace/dir\")\n assert set(os.listdir(tmp_dir / \"dir\")) == {\"file\", \"subdir\"}\n assert (tmp_dir / \"dir\" / \"file\").read_text() == \"file\"\n assert list(os.listdir(tmp_dir / \"dir\" / \"subdir\")) == [\"subfile\"]\n assert (tmp_dir / \"dir\" / \"subdir\" / \"subfile\").read_text() == \"subfile\"\n\n assert (tmp_dir / \"dir.dvc\").read_text() == (\n f\"md5: {stage_md5}\\n\"\n \"frozen: true\\n\"\n \"deps:\\n\"\n f\"- md5: {dir_md5}\\n\"\n \" size: 11\\n\"\n \" nfiles: 2\\n\"\n \" path: remote://workspace/dir\\n\"\n \"outs:\\n\"\n \"- md5: b6dcab6ccd17ca0a8bf4a215a37d14cc.dir\\n\"\n \" size: 11\\n\"\n \" nfiles: 2\\n\"\n \" path: dir\\n\"\n )\n\n assert dvc.status() == {}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_test_import_url_preserve_meta_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_import_url.py_test_import_url_preserve_meta_", "embedding": null, "metadata": {"file_path": "tests/func/test_import_url.py", "file_name": "test_import_url.py", "file_type": "text/x-python", "category": "test", "start_line": 213, "end_line": 248, "span_ids": ["test_import_url_preserve_meta"], "tokens": 272}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_import_url_preserve_meta(tmp_dir, dvc):\n text = textwrap.dedent(\n \"\"\"\\\n # top comment\n desc: top desc\n deps:\n - path: foo # dep comment\n outs:\n - path: bar # out comment\n desc: out desc\n meta: some metadata\n \"\"\"\n )\n tmp_dir.gen(\"bar.dvc\", text)\n\n tmp_dir.gen(\"foo\", \"foo\")\n dvc.imp_url(\"foo\", out=\"bar\")\n assert (tmp_dir / \"bar.dvc\").read_text() == textwrap.dedent(\n \"\"\"\\\n # top comment\n desc: top desc\n deps:\n - path: foo # dep comment\n md5: acbd18db4cc2f85cedef654fccc4a4d8\n size: 3\n outs:\n - path: bar # out comment\n desc: out desc\n md5: acbd18db4cc2f85cedef654fccc4a4d8\n size: 3\n meta: some metadata\n md5: be7ade0aa89cc8d56e320867a9de9740\n frozen: true\n \"\"\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_init.py_test_subdir_init_no_option_test_subdir_init_no_option.assert_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_init.py_test_subdir_init_no_option_test_subdir_init_no_option.assert_", "embedding": null, "metadata": {"file_path": "tests/func/test_init.py", "file_name": "test_init.py", "file_type": "text/x-python", "category": "test", "start_line": 89, "end_line": 103, "span_ids": ["test_subdir_init_no_option"], "tokens": 152}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_subdir_init_no_option(tmp_dir, scm, monkeypatch, caplog):\n tmp_dir.gen({\"subdir\": {}})\n\n caplog.clear()\n with monkeypatch.context() as m:\n m.chdir(\"subdir\")\n with caplog.at_level(logging.ERROR, logger=\"dvc\"):\n assert main([\"init\"]) == 1\n\n assert (\n \"{} is not tracked by any supported SCM tool (e.g. Git). \"\n \"Use `--no-scm` if you don't want to use any SCM or \"\n \"`--subdir` if initializing inside a subdirectory of a parent SCM \"\n \"repository.\".format(os.fspath(tmp_dir / \"subdir\"))\n ) in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_init.py_test_gen_dvcignore_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_init.py_test_gen_dvcignore_", "embedding": null, "metadata": {"file_path": "tests/func/test_init.py", "file_name": "test_init.py", "file_type": "text/x-python", "category": "test", "start_line": 106, "end_line": 128, "span_ids": ["test_gen_dvcignore", "test_init_when_ignored_by_git"], "tokens": 220}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_gen_dvcignore(tmp_dir):\n DvcRepo.init(no_scm=True)\n text = (\n \"# Add patterns of files dvc should ignore, which could improve\\n\"\n \"# the performance. Learn more at\\n\"\n \"# https://dvc.org/doc/user-guide/dvcignore\\n\"\n )\n assert text == (tmp_dir / \".dvcignore\").read_text()\n\n\ndef test_init_when_ignored_by_git(tmp_dir, scm, caplog):\n # https://github.com/iterative/dvc/issues/3738\n tmp_dir.gen({\".gitignore\": \".*\"})\n with caplog.at_level(logging.ERROR, logger=\"dvc\"):\n assert main([\"init\"]) == 1\n assert (\n \"{dvc_dir} is ignored by your SCM tool. \\n\"\n \"Make sure that it's tracked, \"\n \"for example, by adding '!.dvc' to .gitignore.\".format(\n dvc_dir=tmp_dir / DvcRepo.DVC_DIR\n )\n ) in caplog.text", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repo.py_from_dvc_cache_import_Cac_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_repo.py_from_dvc_cache_import_Cac_", "embedding": null, "metadata": {"file_path": "tests/func/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 1, "end_line": 53, "span_ids": ["imports", "test_destroy"], "tokens": 355}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "from dvc.cache import Cache\nfrom dvc.dvcfile import PIPELINE_FILE, PIPELINE_LOCK\nfrom dvc.system import System\n\n\ndef test_destroy(tmp_dir, dvc, run_copy):\n dvc.config[\"cache\"][\"type\"] = [\"symlink\"]\n dvc.cache = Cache(dvc)\n\n tmp_dir.dvc_gen(\"file\", \"text\")\n tmp_dir.dvc_gen({\"dir\": {\"file\": \"lorem\", \"subdir/file\": \"ipsum\"}})\n\n run_copy(\"file\", \"file2\", single_stage=True)\n run_copy(\"file2\", \"file3\", name=\"copy-file2-file3\")\n run_copy(\"file3\", \"file4\", name=\"copy-file3-file4\")\n\n dvc.destroy()\n\n # Remove all the files related to DVC\n for path in [\n \".dvc\",\n \"file.dvc\",\n \"file2.dvc\",\n \"dir.dvc\",\n PIPELINE_FILE,\n PIPELINE_LOCK,\n ]:\n assert not (tmp_dir / path).exists()\n\n # Leave the rest of the files\n for path in [\n \"file\",\n \"file2\",\n \"file3\",\n \"file4\",\n \"dir/file\",\n \"dir/subdir/file\",\n ]:\n assert (tmp_dir / path).is_file()\n\n # Make sure that data was unprotected after `destroy`\n for path in [\n \"file\",\n \"file2\",\n \"file3\",\n \"file4\",\n \"dir\",\n \"dir/file\",\n \"dir/subdir\",\n \"dir/subdir/file\",\n ]:\n assert not System.is_symlink(tmp_dir / path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_test_run_force_preserves_comments_and_meta_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_run_single_stage.py_test_run_force_preserves_comments_and_meta_", "embedding": null, "metadata": {"file_path": "tests/func/test_run_single_stage.py", "file_name": "test_run_single_stage.py", "file_type": "text/x-python", "category": "test", "start_line": 1009, "end_line": 1076, "span_ids": ["test_run_force_preserves_comments_and_meta"], "tokens": 613}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_run_force_preserves_comments_and_meta(tmp_dir, dvc, run_copy):\n tmp_dir.gen({\"foo\": \"foo\", \"foo1\": \"foo1\"})\n text = textwrap.dedent(\n \"\"\"\\\n desc: top desc\n cmd: python copy.py foo bar\n deps:\n - path: copy.py\n - path: foo\n outs:\n # comment preserved\n - path: bar\n desc: out desc\n meta:\n name: copy-foo-bar\n \"\"\"\n )\n (tmp_dir / \"bar.dvc\").write_text(text)\n dvc.reproduce(\"bar.dvc\")\n\n # CRLF on windows makes the generated file bigger in size\n code_size = 143 if os.name == \"nt\" else 142\n assert (tmp_dir / \"bar.dvc\").read_text() == textwrap.dedent(\n f\"\"\"\\\n desc: top desc\n cmd: python copy.py foo bar\n deps:\n - path: copy.py\n md5: 90c27dd80b698fe766f0c3ee0b6b9729\n size: {code_size}\n - path: foo\n md5: acbd18db4cc2f85cedef654fccc4a4d8\n size: 3\n outs:\n # comment preserved\n - path: bar\n desc: out desc\n md5: acbd18db4cc2f85cedef654fccc4a4d8\n size: 3\n meta:\n name: copy-foo-bar\n md5: be659ce4a33cebb85d4e8e1335d394ad\n \"\"\"\n )\n\n run_copy(\"foo1\", \"bar1\", single_stage=True, force=True, fname=\"bar.dvc\")\n assert (tmp_dir / \"bar.dvc\").read_text() == textwrap.dedent(\n f\"\"\"\\\n desc: top desc\n cmd: python copy.py foo1 bar1\n deps:\n - path: foo1\n md5: 299a0be4a5a79e6a59fdd251b19d78bb\n size: 4\n - path: copy.py\n md5: 90c27dd80b698fe766f0c3ee0b6b9729\n size: {code_size}\n outs:\n # comment preserved\n - path: bar1\n md5: 299a0be4a5a79e6a59fdd251b19d78bb\n size: 4\n meta:\n name: copy-foo-bar\n md5: 9e725b11cb393e6a7468369fa50328b7\n \"\"\"\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_TestSCMGitSubmodule_test_ignored.assert_not_scm_is_ignored": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_TestSCMGitSubmodule_test_ignored.assert_not_scm_is_ignored", "embedding": null, "metadata": {"file_path": "tests/func/test_scm.py", "file_name": "test_scm.py", "file_type": "text/x-python", "category": "test", "start_line": 59, "end_line": 96, "span_ids": ["test_ignored", "TestSCMGitSubmodule.test_git_submodule", "TestSCMGitSubmodule.test_commit_in_submodule", "_count_gitignore_entries", "test_ignore", "TestSCMGitSubmodule"], "tokens": 292}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "class TestSCMGitSubmodule(TestGitSubmodule):\n def test_git_submodule(self):\n self.assertIsInstance(SCM(os.curdir), Git)\n\n def test_commit_in_submodule(self):\n G = Git(self._root_dir)\n G.add([\"foo\"])\n G.commit(\"add\")\n self.assertTrue(\"foo\" in self.git.git.ls_files())\n\n\ndef _count_gitignore_entries(line):\n lines = get_gitignore_content()\n return lines.count(line)\n\n\ndef test_ignore(tmp_dir, scm):\n foo = os.fspath(tmp_dir / \"foo\")\n target = \"/foo\"\n\n scm.ignore(foo)\n assert (tmp_dir / \".gitignore\").is_file()\n assert _count_gitignore_entries(target) == 1\n\n scm.ignore(foo)\n assert (tmp_dir / \".gitignore\").is_file()\n assert _count_gitignore_entries(target) == 1\n\n scm.ignore_remove(foo)\n assert not (tmp_dir / \".gitignore\").exists()\n\n\ndef test_ignored(tmp_dir, scm):\n tmp_dir.gen({\"dir1\": {\"file1.jpg\": \"cont\", \"file2.txt\": \"cont\"}})\n tmp_dir.gen({\".gitignore\": \"dir1/*.jpg\"})\n\n assert scm.is_ignored(tmp_dir / \"dir1\" / \"file1.jpg\")\n assert not scm.is_ignored(tmp_dir / \"dir1\" / \"file2.txt\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_gitignore_should_end_with_newline_test_gitignore_should_append_newline_to_gitignore.assert_contents_splitline": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_gitignore_should_end_with_newline_test_gitignore_should_append_newline_to_gitignore.assert_contents_splitline", "embedding": null, "metadata": {"file_path": "tests/func/test_scm.py", "file_name": "test_scm.py", "file_type": "text/x-python", "category": "test", "start_line": 138, "end_line": 165, "span_ids": ["test_gitignore_should_end_with_newline", "test_gitignore_should_append_newline_to_gitignore"], "tokens": 218}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_gitignore_should_end_with_newline(tmp_dir, scm):\n tmp_dir.gen({\"foo\": \"foo\", \"bar\": \"bar\"})\n\n foo = os.fspath(tmp_dir / \"foo\")\n bar = os.fspath(tmp_dir / \"bar\")\n gitignore = tmp_dir / \".gitignore\"\n\n scm.ignore(foo)\n assert gitignore.read_text().endswith(\"\\n\")\n\n scm.ignore(bar)\n assert gitignore.read_text().endswith(\"\\n\")\n\n\ndef test_gitignore_should_append_newline_to_gitignore(tmp_dir, scm):\n tmp_dir.gen({\"foo\": \"foo\", \"bar\": \"bar\"})\n\n bar_path = os.fspath(tmp_dir / \"bar\")\n gitignore = tmp_dir / \".gitignore\"\n\n gitignore.write_text(\"/foo\")\n assert not gitignore.read_text().endswith(\"\\n\")\n\n scm.ignore(bar_path)\n contents = gitignore.read_text()\n assert gitignore.read_text().endswith(\"\\n\")\n\n assert contents.splitlines() == [\"/foo\", \"/bar\"]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_git_detach_head_test_git_stash_workspace.assert_1_tmp_dir_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_git_detach_head_test_git_stash_workspace.assert_1_tmp_dir_", "embedding": null, "metadata": {"file_path": "tests/func/test_scm.py", "file_name": "test_scm.py", "file_type": "text/x-python", "category": "test", "start_line": 168, "end_line": 189, "span_ids": ["test_git_stash_workspace", "test_git_detach_head"], "tokens": 192}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_git_detach_head(tmp_dir, scm):\n tmp_dir.scm_gen({\"file\": \"0\"}, commit=\"init\")\n init_rev = scm.get_rev()\n\n with scm.detach_head() as rev:\n assert init_rev == rev\n assert init_rev == (tmp_dir / \".git\" / \"HEAD\").read_text().strip()\n assert (\n \"ref: refs/heads/master\"\n == (tmp_dir / \".git\" / \"HEAD\").read_text().strip()\n )\n\n\ndef test_git_stash_workspace(tmp_dir, scm):\n tmp_dir.scm_gen({\"file\": \"0\"}, commit=\"init\")\n tmp_dir.gen(\"file\", \"1\")\n\n with scm.stash_workspace():\n assert not scm.is_dirty()\n assert \"0\" == (tmp_dir / \"file\").read_text()\n assert scm.is_dirty()\n assert \"1\" == (tmp_dir / \"file\").read_text()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_git_stash_push_test_git_stash_push.assert_os_path_exists_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_git_stash_push_test_git_stash_push.assert_os_path_exists_", "embedding": null, "metadata": {"file_path": "tests/func/test_scm.py", "file_name": "test_scm.py", "file_type": "text/x-python", "category": "test", "start_line": 192, "end_line": 222, "span_ids": ["test_git_stash_push"], "tokens": 283}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"ref, include_untracked\",\n [\n (None, True),\n (None, False),\n (\"refs/foo/stash\", True),\n (\"refs/foo/stash\", False),\n ],\n)\ndef test_git_stash_push(tmp_dir, scm, ref, include_untracked):\n from dvc.scm.git import Stash\n\n tmp_dir.scm_gen({\"file\": \"0\"}, commit=\"init\")\n tmp_dir.gen({\"file\": \"1\", \"untracked\": \"0\"})\n\n stash = Stash(scm, ref=ref)\n rev = stash.push(include_untracked=include_untracked)\n assert rev == scm.get_ref(stash.ref)\n assert \"0\" == (tmp_dir / \"file\").read_text()\n assert include_untracked != (tmp_dir / \"untracked\").exists()\n assert len(stash) == 1\n\n stash.apply(rev)\n assert \"1\" == (tmp_dir / \"file\").read_text()\n assert \"0\" == (tmp_dir / \"untracked\").read_text()\n\n parts = list(stash.ref.split(\"/\"))\n assert os.path.exists(os.path.join(os.fspath(tmp_dir), \".git\", *parts))\n assert os.path.exists(\n os.path.join(os.fspath(tmp_dir), \".git\", \"logs\", *parts)\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_git_stash_drop_test_git_stash_drop.assert_len_stash_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_git_stash_drop_test_git_stash_drop.assert_len_stash_1", "embedding": null, "metadata": {"file_path": "tests/func/test_scm.py", "file_name": "test_scm.py", "file_type": "text/x-python", "category": "test", "start_line": 225, "end_line": 240, "span_ids": ["test_git_stash_drop"], "tokens": 123}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"ref\", [None, \"refs/foo/stash\"])\ndef test_git_stash_drop(tmp_dir, scm, ref):\n from dvc.scm.git import Stash\n\n tmp_dir.scm_gen({\"file\": \"0\"}, commit=\"init\")\n tmp_dir.gen(\"file\", \"1\")\n\n stash = Stash(scm, ref=ref)\n stash.push()\n\n tmp_dir.gen(\"file\", \"2\")\n expected = stash.push()\n\n stash.drop(1)\n assert expected == scm.get_ref(stash.ref)\n assert len(stash) == 1", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_git_stash_pop_test_git_stash_pop.assert_2_tmp_dir_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_git_stash_pop_test_git_stash_pop.assert_2_tmp_dir_", "embedding": null, "metadata": {"file_path": "tests/func/test_scm.py", "file_name": "test_scm.py", "file_type": "text/x-python", "category": "test", "start_line": 243, "end_line": 259, "span_ids": ["test_git_stash_pop"], "tokens": 143}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"ref\", [None, \"refs/foo/stash\"])\ndef test_git_stash_pop(tmp_dir, scm, ref):\n from dvc.scm.git import Stash\n\n tmp_dir.scm_gen({\"file\": \"0\"}, commit=\"init\")\n tmp_dir.gen(\"file\", \"1\")\n\n stash = Stash(scm, ref=ref)\n first = stash.push()\n\n tmp_dir.gen(\"file\", \"2\")\n second = stash.push()\n\n assert second == stash.pop()\n assert len(stash) == 1\n assert first == scm.get_ref(stash.ref)\n assert \"2\" == (tmp_dir / \"file\").read_text()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_git_stash_clear_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_scm.py_test_git_stash_clear_", "embedding": null, "metadata": {"file_path": "tests/func/test_scm.py", "file_name": "test_scm.py", "file_type": "text/x-python", "category": "test", "start_line": 262, "end_line": 283, "span_ids": ["test_git_stash_clear"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"ref\", [None, \"refs/foo/stash\"])\ndef test_git_stash_clear(tmp_dir, scm, ref):\n from dvc.scm.git import Stash\n\n tmp_dir.scm_gen({\"file\": \"0\"}, commit=\"init\")\n tmp_dir.gen(\"file\", \"1\")\n\n stash = Stash(scm, ref=ref)\n stash.push()\n\n tmp_dir.gen(\"file\", \"2\")\n stash.push()\n\n stash.clear()\n assert len(stash) == 0\n\n parts = list(stash.ref.split(\"/\"))\n assert not os.path.exists(os.path.join(os.fspath(tmp_dir), \".git\", *parts))\n assert not os.path.exists(\n os.path.join(os.fspath(tmp_dir), \".git\", \"logs\", *parts)\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_dir_recursive_test_collect_with_not_existing_output_or_stage_name.with_pytest_raises_StageN.dvc_stage_collect_some_f": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_dir_recursive_test_collect_with_not_existing_output_or_stage_name.with_pytest_raises_StageN.dvc_stage_collect_some_f", "embedding": null, "metadata": {"file_path": "tests/func/test_stage_load.py", "file_name": "test_stage_load.py", "file_type": "text/x-python", "category": "test", "start_line": 69, "end_line": 90, "span_ids": ["test_collect_dir_recursive", "test_collect_with_not_existing_output_or_stage_name"], "tokens": 202}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_collect_dir_recursive(tmp_dir, dvc, run_head):\n tmp_dir.gen({\"dir\": {\"foo\": \"foo\"}})\n (stage1,) = dvc.add(\"dir\", recursive=True)\n with (tmp_dir / \"dir\").chdir():\n stage2 = run_head(\"foo\", name=\"copy-foo-bar\")\n stage3 = run_head(\"foo-1\", single_stage=True)\n assert set(dvc.stage.collect(\"dir\", recursive=True)) == {\n stage1,\n stage2,\n stage3,\n }\n\n\ndef test_collect_with_not_existing_output_or_stage_name(\n tmp_dir, dvc, run_copy\n):\n with pytest.raises(StageFileDoesNotExistError):\n dvc.stage.collect(\"some_file\")\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n with pytest.raises(StageNotFound):\n dvc.stage.collect(\"some_file\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_stages_test_stages.None_1": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_stages_test_stages.None_1", "embedding": null, "metadata": {"file_path": "tests/func/test_stage_load.py", "file_name": "test_stage_load.py", "file_type": "text/x-python", "category": "test", "start_line": 93, "end_line": 107, "span_ids": ["test_stages"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_stages(tmp_dir, dvc):\n def collect_stages():\n return {stage.relpath for stage in Repo(os.fspath(tmp_dir)).stages}\n\n tmp_dir.dvc_gen({\"file\": \"a\", \"dir/file\": \"b\", \"dir/subdir/file\": \"c\"})\n\n assert collect_stages() == {\n \"file.dvc\",\n os.path.join(\"dir\", \"file.dvc\"),\n os.path.join(\"dir\", \"subdir\", \"file.dvc\"),\n }\n\n tmp_dir.gen(\".dvcignore\", \"dir\")\n\n assert collect_stages() == {\"file.dvc\"}", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_stages_stages.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_stages_stages.return._", "embedding": null, "metadata": {"file_path": "tests/func/test_stage_load.py", "file_name": "test_stage_load.py", "file_type": "text/x-python", "category": "test", "start_line": 110, "end_line": 121, "span_ids": ["stages"], "tokens": 132}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.fixture\ndef stages(tmp_dir, run_copy):\n stage1, stage2 = tmp_dir.dvc_gen({\"foo\": \"foo\", \"lorem\": \"lorem\"})\n return {\n \"foo-generate\": stage1,\n \"lorem-generate\": stage2,\n \"copy-foo-bar\": run_copy(\"foo\", \"bar\", single_stage=True),\n \"copy-bar-foobar\": run_copy(\"bar\", \"foobar\", name=\"copy-bar-foobar\"),\n \"copy-lorem-ipsum\": run_copy(\n \"lorem\", \"ipsum\", name=\"copy-lorem-ipsum\"\n ),\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_not_a_group_stage_with_group_flag_test_collect_not_a_group_stage_with_group_flag.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_not_a_group_stage_with_group_flag_test_collect_not_a_group_stage_with_group_flag.None_3", "embedding": null, "metadata": {"file_path": "tests/func/test_stage_load.py", "file_name": "test_stage_load.py", "file_type": "text/x-python", "category": "test", "start_line": 124, "end_line": 146, "span_ids": ["test_collect_not_a_group_stage_with_group_flag"], "tokens": 206}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_collect_not_a_group_stage_with_group_flag(tmp_dir, dvc, stages):\n assert set(dvc.stage.collect(\"copy-bar-foobar\", accept_group=True)) == {\n stages[\"copy-bar-foobar\"]\n }\n assert set(\n dvc.stage.collect(\"copy-bar-foobar\", accept_group=True, with_deps=True)\n ) == {\n stages[\"copy-bar-foobar\"],\n stages[\"copy-foo-bar\"],\n stages[\"foo-generate\"],\n }\n assert set(\n dvc.stage.collect_granular(\"copy-bar-foobar\", accept_group=True)\n ) == {(stages[\"copy-bar-foobar\"], None)}\n assert set(\n dvc.stage.collect_granular(\n \"copy-bar-foobar\", accept_group=True, with_deps=True\n )\n ) == {\n (stages[\"copy-bar-foobar\"], None),\n (stages[\"copy-foo-bar\"], None),\n (stages[\"foo-generate\"], None),\n }", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_glob_test_collect_granular_with_no_target.assert_list_map_itemgette": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_glob_test_collect_granular_with_no_target.assert_list_map_itemgette", "embedding": null, "metadata": {"file_path": "tests/func/test_stage_load.py", "file_name": "test_stage_load.py", "file_type": "text/x-python", "category": "test", "start_line": 189, "end_line": 204, "span_ids": ["test_collect_granular_with_no_target", "test_collect_glob"], "tokens": 167}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_collect_glob(tmp_dir, dvc, stages):\n assert set(dvc.stage.collect(\"copy*\", glob=True)) == {\n stages[key] for key in [\"copy-bar-foobar\", \"copy-lorem-ipsum\"]\n }\n assert set(\n dvc.stage.collect(\"copy-lorem*\", glob=True, with_deps=True)\n ) == {stages[key] for key in [\"copy-lorem-ipsum\", \"lorem-generate\"]}\n\n\ndef test_collect_granular_with_no_target(tmp_dir, dvc, stages):\n assert set(map(itemgetter(0), dvc.stage.collect_granular())) == set(\n stages.values()\n )\n assert list(map(itemgetter(1), dvc.stage.collect_granular())) == [\n None\n ] * len(stages)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_granular_with_target_test_collect_granular_with_target.None_6": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_granular_with_target_test_collect_granular_with_target.None_6", "embedding": null, "metadata": {"file_path": "tests/func/test_stage_load.py", "file_name": "test_stage_load.py", "file_type": "text/x-python", "category": "test", "start_line": 207, "end_line": 236, "span_ids": ["test_collect_granular_with_target"], "tokens": 316}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_collect_granular_with_target(tmp_dir, dvc, stages):\n assert dvc.stage.collect_granular(\"bar.dvc\") == [\n (stages[\"copy-foo-bar\"], None)\n ]\n assert dvc.stage.collect_granular(PIPELINE_FILE) == [\n (stages[\"copy-bar-foobar\"], None),\n (stages[\"copy-lorem-ipsum\"], None),\n ]\n assert dvc.stage.collect_granular(\":\") == [\n (stages[\"copy-bar-foobar\"], None),\n (stages[\"copy-lorem-ipsum\"], None),\n ]\n assert dvc.stage.collect_granular(\"copy-bar-foobar\") == [\n (stages[\"copy-bar-foobar\"], None)\n ]\n assert dvc.stage.collect_granular(\":copy-bar-foobar\") == [\n (stages[\"copy-bar-foobar\"], None)\n ]\n assert dvc.stage.collect_granular(\"dvc.yaml:copy-bar-foobar\") == [\n (stages[\"copy-bar-foobar\"], None)\n ]\n\n with (tmp_dir / dvc.DVC_DIR).chdir():\n assert dvc.stage.collect_granular(\n relpath(tmp_dir / PIPELINE_FILE) + \":copy-bar-foobar\"\n ) == [(stages[\"copy-bar-foobar\"], None)]\n\n assert dvc.stage.collect_granular(\"foobar\") == [\n (stages[\"copy-bar-foobar\"], PathInfo(tmp_dir / \"foobar\"))\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_with_not_existing_dvcfile_test_collect_granular_with_not_existing_output_or_stage_name.None_1.dvc_stage_collect_granula": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_with_not_existing_dvcfile_test_collect_granular_with_not_existing_output_or_stage_name.None_1.dvc_stage_collect_granula", "embedding": null, "metadata": {"file_path": "tests/func/test_stage_load.py", "file_name": "test_stage_load.py", "file_type": "text/x-python", "category": "test", "start_line": 239, "end_line": 259, "span_ids": ["test_collect_granular_with_not_existing_output_or_stage_name", "test_collect_with_not_existing_dvcfile"], "tokens": 173}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"target\",\n [\n \"not_existing.dvc\",\n \"not_existing.dvc:stage_name\",\n \"not_existing/dvc.yaml\",\n \"not_existing/dvc.yaml:stage_name\",\n ],\n)\ndef test_collect_with_not_existing_dvcfile(tmp_dir, dvc, target):\n with pytest.raises(StageFileDoesNotExistError):\n dvc.stage.collect_granular(target)\n with pytest.raises(StageFileDoesNotExistError):\n dvc.stage.collect(target)\n\n\ndef test_collect_granular_with_not_existing_output_or_stage_name(tmp_dir, dvc):\n with pytest.raises(NoOutputOrStageError):\n dvc.stage.collect_granular(\"some_file\")\n with pytest.raises(NoOutputOrStageError):\n dvc.stage.collect_granular(\"some_file\", recursive=True)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_granular_with_deps_test_collect_granular_with_deps.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_granular_with_deps_test_collect_granular_with_deps.None_2", "embedding": null, "metadata": {"file_path": "tests/func/test_stage_load.py", "file_name": "test_stage_load.py", "file_type": "text/x-python", "category": "test", "start_line": 262, "end_line": 284, "span_ids": ["test_collect_granular_with_deps"], "tokens": 168}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_collect_granular_with_deps(tmp_dir, dvc, stages):\n assert set(\n map(\n itemgetter(0),\n dvc.stage.collect_granular(\"bar.dvc\", with_deps=True),\n )\n ) == {stages[\"copy-foo-bar\"], stages[\"foo-generate\"]}\n assert set(\n map(\n itemgetter(0),\n dvc.stage.collect_granular(\"copy-bar-foobar\", with_deps=True),\n )\n ) == {\n stages[\"copy-bar-foobar\"],\n stages[\"copy-foo-bar\"],\n stages[\"foo-generate\"],\n }\n assert set(\n map(\n itemgetter(0),\n dvc.stage.collect_granular(PIPELINE_FILE, with_deps=True),\n )\n ) == set(stages.values())", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_granular_same_output_name_stage_name_test_collect_granular_same_output_name_stage_name.None_6": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_granular_same_output_name_stage_name_test_collect_granular_same_output_name_stage_name.None_6", "embedding": null, "metadata": {"file_path": "tests/func/test_stage_load.py", "file_name": "test_stage_load.py", "file_type": "text/x-python", "category": "test", "start_line": 287, "end_line": 303, "span_ids": ["test_collect_granular_same_output_name_stage_name"], "tokens": 233}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_collect_granular_same_output_name_stage_name(tmp_dir, dvc, run_copy):\n (stage1,) = tmp_dir.dvc_gen(\"foo\", \"foo\")\n (stage2,) = tmp_dir.dvc_gen(\"copy-foo-bar\", \"copy-foo-bar\")\n stage3 = run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n\n assert dvc.stage.collect_granular(\"copy-foo-bar\") == [(stage3, None)]\n\n coll = dvc.stage.collect_granular(\"copy-foo-bar\", with_deps=True)\n assert set(map(itemgetter(0), coll)) == {stage3, stage1}\n assert list(map(itemgetter(1), coll)) == [None] * 2\n\n assert dvc.stage.collect_granular(\"./copy-foo-bar\") == [\n (stage2, PathInfo(tmp_dir / \"copy-foo-bar\"))\n ]\n assert dvc.stage.collect_granular(\"./copy-foo-bar\", with_deps=True) == [\n (stage2, PathInfo(tmp_dir / \"copy-foo-bar\"))\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_granular_priority_on_collision_test_collect_granular_priority_on_collision.None_4": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_granular_priority_on_collision_test_collect_granular_priority_on_collision.None_4", "embedding": null, "metadata": {"file_path": "tests/func/test_stage_load.py", "file_name": "test_stage_load.py", "file_type": "text/x-python", "category": "test", "start_line": 306, "end_line": 321, "span_ids": ["test_collect_granular_priority_on_collision"], "tokens": 166}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_collect_granular_priority_on_collision(tmp_dir, dvc, run_copy):\n tmp_dir.gen({\"dir\": {\"foo\": \"foo\"}, \"foo\": \"foo\"})\n (stage1,) = dvc.add(\"dir\", recursive=True)\n stage2 = run_copy(\"foo\", \"bar\", name=\"dir\")\n\n assert dvc.stage.collect_granular(\"dir\") == [(stage2, None)]\n assert dvc.stage.collect_granular(\"dir\", recursive=True) == [\n (stage1, None)\n ]\n\n remove(tmp_dir / \"dir\")\n\n assert dvc.stage.collect_granular(\"dir\") == [(stage2, None)]\n assert dvc.stage.collect_granular(\"dir\", recursive=True) == [\n (stage2, None)\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_granular_collision_output_dir_stage_name_test_collect_granular_collision_output_dir_stage_name.None_3": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_granular_collision_output_dir_stage_name_test_collect_granular_collision_output_dir_stage_name.None_3", "embedding": null, "metadata": {"file_path": "tests/func/test_stage_load.py", "file_name": "test_stage_load.py", "file_type": "text/x-python", "category": "test", "start_line": 324, "end_line": 334, "span_ids": ["test_collect_granular_collision_output_dir_stage_name"], "tokens": 129}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_collect_granular_collision_output_dir_stage_name(\n tmp_dir, dvc, run_copy\n):\n stage1, *_ = tmp_dir.dvc_gen({\"dir\": {\"foo\": \"foo\"}, \"foo\": \"foo\"})\n stage3 = run_copy(\"foo\", \"bar\", name=\"dir\")\n\n assert dvc.stage.collect_granular(\"dir\") == [(stage3, None)]\n assert not dvc.stage.collect_granular(\"dir\", recursive=True)\n assert dvc.stage.collect_granular(\"./dir\") == [\n (stage1, PathInfo(tmp_dir / \"dir\"))\n ]", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_granular_not_existing_stage_name_test_collect_granular_not_existing_stage_name.with_pytest_raises_StageN.dvc_stage_collect_granula": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_collect_granular_not_existing_stage_name_test_collect_granular_not_existing_stage_name.with_pytest_raises_StageN.dvc_stage_collect_granula", "embedding": null, "metadata": {"file_path": "tests/func/test_stage_load.py", "file_name": "test_stage_load.py", "file_type": "text/x-python", "category": "test", "start_line": 337, "end_line": 346, "span_ids": ["test_collect_granular_not_existing_stage_name"], "tokens": 127}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_collect_granular_not_existing_stage_name(tmp_dir, dvc, run_copy):\n tmp_dir.dvc_gen(\"foo\", \"foo\")\n (stage,) = tmp_dir.dvc_gen(\"copy-foo-bar\", \"copy-foo-bar\")\n run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n\n assert dvc.stage.collect_granular(\n \"copy-foo-bar.dvc:stage_name_not_needed\"\n ) == [(stage, None)]\n with pytest.raises(StageNotFound):\n dvc.stage.collect_granular(\"dvc.yaml:does-not-exist\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_get_stages_test_get_stages.with_pytest_raises_StageN.dvc_stage_load_all_path_P": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_get_stages_test_get_stages.with_pytest_raises_StageN.dvc_stage_load_all_path_P", "embedding": null, "metadata": {"file_path": "tests/func/test_stage_load.py", "file_name": "test_stage_load.py", "file_type": "text/x-python", "category": "test", "start_line": 349, "end_line": 368, "span_ids": ["test_get_stages"], "tokens": 224}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_stages(tmp_dir, dvc, run_copy):\n with pytest.raises(StageFileDoesNotExistError):\n dvc.stage.load_all()\n\n tmp_dir.gen(\"foo\", \"foo\")\n stage1 = run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n stage2 = run_copy(\"bar\", \"foobar\", name=\"copy-bar-foobar\")\n\n assert set(dvc.stage.load_all()) == {stage1, stage2}\n assert set(dvc.stage.load_all(path=PIPELINE_FILE)) == {stage1, stage2}\n assert set(dvc.stage.load_all(name=\"copy-bar-foobar\")) == {stage2}\n assert set(\n dvc.stage.load_all(path=PIPELINE_FILE, name=\"copy-bar-foobar\")\n ) == {stage2}\n\n with pytest.raises(StageFileDoesNotExistError):\n dvc.stage.load_all(path=relpath(tmp_dir / \"..\" / PIPELINE_FILE))\n\n with pytest.raises(StageNotFound):\n dvc.stage.load_all(path=PIPELINE_FILE, name=\"copy\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_get_stages_old_dvcfile_test_get_stages_old_dvcfile.with_pytest_raises_StageF.dvc_stage_load_all_path_r": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_get_stages_old_dvcfile_test_get_stages_old_dvcfile.with_pytest_raises_StageF.dvc_stage_load_all_path_r", "embedding": null, "metadata": {"file_path": "tests/func/test_stage_load.py", "file_name": "test_stage_load.py", "file_type": "text/x-python", "category": "test", "start_line": 371, "end_line": 377, "span_ids": ["test_get_stages_old_dvcfile"], "tokens": 106}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_stages_old_dvcfile(tmp_dir, dvc):\n (stage1,) = tmp_dir.dvc_gen(\"foo\", \"foo\")\n assert set(dvc.stage.load_all(\"foo.dvc\")) == {stage1}\n assert set(dvc.stage.load_all(\"foo.dvc\", name=\"foo-generate\")) == {stage1}\n\n with pytest.raises(StageFileDoesNotExistError):\n dvc.stage.load_all(path=relpath(tmp_dir / \"..\" / \"foo.dvc\"))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_get_stage_test_get_stage.None_3.dvc_stage_load_one_name_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_get_stage_test_get_stage.None_3.dvc_stage_load_one_name_", "embedding": null, "metadata": {"file_path": "tests/func/test_stage_load.py", "file_name": "test_stage_load.py", "file_type": "text/x-python", "category": "test", "start_line": 380, "end_line": 399, "span_ids": ["test_get_stage"], "tokens": 172}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_stage(tmp_dir, dvc, run_copy):\n tmp_dir.gen(\"foo\", \"foo\")\n stage1 = run_copy(\"foo\", \"bar\", name=\"copy-foo-bar\")\n\n with pytest.raises(StageNameUnspecified):\n dvc.stage.load_one()\n\n with pytest.raises(StageNameUnspecified):\n dvc.stage.load_one(path=PIPELINE_FILE)\n\n assert (\n dvc.stage.load_one(path=PIPELINE_FILE, name=\"copy-foo-bar\") == stage1\n )\n assert dvc.stage.load_one(name=\"copy-foo-bar\") == stage1\n\n with pytest.raises(StageFileDoesNotExistError):\n dvc.stage.load_one(path=\"something.yaml\", name=\"name\")\n\n with pytest.raises(StageNotFound):\n dvc.stage.load_one(name=\"random_name\")", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_get_stage_single_stage_dvcfile_test_collect_optimization.dvc_stage_collect_granula": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/func/test_stage_load.py_test_get_stage_single_stage_dvcfile_test_collect_optimization.dvc_stage_collect_granula", "embedding": null, "metadata": {"file_path": "tests/func/test_stage_load.py", "file_name": "test_stage_load.py", "file_type": "text/x-python", "category": "test", "start_line": 402, "end_line": 422, "span_ids": ["test_get_stage_single_stage_dvcfile", "test_collect_optimization"], "tokens": 204}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_get_stage_single_stage_dvcfile(tmp_dir, dvc):\n (stage1,) = tmp_dir.dvc_gen(\"foo\", \"foo\")\n assert dvc.stage.load_one(\"foo.dvc\") == stage1\n assert dvc.stage.load_one(\"foo.dvc\", name=\"jpt\") == stage1\n with pytest.raises(StageFileDoesNotExistError):\n dvc.stage.load_one(path=\"bar.dvc\", name=\"name\")\n\n\ndef test_collect_optimization(tmp_dir, dvc, mocker):\n (stage,) = tmp_dir.dvc_gen(\"foo\", \"foo text\")\n\n # Forget cached stages and graph and error out on collection\n dvc._reset()\n mocker.patch(\n \"dvc.repo.Repo.stages\",\n property(raiser(Exception(\"Should not collect\"))),\n )\n\n # Should read stage directly instead of collecting the whole graph\n dvc.stage.collect(stage.path)\n dvc.stage.collect_granular(stage.path)", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/test_repo.py_test_locked_test_skip_graph_checks.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/repo/test_repo.py_test_locked_test_skip_graph_checks.None_2", "embedding": null, "metadata": {"file_path": "tests/unit/repo/test_repo.py", "file_name": "test_repo.py", "file_type": "text/x-python", "category": "test", "start_line": 59, "end_line": 99, "span_ids": ["test_locked", "test_skip_graph_checks"], "tokens": 307}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_locked(mocker):\n repo = mocker.MagicMock()\n repo._lock_depth = 0\n repo.method = locked(repo.method)\n\n args = ()\n kwargs = {}\n repo.method(repo, args, kwargs)\n\n assert repo.method_calls == [\n mocker.call._reset(),\n mocker.call.method(repo, args, kwargs),\n mocker.call._reset(),\n ]\n\n\ndef test_skip_graph_checks(tmp_dir, dvc, mocker, run_copy):\n # See https://github.com/iterative/dvc/issues/2671 for more info\n mock_build_graph = mocker.patch(\"dvc.repo.build_graph\")\n\n # sanity check\n tmp_dir.gen(\"foo\", \"foo text\")\n dvc.add(\"foo\")\n run_copy(\"foo\", \"bar\", single_stage=True)\n assert mock_build_graph.called\n\n # check that our hack can be enabled\n mock_build_graph.reset_mock()\n dvc._skip_graph_checks = True\n tmp_dir.gen(\"baz\", \"baz text\")\n dvc.add(\"baz\")\n run_copy(\"baz\", \"qux\", single_stage=True)\n assert not mock_build_graph.called\n\n # check that our hack can be disabled\n mock_build_graph.reset_mock()\n dvc._skip_graph_checks = False\n tmp_dir.gen(\"quux\", \"quux text\")\n dvc.add(\"quux\")\n run_copy(\"quux\", \"quuz\", single_stage=True)\n assert mock_build_graph.called", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_no_commits_test_branch_revs.assert_len_expected_0": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_no_commits_test_branch_revs.assert_len_expected_0", "embedding": null, "metadata": {"file_path": "tests/unit/scm/test_git.py", "file_name": "test_git.py", "file_type": "text/x-python", "category": "test", "start_line": 101, "end_line": 126, "span_ids": ["test_no_commits", "test_branch_revs"], "tokens": 178}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_no_commits(tmp_dir):\n from dvc.scm.git import Git\n from tests.dir_helpers import git_init\n\n git_init(\".\")\n assert Git().no_commits\n\n tmp_dir.gen(\"foo\", \"foo\")\n Git().add([\"foo\"])\n Git().commit(\"foo\")\n\n assert not Git().no_commits\n\n\ndef test_branch_revs(tmp_dir, scm):\n tmp_dir.scm_gen({\"file\": \"0\"}, commit=\"init\")\n init_rev = scm.get_rev()\n\n expected = []\n for i in range(1, 5):\n tmp_dir.scm_gen({\"file\": f\"{i}\"}, commit=f\"{i}\")\n expected.append(scm.get_rev())\n\n for rev in scm.branch_revs(\"master\", init_rev):\n assert rev == expected.pop()\n assert len(expected) == 0", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_set_ref_test_set_ref.None_2": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_set_ref_test_set_ref.None_2", "embedding": null, "metadata": {"file_path": "tests/unit/scm/test_git.py", "file_name": "test_git.py", "file_type": "text/x-python", "category": "test", "start_line": 142, "end_line": 166, "span_ids": ["test_set_ref"], "tokens": 248}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_set_ref(tmp_dir, git):\n tmp_dir.scm_gen({\"file\": \"0\"}, commit=\"init\")\n init_rev = tmp_dir.scm.get_rev()\n tmp_dir.scm_gen({\"file\": \"1\"}, commit=\"commit\")\n commit_rev = tmp_dir.scm.get_rev()\n\n git.set_ref(\"refs/foo/bar\", init_rev)\n assert (\n init_rev\n == (tmp_dir / \".git\" / \"refs\" / \"foo\" / \"bar\").read_text().strip()\n )\n\n with pytest.raises(SCMError):\n git.set_ref(\"refs/foo/bar\", commit_rev, old_ref=commit_rev)\n git.set_ref(\"refs/foo/bar\", commit_rev, old_ref=init_rev)\n assert (\n commit_rev\n == (tmp_dir / \".git\" / \"refs\" / \"foo\" / \"bar\").read_text().strip()\n )\n\n git.set_ref(\"refs/foo/baz\", \"refs/heads/master\", symbolic=True)\n assert (\n \"ref: refs/heads/master\"\n == (tmp_dir / \".git\" / \"refs\" / \"foo\" / \"baz\").read_text().strip()\n )", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_remove_ref_test_remove_ref.assert_not_tmp_dir_g": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_remove_ref_test_remove_ref.assert_not_tmp_dir_g", "embedding": null, "metadata": {"file_path": "tests/unit/scm/test_git.py", "file_name": "test_git.py", "file_type": "text/x-python", "category": "test", "start_line": 187, "end_line": 197, "span_ids": ["test_remove_ref"], "tokens": 147}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_remove_ref(tmp_dir, git):\n tmp_dir.scm_gen({\"file\": \"0\"}, commit=\"init\")\n init_rev = tmp_dir.scm.get_rev()\n tmp_dir.gen(os.path.join(\".git\", \"refs\", \"foo\", \"bar\"), init_rev)\n tmp_dir.scm_gen({\"file\": \"1\"}, commit=\"commit\")\n commit_rev = tmp_dir.scm.get_rev()\n\n with pytest.raises(SCMError):\n git.remove_ref(\"refs/foo/bar\", old_ref=commit_rev)\n git.remove_ref(\"refs/foo/bar\", old_ref=init_rev)\n assert not (tmp_dir / \".git\" / \"refs\" / \"foo\" / \"bar\").exists()", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_refs_containing_test_refs_containing.assert_expected_set_sc": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_refs_containing_test_refs_containing.assert_expected_set_sc", "embedding": null, "metadata": {"file_path": "tests/unit/scm/test_git.py", "file_name": "test_git.py", "file_type": "text/x-python", "category": "test", "start_line": 187, "end_line": 198, "span_ids": ["test_refs_containing"], "tokens": 117}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_refs_containing(tmp_dir, scm):\n tmp_dir.scm_gen({\"file\": \"0\"}, commit=\"init\")\n init_rev = scm.get_rev()\n tmp_dir.gen(\n {\n os.path.join(\".git\", \"refs\", \"foo\", \"bar\"): init_rev,\n os.path.join(\".git\", \"refs\", \"foo\", \"baz\"): init_rev,\n }\n )\n\n expected = {\"refs/foo/bar\", \"refs/foo/baz\", \"refs/heads/master\"}\n assert expected == set(scm.get_refs_containing(init_rev))", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_push_refspec_test_push_refspec.assert_remote_dir_scm_get": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/scm/test_git.py_test_push_refspec_test_push_refspec.assert_remote_dir_scm_get", "embedding": null, "metadata": {"file_path": "tests/unit/scm/test_git.py", "file_name": "test_git.py", "file_type": "text/x-python", "category": "test", "start_line": 214, "end_line": 243, "span_ids": ["test_push_refspec"], "tokens": 320}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\"use_url\", [True, False])\ndef test_push_refspec(tmp_dir, scm, make_tmp_dir, use_url):\n tmp_dir.scm_gen({\"file\": \"0\"}, commit=\"init\")\n init_rev = scm.get_rev()\n tmp_dir.gen(\n {\n os.path.join(\".git\", \"refs\", \"foo\", \"bar\"): init_rev,\n os.path.join(\".git\", \"refs\", \"foo\", \"baz\"): init_rev,\n }\n )\n remote_dir = make_tmp_dir(\"git-remote\", scm=True)\n url = \"file://{}\".format(remote_dir.resolve().as_posix())\n scm.gitpython.repo.create_remote(\"origin\", url)\n\n with pytest.raises(SCMError):\n scm.push_refspec(\"bad-remote\", \"refs/foo/bar\", \"refs/foo/bar\")\n\n remote = url if use_url else \"origin\"\n scm.push_refspec(remote, \"refs/foo/bar\", \"refs/foo/bar\")\n assert init_rev == remote_dir.scm.get_ref(\"refs/foo/bar\")\n\n remote_dir.scm.checkout(\"refs/foo/bar\")\n assert init_rev == remote_dir.scm.get_rev()\n assert \"0\" == (remote_dir / \"file\").read_text()\n\n scm.push_refspec(remote, \"refs/foo/\", \"refs/foo/\")\n assert init_rev == remote_dir.scm.get_ref(\"refs/foo/baz\")\n\n scm.push_refspec(remote, None, \"refs/foo/baz\")\n assert remote_dir.scm.get_ref(\"refs/foo/baz\") is None", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_utils.py_test_parse_target_test_parse_target.assert_parse_target_inp_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_utils.py_test_parse_target_test_parse_target.assert_parse_target_inp_", "embedding": null, "metadata": {"file_path": "tests/unit/utils/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 138, "end_line": 180, "span_ids": ["test_parse_target"], "tokens": 506}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "@pytest.mark.parametrize(\n \"inp,out, default\",\n [\n [\"dvc.yaml\", (\"dvc.yaml\", None), None],\n [\"dvc.yaml:name\", (\"dvc.yaml\", \"name\"), None],\n [\":name\", (\"dvc.yaml\", \"name\"), None],\n [\"stage.dvc\", (\"stage.dvc\", None), None],\n [\"dvc.yaml:name\", (\"dvc.yaml\", \"name\"), None],\n [\"../models/stage.dvc\", (\"../models/stage.dvc\", None), \"def\"],\n [\":name\", (\"default\", \"name\"), \"default\"],\n [\":name\", (\"default\", \"name\"), \"default\"],\n [\"something.dvc:name\", (\"something.dvc\", \"name\"), None],\n [\"../something.dvc:name\", (\"../something.dvc\", \"name\"), None],\n [\"file\", (None, \"file\"), None],\n [\"build@15\", (None, \"build@15\"), None],\n [\"build@{'level': 35}\", (None, \"build@{'level': 35}\"), None],\n [\":build@15\", (\"dvc.yaml\", \"build@15\"), None],\n [\":build@{'level': 35}\", (\"dvc.yaml\", \"build@{'level': 35}\"), None],\n [\"dvc.yaml:build@15\", (\"dvc.yaml\", \"build@15\"), None],\n [\n \"dvc.yaml:build@{'level': 35}\",\n (\"dvc.yaml\", \"build@{'level': 35}\"),\n None,\n ],\n [\n \"build2@{'level': [1, 2, 3]}\",\n (None, \"build2@{'level': [1, 2, 3]}\"),\n None,\n ],\n [\n \":build2@{'level': [1, 2, 3]}\",\n (\"dvc.yaml\", \"build2@{'level': [1, 2, 3]}\"),\n None,\n ],\n [\n \"dvc.yaml:build2@{'level': [1, 2, 3]}\",\n (\"dvc.yaml\", \"build2@{'level': [1, 2, 3]}\"),\n None,\n ],\n ],\n)\ndef test_parse_target(inp, out, default):\n assert parse_target(inp, default) == out", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_utils.py_test_hint_on_lockfile_": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/tests/unit/utils/test_utils.py_test_hint_on_lockfile_", "embedding": null, "metadata": {"file_path": "tests/unit/utils/test_utils.py", "file_name": "test_utils.py", "file_type": "text/x-python", "category": "test", "start_line": 183, "end_line": 212, "span_ids": ["test_dict_sha256", "test_hint_on_lockfile"], "tokens": 277}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "def test_hint_on_lockfile():\n with pytest.raises(Exception) as exc:\n assert parse_target(\"dvc.lock:name\")\n assert \"dvc.yaml:name\" in str(exc.value)\n\n\n@pytest.mark.parametrize(\n \"d,sha\",\n [\n (\n {\n \"cmd\": \"echo content > out\",\n \"deps\": {\"dep\": \"2254342becceafbd04538e0a38696791\"},\n \"outs\": {\"out\": \"f75b8179e4bbe7e2b4a074dcef62de95\"},\n },\n \"f472eda60f09660a4750e8b3208cf90b3a3b24e5f42e0371d829710e9464d74a\",\n ),\n (\n {\n \"cmd\": \"echo content > out\",\n \"deps\": {\"dep\": \"2254342becceafbd04538e0a38696791\"},\n \"outs\": [\"out\"],\n },\n \"a239b67073bd58affcdb81fff3305d1726c6e7f9c86f3d4fca0e92e8147dc7b0\",\n ),\n ],\n)\ndef test_dict_sha256(d, sha):\n assert dict_sha256(d) == sha", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\n\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\n", "class_name": "TextNode"}, "__type__": "1"}, "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/config.py_argparse__name_type.return._": {"__data__": {"id_": "/home/jiayipan/code/24FA/temp/ml-01/moatless-tools/t/repos/swe-train_iterative__dvc/dvc/command/config.py_argparse__name_type.return._", "embedding": null, "metadata": {"file_path": "dvc/command/config.py", "file_name": "config.py", "file_type": "text/x-python", "category": "implementation", "start_line": 1, "end_line": 29, "span_ids": ["imports", "_name_type"], "tokens": 170}, "excluded_embed_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date", "start_line", "end_line", "tokens"], "excluded_llm_metadata_keys": ["file_name", "file_type", "file_size", "creation_date", "last_modified_date", "last_accessed_date"], "relationships": {}, "text": "import argparse\nimport logging\nimport os\n\nfrom dvc.command.base import CmdBaseNoRepo, append_doc_link\nfrom dvc.config import Config, ConfigError\nfrom dvc.repo import Repo\nfrom dvc.utils.flatten import flatten\n\nlogger = logging.getLogger(__name__)\n\nNAME_REGEX = r\"^(?Premote\\.)?(?P
[^\\.]*)\\.(?P