Skip to content

Conversation

@Borda
Copy link
Collaborator

@Borda Borda commented May 6, 2022

What does this PR do?

Closes #12383
set all max versions of today's latest released version and define dependabot to open PR when a new release appears...
in setup add logic for removing this upper bound unless it is commented in as strict

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?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

  • 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

Did you have fun?

Make sure you had fun coding 🙃

cc @carmocca @akihironitta @Borda @tchaton @rohitgr7

@Borda Borda added the ci Continuous Integration label May 6, 2022
@Borda Borda mentioned this pull request May 6, 2022
12 tasks
@Borda Borda added the priority: 1 Medium priority task label May 6, 2022
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Copy link
Contributor

@awaelchli awaelchli left a comment

Choose a reason for hiding this comment

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

awesome!



def _load_requirements(path_dir: str, file_name: str = "requirements.txt", comment_char: str = "#") -> List[str]:
def _load_requirements(
Copy link
Contributor

Choose a reason for hiding this comment

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

can you explain what the core change is here, on a high level? I'm not exactly sure what it does or when it is used

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

when you install PL as a python package our requirements listed in files need to be loaded and passed to the setup function... till now we just dropped all comments and HTTP links, but now we also remove all upper bound version limitations unless it is intended (the commend after package includes word strict)

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay I see. So basically if the requirement says x >= 1.5, <1.7, we will install as if x >= 1.5. Sounds good! Do we actually have examples where the comment includes "strict"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Okay I see. So basically if the requirement says x >= 1.5, <1.7, we will install as if x >= 1.5

the pattern for replacement is <= not < as the dependabot would list the last feasible version

Do we actually have examples where the comment includes "strict"?

not yet as we do not have such case yet :/

Copy link
Contributor

Choose a reason for hiding this comment

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

This is nice! Please correct me if I'm wrong, but with this logic, we don't need to change anything in the requirements files (i.e., we don't need to unpin the upper-bounded versions) when releasing, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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



def _load_requirements(path_dir: str, file_name: str = "requirements.txt", comment_char: str = "#") -> List[str]:
def _load_requirements(
Copy link
Contributor

Choose a reason for hiding this comment

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

Okay I see. So basically if the requirement says x >= 1.5, <1.7, we will install as if x >= 1.5. Sounds good! Do we actually have examples where the comment includes "strict"?

@Borda Borda requested a review from carmocca May 9, 2022 06:45
@Borda Borda added this to the 1.6.x milestone May 9, 2022
Copy link
Contributor

@akihironitta akihironitta left a comment

Choose a reason for hiding this comment

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

The change in setup_tools.py is very interesting 🚀

rich>=10.2.2,!=10.15.*
matplotlib>3.1, <=3.5.1
torchtext>=0.9.*, <=0.12.0
omegaconf>=2.0.5, <=2.1.*
Copy link
Contributor

Choose a reason for hiding this comment

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

noob question: How is it different from specifying the exact version? e.g. <=2.1.* vs. <=2.1.2

Not sure why some use .* and others use exact versions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

.* includes all bugfixes...
<=2.1.* is the same as <2.2

Copy link
Contributor

Choose a reason for hiding this comment

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

Should all upper bounds be written that way then?

For example,

- matplotlib>3.1, <=3.5.1
- torchtext>=0.9.*, <=0.12.0
+ matplotlib>3.1, <=3.5.*
+ torchtext>=0.9.*, <=0.12.*

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's nothing critical, but I'm just curious why some are written so while others aren't.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we can convert them to a specific version :)

Copy link
Contributor

@akihironitta akihironitta May 10, 2022

Choose a reason for hiding this comment

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

IMHO, we should have specific versions for all packages to further reduce the possibility of something getting broken. (meaning we shouldn't use *.)

Co-authored-by: Akihiro Nitta <nitta@akihironitta.com>
@Borda Borda requested a review from akihironitta May 9, 2022 10:57
@mergify mergify bot added the has conflicts label May 9, 2022
@mergify mergify bot added ready PRs ready to be merged has conflicts and removed has conflicts ready PRs ready to be merged labels May 10, 2022
@mergify mergify bot added ready PRs ready to be merged and removed has conflicts ready PRs ready to be merged labels May 11, 2022
horovod>=0.21.2,!=0.24.0 # no need to install with [pytorch] as pytorch is already installed
hivemind>=1.0.1; sys_platform == 'linux'
# no need to install with [pytorch] as pytorch is already installed
horovod>=0.21.2,!=0.24.0, <=0.24.3
Copy link
Contributor

Choose a reason for hiding this comment

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

The comment will go next to horovod.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it was too long line, but yes, we can move it back...

Copy link
Collaborator Author

@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.

->

@lexierule lexierule merged commit fec9a09 into master May 12, 2022
@lexierule lexierule deleted the req/freeze branch May 12, 2022 13:14
carmocca added a commit that referenced this pull request May 13, 2022
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: Akihiro Nitta <nitta@akihironitta.com>
carmocca added a commit that referenced this pull request May 31, 2022
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: Akihiro Nitta <nitta@akihironitta.com>
lexierule pushed a commit that referenced this pull request Jun 1, 2022
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
Co-authored-by: Akihiro Nitta <nitta@akihironitta.com>
@rohitgr7 rohitgr7 mentioned this pull request Jul 1, 2022
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous Integration priority: 1 Medium priority task ready PRs ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants