[Priority] [Bug] removing hardcoded local file paths and standardizing them#97
[Priority] [Bug] removing hardcoded local file paths and standardizing them#97Varun-sai-500 wants to merge 24 commits intoyoxu515:mainfrom
Conversation
|
@z-x-yang Can you please review? |
|
Thanks — this PR is much smaller than #96 and the direction is reasonable, but I don’t think it is merge-ready yet because the new path resolution is currently incorrect. Main blockers:
So the current refactor would break config-driven training/eval by looking for datasets and pretrained encoder weights in the wrong locations. The Suggested fix: define a single repo root helper once, e.g. from |
|
fixed those issues, must be good by now @z-x-yang |
This PR modernizes configuration handling and data transformation utilities to improve compatibility, maintainability, and robustness across training and deployment pipelines.
Key Changes:
Path Handling & Configuration Refactor
Introduced BASE_DIR and standardized absolute path construction across configs
Replaced hardcoded relative paths with os.path.join + os.path.abspath
Refactored dynamic imports using f-strings
Consolidated directory structure initialization using a common ROOT
Updated logging paths:
DIR_TB_LOG now derives from DIR_LOG
Simplified directory creation with exist_ok=True
Model Configuration Improvements
Updated all MODEL_ENCODER_PRETRAIN paths to use absolute resolution
Ensured consistent path handling across all model configs
Reordered initialization where necessary to avoid dependency issues
Semantic Cleanup
Replaced sentinel values:
TRAIN_LONG_TERM_MEM_GAP = 9999 → None
TEST_LONG_TERM_MEM_GAP = 9999 → None
Improves clarity and avoids implicit magic-number behavior
Important:
This refactor actually solves a problem because normal running the file (without flags) and it will just take it from here, and these configs have those vos02, it's incredibly harder to debug, so standardized to dataset paths
One noticeable change is I have removed data_wd and VOS2 from path because it really doesn't belong the project repository, it's local, slipped into production.