You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interestingly, method _create_configuration_map() of class BytewaxMaterializationEngine uses yaml.dump() instead of yaml.safe_dump() to write the config in the first place:
# ...def_create_configuration_map(self, job_id, paths, feature_view, namespace):
"""Create a Kubernetes configmap for this job"""feature_store_configuration=yaml.dump(self.repo_config.dict())
# ...
When I tried to replace yaml.dump by yaml.safe_dump() I got the following error:
yaml.representer.RepresenterError: ('cannot represent an object', <RedisType.redis: 'redis'>)
It appears that yaml.SafeDumper and yaml.SafeLoader cannot find the appropriate representers and/or constructors for RedisType.redis and path.PosixPath. Perhaps those objects do not have corresponding to_yaml() and from_yaml() methods.
withopen("/var/feast/feature_store.yaml") asf:
#feast_config = yaml.safe_load(f)feast_config=yaml.load(f, Loader=yaml.Loader)
withopen("/var/feast/bytewax_materialization_config.yaml") asb:
# I did not test if yaml.safe_load() works for the bytewax config, but just went ahead and replaced it too #bytewax_config = yaml.safe_load(b)bytewax_config=yaml.load(b, Loader=yaml.Loader)
The text was updated successfully, but these errors were encountered:
Expected Behavior
Loading the
feature_store.yaml
file from within a Bytewax pod should work.Current Behavior
yaml.safe_load()
raises an error while trying to reconstruct the object below:The error occurs while running materialization using Bytewax at the point where the
feature_store.yaml
is loaded. The code where this happens is in sdk/python/feast/infra/materialization/contrib/bytewax/dataflow.py. Below is an excerpt:The exact message is as below:
Interestingly, method _create_configuration_map() of class
BytewaxMaterializationEngine
usesyaml.dump()
instead ofyaml.safe_dump()
to write the config in the first place:When I tried to replace
yaml.dump
byyaml.safe_dump()
I got the following error:It appears that
yaml.SafeDumper
andyaml.SafeLoader
cannot find the appropriate representers and/or constructors forRedisType.redis
andpath.PosixPath
. Perhaps those objects do not have correspondingto_yaml()
andfrom_yaml()
methods.Steps to reproduce
Run the materialization:
Give it some time and check the pods:
Then upon inspecting the logs, I see the error from above:
Specifications
Possible Solution
I was able to make it work by modifying sdk/python/feast/infra/materialization/contrib/bytewax/dataflow.py to use yaml.load() instead of
yaml.safe_load()
and rebuilding the Bytewax docker image:The text was updated successfully, but these errors were encountered: