-
Notifications
You must be signed in to change notification settings - Fork 121
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
Conversation
Signed-off-by: Samhita Alla <[email protected]>
cookbook/case_studies/feature_engineering/feast_integration/Feast_Flyte_Demo.ipynb
Outdated
Show resolved
Hide resolved
"from feast_dataobjects import FeatureStore\n", | ||
"fs = exe.raw_outputs.get('o0', FeatureStore)\n", | ||
"model = exe.outputs['o1']" | ||
"fs = synced_execution.outputs['o0']\n", |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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'
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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]>
Signed-off-by: Samhita Alla <[email protected]>
Signed-off-by: Samhita Alla [email protected]
proto-plus
dependency once 0.16 is out)