Fix Feast's Jupyter notebook code - #482
Conversation
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", |
There was a problem hiding this comment.
Does this work? How can it get the right thing
There was a problem hiding this comment.
I didn't get you. Why shouldn't it?
There was a problem hiding this comment.
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_pointDoes 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.
Ohh ya I had hacked that method, I think there is a better method now
There was a problem hiding this comment.
@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.
@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.
@kumare3, code is working now. Can we merge this PR?
Signed-off-by: Samhita Alla <aallasamhita@gmail.com>
Signed-off-by: Samhita Alla aallasamhita@gmail.com
proto-plusdependency once 0.16 is out)