Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: attach conda decorator in conda_base flow_init #2028

Merged
merged 2 commits into from
Sep 16, 2024

Conversation

saikonen
Copy link
Collaborator

attach conda decorator to steps in the conda_base decorator when using it.

This solves an issue where a virtual environment implemented in an extension does not append conda as part of environment decospecs, but still needs to know whether a step needs to execute on conda due to the flow decorator.

decorators._attach_decorators is a no-op for existing conda decorators on a step so this should not have adverse effects.

@saikonen saikonen requested a review from savingoyal September 13, 2024 12:18
# Important for extensions implementing custom virtual environments
from metaflow import decorators

decorators._attach_decorators(flow, ["conda"])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need a symmetric change for pypi_base too? if not, can you add the reasoning as a code comment?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pypi_base already does this for itself so no change needed on that side. I'll refine the above comment a bit to clarify.

@savingoyal savingoyal merged commit a07bfb5 into master Sep 16, 2024
26 checks passed
@savingoyal savingoyal deleted the fix/conda_base-should-attach-step-decorators branch September 16, 2024 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants