You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.
Right now for load logic is the following: we have mlem.api.load function. Args include path, repo, rev.
If you pass repo, then we suppose model is located in a repo.
If you don't pass repo, then we suppose path is a fsspec-compatible path.
When this is decided, we first try to check whether we can just read the model by path, regardless of do we have .mlem folder somewhere or not. Path may be to a link file or model folder, it doesn't matter. If this fails, we assume that the path may be a link. We search for .mlem directory starting from the given path and going up, and when it is found, we treat all what's left as link name.
E.g., if we try to load("examples/dvc-pipeline/latest"), we will find examples/dvc-pipeline/.mlem folder and interpret latest as a link name. (We probably need to just interpret last part of URI as a model name, cause I don't think we want to support links having slash in names, like nn/latest).
Then we search .mlem directory for all objects with the same name (called latest in the example above) and raise an error if we found more or less than one. Otherwise we just load it.
@mike0sv, does this sound ok or something is missing?
aguschin
changed the title
Refactor "name to actual path" resolution
Load/save models to GH and fsspec paths
Sep 14, 2021
When you do
mlem.api.save(model, name)
,name
can point to local fs, GitHub repo or other remote storages like s3, etc.We need to
name
The text was updated successfully, but these errors were encountered: