3636def cmd_args () -> AIDynamoCmdArgs :
3737 return AIDynamoCmdArgs (
3838 docker_image_url = "url" ,
39- huggingface_home_host_path = Path .home () / ".cache/huggingface" ,
4039 huggingface_home_container_path = Path ("/root/.cache/huggingface" ),
4140 dynamo = AIDynamoArgs (
4241 prefill_worker = PrefillWorkerArgs (
@@ -76,10 +75,6 @@ def cmd_args() -> AIDynamoCmdArgs:
7675
7776@pytest .fixture
7877def test_run (tmp_path : Path , cmd_args : AIDynamoCmdArgs ) -> TestRun :
79- hf_home = tmp_path / "huggingface"
80- hf_home .mkdir ()
81- cmd_args .huggingface_home_host_path = hf_home
82-
8378 dynamo_repo_path = tmp_path / "dynamo_repo"
8479 dynamo_repo_path .mkdir ()
8580
@@ -99,20 +94,6 @@ def strategy(slurm_system: SlurmSystem, test_run: TestRun) -> AIDynamoSlurmComma
9994 return AIDynamoSlurmCommandGenStrategy (slurm_system , test_run )
10095
10196
102- def test_hugging_face_home_path_valid (test_run : TestRun ) -> None :
103- td = cast (AIDynamoTestDefinition , test_run .test )
104- path = td .huggingface_home_host_path
105- assert path .exists ()
106- assert path .is_dir ()
107-
108-
109- def test_hugging_face_home_path_missing (test_run : TestRun ) -> None :
110- td = cast (AIDynamoTestDefinition , test_run .test )
111- td .cmd_args .huggingface_home_host_path = Path ("/nonexistent" )
112- with pytest .raises (FileNotFoundError ):
113- _ = td .huggingface_home_host_path
114-
115-
11697def test_container_mounts (strategy : AIDynamoSlurmCommandGenStrategy , test_run : TestRun ) -> None :
11798 mounts = strategy ._container_mounts ()
11899 td = cast (AIDynamoTestDefinition , test_run .test )
@@ -121,7 +102,7 @@ def test_container_mounts(strategy: AIDynamoSlurmCommandGenStrategy, test_run: T
121102
122103 assert mounts == [
123104 f"{ dynamo_repo_path !s} :{ dynamo_repo_path !s} " ,
124- f"{ td . cmd_args . huggingface_home_host_path !s} :{ td .cmd_args .huggingface_home_container_path !s} " ,
105+ f"{ strategy . system . hf_home_path . absolute () !s} :{ td .cmd_args .huggingface_home_container_path !s} " ,
125106 f"{ td .script .installed_path .absolute ()!s} :{ td .script .installed_path .absolute ()!s} " ,
126107 ]
127108
0 commit comments