stocky-fountain-57774
01/23/2024, 11:02 AM__init__.py file:
from metaflow.decorators import step, _import_plugin_decorators
from metaflow.plugins import STEP_DECORATORS
from .custom_step_decorator import TestDecorator
STEP_DECORATORS.append(TestDecorator)
_import_plugin_decorators(globals())
This allows us to import the decorator into the workflow code itself and apply it to the steps. However, we find this approach complex and are not sure how it fits into deployment on AWS with Step Functions. What would be the best way to proceed?
On a related note, the package we use for logging is on GCP Artifact Registry. Is there a straightforward way to import it with GCP credentials, perhaps via the PyPI tag? How can we import this package for the entire workflow without having to do it for each step?
Thank you for your response and have a great day!dry-beach-38304
01/23/2024, 4:41 PMdry-beach-38304
01/23/2024, 4:44 PM@pypi decorator will pick up authentication credentials from your pypi configuration and has been tested on the AWS equivalent of GCP artifact registry so it should work if you put your credentials there. @bulky-afternoon-92433 can confirm. If that doesnβt work, you can also try the bleeding edge decorators (see https://docs.metaflow.org/scaling/dependencies/libraries#bleeding-edge-versions-of-the-decorators) which support slightly different authentication slurping.stocky-fountain-57774
01/25/2024, 7:53 AMERROR: Could not find a version that satisfies the requirement job-tracker-ers==0.0.9 (from versions: none)
ERROR: No matching distribution found for job-tracker-ers==0.0.9
It's as if it didn't look in the index-url. Do you have any ideas on the matter ? Thanks again !dry-beach-38304
01/25/2024, 7:54 AM@pypi or the bleeding edge one?stocky-fountain-57774
01/25/2024, 7:57 AMstocky-fountain-57774
01/25/2024, 8:01 AMdry-beach-38304
01/25/2024, 8:04 AMdry-beach-38304
01/25/2024, 8:06 AMMETAFLOW_DEBUG_CONDA=1 as an env var) so I would try with those. If you want to stick with the default ones, @bulky-afternoon-92433 may be able to help when he comes online as I am a lot less familiar with that implementation. I do know it should pick up the index-url from the pip.conf so it is possible the pip bieng used is not using that pip.conf?stocky-fountain-57774
01/25/2024, 9:13 AMstocky-fountain-57774
01/25/2024, 9:51 AM@pypi , I found that the error comes from the --isolated option in pip install generated. which ignores user env variables and configuration. A bit annoying when you need it to connect to cloud artifact πbulky-afternoon-92433
01/25/2024, 10:49 AMpip config list
β’ if there's an index-url or extra-index-url, these are passed as part of the pip commands inside the underlying conda environment
β¦ this is also why there is a limitation regarding authentication, where currently the credentials need to be a part of the url.
β’ if there is a custom index-url configured, this will override pip defaults, leading to no lookup in pypi index
β¦ custom indices like AWS codeartifact can be configured with an upstream to make public packages available
β¦ alternatively the default pypi repo can be added as an extra index in the config <https://pypi.org/simple>bulky-afternoon-92433
01/25/2024, 10:53 AMbulky-afternoon-92433
01/25/2024, 10:58 AMpip install --dry-run --only-binary=:all: somepackage==1.2.3
which is what is happening under the hood during environment resolvingbulky-afternoon-92433
01/25/2024, 11:10 AMstocky-fountain-57774
01/25/2024, 11:22 AMstocky-fountain-57774
01/25/2024, 11:24 AM[global]
index-url = <https://aws:token@pypi-ers-111112222333.d.codeartifact.eu-central-1.amazonaws.com/pypi/pypi-ers-repository/simple/>stocky-fountain-57774
01/25/2024, 11:29 AMstocky-fountain-57774
01/25/2024, 11:33 AMstocky-fountain-57774
01/25/2024, 11:33 AMbulky-afternoon-92433
01/25/2024, 11:46 AMbulky-afternoon-92433
01/25/2024, 11:50 AM