Skip to content

Commit

Permalink
model IDs default labels
Browse files Browse the repository at this point in the history
  • Loading branch information
dilpath committed Mar 14, 2023
1 parent 2286198 commit 9fbbbdf
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions petab_select/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,16 +476,20 @@ def graph_iteration_layers(
VIRTUAL_INITIAL_MODEL, "Virtual\nInitial\nModel"
)

missing_labels = [
model.get_hash() for model in models if model.get_hash() not in labels
]
missing_labels += [
model.predecessor_model_hash
missing_labels = {
model.get_hash(): model.model_id
for model in models
if model.get_hash() not in labels
}
missing_labels2 = {
model.predecessor_model_hash: model.predecessor_model_hash
for model in models
if model.predecessor_model_hash not in labels
]
for label in missing_labels:
labels[label] = label
}
labels.update(missing_labels2)
labels.update(missing_labels)
# for label in missing_labels:
# labels[label] = label

default_draw_networkx_kwargs = {
'node_color': NORMAL_NODE_COLOR,
Expand Down

0 comments on commit 9fbbbdf

Please sign in to comment.