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

python: separate build- and test-related pip dependencies #1874

Merged
merged 1 commit into from
Feb 14, 2023
Merged

python: separate build- and test-related pip dependencies #1874

merged 1 commit into from
Feb 14, 2023

Conversation

ashay
Copy link
Collaborator

@ashay ashay commented Feb 12, 2023

We want to ensure that pip packages required for building torch-mlir
should be included in the dependencies of torch-mlir, but we don't want
the pip packages required for testing of torch-mlir to be included
among the dependencies. To be able to specify and install one set of
dependencies and not the other, this patch separates the pip packages
into two files: build-requirements.txt and test-requirements.txt.

This patch also updates references to the requirements.txt file so that
CI builds that run end-to-end tests install test-related pip
dependencies while everything else (including WHL builds) sticks to just
the build-related pip dependencies.

Despite this change, this patch should not affect a torch-mlir
developer's workflow. More precisely, since this patch makes the
top-level requirements.txt file refer to both build-requirements.txt and
test-requirements.txt files, a torch-mlir developer should be able to
continue referring to the requirements.txt file without any impact.

@makslevental
Copy link
Collaborator

@ashay I haven't been tracking this work stream but I might've thrown a small monkey wrench in your works since I refactored requirements.txt: https://github.com/llvm/torch-mlir/blob/main/requirements.txt#L1-L2

@ashay
Copy link
Collaborator Author

ashay commented Feb 13, 2023

@ashay I haven't been tracking this work stream but I might've thrown a small monkey wrench in your works since I refactored requirements.txt: https://github.com/llvm/torch-mlir/blob/main/requirements.txt#L1-L2

Oh, no worries at all! I saw your PR and it looks like it will not be too hard to merge. I'm currently waiting for the GitHub builder issue to be resolved, after which I'll rebase.

Thanks for the heads up, though!

We want to ensure that pip packages required for building torch-mlir
should be included in the dependencies of torch-mlir, but we don't want
the pip packages required for _testing_ of torch-mlir to be included
among the dependencies.  To be able to specify and install one set of
dependencies and not the other, this patch separates the pip packages
into two files: build-requirements.txt and test-requirements.txt.

This patch also updates references to the requirements.txt file so that
CI builds that run end-to-end tests install test-related pip
dependencies while everything else (including WHL builds) sticks to just
the build-related pip dependencies.

Despite this change, this patch should not affect a torch-mlir
developer's workflow.  More precisely, since this patch makes the
top-level requirements.txt file refer to both build-requirements.txt and
test-requirements.txt files, a torch-mlir developer should be able to
continue referring to the requirements.txt file without any impact.
@makslevental makslevental self-requested a review February 14, 2023 00:34
Copy link
Collaborator

@makslevental makslevental left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Collaborator

@powderluv powderluv left a comment

Choose a reason for hiding this comment

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

Lets land it and I can help watch for any breakages. Maybe worth a oneshot build too.

@ashay
Copy link
Collaborator Author

ashay commented Feb 14, 2023

I now have doubts about whether this drops the torchvision dependency from the WHL files. It probably does for the macOS and Windows WHL files but I am not sure about Linux.

I am merging it now, and I'll start a one shot release build, but I'll come back to this tomorrow and see if the dependencies are updated as we expect.

@ashay ashay merged commit 67ab708 into llvm:main Feb 14, 2023
@ashay ashay deleted the ashay/separate-build-and-test-pip-deps branch February 14, 2023 03:22
gpetters94 pushed a commit to gpetters94/mlir-npcomp that referenced this pull request May 10, 2023
We want to ensure that pip packages required for building torch-mlir
should be included in the dependencies of torch-mlir, but we don't want
the pip packages required for _testing_ of torch-mlir to be included
among the dependencies.  To be able to specify and install one set of
dependencies and not the other, this patch separates the pip packages
into two files: build-requirements.txt and test-requirements.txt.

This patch also updates references to the requirements.txt file so that
CI builds that run end-to-end tests install test-related pip
dependencies while everything else (including WHL builds) sticks to just
the build-related pip dependencies.

Despite this change, this patch should not affect a torch-mlir
developer's workflow.  More precisely, since this patch makes the
top-level requirements.txt file refer to both build-requirements.txt and
test-requirements.txt files, a torch-mlir developer should be able to
continue referring to the requirements.txt file without any impact.
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.

pip install torch-mlir keeps downloading all the versions of the package but does not install them
3 participants