This PR introduces src/model_locator.py to resolve model file paths from env vars in a better way.
I encountered problems because not every Python file does the is-in-dev-container check and therefore fails in some environments.
To avoid further headaches, this model_locator.py is the single source of truth when resolving the model file paths.
The model paths can now be resolved using model_locator.labeling() or model_locator.classification().
Further, this PR changes the behavior for the DEV_CONTAINER env.
The new behavior is as follows:
If .env file and the targeted env exist, it will use it directly
Otherwise, _DEV will be appended to the env name and then resolved
This change in behavior makes the DEV_CONTAINER env obsolete and should be removed from the codebase in further PRs.
This PR introduces
src/model_locator.py
to resolve model file paths from env vars in a better way. I encountered problems because not every Python file does the is-in-dev-container check and therefore fails in some environments. To avoid further headaches, thismodel_locator.py
is the single source of truth when resolving the model file paths.The model paths can now be resolved using
model_locator.labeling()
ormodel_locator.classification()
.Further, this PR changes the behavior for the
DEV_CONTAINER
env. The new behavior is as follows:.env
file and the targeted env exist, it will use it directly_DEV
will be appended to the env name and then resolvedThis change in behavior makes the
DEV_CONTAINER
env obsolete and should be removed from the codebase in further PRs.