nutritious-magazine-38839
02/26/2025, 8:51 PMStepDecorator and followed the guides from metaflow-extensions-template, also looked at examples in metaflow-nflx-extensions, but something is still missing as the registration fails with the following error message:
metaflow_extensions: Found packages present at {'/home/daroczig/.local/share/virtualenvs/sc-resource-tracker-WkxmM6V1/lib/python3.13/site-packages/metaflow_extensions'}
metaflow_extensions: Found extension package 'resource-tracker' at '/home/daroczig/.local/share/virtualenvs/sc-resource-tracker-WkxmM6V1/lib/python3.13/site-packages/metaflow_extensions'...
metaflow_extensions: Top-level 'resource_tracker' extends 'plugins' with config 'None'
metaflow_extensions: Top-level 'resource_tracker' found config file 'metaflow_extensions.resource_tracker.plugins.mfextinit_resource_tracker'
Traceback (most recent call last):
File "/home/daroczig/projects/sc-resource-tracker/examples/metaflow/1-single-step.py", line 4, in <module>
from metaflow import Flow, FlowSpec, step
File "/home/daroczig/.local/share/virtualenvs/sc-resource-tracker-WkxmM6V1/lib/python3.13/site-packages/metaflow/__init__.py", line 48, in <module>
from metaflow.extension_support import (
...<7 lines>...
)
File "/home/daroczig/.local/share/virtualenvs/sc-resource-tracker-WkxmM6V1/lib/python3.13/site-packages/metaflow/extension_support/__init__.py", line 890, in <module>
_all_packages, _pkgs_per_extension_point = _get_extension_packages()
~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/daroczig/.local/share/virtualenvs/sc-resource-tracker-WkxmM6V1/lib/python3.13/site-packages/metaflow/extension_support/__init__.py", line 666, in _get_extension_packages
raise RuntimeError(
...<2 lines>...
)
RuntimeError: Unresolved dependencies in 'metaflow_extensions': 'resource-tracker'
could someone please take a look at suggest what am I doing wrong? https://github.com/SpareCores/resource-tracker/tree/main/src/metaflow_extensions/resource_tracker/pluginsrhythmic-controller-77489
02/26/2025, 9:24 PMMETAFLOW_DEBUG_EXT=1 and then show the outputs here?nutritious-magazine-38839
02/26/2025, 9:26 PMMETAFLOW_DEBUG_EXT=1rhythmic-controller-77489
02/26/2025, 9:27 PMnutritious-magazine-38839
02/26/2025, 9:28 PMexamples/metaflow folder if you may have time to reproduce the problemrhythmic-controller-77489
02/26/2025, 10:07 PMmfextinit_track_resources.py
track_resources
āāā __init__.py
āāā resource_tracker
ā āāā __init__.py
ā āāā __pycache__
ā ā āāā __init__.cpython-310.pyc
ā ā āāā tracker.cpython-310.pyc
ā āāā tracker.py
āāā track_resources_decorator.py
mfextinit_resource_tracker.py
STEP_DECORATORS_DESC = [
("track_resources", ".track_resources.track_resources_decorator.ResourceTrackerDecorator"),
]
And finally moved this import to inside the function, and it seems to have fixed the issue for me.rhythmic-controller-77489
02/26/2025, 10:08 PMnutritious-magazine-38839
02/26/2025, 10:47 PMmetaflow_extensions
āāā resource_tracker
āāā plugins
āāā mfextinit_resource_tracker.py
āāā __pycache__
ā āāā mfextinit_resource_tracker.cpython-313.pyc
āāā track_resources
āāā __init__.py
āāā __pycache__
ā āāā __init__.cpython-313.pyc
ā āāā track_resources_decorator.cpython-313.pyc
āāā resource_tracker
ā āāā __init__.py
ā āāā __pycache__
ā ā āāā __init__.cpython-313.pyc
ā ā āāā tracker.cpython-313.pyc
ā āāā tracker.py
āāā track_resources_decorator.py
also got rid of the symlink (as per above), and updated mfextinit_resource_tracker.py
but still getting the same error when running METAFLOW_DEBUG_EXT=1 python 1-single-step.py run in the examples/metaflow folder šnutritious-magazine-38839
02/26/2025, 10:48 PMrhythmic-controller-77489
02/26/2025, 11:04 PMfrom metaflow import track_resourcesnutritious-magazine-38839
02/26/2025, 11:15 PMrhythmic-controller-77489
02/26/2025, 11:19 PMnutritious-magazine-38839
02/27/2025, 12:38 PM[project.optional-dependencies]
metaflow = ["metaflow"]
all = ["resource-tracker[metaflow]"]
sounds like a metaflow extension pkg should not have optional dependencies?nutritious-magazine-38839
02/27/2025, 12:39 PMall = ["resource-tracker[metaflow]"]
fixes the problemrhythmic-controller-77489
02/27/2025, 9:44 PMnutritious-magazine-38839
02/27/2025, 10:06 PM