Skip to content

Commit

Permalink
Release new version
Browse files Browse the repository at this point in the history
  • Loading branch information
Mats E. Mollestad committed Oct 13, 2023
1 parent 9f1beee commit c8a0ff0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

Aligned helps improving ML system visibility, while also reducing technical, and data debt, as described in [Sculley et al. [2015]](https://papers.nips.cc/paper/2015/file/86df7dcfd896fcaf2674f757a2463eba-Paper.pdf).

## Docs

Check out the [Aligned Docs](https://www.aligned.codes), but keep in mind that they are still work in progress.

---

Want to look at examples of how to use `aligned`?
View the [`MatsMoll/aligned-example` repo](https://github.com/MatsMoll/aligned-example).

Expand Down
4 changes: 3 additions & 1 deletion aligned/feature_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ class FeatureSource:
def features_for(self, facts: RetrivalJob, request: FeatureRequest) -> RetrivalJob:
raise NotImplementedError()

async def freshness_for(self, locations: list[FeatureLocation]) -> dict[FeatureLocation, datetime]:
async def freshness_for(
self, locations: dict[FeatureLocation, EventTimestamp]
) -> dict[FeatureLocation, datetime]:
raise NotImplementedError()


Expand Down
11 changes: 11 additions & 0 deletions aligned/feature_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,17 @@ def features_for(self, entities: dict[str, list] | RetrivalJob) -> RetrivalJob:

return job.filter(request.features_to_include)

async def freshness(self) -> dict[FeatureLocation, datetime]:
from aligned.schemas.feature import EventTimestamp

locs: dict[FeatureLocation, EventTimestamp] = {}

for req in self.request().needed_requests:
if req.event_timestamp:
locs[req.location]

return await self.store.feature_source.freshness_for(locs)

def with_labels(self) -> SupervisedModelFeatureStore:
"""Will also load the labels for the model
Expand Down
1 change: 1 addition & 0 deletions aligned/feature_view/feature_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ def compile_with_metadata(feature_view: Any, metadata: FeatureViewMetadata) -> C
event_timestamp=None,
stream_data_source=metadata.stream_source,
application_source=metadata.application_source,
staging_source=metadata.staging_source,
indexes=[],
)
aggregations: list[FeatureFactory] = []
Expand Down

0 comments on commit c8a0ff0

Please sign in to comment.