@@ -50,30 +50,6 @@ def get_latest_run_path_from_workspace_path(workspace_path: Path) -> Path:
50
50
DEFAULT_BOOT_CONFIG_PATH = POSTGRES_PATH / "default_boot_config.yaml"
51
51
52
52
53
- # Paths of dependencies in the workspace. These are named "*_path" because they will be an absolute path
54
- # The reason these _cannot_ be relative paths is because relative paths are relative to the codebase root, not the workspace root
55
- # Note that it's okay to hardcode the codebase paths (like dbgym_dbms_postgres) here. In the worst case, we'll just break an
56
- # integration test. The "source of truth" of codebase paths is based on DBGymWorkspace.cur_source_path(), which will always
57
- # reflect the actual codebase structure. As long as we automatically enforce getting the right codebase paths when writing, it's
58
- # ok to have to hardcode them when reading.
59
- # Details
60
- # - If a name already has the workload_name, I omit scale factor. This is because the workload_name includes the scale factor
61
- # - By convention, symlinks should end with ".link". The bug that motivated this decision involved replaying a tuning run. When
62
- # replaying a tuning run, you read the tuning_steps/ folder of the tuning run. Earlier, I created a symlink to that tuning_steps/
63
- # folder called run_*/*/tuning_steps. However, replay itself generates an replay_info.log file, which goes in
64
- # run_*/*/tuning_steps/. The bug was that my replay function was overwriting the replay_info.log file of the
65
- # tuning run. By naming all symlinks "*.link", we avoid the possibility of subtle bugs like this happening.
66
- def get_default_workload_path (
67
- workspace_path : Path , benchmark_name : str , workload_name : str
68
- ) -> Path :
69
- return (
70
- get_symlinks_path_from_workspace_path (workspace_path )
71
- / f"dbgym_benchmark_{ benchmark_name } "
72
- / "data"
73
- / (workload_name + ".link" )
74
- )
75
-
76
-
77
53
SCALE_FACTOR_PLACEHOLDER : str = "[scale_factor]"
78
54
79
55
@@ -323,51 +299,6 @@ def open_and_save(self, open_path: Path, mode: str = "r") -> IO[Any]:
323
299
def append_group (self , name : str ) -> None :
324
300
self .cur_path_list .append (name )
325
301
326
- def cur_source_path (self , * dirs : str ) -> Path :
327
- cur_path = self .base_dbgym_repo_path
328
- assert self .cur_path_list [0 ] == "dbgym"
329
- for folder in self .cur_path_list [1 :]:
330
- cur_path = cur_path / folder
331
- for dir in dirs :
332
- cur_path = cur_path / dir
333
- return cur_path
334
-
335
- def _cur_symlinks_path (self , * dirs : str , mkdir : bool = False ) -> Path :
336
- flattened_structure = "_" .join (self .cur_path_list )
337
- cur_path = self .dbgym_symlinks_path / flattened_structure
338
- for dir in dirs :
339
- cur_path = cur_path / dir
340
- if mkdir :
341
- cur_path .mkdir (parents = True , exist_ok = True )
342
- return cur_path
343
-
344
- def cur_task_runs_path (self , * dirs : str , mkdir : bool = False ) -> Path :
345
- flattened_structure = "_" .join (self .cur_path_list )
346
- cur_path = self .dbgym_this_run_path / flattened_structure
347
- for dir in dirs :
348
- cur_path = cur_path / dir
349
- if mkdir :
350
- cur_path .mkdir (parents = True , exist_ok = True )
351
- return cur_path
352
-
353
- def cur_symlinks_bin_path (self , * dirs : str , mkdir : bool = False ) -> Path :
354
- return self ._cur_symlinks_path ("bin" , * dirs , mkdir = mkdir )
355
-
356
- def cur_symlinks_build_path (self , * dirs : str , mkdir : bool = False ) -> Path :
357
- return self ._cur_symlinks_path ("build" , * dirs , mkdir = mkdir )
358
-
359
- def cur_symlinks_data_path (self , * dirs : str , mkdir : bool = False ) -> Path :
360
- return self ._cur_symlinks_path ("data" , * dirs , mkdir = mkdir )
361
-
362
- def cur_task_runs_build_path (self , * dirs : str , mkdir : bool = False ) -> Path :
363
- return self .cur_task_runs_path ("build" , * dirs , mkdir = mkdir )
364
-
365
- def cur_task_runs_data_path (self , * dirs : str , mkdir : bool = False ) -> Path :
366
- return self .cur_task_runs_path ("data" , * dirs , mkdir = mkdir )
367
-
368
- def cur_task_runs_artifacts_path (self , * dirs : str , mkdir : bool = False ) -> Path :
369
- return self .cur_task_runs_path ("artifacts" , * dirs , mkdir = mkdir )
370
-
371
302
372
303
def get_workspace_path_from_config (dbgym_config_path : Path ) -> Path :
373
304
"""
0 commit comments