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

Rename "master" methods to "main" in ClusterEnvironment plugins #10103

Merged
merged 21 commits into from
Nov 8, 2021

Conversation

awaelchli
Copy link
Contributor

@awaelchli awaelchli commented Oct 24, 2021

What does this PR do?

Fixes #8774
Continues #9094 (repository and branch was deleted)

In addition, converts the main_port and main_address methods to properties. This was requested in #6303.

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

Yes. User with custom cluster environment plugins won't be able to instantiate their existing plugins due to the requirement of main_port, main_address to be abstract. They will have to rename master_port and master_address methods immediately.

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 update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read 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?

I made sure I had fun coding 🙃

Part of #1 (it's a lie, this is just here to avoid noisy GitHub bot)

@awaelchli awaelchli added breaking change Includes a breaking change refactor design Includes a design discussion and removed refactor labels Oct 24, 2021
@awaelchli awaelchli added this to the v1.6 milestone Oct 24, 2021
@awaelchli awaelchli force-pushed the refactor/master-to-main branch from bad1ec1 to 77aca7c Compare November 3, 2021 17:20
@awaelchli awaelchli marked this pull request as ready for review November 4, 2021 01:23
@mergify mergify bot added the ready PRs ready to be merged label Nov 4, 2021
@awaelchli awaelchli changed the title Rename occurrences of the word "master" in distributed code Rename "master" methods to "main" in ClusterEnvironment plugins Nov 4, 2021
@mergify mergify bot added the has conflicts label Nov 4, 2021
@mergify mergify bot removed the has conflicts label Nov 5, 2021
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.

feeling it is just adding confusion if we preserve MASTER_ in OS environment and locally in PL rename as main_ can we do the rename for both?

@awaelchli
Copy link
Contributor Author

To clarify, @Borda the MASTER_* variables in os.environ are set by pytorch and read by pytorch (or rather the distributed backends). We can't rename them, but it's also not a problem because these are not user facing. However, our public API for the cluster plugins is and I think we should update them. Another example was #10105.

Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

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

LGTM !

@justusschock justusschock enabled auto-merge (squash) November 8, 2021 09:30
@justusschock justusschock merged commit a270a79 into master Nov 8, 2021
@justusschock justusschock deleted the refactor/master-to-main branch November 8, 2021 12:32
Raalsky pushed a commit to neptune-ai/pytorch-lightning that referenced this pull request Nov 23, 2021
…tning-AI#10103)

* rename occurrences of master port, master address, maser node, master process

* rename properties

* add property decorators

* occurrences in docs

* update changelog

* update changelog

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add lost method

* create deprecation

* add changelog

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix typo (but it was already there!!!)

* Apply suggestions from code review

Co-authored-by: Justus Schock <[email protected]>

* add todo

* update more occurences

* add types

* add missing import

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Justus Schock <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Includes a breaking change design Includes a design discussion ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rename master* properties in cluster environments to main*
6 participants