我在MLRun中遇到了这个错误,在摄取FeatureSet的值时:
> 2023-05-20 13:11:40,669 [info] loaded project my-project7xx from ./ and saved in MLRun DB
> 2023-05-20 13:11:53,640 [error] For {'_1': 374, '_2': 886, '_3': 989, '_4': 191, '_5': 49, '_6': 658, '_7': 994, '_8': 857, '_9': 217, '_10': 220} value of key _fn0 is None
> 2023-05-20 13:11:53,640 [error] For {'_1': 642, '_2': 688, '_3': 438, '_4': 599, '_5': 176, '_6': 562, '_7': 708, '_8': 444, '_9': 525, '_10': 54} value of key _fn0 is None
当我调用这部分代码时:
import mlrun
import mlrun.feature_store as fs
...
project = mlrun.get_or_create_project(project_name, context='./', user_project=False)
feature_set = fstore.FeatureSet(feature_name, entities=[fstore.Entity("_fn0",
value_type=mlrun.data_types.data_types.ValueType.INT32,
description='fn0 description'),
fstore.Entity("_fn1",
value_type=mlrun.data_types.data_types.ValueType.INT32,
description='fn1 description')],
engine="storey")
feature_set.save()
...
df = pandas.DataFrame(numpy.random.randint(low=0, high=1000,
size=(100, 10)), # rows, columns
columns=[f"_fn{i}" for i in range(10)])
fs.ingest(feature_set, df)
你知道怎么解决这个问题吗?
1条答案
按热度按时间t5fffqht1#
问题出在实体名称上,不能使用缩写
_
。必须对FeatureSet中的名称实体/要素的定义进行限制。参见link到原始文档。你的案例看这里: