Easy way to override asset for local development?
Closed this issue · 2 comments
Is there an easy way to override an asset in a config specifically for development / non-production purposes?
Ideally, a way to do this on the local machine by copying an existing config, and setting the asset path to a local directory. Even if before it pointed to a remote path.
For example, maybe support for asset: "file:///test/path/to/asset"
which then bypasses the asset resolver? Could potentially be enabled through an environment variable, like MODELKIT_ALLOW_DEBUG_ASSETS=1
Closing, missed this:
model_name:
asset: asset/name:1.0/[file.ext]
model_settings:
# including this line will override the above (the above syntax must still be valid, otherwise it causes a crash)
asset_path: /local/path/to/asset/file.ext
modelkit/modelkit/core/library.py
Lines 291 to 299 in 074bddf
It is also possible to specify an environment variable to override the file or version based on the model name:
modelkit/modelkit/core/library.py
Lines 303 to 306 in 074bddf
modelkit/modelkit/core/library.py
Lines 317 to 320 in 074bddf