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

Eager pip install #13198

Closed
wants to merge 6 commits into from
Closed

Eager pip install #13198

wants to merge 6 commits into from

Conversation

carmocca
Copy link
Contributor

@carmocca carmocca commented Jun 1, 2022

What does this PR do?

Fixes the problem described in #13048 (comment)

Does your PR introduce any breaking changes? If yes, please list them.

None

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • [n/a] Did you make sure to update the documentation with your changes? (if necessary)
  • [n/a] Did you write any new necessary tests? (not for typos and docs)
  • [n/a] Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • [n/a] Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

cc @carmocca @akihironitta @Borda @tchaton @rohitgr7

@carmocca carmocca added the ci Continuous Integration label Jun 1, 2022
@carmocca carmocca added this to the 1.6.x milestone Jun 1, 2022
@carmocca carmocca self-assigned this Jun 1, 2022
Copy link
Member

@Borda Borda left a comment

Choose a reason for hiding this comment

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

seem complete for me

@carmocca carmocca marked this pull request as ready for review June 2, 2022 09:55
@carmocca carmocca requested a review from tchaton as a code owner June 2, 2022 09:55
pip install -r requirements/examples.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
pip install -r requirements/test.txt --upgrade
pip install -r requirements/examples.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html -U --upgrade-strategy eager
pip install -r requirements/test.txt -U --upgrade-strategy eager
Copy link
Contributor Author

Choose a reason for hiding this comment

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

CI is failing because a test.txt dependency requires protobuf and since we are marking eager here, it gets upgraded to the latest version since it's not considering the pin in requirements.txt

Not sure about how we can resolve this problem. All requirements would need to be installed together instead of in steps so the resolution algorithm can find a working combination.

@carmocca
Copy link
Contributor Author

Closing, as I don't think we can fix the issue this way reliably.

I think the best option now would be to have some sort of lock file by using a tool like poetry.

@carmocca carmocca closed this Jun 28, 2022
@carmocca carmocca deleted the ci/upgrade-eager branch June 28, 2022 15:45
@Borda Borda restored the ci/upgrade-eager branch June 29, 2022 12:35
@Borda Borda reopened this Jun 29, 2022
@carmocca carmocca removed their assignment Jun 29, 2022
@carmocca carmocca removed this from the pl:1.6.x milestone Jun 29, 2022
@mergify mergify bot removed the has conflicts label Jun 29, 2022
@Borda Borda requested review from akihironitta and a team June 29, 2022 12:44
@Borda
Copy link
Member

Borda commented Jun 29, 2022

@carmocca re-opened and set the eager mode only for the one CI which shall be running the latest versions... I think that is the best place we shall be testing compatibility 🐰

@Borda Borda added the priority: 1 Medium priority task label Jun 29, 2022
@carmocca
Copy link
Contributor Author

But it needs to be done for all requirements, not just PyTorch. In fact, last breakages were from dependabot upgrading DeepSpeed and NumPy.

I don't see how it solves the issue described in #13198 (comment)

@Borda
Copy link
Member

Borda commented Jun 29, 2022

fyi, shall be passing after #13441

@Borda
Copy link
Member

Borda commented Jun 29, 2022

I don't see how it solves the issue described in #13198 (comment)

yes, this won't address installing requirements together but set the proper upgrade for testing the bumped version are correct/feasible so let's do it step by step...
merge this and check how to join and install the remaining req. or do you prefer to do it single PR?

@carmocca
Copy link
Contributor Author

merge this and check how to join and install the remaining req. or do you prefer to do it single PR?

I would prefer to have a general solution that works for all requirements before starting to make changes. This will make any possible issues pop up

@Borda
Copy link
Member

Borda commented Jun 29, 2022

I would prefer to have a general solution that works for all requirements before starting to make changes.

but be aware that no other CI/workflow requires running the latest, other rather uses cache, for example, Conda has specified PT versions and other like dockers are fine to build with a version available not necessary the latest... so I believe we shall just update this CI job

@@ -143,7 +147,7 @@ jobs:
run: |
# adjust versions according installed Torch version
python ./requirements/pytorch/adjust-versions.py requirements/pytorch/examples.txt
pip install -r requirements/pytorch/examples.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
pip install $PIP_FLAG -r requirements/pytorch/examples.txt --find-links "$TORCH_URL --upgrade
Copy link
Member

Choose a reason for hiding this comment

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

so what we can do here is reinstall the all above to reduce installing different versions to be not sliding with example requirements...

@carmocca
Copy link
Contributor Author

The point of this PR was that all installations would use the newest available version.

For "oldest" jobs, there's nothing to do because they are pinned already to the min version: ==
For "latest" jobs, caches mess things up because we don't pin (==) to the max version. For this reason, the version in requirements can be updated when in reality it will fail overnight. Two examples are:

What this PR tried to do is to always force eager ugprades. But this needs to be done for all dependencies. However issues arise from installing different dependencies in different steps since the resolution algorithm does not consider the requirements from a previous step.
It's not just a problem with PyTorch, but every single package.

So I don't see how the changes in the PR now help.

Another option would be to do the max version pinning just as we do for min version pinning.

@stale
Copy link

stale bot commented Jul 14, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If you need further help see our docs: https://pytorch-lightning.readthedocs.io/en/latest/generated/CONTRIBUTING.html#pull-request or ask the assistance of a core contributor here or on Slack. Thank you for your contributions.

@stale stale bot added the won't fix This will not be worked on label Jul 14, 2022
@stale
Copy link

stale bot commented Jul 22, 2022

This pull request is going to be closed. Please feel free to reopen it create a new from the actual master.

@stale stale bot closed this Jul 22, 2022
@carmocca carmocca deleted the ci/upgrade-eager branch July 22, 2022 13:11
@carmocca carmocca mentioned this pull request Feb 1, 2023
12 tasks
@carmocca carmocca self-assigned this Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous Integration has conflicts priority: 1 Medium priority task won't fix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants