lamindb.core.FeatureManager¶
- class lamindb.core.FeatureManager(host)¶
Bases:
object
Feature manager.
Class methods¶
Methods¶
- add_feature_set(schema, slot)¶
Annotate artifact with a schema.
- Parameters:
schema (
Schema
) –Schema
A schema record.slot (
str
) –str
The slot that marks where the schema is stored in the artifact.
- Return type:
None
- add_schema(schema, slot)¶
Annotate artifact with a schema.
- Parameters:
schema (
Schema
) –Schema
A schema record.slot (
str
) –str
The slot that marks where the schema is stored in the artifact.
- Return type:
None
- add_values(values, feature_field=FieldAttr(Feature.name), str_as_ulabel=True)¶
Curate artifact with features & values.
- Parameters:
values (
dict
[str
,str
|int
|float
|bool
]) – A dictionary of keys (features) & values (labels, numbers, booleans).feature_field (
DeferredAttribute
, default:FieldAttr(Feature.name)
) – The field of a reference registry to map keys of the dictionary.str_as_ulabel (
bool
, default:True
) – Whether to interpret string values as ulabels.
- Return type:
None
- get_values()¶
Get feature values as a dictionary.
- Return type:
dict
[str
,Any
]