Skip to content

Fix Feast's Jupyter notebook code - #482

Merged
samhita-alla merged 3 commits into
masterfrom
feast-jupyter
Dec 9, 2021
Merged

samhita-alla merged 3 commits into
masterfrom
feast-jupyter

Conversation

@samhita-alla

Copy link
Copy Markdown
Contributor

Signed-off-by: Samhita Alla aallasamhita@gmail.com

  • Jupyter notebook works now; included minio environment variables
  • Bumped Feast version to 0.15 (will remove proto-plus dependency once 0.16 is out)

Signed-off-by: Samhita Alla <aallasamhita@gmail.com>
"from feast_dataobjects import FeatureStore\n",
"fs = exe.raw_outputs.get('o0', FeatureStore)\n",
"model = exe.outputs['o1']"
"fs = synced_execution.outputs['o0']\n",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work? How can it get the right thing

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't get you. Why shouldn't it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you mean to ask if the output is a FeatureStore data class with all the methods within it accessible, then no, it isn't precisely so. Hence, what I am doing is, accessing the config and creating a FeatureStore out of it.

import os

from feast_workflow import predict, FEAST_FEATURES
from feast_dataobjects import FeatureStore

os.environ["FLYTE_AWS_ENDPOINT"] = os.environ["FEAST_S3_ENDPOINT_URL"] = "http://localhost:30084/"
os.environ["FLYTE_AWS_ACCESS_KEY_ID"] = os.environ["AWS_ACCESS_KEY_ID"] = "minio"
os.environ["FLYTE_AWS_SECRET_ACCESS_KEY"] = os.environ["AWS_SECRET_ACCESS_KEY"] = "miniostorage"

inference_point = FeatureStore(fs.config).get_online_features(FEAST_FEATURES, [{"Hospital Number": "533738"}])
inference_point

Does this not look okay? I tried running the code with raw_outputs and this is what I see:

AttributeError: 'FlyteWorkflowExecution' object has no attribute 'raw_outputs'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh ya I had hacked that method, I think there is a better method now

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kumare3 we haven't merged that PR yet, so we can't get "raw_outputs" now.
flyteorg/flytekit#675
I think that PR is ready to be merged after resolving the merge conflict.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pingsutw, can you please merge flyteorg/flytekit#675? I think @kumare3 wants you to finalize, clean up the code, and merge the PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kumare3, code is working now. Can we merge this PR?

Signed-off-by: Samhita Alla <aallasamhita@gmail.com>
@samhita-alla
samhita-alla requested a review from kumare3 November 15, 2021 04:07
Signed-off-by: Samhita Alla <aallasamhita@gmail.com>
@samhita-alla
samhita-alla merged commit 6874282 into master Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants