great-garage-57644
09/30/2024, 2:08 PM@pypi_base
as decorator for managing the environments. Setting following env variables CONDA_PYPI_DEPENDENCY_RESOLVER=pip METAFLOW_CONDA_DEPENDENCY_RESOLVER=micromamba CONDA_DEPENDENCY_RESOLVER=micromamba CONDA_CHANNEL_PRIORITY=flexible METAFLOW_DEBUG_CONDA=1 CONDA_MIXED_DEPENDENCY_RESOLVER=conda-lock CONDA_CHANNELS='conda-forge' --environment conda
Thanks a lot for your support and response in advance.dry-beach-38304
09/30/2024, 3:41 PMgreat-garage-57644
09/30/2024, 4:19 PMgreat-garage-57644
09/30/2024, 4:21 PMdry-beach-38304
09/30/2024, 5:09 PMgreat-garage-57644
09/30/2024, 5:12 PMdebug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/envsresolver.py:518]: Builder environments: {EnvID(req_id='9ecf751db3a818702ebe5023daaacacd10f24bbe', full_id='_default', arch='linux-64'): {'id': EnvID(req_id='9ecf751db3a818702ebe5023daaacacd10f24bbe', full_id='_default', arch='linux-64'), 'steps': ['query_data', 'deploy_model'], 'user_deps': {'conda': ['python==3.8', 'pip', 'wheel==0.42.0', 'tomli', 'setuptools'], 'npconda': [], 'sys': ['__glibc==2.35=0']}, 'deps': {'conda': ['python==3.8', 'pip', 'wheel==0.42.0', 'tomli', 'setuptools'], 'npconda': [], 'sys': ['__glibc==2.35=0']}, 'sources': {'conda': ['conda-forge']}, 'extras': {}, 'conda_format': ['_any'], 'base': None, 'base_accurate': False, 'resolved': None, 'already_resolved': False, 'env_type': <EnvType.CONDA_ONLY: 'conda-only'>}}
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:278]: Conda call: ['/usr/bin/micromamba', 'create', '--yes', '--prefix', '/tmp/tmpefsoe5pa/prefix', '--dry-run', 'python==3.8', 'pip', 'wheel==0.42.0', 'tomli', 'setuptools', '-r', '/opt/conda', '--json']
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/resolvers/pip_resolver.py:103]: Creating builder conda environment
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:278]: Conda call: ['/usr/bin/micromamba', 'info', '--json']
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:1521]: ld_impl_linux-64-2.43-h712a8e2_1 -> preferred .conda @ web
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:1521]: _libgcc_mutex-0.1-conda_forge -> preferred .tar.bz2 @ web
We want to stop this from happening - but unable to figure out what should be the parameters to use only PYPI repogreat-garage-57644
09/30/2024, 5:13 PMError downloading package for 'python-3.8.0-h357f687_5': HTTPSConnectionPool(host='<http://conda.anaconda.org|conda.anaconda.org>', port=443): Max retries exceeded with url: /conda-forge/linux-64/python-3.8.0-h357f687_5.tar.bz2 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1007)')))
Conda ran into an error while setting up environment.:
Could not fetch packages -- see pretty-printed errors above.
great-garage-57644
09/30/2024, 5:14 PMCONDA_PYPI_DEPENDENCY_RESOLVER=pip METAFLOW_CONDA_DEPENDENCY_RESOLVER=micromamba CONDA_DEPENDENCY_RESOLVER=micromamba CONDA_CHANNEL_PRIORITY=flexible METAFLOW_DEBUG_CONDA=1 CONDA_MIXED_DEPENDENCY_RESOLVER=conda-lock CONDA_CHANNELS='conda-forge' --environment conda
dry-beach-38304
09/30/2024, 5:20 PMdry-beach-38304
09/30/2024, 5:21 PMgreat-garage-57644
09/30/2024, 5:22 PM@pypi_base
, then we dont see this behaviour.
If we install the extensions package and then run the same code, it tries to go to conda and throws these errorsdry-beach-38304
09/30/2024, 5:32 PMgreat-garage-57644
09/30/2024, 7:09 PM2024-09-30 16:35:08.755 Creating local datastore in current directory (/metaflow/.metaflow)
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/utils.py:164]: Conda root is at <s3://cnn-mls-metaflow-science/metaflow/conda_env>
Validating your flow...
The graph looks good!
Running pylint...
Pylint is happy!
Bootstrapping Conda environment... (this could take a few minutes)
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda_environment.py:459]: For step start, got flow req: StepReq[disabled=False; python=3.8; packages={'pypi': {'snowflake-connector-python[pandas]': '2.9', 'scipy': '1.5.3', 'joblib': '1.2', 'numpy': '1.19.4'}}; sources={'pypi': []}]; step req: StepReq[disabled=True]
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda_environment.py:466]: For step start, merged requirement: StepReq[disabled=True]
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda_environment.py:459]: For step query_data, got flow req: StepReq[disabled=False; python=3.8; packages={'pypi': {'snowflake-connector-python[pandas]': '2.9', 'scipy': '1.5.3', 'joblib': '1.2', 'numpy': '1.19.4'}}; sources={'pypi': []}]; step req: StepReq[]
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda_environment.py:466]: For step query_data, merged requirement: StepReq[disabled=False; python=3.8; packages={'pypi': {'snowflake-connector-python[pandas]': '2.9', 'scipy': '1.5.3', 'joblib': '1.2', 'numpy': '1.19.4'}}; sources={'pypi': []}]
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:335]: Binary call: ['/opt/conda/bin/cph', '--version']
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:335]: Binary call: ['/opt/conda/bin/conda-lock', '--version']
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:335]: Binary call: ['/opt/conda/bin/pip', '--version']
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:278]: Conda call: ['/usr/bin/micromamba', 'info', '--json']
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:335]: Binary call: ['/opt/conda/bin/pip', 'config', 'list']
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda_environment.py:619]: For step query_data, final req: StepReq[disabled=False; python=3.8; packages={'pypi': {'numpy': '1.19.4', 'boto3': '>=1.14.0', 'requests': '>=2.21.0', 'snowflake-connector-python[pandas]': '2.9', 'scipy': '1.5.3', 'joblib': '1.2'}, 'conda': {'python': '3.8'}, 'sys': {'__glibc': '2.35=0'}}; sources={'conda': ['conda-forge'], 'pypi': ['<https://pypi.org/simple']}]>
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:590]: EnvID(req_id='0669c556ab12d33fd1720672a5337f35af4edcba', full_id='_default', arch='linux-64') not found locally
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/envsresolver.py:206]: Added environment to resolve {'id': EnvID(req_id='0669c556ab12d33fd1720672a5337f35af4edcba', full_id='_default', arch='linux-64'), 'steps': ['query_data'], 'user_deps': {'pypi': ['numpy==1.19.4', 'boto3==>=1.14.0', 'requests==>=2.21.0', 'snowflake-connector-python[pandas]==2.9', 'scipy==1.5.3', 'joblib==1.2'], 'conda': ['python==3.8'], 'sys': ['__glibc==2.35=0']}, 'deps': {'pypi': ['numpy==1.19.4', 'boto3==>=1.14.0', 'requests==>=2.21.0', 'snowflake-connector-python[pandas]==2.9', 'scipy==1.5.3', 'joblib==1.2'], 'conda': ['python==3.8'], 'sys': ['__glibc==2.35=0']}, 'sources': {'conda': ['conda-forge'], 'pypi': ['<https://pypi.org/simple']>}, 'extras': {}, 'conda_format': ['_any'], 'base': None, 'base_accurate': None, 'resolved': None, 'already_resolved': False, 'env_type': <EnvType.PYPI_ONLY: 'pypi-only'>, 'force': False}
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda_environment.py:459]: For step deploy_model, got flow req: StepReq[disabled=False; python=3.8; packages={'pypi': {'snowflake-connector-python[pandas]': '2.9', 'scipy': '1.5.3', 'joblib': '1.2', 'numpy': '1.19.4'}}; sources={'pypi': []}]; step req: StepReq[]
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda_environment.py:466]: For step deploy_model, merged requirement: StepReq[disabled=False; python=3.8; packages={'pypi': {'snowflake-connector-python[pandas]': '2.9', 'scipy': '1.5.3', 'joblib': '1.2', 'numpy': '1.19.4'}}; sources={'pypi': []}]
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:335]: Binary call: ['/opt/conda/bin/pip', 'config', 'list']
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda_environment.py:619]: For step deploy_model, final req: StepReq[disabled=False; python=3.8; packages={'pypi': {'numpy': '1.19.4', 'boto3': '>=1.14.0', 'requests': '>=2.21.0', 'snowflake-connector-python[pandas]': '2.9', 'scipy': '1.5.3', 'joblib': '1.2'}, 'conda': {'python': '3.8'}, 'sys': {'__glibc': '2.35=0'}}; sources={'conda': ['conda-forge'], 'pypi': ['<https://pypi.org/simple']}]>
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:590]: EnvID(req_id='0669c556ab12d33fd1720672a5337f35af4edcba', full_id='_default', arch='linux-64') not found locally
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/envsresolver.py:211]: Environment 'EnvID(req_id='0669c556ab12d33fd1720672a5337f35af4edcba', full_id='_default', arch='linux-64')' is also needed by 'deploy_model'
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda_environment.py:459]: For step end, got flow req: StepReq[disabled=False; python=3.8; packages={'pypi': {'snowflake-connector-python[pandas]': '2.9', 'scipy': '1.5.3', 'joblib': '1.2', 'numpy': '1.19.4'}}; sources={'pypi': []}]; step req: StepReq[disabled=True]
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda_environment.py:466]: For step end, merged requirement: StepReq[disabled=True]
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/envsresolver.py:231]: Resolving environments:
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/envsresolver.py:234]: 0669c556ab12d33fd1720672a5337f35af4edcba (_default): {'id': EnvID(req_id='0669c556ab12d33fd1720672a5337f35af4edcba', full_id='_default', arch='linux-64'), 'steps': ['query_data', 'deploy_model'], 'user_deps': {'pypi': ['numpy==1.19.4', 'boto3==>=1.14.0', 'requests==>=2.21.0', 'snowflake-connector-python[pandas]==2.9', 'scipy==1.5.3', 'joblib==1.2'], 'conda': ['python==3.8'], 'sys': ['__glibc==2.35=0']}, 'deps': {'pypi': ['numpy==1.19.4', 'boto3==>=1.14.0', 'requests==>=2.21.0', 'snowflake-connector-python[pandas]==2.9', 'scipy==1.5.3', 'joblib==1.2'], 'conda': ['python==3.8'], 'sys': ['__glibc==2.35=0']}, 'sources': {'conda': ['conda-forge'], 'pypi': ['<https://pypi.org/simple']>}, 'extras': {}, 'conda_format': ['_any'], 'base': None, 'base_accurate': None, 'resolved': None, 'already_resolved': False, 'env_type': <EnvType.PYPI_ONLY: 'pypi-only'>, 'force': False}
Resolving 1 environment ...debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:590]: EnvID(req_id='9ecf751db3a818702ebe5023daaacacd10f24bbe', full_id='_default', arch='linux-64') not found locally
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/envsresolver.py:518]: Builder environments: {EnvID(req_id='9ecf751db3a818702ebe5023daaacacd10f24bbe', full_id='_default', arch='linux-64'): {'id': EnvID(req_id='9ecf751db3a818702ebe5023daaacacd10f24bbe', full_id='_default', arch='linux-64'), 'steps': ['query_data', 'deploy_model'], 'user_deps': {'conda': ['python==3.8', 'pip', 'wheel==0.42.0', 'tomli', 'setuptools'], 'npconda': [], 'sys': ['__glibc==2.35=0']}, 'deps': {'conda': ['python==3.8', 'pip', 'wheel==0.42.0', 'tomli', 'setuptools'], 'npconda': [], 'sys': ['__glibc==2.35=0']}, 'sources': {'conda': ['conda-forge']}, 'extras': {}, 'conda_format': ['_any'], 'base': None, 'base_accurate': False, 'resolved': None, 'already_resolved': False, 'env_type': <EnvType.CONDA_ONLY: 'conda-only'>}}
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:278]: Conda call: ['/usr/bin/micromamba', 'create', '--yes', '--prefix', '/tmp/tmpefsoe5pa/prefix', '--dry-run', 'python==3.8', 'pip', 'wheel==0.42.0', 'tomli', 'setuptools', '-r', '/opt/conda', '--json']
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/resolvers/pip_resolver.py:103]: Creating builder conda environment
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:278]: Conda call: ['/usr/bin/micromamba', 'info', '--json']
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:1521]: ld_impl_linux-64-2.43-h712a8e2_1 -> preferred .conda @ web
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:1521]: _libgcc_mutex-0.1-conda_forge -> preferred .tar.bz2 @ web
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:1521]: ca-certificates-2024.8.30-hbcca054_0 -> preferred .conda @ web
debug[conda /opt/conda/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:1521]: libgomp-14.1.0-h77fa898_1 -> preferred .conda @ web
great-garage-57644
09/30/2024, 7:12 PMValidating your flow...
The graph looks good!
Running pylint...
Pylint is happy!
2024-09-30 16:29:15.601 Creating local datastore in current directory (/metaflow/.metaflow)
2024-09-30 16:29:15.603 Bootstrapping virtual environment(s) ...
2024-09-30 16:30:49.830 Virtual environment(s) bootstrapped!
2024-09-30 16:30:51.595 Workflow starting (run-id 469947):
2024-09-30 16:29:15.601 Creating local datastore in current directory (/metaflow/.metaflow)
2024-09-30 16:29:15.603 Bootstrapping virtual environment(s) ...
2024-09-30 16:30:49.830 Virtual environment(s) bootstrapped!
2024-09-30 16:30:51.595 Workflow starting (run-id 469947):
dry-beach-38304
09/30/2024, 8:19 PMBootstrapping virtual environment(s)
and Virtual environment(s) bootstrapped!
you can see that over a minute goes by and itâs doing something.
⢠clearly one work and one doesnât so something the extension is doing is slightly different and your firewall/proxy/whatever-security-thing-your-company-puts is blocking it.
⢠since I donât have access to that âthingâ that is blocking access, I can only speculate and I am trying to narrow down what the issue may be.
⢠You can see for example that in the extension case, this command seems to work: ['/usr/bin/micromamba', 'create', '--yes', '--prefix', '/tmp/tmpefsoe5pa/prefix', '--dry-run', 'python==3.8', 'pip', 'wheel==0.42.0', 'tomli', 'setuptools', '-r', '/opt/conda', '--json']
but it then has issues downloading the packages themselves (at least that is what I am guessing).
⢠In the non-extension case, packages are downloaded here: https://github.com/Netflix/metaflow/blob/master/metaflow/plugins/pypi/micromamba.py#L120 which is why I was suggesting instrumenting the _call function a bit.
Iâm really sorry about trying to gather more information this way but this is not something I can readily reproduce since it heavily depends on your corporate environment. I can only speculate and, to be best of my knowledge, both versions WILL download stuff. I am wondering what the exact different is and why it happens to help you better. There are a bunch of other variables (things can get cached, etc) which can also impact the result but thatâs hard for me to speculate on without a bit more information and unfortunately the non-extension pypi implementation gives NO details.great-garage-57644
09/30/2024, 8:26 PMdry-beach-38304
09/30/2024, 8:27 PMdry-beach-38304
09/30/2024, 8:27 PMgreat-garage-57644
09/30/2024, 8:28 PM