sparse-dress-4861
08/24/2024, 7:06 PM@pypi on a linux machine. We are using the linux machine to launch flows programmatically to a batch cluster cc @chilly-quill-46782sparse-dress-4861
08/24/2024, 7:08 PM$ python metaflow/hello_full_example_flow.py --environment=pypi run
Metaflow 2.12.15+netflix-ext(1.2.2) executing FullExampleFlow for user:bibek
Validating your flow...
The graph looks good!
Running pylint...
Pylint not found, so extra checks are disabled.
Incompatible environment:
The @pypi decorator requires --environment=conda
After I use --environment=conda, I get this:
$ python metaflow/hello_full_example_flow.py --environment=conda run
Metaflow 2.12.15+netflix-ext(1.2.2) executing FullExampleFlow for user:bibek
Validating your flow...
The graph looks good!
Running pylint...
Pylint not found, so extra checks are disabled.
Bootstrapping Conda environment... (this could take a few minutes)
Incompatible environment:
No mamba binary found
After I installed mamba, I got this:
$ python metaflow/hello_full_example_flow.py --environment=conda run
Metaflow 2.12.15+netflix-ext(1.2.2) executing FullExampleFlow for user:bibek
Validating your flow...
The graph looks good!
Running pylint...
Pylint not found, so extra checks are disabled.
Bootstrapping Conda environment... (this could take a few minutes)
No STDOUT
Pretty-printed STDERR:
usage: mamba [-h] [--version] [--slow SLOW] [--enable-coverage]
[--coverage-file COVERAGE_FILE] [--format FORMAT] [--no-color]
[--tags TAGS]
[specs ...]
mamba: error: unrecognized arguments: --json
Conda ran into an error while setting up environment.:
Conda command '['/home/bibek/envs/torch/bin/mamba', 'info', '--json']' returned error (2); see pretty-printed error abovesparse-dress-4861
08/24/2024, 7:09 PM@pypi decorator need --environment=condasquare-wire-39606
08/26/2024, 3:38 PM--environment=conda - behind the scenes metaflow installs the packages in an isolated virtual environment which is generated through mamba/conda.dry-beach-38304
08/26/2024, 3:54 PMdry-beach-38304
08/26/2024, 4:13 PMdry-beach-38304
08/26/2024, 4:13 PMdry-beach-38304
08/26/2024, 4:14 PMdry-beach-38304
08/26/2024, 4:14 PMsparse-dress-4861
08/26/2024, 4:14 PMdry-beach-38304
08/26/2024, 4:14 PMdry-beach-38304
08/26/2024, 4:14 PM@pypidry-beach-38304
08/26/2024, 4:15 PMdry-beach-38304
08/26/2024, 4:15 PMdry-beach-38304
08/26/2024, 4:15 PMdry-beach-38304
08/26/2024, 4:15 PMdry-beach-38304
08/26/2024, 4:15 PMsparse-dress-4861
08/26/2024, 4:17 PMsparse-dress-4861
08/26/2024, 4:19 PMchilly-quill-46782
08/26/2024, 7:40 PMThe @conda decorator requires --environment=conda. But when i activated the conda environment, did pip install metaflow inside that environment, then the flow was able to run.dry-beach-38304
08/26/2024, 7:41 PMwhich mamba works, it should be all good.chilly-quill-46782
08/26/2024, 7:45 PMwhich mamba works, but I when I run the exact same command, I get the error: The @pypi decorator requires --environment=condadry-beach-38304
08/26/2024, 7:46 PMchilly-quill-46782
08/26/2024, 7:46 PMpython metaflow/example_flow.py --environment=pypi rundry-beach-38304
08/26/2024, 7:48 PM--environment=conda instead of --environment=pypi. But rest assured, they are literal synonyms in the mainline work: https://github.com/Netflix/metaflow/blob/master/metaflow/plugins/pypi/pypi_environment.py#L4