Skip to content

Commit

Permalink
Normalize the feature name upon features creation
Browse files Browse the repository at this point in the history
  • Loading branch information
jond01 committed Sep 28, 2023
1 parent 0161b27 commit 0315871
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mlrun/api/crud/model_monitoring/model_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ def _get_features(
features = []
if model.spec.inputs:
for feature in itertools.chain(model.spec.inputs, model.spec.outputs):
# feature_name =
name = mlrun.feature_store.api.norm_column_name(feature.name)
features.append(
mlrun.feature_store.Feature(
name=feature.name, value_type=feature.value_type
name=name, value_type=feature.value_type
)
)
# Check if features can be found within the feature vector
Expand All @@ -221,15 +221,17 @@ def _get_features(
fv = run_db.get_feature_vector(name=name, project=project, tag=tag)
for feature in fv.status.features:
if feature["name"] != fv.status.label_column:
name = mlrun.feature_store.api.norm_column_name(feature["name"])
features.append(
mlrun.feature_store.Feature(
name=feature["name"], value_type=feature["value_type"]
name=name, value_type=feature["value_type"]
)
)
else:
logger.warn(
"Could not find any features in the model object and in the Feature Vector"
)
logger.debug("Listed features", features=features)
return features

@staticmethod
Expand Down

0 comments on commit 0315871

Please sign in to comment.