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

WIP: Add node setup&teardown #16

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

WIP: Add node setup&teardown #16

wants to merge 10 commits into from

Conversation

zhanyuanucb
Copy link
Contributor

Address issue #15

@zhanyuanucb zhanyuanucb changed the title Add node setup&teardown WIP: Add node setup&teardown Aug 5, 2022
@@ -74,21 +95,19 @@ def sentiment(model: FilePath, sentences: DirectoryPath) -> DirectoryPath:


@pipeline
def infer_pipeline(translate_model: FilePath,
sentiment_model: FilePath,
def infer_pipeline(sentiment_model: FilePath,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should not be changing the structure of the example DAG with this PR. Should maintain backward compatibility.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so make a new example for new features?

Copy link
Contributor

Choose a reason for hiding this comment

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

No I mean, this PR adds the setup and teardown methods. The only change needed in the example should be to add a setup and teardown step to one of the tasks. Not sure why we need to make these other changes like to the task arguments, removing a file input, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the file input for translation model since now the translation model is initialized by task's setup method. If we need to keep it, then I guess it should mean something else? For example, model checkpoint.

example/example.py Outdated Show resolved Hide resolved
pirlib/task.py Outdated Show resolved Hide resolved
pirlib/task.py Show resolved Hide resolved
@zhanyuanucb zhanyuanucb self-assigned this Aug 11, 2022
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