Some API and CLI commands like
mlem config require this execution context. But
in general, MLEM can work with
.mlem metafiles anywhere.
A common place to initialize MLEM is a data science Git repository. MLEM projects help you better structure and easily address existing data artifacts (especially ML models). And Git allows you to version MLEM objects and configuration options along with code.
Everywhere you need to reference any saved MLEM Object, you can do so by providing those arguments:
path is path to object
project is the project dir to look in. This is optional
rev is revision of the project, also optional
fs (API-only) fsspec FileSystem implementation to use
All of those are saved in
location field of a MLEM Object.
If you didn't provide
rev, MLEM will try to deduce them from
fs is also can be deduced from
Here is the example of how the same object can be referenced
path = models/rf, project = https://github.com/iterative/example-mlem-get-started, rev=main -
using the full path inside MLEM project
path = https://github.com/iterative/example-mlem-get-started/tree/main/models/rf -
everything could be provided via path (path format could differ for different
path = https://github.com/iterative/example-mlem-get-started/models/rf -
also can omit
main is default.
path = models/rf, fs = GithubFileSystem(org="iterative", repo="example-mlem-get-started", sha="main") -
API only, can provide pre-configured fs.