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

Concatenate method for DataPipeline class #84

Merged
merged 33 commits into from
Oct 18, 2023

Conversation

am831
Copy link
Contributor

@am831 am831 commented Oct 4, 2023

What does this PR do? Please describe:
Implements concat method in the DataPipeline class which concatenates two data pipelines.

Check list:

  • Was the content of this PR discussed and approved via a GitHub issue? (no need for typos or documentation improvements)
  • Did you read the contributor guideline?
  • Did you make sure that your PR does only one thing instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests?
  • Did you verify new and existing tests pass locally with your changes?
  • Did you update the CHANGELOG? (no need for typos, documentation, or minor internal changes)

@facebook-github-bot
Copy link

Hi @am831!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@kauterry kauterry self-requested a review October 4, 2023 20:06
@am831 am831 changed the title Concatenate method for data_pipeline class Concatenate method for DataPipeline class Oct 4, 2023
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 5, 2023
@am831 am831 marked this pull request as ready for review October 7, 2023 17:55
@am831 am831 requested a review from cbalioglu as a code owner October 7, 2023 17:55
Copy link
Contributor

@cbalioglu cbalioglu left a comment

Choose a reason for hiding this comment

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

Thanks for your first PR! My main feedback/question is why we need to have two lists of pipelines. I think the ideal API should look like .concat(pipelines: Sequence[DataPipeline]) (in C++ .concat(std::vector<data_pipeline> pipelines), so I can't see the reason for the second "pipelines2".

Looks like there are also some linting and build issues that you can check at the bottom of the PR conversation pane.

fairseq2n/src/fairseq2n/data/cat_data_source.cc Outdated Show resolved Hide resolved
fairseq2n/src/fairseq2n/data/cat_data_source.cc Outdated Show resolved Hide resolved
Copy link
Contributor

@cbalioglu cbalioglu left a comment

Choose a reason for hiding this comment

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

Neat! Looks good to me. Please make sure to annotate your python test class TestConcatOp as I mentioned in our chat. There is also a subtle bug in the constructor initializer, but otherwise looks good to me. Let me know once you addressed the two points and I can stamp it right away.

fairseq2n/src/fairseq2n/data/concat_data_source.cc Outdated Show resolved Hide resolved
fairseq2n/src/fairseq2n/data/concat_data_source.cc Outdated Show resolved Hide resolved
fairseq2n/src/fairseq2n/data/data_pipeline.cc Outdated Show resolved Hide resolved
fairseq2n/src/fairseq2n/data/concat_data_source.cc Outdated Show resolved Hide resolved
Copy link
Contributor

@cbalioglu cbalioglu left a comment

Choose a reason for hiding this comment

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

LGTM!

@cbalioglu cbalioglu merged commit e969622 into facebookresearch:main Oct 18, 2023
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants