š DataChain Open-Source Release. Star us on !
MLEM Objects are instances of one of the subclasses of MlemObject
class. MLEM
is using extended pydantic functionality
to save and load them from files.
You can get MlemObject
instance if you use load_meta
API method instead of
simple load
.
See also MLEM Object API
Each MLEM Object has an object_type
field which determines the type of the
object. Specific types may have additional properties, but all MLEM Objects have
the following fields:
params
- arbitrary object with additional parameterslocation
- if the object is loaded, information about where it came fromYou can check out what methods MLEM Objects have in API Reference
These are the builtin types of MLEM Objects.
Represents an ML model, but can be generalized to any model or even any
"function" or any "transformation", thanks to callable
ModelType.
Base class: mlem.core.objects.MlemModel
Fields (in addition to inherited):
model_type
(lazy) -
ModelType, which is polymorphic
and holds metadata about model's framework, methods and io.artifacts
- a string-to-artifacts mapping.
Artifact
instances represent a
file stored somewhere (local/cloud/dvc cache etc.)requirements
- a list of
Requirement
instances, needed
to use that object in runtimeRepresent data, which can be used as an input to one of Model's methods.
Base class: mlem.core.objects.MlemData
Fields (in addition to inherited):
reader
(lazy) - DataReader -
how to read saved files and resulting dataset metadatadata_type
(transient) -
DataType
with dataset value and
metadata (available once data is read)artifacts
- a string-to-artifacts mapping.
Artifact
instances represent a
file stored somewhere (local/cloud/dvc cache etc.)requirements
- a list of
Requirement
instances, needed
to use that object in runtimeRepresents a link (pointer) to another MLEM Object. More on that here
Base class: mlem.core.objects.MlemLink
Fields (in addition to inherited):
path
- path to MLEM Objectproject
- location of MLEM Project with referenced objectrev
- revision of the objectlink_type
- type of the referenced objectSome of the MLEM ABCs
are also MLEM Objects: