Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Feast's Jupyter notebook code #482

Merged
merged 3 commits into from
Dec 9, 2021
Merged

Fix Feast's Jupyter notebook code #482

merged 3 commits into from
Dec 9, 2021

Conversation

samhita-alla
Copy link
Contributor

Signed-off-by: Samhita Alla [email protected]

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

"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
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
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
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
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
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
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
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 <[email protected]>
@samhita-alla samhita-alla requested a review from kumare3 November 15, 2021 04:07
Signed-off-by: Samhita Alla <[email protected]>
@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