File tree Expand file tree Collapse file tree 4 files changed +5
-13
lines changed Expand file tree Collapse file tree 4 files changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -106,8 +106,8 @@ def postgres_dbdata(
106
106
)
107
107
108
108
# Fully resolve all input paths.
109
- pgbin_path = fully_resolve_path (dbgym_workspace , pgbin_path )
110
- dbdata_parent_dpath = fully_resolve_path (dbgym_workspace , dbdata_parent_dpath )
109
+ pgbin_path = fully_resolve_path (pgbin_path )
110
+ dbdata_parent_dpath = fully_resolve_path (dbdata_parent_dpath )
111
111
112
112
# Check assertions on args
113
113
if intended_dbdata_hardware == "hdd" :
Original file line number Diff line number Diff line change @@ -69,7 +69,6 @@ def get_default_metadata() -> TuningMetadata:
69
69
dbgym_workspace = GymlibIntegtestManager .get_dbgym_workspace ()
70
70
return TuningMetadata (
71
71
workload_path = fully_resolve_path (
72
- dbgym_workspace ,
73
72
get_default_workload_path (
74
73
dbgym_workspace .dbgym_workspace_path ,
75
74
GymlibIntegtestManager .BENCHMARK ,
@@ -82,19 +81,16 @@ def get_default_metadata() -> TuningMetadata:
82
81
),
83
82
),
84
83
pristine_dbdata_snapshot_path = fully_resolve_path (
85
- dbgym_workspace ,
86
84
get_default_pristine_dbdata_snapshot_path (
87
85
dbgym_workspace .dbgym_workspace_path ,
88
86
GymlibIntegtestManager .BENCHMARK ,
89
87
GymlibIntegtestManager .SCALE_FACTOR ,
90
88
),
91
89
),
92
90
dbdata_parent_path = fully_resolve_path (
93
- dbgym_workspace ,
94
91
get_default_dbdata_parent_dpath (dbgym_workspace .dbgym_workspace_path ),
95
92
),
96
93
pgbin_path = fully_resolve_path (
97
- dbgym_workspace ,
98
94
get_default_pgbin_path (dbgym_workspace .dbgym_workspace_path ),
99
95
),
100
96
)
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ def setUpClass() -> None:
18
18
19
19
def test_workload (self ) -> None :
20
20
workload_dpath = fully_resolve_path (
21
- GymlibIntegtestManager .get_dbgym_workspace (),
22
21
get_default_workload_path (
23
22
GymlibIntegtestManager .get_dbgym_workspace ().dbgym_workspace_path ,
24
23
GymlibIntegtestManager .BENCHMARK ,
Original file line number Diff line number Diff line change @@ -281,8 +281,7 @@ def get_workspace_path_from_config(dbgym_config_path: Path) -> Path:
281
281
Returns the workspace path (as a fully resolved path) from the config file.
282
282
"""
283
283
with open (dbgym_config_path ) as f :
284
- # TODO: use fully_resolve_path()
285
- return Path (yaml .safe_load (f )["dbgym_workspace_path" ]).resolve ().absolute ()
284
+ return fully_resolve_path (Path (yaml .safe_load (f )["dbgym_workspace_path" ]))
286
285
287
286
288
287
def make_standard_dbgym_workspace () -> DBGymWorkspace :
@@ -296,9 +295,7 @@ def make_standard_dbgym_workspace() -> DBGymWorkspace:
296
295
return dbgym_workspace
297
296
298
297
299
- def fully_resolve_path (
300
- dbgym_workspace : DBGymWorkspace , inputpath : os .PathLike [str ]
301
- ) -> Path :
298
+ def fully_resolve_path (inputpath : os .PathLike [str ]) -> Path :
302
299
"""
303
300
Fully resolve any path to a real, absolute path.
304
301
@@ -600,7 +597,7 @@ def link_result(
600
597
assert is_fully_resolved (
601
598
result_fordpath
602
599
), f"result_fordpath ({ result_fordpath } ) should be a fully resolved path"
603
- result_fordpath = fully_resolve_path (dbgym_workspace , result_fordpath )
600
+ result_fordpath = fully_resolve_path (result_fordpath )
604
601
assert is_child_path (result_fordpath , dbgym_workspace .dbgym_this_run_path )
605
602
assert not os .path .islink (result_fordpath )
606
603
You can’t perform that action at this time.
0 commit comments