Skip to content
This repository was archived by the owner on Jan 8, 2025. It is now read-only.

Fixed no model id issue. #296

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fixed no model id issue.
toddroper committed Jul 31, 2023
commit ffbccdc150808b68b30c3ecaa03c49fd862f6595
13 changes: 9 additions & 4 deletions dev/tools/copy_project.py
Original file line number Diff line number Diff line change
@@ -236,9 +236,10 @@ def _process_workflow_nodes(self, nodes: list, workflow_id: str):
node["state"]["datasetId"]
]
elif op == "ModelOperation":
node_obj["state"]["modelId"] = self.id_mapper["models"][
node["state"]["modelId"]
]
if "state" in node and "modelId" in node["state"]:
node_obj["state"]["modelId"] = self.id_mapper["models"][
node["state"]["modelId"]
]
else:
print(f"{op} is not currently supported.")
updated_nodes.append(node_obj)
@@ -261,7 +262,11 @@ def _process_workflow_models(self, models: list):
Method processes the workflow model objects to extract configurations.
"""
for model in models:
new_model_id = self.id_mapper["models"][model["state"]["modelId"]]
model_state = model["state"] if "state" in model else None
if "modelId" in model_state:
new_model_id = self.id_mapper["models"][model_state["modelId"]]
else:
new_model_id = None

# Currently no projects I have looked at have model inputs. - Todd R. July 27, 2023
if len(model["inputs"]):