From 3bb23ab5de7c9c45631bd8a234182f6e71ce1120 Mon Sep 17 00:00:00 2001 From: Akhilesh Halageri Date: Mon, 9 Dec 2024 22:11:01 +0000 Subject: [PATCH] feat: use mesh dir and dynamic dir from metadata --- workers/mesh_worker.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/workers/mesh_worker.py b/workers/mesh_worker.py index 2dd3dd34d..52864a89b 100644 --- a/workers/mesh_worker.py +++ b/workers/mesh_worker.py @@ -37,9 +37,12 @@ def callback(payload): ) try: - mesh_dir = cg.meta.dataset_info["mesh"] - mesh_meta = cg.meta.dataset_info["mesh_metadata"] - cv_unsharded_mesh_dir = mesh_meta.get("unsharded_mesh_dir", f"dynamic_{cg.graph_id}") + mesh_meta = cg.meta.custom_data["mesh"] + mesh_dir = mesh_meta["dir"] + layer = mesh_meta["max_layer"] + mip = mesh_meta["mip"] + err = mesh_meta["max_error"] + cv_unsharded_mesh_dir = mesh_meta.get("dynamic_mesh_dir", "dynamic") except KeyError: logging.warning(f"No metadata found for {cg.graph_id}; ignoring...") return @@ -48,15 +51,6 @@ def callback(payload): cg.meta.data_source.WATERSHED, mesh_dir, cv_unsharded_mesh_dir ) - try: - mesh_data = cg.meta.custom_data["mesh"] - layer = mesh_data["max_layer"] - mip = mesh_data["mip"] - err = mesh_data["max_error"] - except KeyError: - return - - logging.log(INFO_HIGH, f"remeshing {l2ids}; graph {table_id} operation {op_id}.") meshgen.remeshing( cg,