Skip to content

Commit

Permalink
Unique process models in process models discovery (lava-nc#277)
Browse files Browse the repository at this point in the history
* Unique process models in process models discovery

Signed-off-by: bamsumit <[email protected]>
  • Loading branch information
bamsumit authored Jul 22, 2022
1 parent 0658454 commit 2c35606
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/lava/magma/compiler/compiler_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,8 @@ def _find_proc_models(proc: AbstractProcess) \
import_module(proc_cls_mod)
class_ = getattr(proc_cls_mod,
proc_model.__name__)
proc_models.append(class_)
if class_ not in proc_models:
proc_models.append(class_)
except Exception:
warnings.warn(
f"Cannot import module '{module}' when searching "
Expand Down
1 change: 0 additions & 1 deletion src/lava/magma/core/run_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ def select(self,
-------
Selected ProcessModel class
"""

num_pm = len(proc_models)
# Case 0: No ProcessModels exist:
# ------------------------------
Expand Down

0 comments on commit 2c35606

Please sign in to comment.