bored-megabyte-53307
12/12/2023, 10:31 PMray library to work with metaflow on apple silicon? I get the error message
nothing provides requested ray-tune 2.3.0
when attempting to include "ray-tune": "2.3.0", in the @conda_base decorator with PYTHON_VERSION = "3.10.13". I am able to successfully construct a conda python 3.10.13 environment with ray-tune 2.3.0dry-beach-38304
12/12/2023, 11:34 PMcrooked-jordan-29960
12/12/2023, 11:35 PMfrom metaflow import FlowSpec, step, conda_base
@conda_base(
python='3.10.13',
libraries={
'ray-tune': '2.3.0'
}
)
class RayAppleSiliconSmokeTest(FlowSpec):
@step
def start(self):
import ray
ray.init()
self.next(self.end)
@step
def end(self):
pass
if __name__ == '__main__':
RayAppleSiliconSmokeTest()bored-megabyte-53307
12/13/2023, 8:30 PMTRAINING_PACKAGES = {
"pandas": "2.1.1",
"pyarrow": "11.0.0",
"numpy": "1.26.0",
"s3fs": "2023.4.0",
"transformers": "4.32.1",
"datasets": "2.14.6",
"pytorch::pytorch": "2.1.1",
"accelerate": "0.24.1",
"conda-forge::hyperopt": "0.2.7",
"ray-tune": "2.3.0",
}
PYTHON_VERSION = "3.10.13"
@project(name="my_project")
@conda_base(packages=TRAINING_PACKAGES, python=PYTHON_VERSION)bored-megabyte-53307
12/13/2023, 8:55 PM(py3.10) (base) cearl@cearl-MacBook-Pro % python --version
Python 3.10.13
(py3.10) (base) cearl@cearl-MacBook-Pro % python src/extraction/smoke_test_flow.py --environment=conda run
Metaflow 2.10.8 executing RayAppleSiliconSmokeTest for user:cearl
Validating your flow...
The graph looks good!
Running pylint...
Pylint not found, so extra checks are disabled.
Bootstrapping virtual environment(s) ...
Micromamba ran into an error while setting up environment:
command '/Users/cearl/.metaflowconfig/micromamba/bin/micromamba create --yes --quiet --dry-run --no-extra-safety-checks --repodata-ttl=86400 --retry-clean-cache --prefix=/var/folders/0r/h_wgmt5j18z8t37d0kg2tr5c0000gn/T/tmpck71h5oq/prefix --channel=conda-forge requests==>=2.21.0 boto3==>=1.14.0 ray-tune==2.3.0 python==3.10.13' returned error (1)
nothing provides requested ray-tune 2.3.0crooked-jordan-29960
12/13/2023, 9:11 PMmicromamba create --yes --quiet --dry-run --no-extra-safety-checks --repodata-ttl=86400 --retry-clean-cache --prefix=/var/folders/0r/h_wgmt5j18z8t37d0kg2tr5c0000gn/T/tmpck71h5oq/prefix --channel=conda-forge ray-tune==2.3.0 python==3.10.13bored-megabyte-53307
12/13/2023, 9:12 PMbored-megabyte-53307
12/13/2023, 9:27 PM(try-ray-tune) cearl@cearl-MacBook-Pro % micromamba create --yes --quiet --dry-run --no-extra-safety-checks --repodata-ttl=86400 --retry-clean-cache --prefix=/var/folders/0r/h_wgmt5j18z8t37d0kg2tr5c0000gn/T/tmpck71h5oq/prefix --channel=conda-forge ray-tune==2.3.0 python==3.10.13
error libmamba Could not solve for environment specs
The following package could not be installed
└─ ray-tune 2.3.0 does not exist (perhaps a typo or a missing channel).
error libmamba Could not solve for environment specs
The following package could not be installed
└─ ray-tune 2.3.0 does not exist (perhaps a typo or a missing channel).
critical libmamba Could not solve for environment specs
(try-ray-tune) cearl@cearl-MacBook-Pro address_extraction % micromamba --version
1.5.3bored-megabyte-53307
12/13/2023, 9:30 PMbored-megabyte-53307
12/13/2023, 9:41 PMcrooked-jordan-29960
12/13/2023, 9:42 PMdry-beach-38304
12/13/2023, 9:43 PMbored-megabyte-53307
12/13/2023, 10:09 PMfrom metaflow import FlowSpec, step, pypi
class RayAppleSiliconSmokeTest(FlowSpec):
@pypi(python="3.10.13", packages={"ray-tune": "2.3.0"})
@step
def start(self):
import ray
ray.init()
self.next(self.end)
@step
def end(self):
pass
if __name__ == "__main__":
RayAppleSiliconSmokeTest()
Metaflow 2.10.8 executing RayAppleSiliconSmokeTest for user:cearl
Validating your flow...
The graph looks good!
Running pylint...
Pylint not found, so extra checks are disabled.
Bootstrapping virtual environment(s) ...
Pip ran into an error while setting up environment:
ERROR: Could not find a version that satisfies the requirement ray-tune==2.3.0 (from versions: none)
ERROR: No matching distribution found for ray-tune==2.3.0dry-beach-38304
12/13/2023, 10:29 PMray[tune]. I don’t know if it makes a difference.dry-beach-38304
12/13/2023, 10:32 PMray-tune
• for pypi: package is ray[tune]
For both, you can also try: https://docs.metaflow.org/scaling/dependencies/libraries#bleeding-edge-versions-of-the-decorators if it doesn’t work. It may not work but you will get more detail with METAFLOW_DEBUG_CONDA=1 as an env var which can help debug. The pypi path of both decorators is similar so I wouldn’t expect much difference there but it may help with the conda version.bored-megabyte-53307
12/13/2023, 10:32 PMVirtual environment(s) bootstrapped!
Woot!dry-beach-38304
12/13/2023, 10:32 PMbored-megabyte-53307
12/13/2023, 10:34 PMbored-megabyte-53307
12/13/2023, 10:34 PMdry-beach-38304
12/13/2023, 10:51 PMbored-megabyte-53307
12/13/2023, 11:27 PMdry-beach-38304
12/14/2023, 10:01 AMbored-megabyte-53307
12/14/2023, 6:39 PMdry-beach-38304
12/14/2023, 6:45 PMbored-megabyte-53307
12/14/2023, 8:10 PMmy-local-lib-0.1.0-py3-none-any.whl file that I wanted to include via decorators & that I've loaded bleeding edge. What syntax would you suggest?dry-beach-38304
12/14/2023, 8:23 PM@pypi(packages={"/root/flows/conda_tests/my-local-lib-0.1.0-py3-none-any.whl": ""}) should work (just tried it on a trivial example)dry-beach-38304
12/14/2023, 8:24 PMbored-megabyte-53307
12/14/2023, 9:44 PM