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

Input existence checking #117

Merged
merged 2 commits into from
Dec 11, 2024
Merged

Input existence checking #117

merged 2 commits into from
Dec 11, 2024

Conversation

zhengp0
Copy link
Member

@zhengp0 zhengp0 commented Dec 10, 2024

Description

Stop checking input existence if the input is part of the output from upstream stage that hasn't been produced yet.

Please let me know if I misunderstood something here.

…m upstream stage that hasn't been produced yet
@kels271828
Copy link
Member

Were you getting errors?

The way I wrote it, the arg upstream_stages are the stages that you DO want to check (see description in docstring:

upstream_stages : set of str, optional
)

When the function gets called in Pipeline.evaluate(), it only passes the stages that aren't being run (

dep for dep in stage.dependencies if dep not in stages
).

I also added check_exists() to Stage.evaluate() (

self.input.check_exists()
) and ModelStage.evaluate() (
self.input.check_exists()
). This is redundant if you've called Pipeline.evaluate(), so we can check the logic of when we check stage input.

The main reasons to have the check_exists() in the first place is to 1) have more informative error messages, and 2) to fail before running or scheduling anything.

@zhengp0 zhengp0 merged commit e83a13a into release/1.0 Dec 11, 2024
3 of 9 checks passed
@zhengp0 zhengp0 deleted the bugfix/dependency branch December 11, 2024 17:37
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