Skip to content

Commit

Permalink
Merge pull request #15 from MatsMoll/matsei/fix-model-entity
Browse files Browse the repository at this point in the history
Matsei/fix model entity
  • Loading branch information
MatsMoll authored Oct 16, 2023
2 parents 2b12dc9 + 652a192 commit 667a9b1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions aligned/compiler/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from aligned.compiler.feature_factory import (
ClassificationLabel,
Entity,
EventTimestamp,
FeatureFactory,
FeatureReferencable,
Expand Down Expand Up @@ -230,6 +231,8 @@ class MyModel(ModelContract):
probability_features[feature_name] = probability_features.get(feature_name, set()).union(
{feature}
)
elif isinstance(feature, Entity):
inference_view.entities.add(feature.feature())
elif isinstance(feature, FeatureFactory):
inference_view.features.add(feature.feature())

Expand Down
6 changes: 4 additions & 2 deletions aligned/schemas/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ def request(self, name: str) -> RetrivalRequest:

def request_for(self, features: set[str], name: str) -> RetrivalRequest:
entities = self.entities
if self.model_version_column:
entities.add(self.model_version_column)

# if self.model_version_column:
# entities.add(self.model_version_column)

return RetrivalRequest(
name=name,
location=FeatureLocation.model(name),
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "aligned"
version = "0.0.28"
version = "0.0.29"
description = "A scalable feature store that makes it easy to align offline and online ML systems"
authors = ["Mats E. Mollestad <mats@mollestad.no>"]
license = "Apache-2.0"
Expand Down

0 comments on commit 667a9b1

Please sign in to comment.