wooden-dusk-90720
05/08/2023, 8:53 PMdry-beach-38304
05/08/2023, 10:34 PMwooden-dusk-90720
05/08/2023, 10:52 PM@pip decorator to install from a private CodeArtifact repo (I heard from Savin that this is already in the works, but I don't really wanna wait)dry-beach-38304
05/08/2023, 10:58 PM@pip decorator. It doesn’t use CodeArtifact though but may be extensible. It’s here: https://github.com/Netflix/metaflow-nflx-extensionsdry-beach-38304
05/08/2023, 10:58 PMwooden-dusk-90720
05/08/2023, 11:02 PMpip_sources and pass it my codeartifact repo? https://github.com/Netflix/metaflow-nflx-extensions/blob/108f5b46657bb50d784dcd48d9289129a1c2ccb0/README.md?plain=1#L188dry-beach-38304
05/08/2023, 11:02 PMdry-beach-38304
05/08/2023, 11:02 PMdry-beach-38304
05/08/2023, 11:03 PMmetaflow environment resolve -r requirement.txt and put --extra-index-url <your url> in that file for example.wooden-dusk-90720
05/08/2023, 11:03 PMwooden-dusk-90720
05/08/2023, 11:03 PMpip_sources or its in Metaflow mainline too?dry-beach-38304
05/08/2023, 11:08 PMdry-beach-38304
05/08/2023, 11:08 PMdry-beach-38304
05/08/2023, 11:08 PMdry-beach-38304
05/10/2023, 9:27 AMdry-beach-38304
05/11/2023, 9:19 AMwooden-dusk-90720
06/01/2023, 7:12 PMpip_sources 😕
do i need to change --environment=conda? how do i make it use the requirements.txt file?dry-beach-38304
06/01/2023, 7:14 PMdry-beach-38304
06/01/2023, 7:15 PMwooden-dusk-90720
06/01/2023, 7:16 PMlibraries and put my internal codeartifact url under pip_sources but it's saying it cant find my internal package. I tried installing the package with pip and it works (it did add a bunch of stuff to my ~/.config/pip/pip.conf but i figure i could pass the same thing to METAFLOW_CONDA_DEFAULT_PIP_SOURCEdry-beach-38304
06/01/2023, 7:18 PMMETAFLOW_CONDA_DEFAULT_PIP_SOURCE . but pip_sources should also work. Could you run with METAFLOW_DEBUG_CONDA=1 ?wooden-dusk-90720
06/01/2023, 7:18 PMpip_sources because the generated index url has the username/password after i do "aws codeartifact login"dry-beach-38304
06/01/2023, 7:19 PMwooden-dusk-90720
06/01/2023, 7:20 PM@project(name="nissan_test")
@conda_base(
libraries={
"saitama": "0.1.0",
"pytorch::pytorch": "1.12.1",
},
python="3.10",
)
and i have set METAFLOW_CONDA_DEFAULT_PIP_SOURCEwooden-dusk-90720
06/01/2023, 7:20 PMs/hp/bf0s0t_x36xb56y4b4qg_xwc2sdr34/T/tmpubiqi7iw/prefix', '--dry-run', '--no-channel-priority', 'python==3.10', 'requests==>=2.21.0', 'boto3==>=1.14.0', 'saitama==0.1.0', 'pytorch::pytorch==1.12.1']
Pretty-printed STDOUT:
Could not solve for environment specs
The following package could not be installed
└─ saitama 0.1.0 does not exist (perhaps a typo or a missing channel).
{
"success": false
}dry-beach-38304
06/01/2023, 7:21 PMwooden-dusk-90720
06/01/2023, 7:21 PMdry-beach-38304
06/01/2023, 7:21 PMpip_packages section thendry-beach-38304
06/01/2023, 7:23 PM@pip(packages={"pytorch": "1.21.1", "saitama": "0.1.0"}, sources=[...])wooden-dusk-90720
06/01/2023, 7:23 PMwooden-dusk-90720
06/01/2023, 7:24 PM@project(name="nissan_test")
@conda_base(
libraries={
"pytorch::pytorch": "1.12.1",
},
pip_packages={
"saitama": "0.1.0",
},
python="3.10",
)dry-beach-38304
06/01/2023, 7:24 PMdry-beach-38304
06/01/2023, 7:24 PMdry-beach-38304
06/01/2023, 7:25 PMdry-beach-38304
06/01/2023, 7:25 PMwooden-dusk-90720
06/01/2023, 7:29 PMfrom metaflow import FlowSpec, step, project, conda_base, pip, pip_base
@project(name="nissan_test")
@pip_base(packages={"pytorch": "1.21.1", "saitama": "0.1.0"})
class LinearFlow(FlowSpec):
@step
def start(self):
self.my_var = 'hello world'
self.next(self.a)
@step
def a(self):
print('the data artifact is: %s' % self.my_var)
self.next(self.end)
@step
def end(self):
print('the data artifact is still: %s' % self.my_var)
if __name__ == '__main__':
LinearFlow()
and i ran:
METAFLOW_CONDA_DEPENDENCY_RESOLVER=conda METAFLOW_DEBUG_CONDA=1 python flows/test.py --environment=conda run
there's an error about:
subprocess.CalledProcessError: Command '['/Users/pownissa/anaconda3/bin/conda', 'info', '--json']' returned non-zero exit status 1.wooden-dusk-90720
06/01/2023, 7:29 PMwooden-dusk-90720
06/01/2023, 7:30 PMFile "/Users/pownissa/Library/Caches/pypoetry/virtualenvs/saitama-2InH2OdX-py3.10/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py", line 3276, in _call_conda
err = [output["err"]] # type: List[str]
KeyError: 'err'wooden-dusk-90720
06/01/2023, 7:31 PM3275 if isinstance(output, dict) and "error" in output:
3276 err = [output["err"]] # type: List[str]
3277 else:
3278 err = [output] # type: List[str]dry-beach-38304
06/01/2023, 7:34 PMdry-beach-38304
06/01/2023, 7:35 PMwooden-dusk-90720
06/01/2023, 7:36 PMdry-beach-38304
06/01/2023, 7:36 PMdry-beach-38304
06/01/2023, 7:36 PMwooden-dusk-90720
06/01/2023, 7:37 PMconda () {
\local cmd="${1-__missing__}"
case "$cmd" in
(activate | deactivate) __conda_activate "$@" ;;
(install | update | upgrade | remove | uninstall) __conda_exe "$@" || \return
__conda_reactivate ;;
(*) __conda_exe "$@" ;;
esac
}wooden-dusk-90720
06/01/2023, 7:37 PMwooden-dusk-90720
06/01/2023, 7:37 PMwooden-dusk-90720
06/01/2023, 7:38 PMwooden-dusk-90720
06/01/2023, 7:45 PMconda.CondaMultiError: EnforceUnusedAdapter called with url <https://conda.anaconda.org/conda-forge/noarch/setuptools-67.7.2-pyhd8ed1ab_0.conda>
This command is using a remote connection in offline mode.
EnforceUnusedAdapter called with url <https://conda.anaconda.org/conda-forge/noarch/pip-23.1.2-pyhd8ed1ab_0.conda>
This command is using a remote connection in offline mode.
EnforceUnusedAdapter called with url <https://conda.anaconda.org/conda-forge/osx-64/libsqlite-3.42.0-h58db7d2_0.conda>
This command is using a remote connection in offline mode.
EnforceUnusedAdapter called with url <https://conda.anaconda.org/conda-forge/osx-64/openssl-3.1.1-h8a1eda9_1.conda>
This command is using a remote connection in offline mode.wooden-dusk-90720
06/01/2023, 7:45 PMwooden-dusk-90720
06/01/2023, 7:47 PMdebug[conda /Users/pownissa/Library/Caches/pypoetry/virtualenvs/saitama-2InH2OdX-py3.10/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:3266]: Conda call: ['/Users/pownissa/mambaforge/bin/conda', 'create', '--yes', '--quiet', '--offline', '--no-deps', '--name', 'metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_39c31592d3551aed1483bd9729e59a3009fa3b20', '--file', '/var/folders/hp/bf0s0t_x36xb56y4b4qg_xwc2sdr34/T/tmp8xuogon4']
No STDOUTwooden-dusk-90720
06/01/2023, 8:11 PMFile "/Users/pownissa/Library/Caches/pypoetry/virtualenvs/saitama-2InH2OdX-py3.10/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py", line 1299, in _transmute
pkg_spec.add_local_file(dst_format, dst_file, transmuted=True)
File "/Users/pownissa/Library/Caches/pypoetry/virtualenvs/saitama-2InH2OdX-py3.10/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/env_descr.py", line 378, in add_local_file
added_hash = pkg_hash or self._hash_pkg(local_path)
File "/Users/pownissa/Library/Caches/pypoetry/virtualenvs/saitama-2InH2OdX-py3.10/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/env_descr.py", line 502, in _hash_pkg
with open(path, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/pownissa/mambaforge/pkgs/ca-certificates-2023.5.7-h8857fd0_0.tar.bz2'
idk what this file is fordry-beach-38304
06/01/2023, 8:41 PMdry-beach-38304
06/01/2023, 8:43 PMwooden-dusk-90720
06/01/2023, 9:42 PMwooden-dusk-90720
06/01/2023, 9:45 PMls /Users/pownissa/micromamba/pkgs/ | grep ca-cer
ca-certificates-2023.5.7-h8857fd0.tar.bz2
ca-certificates-2023.5.7-h8857fd0_0
ca-certificates-2023.5.7-h8857fd0_0.condadry-beach-38304
06/01/2023, 11:22 PMdry-beach-38304
06/01/2023, 11:23 PMdry-beach-38304
06/01/2023, 11:23 PMca-certificates-2023.5.7-h8857fd0.tar.bz2 instead of ca-certificates-2023.5.7-h8857fd0_0.tar.bz2dry-beach-38304
06/01/2023, 11:23 PMdry-beach-38304
06/01/2023, 11:23 PMdry-beach-38304
06/01/2023, 11:24 PMwooden-dusk-90720
06/01/2023, 11:25 PMdry-beach-38304
06/01/2023, 11:25 PMdry-beach-38304
06/01/2023, 11:25 PMdry-beach-38304
06/01/2023, 11:26 PMMETAFLOW_CONDA_PREFERRED_FORMAT ?dry-beach-38304
06/01/2023, 11:28 PM.conda so that’s how I have mostly been testing itwooden-dusk-90720
06/01/2023, 11:46 PMwooden-dusk-90720
06/01/2023, 11:46 PMdry-beach-38304
06/02/2023, 12:06 AMwooden-dusk-90720
06/02/2023, 12:26 AMdry-beach-38304
06/02/2023, 12:31 AMdry-beach-38304
06/02/2023, 12:31 AMdry-beach-38304
06/02/2023, 12:32 AMwooden-dusk-90720
06/02/2023, 12:33 AMMETAFLOW_CONDA_DEFAULT_PIP_SOURCEdry-beach-38304
06/02/2023, 12:44 AMwooden-dusk-90720
06/06/2023, 12:10 AMStep(s): ['start', 'a', 'end'], Error: URL '<https://amazon-149122183214.d.codeartifact.us-west-2.amazonaws.com/pypi/johnny5/simple/bunch/1.0.1/bunch-1.0.1.zip#sha256=3c554816ba260634b55c1edf8de6467d8122dbd18ec20f323e181869bc48ac93>' is not a supported format (['.whl', '.tar.gz'])dry-beach-38304
06/06/2023, 3:01 AMdry-beach-38304
06/06/2023, 8:52 PMwooden-dusk-90720
06/06/2023, 9:37 PMcat protobuf3-to-dict-0.1.5.tar.gz
Unauthenticated: request did not include an Authorization header. Please provide your credentials.wooden-dusk-90720
06/06/2023, 9:37 PMdry-beach-38304
06/06/2023, 9:39 PMMETAFLOW_DEBUG_CONDA=1 to see what it is doing exactly but I don’t think I changed anything there.dry-beach-38304
06/06/2023, 9:39 PMwooden-dusk-90720
06/06/2023, 9:39 PM~/micromamba/pkgs/pipwooden-dusk-90720
06/06/2023, 9:40 PMdry-beach-38304
06/06/2023, 9:40 PMdry-beach-38304
06/06/2023, 9:40 PMdry-beach-38304
06/06/2023, 9:41 PMdry-beach-38304
06/06/2023, 9:41 PMwooden-dusk-90720
06/06/2023, 9:41 PMdry-beach-38304
06/06/2023, 9:41 PMdry-beach-38304
06/06/2023, 9:42 PMdry-beach-38304
06/06/2023, 9:42 PMwooden-dusk-90720
06/06/2023, 9:43 PMPOETRY_HTTP_BASIC_ARTIFACT_USERNAME and POETRY_HTTP_BASIC_ARTIFACT_PASSWORD (because i'm using poetry). but i also have it set in ~/.config/pip/pip.conf and METAFLOW_CONDA_DEFAULT_PIP_SOURCE because i'm not sure which one you look atwooden-dusk-90720
06/06/2023, 9:43 PMdry-beach-38304
06/06/2023, 9:45 PMdry-beach-38304
06/06/2023, 9:45 PMwooden-dusk-90720
06/06/2023, 9:46 PMpip_base (so pure pip?)dry-beach-38304
06/06/2023, 9:46 PMwooden-dusk-90720
06/06/2023, 9:46 PM/pip/antlr4-python3-runtime-4.9.3.tar.gz']
debug[conda /Users/pownissa/Library/Caches/pypoetry/virtualenvs/saitama-2InH2OdX-py3.10/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:3875]: Binary call: ['/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/bin/python', '-m', 'pip', '--isolated', 'wheel', '--no-deps', '--progress-bar', 'off', '-w', '/var/folders/hp/bf0s0t_x36xb56y4b4qg_xwc2sdr34/T/tmpqqm_02i_/build_5', '/Users/pownissa/micromamba/pkgs/pip/protobuf3-to-dict-0.1.5.tar.gz']
Pretty-printed STDOUT:
Processing /Users/pownissa/micromamba/pkgs/pip/bunch-1.0.1.zip
Pretty-printed STDERR:
ERROR: Exception:
Traceback (most recent call last):
File "/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 169, in exc_logging_wrapper
status = run_func(*args)
File "/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 248, in wrapper
return func(self, options, args)
File "/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/lib/python3.10/site-packages/pip/_internal/commands/wheel.py", line 147, in run
requirement_set = resolver.resolve(reqs, check_supported_wheels=True)
File "/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 73, in resolve
collected = self.factory.collect_root_requirements(root_reqs)
File "/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 491, in collect_root_requirements
req = self._make_requirement_from_install_req(
File "/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 453, in _make_requirement_from_install_req
cand = self._make_candidate_from_link(
File "/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 206, in _make_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
File "/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 293, in __init__
super().__init__(
File "/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 156, in __init__
self.dist = self._prepare()
File "/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 225, in _prepare
dist = self._prepare_distribution()
File "/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 304, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
File "/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 516, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 587, in _prepare_linked_requirement
local_file = unpack_url(
File "/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 176, in unpack_url
unpack_file(file.path, location, file.content_type)
File "/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/lib/python3.10/site-packages/pip/_internal/utils/unpacking.py", line 240, in unpack_file
unzip_file(filename, location, flatten=not filename.endswith(".whl"))
File "/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/lib/python3.10/site-packages/pip/_internal/utils/unpacking.py", line 115, in unzip_file
zip = zipfile.ZipFile(zipfp, allowZip64=True)
File "/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/lib/python3.10/zipfile.py", line 1267, in __init__
self._RealGetContents()
File "/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/lib/python3.10/zipfile.py", line 1334, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip filedry-beach-38304
06/06/2023, 9:46 PMdry-beach-38304
06/06/2023, 9:47 PMdry-beach-38304
06/06/2023, 9:48 PMwooden-dusk-90720
06/06/2023, 9:48 PMdry-beach-38304
06/06/2023, 9:49 PMdry-beach-38304
06/06/2023, 9:49 PMdry-beach-38304
06/06/2023, 9:49 PMMETAFLOW_DEBUG_CONDA, it will give you the full output of the pip resolution.wooden-dusk-90720
06/06/2023, 9:49 PMdry-beach-38304
06/06/2023, 9:49 PMdry-beach-38304
06/06/2023, 9:49 PMdry-beach-38304
06/06/2023, 9:50 PMwooden-dusk-90720
06/06/2023, 9:50 PMwooden-dusk-90720
06/06/2023, 9:50 PMdry-beach-38304
06/06/2023, 9:50 PMwooden-dusk-90720
06/06/2023, 9:50 PMdry-beach-38304
06/06/2023, 9:50 PMdry-beach-38304
06/06/2023, 9:51 PM/Users/pownissa/micromamba/pkgs/pip/protobuf3-to-dict-0.1.5.tar.gz is effectively a text file with the error in it right?wooden-dusk-90720
06/06/2023, 9:51 PMwooden-dusk-90720
06/06/2023, 9:52 PMfile /Users/pownissa/micromamba/pkgs/pip/protobuf3-to-dict-0.1.5.tar.gz
/Users/pownissa/micromamba/pkgs/pip/protobuf3-to-dict-0.1.5.tar.gz: ASCII text, with no line terminatorsdry-beach-38304
06/06/2023, 9:54 PMwith open(local_path, "wb") as f:
with session.get(pkg_spec.url, stream=True) as r:
for chunk in r.iter_content(chunk_size=None):
base_hash.update(chunk)
f.write(chunk)
which doesn’t check the return code of r (I think I assumed it would fail loudly if it didn’t get a response. I’ll fix that but that won’t solve your immediate config problem so let’s see if we can figure that one out too. So you see that it says something like this:
/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/bin/python', '-m', 'pip'
this is the pip it is using. Could you see if it is reading the config file you have?dry-beach-38304
06/06/2023, 9:54 PMwooden-dusk-90720
06/06/2023, 9:55 PMStep(s): ['start', 'a', 'end'], Error: Binary command for Conda '['/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/bin/python', '-m', 'pip', '--isolated', 'wheel', '--no-deps', '--progress-bar', 'off', '-w', '/var/folders/hp/bf0s0t_x36xb56y4b4qg_xwc2sdr34/T/tmpqqm_02i_/build_1', '/Users/pownissa/micromamba/pkgs/pip/bunch-1.0.1.zip']' returned error (2); see pretty-printed error abovedry-beach-38304
06/06/2023, 9:55 PMdry-beach-38304
06/06/2023, 9:55 PMwooden-dusk-90720
06/06/2023, 9:56 PMdry-beach-38304
06/06/2023, 9:56 PMdry-beach-38304
06/06/2023, 9:57 PMwooden-dusk-90720
06/06/2023, 9:57 PMdry-beach-38304
06/06/2023, 9:57 PMdry-beach-38304
06/06/2023, 9:58 PMdry-beach-38304
06/06/2023, 9:58 PMdry-beach-38304
06/06/2023, 9:58 PMdry-beach-38304
06/06/2023, 9:58 PMwooden-dusk-90720
06/06/2023, 9:59 PMcondav2.cnd filewhere do i find this file?
dry-beach-38304
06/06/2023, 10:00 PM.metaflow directory in your current directory (or along its parent path). The file should be in there.wooden-dusk-90720
06/06/2023, 10:01 PM.metaflow dir. i see it using the credentials nowwooden-dusk-90720
06/06/2023, 10:02 PMwooden-dusk-90720
06/06/2023, 10:03 PMwooden-dusk-90720
06/06/2023, 10:05 PMwooden-dusk-90720
06/06/2023, 10:06 PMdebug[conda /Users/pownissa/Library/Caches/pypoetry/virtualenvs/saitama-2InH2OdX-py3.10/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:2064]: Need to install {'download_info': {'url': '<https://amazon-149122183214.d.codeartifact.us-west-2.amazonaws.com/pypi/johnny5/simple/ether/0.1.1/ether-0.1.1-py3-none-any.whl>', 'archive_info': {'hash': 'sha256=911982a95f56856d9c212cc26e055f778312c889a069bad713660dfda9aecfca', 'hashes': {'sha256': '911982a95f56856d9c212cc26e055f778312c889a069bad713660dfda9aecfca'}}}}dry-beach-38304
06/06/2023, 10:06 PMdry-beach-38304
06/06/2023, 10:08 PMdry-beach-38304
06/06/2023, 10:10 PMdebug[conda /Users/pownissa/Library/Caches/pypoetry/virtualenvs/saitama-2InH2OdX-py3.10/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:2064]: Need to install {'download_info': {'url': '<https://amazon-149122183214.d.codeartifact.us-west-2.amazonaws.com/pypi/johnny5/simple/bunch/1.0.1/bunch-1.0.1.zip>', 'archive_info': {'hash': 'sha256=3c554816ba260634b55c1edf8de6467d8122dbd18ec20f323e181869bc48ac93', 'hashes': {'sha256': '3c554816ba260634b55c1edf8de6467d8122dbd18ec20f323e181869bc48ac93'}}}}
which, as you noted, does not include the credentials (it’s probably safer since otherwise they would leak all over the place)
• we then download the package ourself because we want to build a wheel out of it:
debug[conda /Users/pownissa/Library/Caches/pypoetry/virtualenvs/saitama-2InH2OdX-py3.10/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:1530]: bunch-1.0.1 -> preferred .zip @ web
followed by:
Downloading 7(web) + 0(cache) packages for arch osx-64 ...debug[conda /Users/pownissa/Library/Caches/pypoetry/virtualenvs/saitama-2InH2OdX-py3.10/lib/python3.10/site-packages/metaflow_extensions/netflix_ext/plugins/conda/conda.py:1338]: bunch-1.0.1 -> download <https://amazon-149122183214.d.codeartifact.us-west-2.amazonaws.com/pypi/johnny5/simple/bunch/1.0.1/bunch-1.0.1.zip> to /Users/pownissa/micromamba/pkgs/pip/bunch-1.0.1.zip
This then fails because it’s not a zip file beacuse it didn’t have authorization.wooden-dusk-90720
06/06/2023, 10:11 PMpip.conf so we dont need to pollute the urlsdry-beach-38304
06/06/2023, 10:11 PMdry-beach-38304
06/06/2023, 10:11 PMdry-beach-38304
06/06/2023, 10:11 PMdry-beach-38304
06/06/2023, 10:12 PMdry-beach-38304
06/06/2023, 10:12 PMwooden-dusk-90720
06/06/2023, 10:12 PMdry-beach-38304
06/06/2023, 10:12 PMwooden-dusk-90720
06/06/2023, 10:13 PMdry-beach-38304
06/06/2023, 10:13 PMwooden-dusk-90720
06/06/2023, 10:14 PMwooden-dusk-90720
06/06/2023, 10:14 PMdry-beach-38304
06/06/2023, 10:17 PM/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/bin/python -m pip config list
to see if it actually sees your config?dry-beach-38304
06/06/2023, 10:18 PMwooden-dusk-90720
06/06/2023, 10:22 PM[global]
index-url = <https://REDACTED@amazon-149122183214.d.codeartifact.us-west-2.amazonaws.com/pypi/saitama/simple/>
but i believe you can also specify others using "extra-index-url" like so:
[global]
index-url = <https://REDACTED@amazon-149122183214.d.codeartifact.us-west-2.amazonaws.com/pypi/saitama/simple/>
trusted-host = <http://download.zope.org|download.zope.org>
<http://pypi.org|pypi.org>
secondary.extra.host
extra-index-url= <https://pypi.org/simple>
<http://secondary.extra.host/simple>dry-beach-38304
06/06/2023, 10:58 PMconfig list thing, does it show that config?wooden-dusk-90720
06/06/2023, 11:01 PM✗ which pip
/Users/pownissa/Library/Caches/pypoetry/virtualenvs/saitama-2InH2OdX-py3.10/bin/pip
✗ pip config list
global.extra-index-url='<https://pypi.org/simple>\n<http://secondary.extra.host/simple>'
global.index-url='<https://REDACTED@amazon-149122183214.d.codeartifact.us-west-2.amazonaws.com/pypi/saitama/simple/>'
global.trusted-host='<http://download.zope.org|download.zope.org>\<http://npypi.org|npypi.org>\nsecondary.extra.host'wooden-dusk-90720
06/06/2023, 11:01 PMdry-beach-38304
06/06/2023, 11:31 PMwooden-dusk-90720
06/06/2023, 11:32 PM/Users/pownissa/micromamba/envs/metaflow_builder_bcaa5c0f188333ea6204cf10eaed8c900354c27d_0a72266ccb5a2bd3c53d72b276a5031970e91d94/bin/python -m pip config list
global.index-url='<https://REDACTED@amazon-149122183214.d.codeartifact.us-west-2.amazonaws.com/pypi/johnny5/simple/>'dry-beach-38304
06/06/2023, 11:33 PMdry-beach-38304
06/07/2023, 10:04 AMwooden-dusk-90720
06/07/2023, 3:47 PMdry-beach-38304
06/08/2023, 8:55 AMwooden-dusk-90720
06/08/2023, 7:17 PM~/micromamba/pkgs/pip are now 0B and empty (instead of before where it was a text file)
so seems like it's not picking up the settings in pip.confwooden-dusk-90720
06/08/2023, 7:20 PMCONDA_SRCS_AUTH_INFO?dry-beach-38304
06/08/2023, 7:29 PMwooden-dusk-90720
06/08/2023, 7:33 PMwooden-dusk-90720
06/08/2023, 9:10 PMCONDA_SRCS_AUTH_INFO and it managed to download some stuff but a bunch of others are still 0B which is causing the failuresdry-beach-38304
06/08/2023, 9:12 PMwooden-dusk-90720
06/08/2023, 9:12 PMdry-beach-38304
06/08/2023, 9:13 PMdry-beach-38304
06/08/2023, 9:13 PMdry-beach-38304
06/08/2023, 9:14 PMwooden-dusk-90720
06/08/2023, 9:35 PMfor url in urls:
up = urlparse(url)
url was single quoted.. so the urlparse was failing. so i got rid of the quotes using:
if url.startswith("'") and url.endswith("'"):
url = url[1:-1]wooden-dusk-90720
06/08/2023, 10:28 PMdry-beach-38304
06/08/2023, 10:29 PMwooden-dusk-90720
06/08/2023, 10:30 PMdry-beach-38304
06/08/2023, 10:30 PMdry-beach-38304
06/08/2023, 10:30 PMdry-beach-38304
06/08/2023, 10:31 PMwooden-dusk-90720
06/08/2023, 10:31 PMdry-beach-38304
06/08/2023, 10:31 PMdry-beach-38304
06/08/2023, 10:31 PMdry-beach-38304
06/08/2023, 10:31 PMdry-beach-38304
06/08/2023, 10:31 PMwooden-dusk-90720
06/08/2023, 10:31 PMdry-beach-38304
06/08/2023, 10:31 PMdry-beach-38304
06/08/2023, 10:32 PMdry-beach-38304
06/08/2023, 10:32 PMdry-beach-38304
06/08/2023, 10:32 PMdry-beach-38304
06/08/2023, 11:08 PMwooden-dusk-90720
06/08/2023, 11:09 PMwooden-dusk-90720
06/08/2023, 11:10 PMdry-beach-38304
06/08/2023, 11:44 PMdry-beach-38304
06/08/2023, 11:45 PMdry-beach-38304
06/08/2023, 11:46 PMwooden-dusk-90720
06/08/2023, 11:51 PMMETAFLOW_CONDA_DEFAULT_PIP_SOURCE or METAFLOW_CONDA_SRCS_AUTH_INFO anymorewooden-dusk-90720
06/08/2023, 11:53 PMmetaflow will take care of doing all that for you as long as you have the cache enabled (and if you don’t, it’ll work too but just be a bit slower).i want to package up my code/dependencies to use in an inference image, so i dont need to bake the code into the image (which is what i'm doing right now). so basically it should work just like how it does in Batch, where there is a base image and it sucks down the code/dependencies. maybe i can just do it the same way that metaflow does it for Batch?
dry-beach-38304
06/09/2023, 12:03 AMdry-beach-38304
06/09/2023, 12:03 AMdry-beach-38304
06/09/2023, 12:06 AM.metaflow directory in your cwd or along the path to the root as well as remotely in S3. If you want to fully remove things, you should remove both of those as well.wooden-dusk-90720
06/09/2023, 12:09 AMdry-beach-38304
06/09/2023, 12:10 AMwooden-dusk-90720
06/09/2023, 12:12 AMdry-beach-38304
06/09/2023, 12:14 AM