Summary
deepretro.utils.az builds config paths with raw string concatenation against the repo root:
AZ_MODEL_CONFIG_PATH = f"{root_dir}/{os.getenv('AZ_MODEL_CONFIG_PATH')}"
AZ_MODELS_PATH = f"{root_dir}/{os.getenv('AZ_MODELS_PATH')}"
Affected code
Problems
- Absolute env-var paths are mangled.
- If
AZ_MODEL_CONFIG_PATH=/tmp/config.yml, the effective path becomes <repo-root>//tmp/config.yml.
- Unset env vars become literal
.../None paths.
- The path handling is inconsistent with normal user expectations for environment-provided file paths.
Why this matters
This makes valid external configurations fail unexpectedly, especially in CI, notebooks, or shared environments where configs live outside the repo.
Expected behavior
- Absolute env-var paths should be used as-is.
- Relative env-var paths can optionally be resolved against the project root.
- Missing env vars should stay missing and trigger a clear error later, not silently turn into
.../None.
Suggested direction
Use Path-based resolution with explicit handling for:
- unset values
- absolute paths
- relative paths
Summary
deepretro.utils.azbuilds config paths with raw string concatenation against the repo root:Affected code
deepretro/utils/az.pyProblems
AZ_MODEL_CONFIG_PATH=/tmp/config.yml, the effective path becomes<repo-root>//tmp/config.yml..../Nonepaths.Why this matters
This makes valid external configurations fail unexpectedly, especially in CI, notebooks, or shared environments where configs live outside the repo.
Expected behavior
.../None.Suggested direction
Use
Path-based resolution with explicit handling for: