diff --git a/orchestrator/modules/operators/collections.py b/orchestrator/modules/operators/collections.py index 5de2954e0..d190ba16d 100644 --- a/orchestrator/modules/operators/collections.py +++ b/orchestrator/modules/operators/collections.py @@ -376,8 +376,6 @@ def wrapper( def load_operators() -> None: from importlib.metadata import entry_points - import orchestrator.modules.operators.randomwalk # noqa: F401 - for operator_plugin in entry_points(group="ado.operators"): try: operator_plugin.load() diff --git a/plugins/operators/trim/src/trim/operator.py b/plugins/operators/trim/src/trim/operator.py index 653d36606..f4ad7a2ae 100644 --- a/plugins/operators/trim/src/trim/operator.py +++ b/plugins/operators/trim/src/trim/operator.py @@ -54,8 +54,6 @@ def trim( Returns: OperationOutput containing the operation resources and metadata """ - # Lazy import to avoid circular import issues during plugin loading - import orchestrator.modules.operators.randomwalk # noqa: F401 — registers explore.random_walk from orchestrator.modules.operators.collections import characterize, explore from orchestrator.modules.operators.randomwalk import ( CustomSamplerConfiguration, diff --git a/pyproject.toml b/pyproject.toml index ee5fb98cc..35229762d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,6 +47,9 @@ Repository = "https://github.com/IBM/ado" ado = "orchestrator.cli.core.cli:app" run_experiment = "orchestrator.utilities.run_experiment:main" +[project.entry-points."ado.operators"] +randomwalk = "orchestrator.modules.operators.randomwalk" + [dependency-groups] dev = [ "black>=25.1.0",