great-father-37686
06/21/2024, 4:49 PMmetaflow 2.12.5
metaflow-netflixext 1.2.0
error seems to be coming from here where auth_info is None even though GOOGLE_APPLICATION_CREDENTIALS is exported, and if I run the install command outside of metaflow (/opt/homebrew/Caskroom/miniforge/base/envs/metaflow_builder_b36bf7c45bc90818c9925cc3dc77260c9a092f99_16de40ce0d9565e40a87d19d3ea4fc202f48a3d8/lib/python3.10/site-packages/pip install my-package --extra-index-url <http://us-python.dev/|us-python.dev/>...) it works
error is >
Error downloading package for 'my-package-py3-none-any': 401 Client Error: Unauthorized for url: <https://us-python.pkg.dev/my-package-py3-none-any.whl>
Conda ran into an error while setting up environment.:
Could not fetch packages -- see pretty-printed errors above.great-father-37686
06/21/2024, 4:52 PMfrom metaflow import FlowSpec, step, pypi, pypi_base, kubernetes, environment
@pypi_base(
python='3.10',
extra_indices=[f"<https://us-python.pkg.dev/.../simple>"],
packages={
'keyrings.google-artifactregistry-auth': '>=1.1.1' ,
'my-private-package': '3.4.1',
}
)
class PrivateLibFlow(FlowSpec):
@environment(vars={"METAFLOW_DEBUG_CONDA": "1"})
@step
def start(self):
import pkg_resources
installed_packages = pkg_resources.working_set
installed_packages_list = sorted(["%s==%s" % (i.key, i.version) for i in installed_packages])
print(installed_packages_list)
from my_private_package import Something
self.next(self.next_step)
@pypi(
packages={
"gcsfs": "2024.6.0"
}
)
@step
def next_step(self):
print("next_step")
self.next(self.end)
@step
def end(self):
print("yay!")
if __name__ == '__main__':
PrivateLibFlow()
command:
GOOGLE_APPLICATION_CREDENTIALS=/Users/maja/.config/gcloud/application_default_credentials.json METAFLOW_DEBUG_CONDA=1 python3 workflows/minimal.py --datastore=gs --environment=conda rundry-beach-38304
06/21/2024, 5:03 PMquick-carpet-67110
05/08/2025, 9:54 AMdry-beach-38304
05/08/2025, 7:15 PM