Skip to content

Commit d2a6c27

Browse files
sudohainguyentqtensor
authored andcommitted
fix: Bytewax engine create configmap from object (feast-dev#3821)
fix: bytewax engine create configmap from object Signed-off-by: Hai Nguyen <quanghai.ng1512@gmail.com>
1 parent 94299be commit d2a6c27

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

sdk/python/feast/infra/materialization/contrib/bytewax/bytewax_materialization_engine.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def __init__(
111111
self.offline_store = offline_store
112112
self.online_store = online_store
113113

114+
# TODO: Configure k8s here
114115
k8s_config.load_config()
115116

116117
self.k8s_client = client.api_client.ApiClient()
@@ -298,9 +299,6 @@ def _create_kubernetes_job(self, job_id, paths, feature_view):
298299
len(paths), # Create a pod for each parquet file
299300
self.batch_engine_config.env,
300301
)
301-
logger.info(
302-
f"Created job `dataflow-{job_id}` on namespace `{self.namespace}`"
303-
)
304302
except FailToCreateError as failures:
305303
return BytewaxMaterializationJob(job_id, self.namespace, error=failures)
306304

@@ -309,11 +307,7 @@ def _create_kubernetes_job(self, job_id, paths, feature_view):
309307
def _create_configuration_map(self, job_id, paths, feature_view, namespace):
310308
"""Create a Kubernetes configmap for this job"""
311309

312-
if self.repo_config.repo_path:
313-
feature_store_path = get_default_yaml_file_path(self.repo_config.repo_path)
314-
feature_store_configuration = feature_store_path.read_text()
315-
else:
316-
feature_store_configuration = yaml.dump(self.repo_config.dict())
310+
feature_store_configuration = yaml.dump(self.repo_config.dict())
317311

318312
materialization_config = yaml.dump(
319313
{"paths": paths, "feature_view": feature_view.name}
@@ -364,7 +358,7 @@ def _create_job_definition(self, job_id, namespace, pods, env, index_offset=0):
364358
},
365359
{
366360
"name": "BYTEWAX_REPLICAS",
367-
"value": "1",
361+
"value": f"{pods}",
368362
},
369363
{
370364
"name": "BYTEWAX_KEEP_CONTAINER_ALIVE",

0 commit comments

Comments
 (0)