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

Fix TPU tests on master builds #15349

Merged
merged 6 commits into from
Oct 31, 2022
Merged

Fix TPU tests on master builds #15349

merged 6 commits into from
Oct 31, 2022

Conversation

carmocca
Copy link
Contributor

@carmocca carmocca commented Oct 27, 2022

What does this PR do?

Jobs triggered from master do not have a PR number.

Also install both packages separately.

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

None

cc @carmocca @akihironitta @Borda @kaushikb11 @rohitgr7

@carmocca carmocca added ci Continuous Integration accelerator: tpu Tensor Processing Unit labels Oct 27, 2022
@carmocca carmocca requested a review from Borda as a code owner October 27, 2022 00:38
@carmocca carmocca self-assigned this Oct 27, 2022
@carmocca
Copy link
Contributor Author

The changes here will not apply until they are merged. So this is ready. I'll check it after it's merged. This is fine because TPUs are not a required check

@carmocca carmocca added this to the v1.8.x milestone Oct 27, 2022
@carmocca carmocca enabled auto-merge (squash) October 27, 2022 16:26
@mergify mergify bot added the ready PRs ready to be merged label Oct 31, 2022
@carmocca carmocca merged commit 7f3e9de into master Oct 31, 2022
@carmocca carmocca deleted the ci/tpu-amster branch October 31, 2022 15:58
@awaelchli awaelchli modified the milestones: v1.8.x, v1.8 Oct 31, 2022
fi

echo "--- Install packages ---"
PACKAGE_NAME=lite pip install -e .[dev]
Copy link
Contributor

Choose a reason for hiding this comment

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

I stumbled upon something interesting regarding these two lines when I tried setting up a machine on Colab to run my TPU tests.

When you run PACKAGE_NAME=lite pip install -e .[dev], it will write _PACKAGE_NAME = "lite" in setup.py. This is done by these quite surprising lines of code: https://github.com/Lightning-AI/lightning/blob/master/setup.py#L72-L78

When you run PACKAGE_NAME=pytorch pip install -e .[dev] it installs once again lightning_lite because the PACKAGE_NAME variable is simply ignored.

You can see it in the logs of the run on the master branch:

When running PACKAGE_NAME=lite pip install .[dev] without the -e option, it does not override the code in setup.py, so I could successfully set up the libraries like this.

Mysteriously, the tests that require pytorch_lightning run successfully, so it must be installed somehow. I presumed that it may come pre-installed in the docker image, but I couldn't deduce it from the commands given on the docker hub page.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, and I think it is rightthat the next env. variable is ignored because aside from the edit of setup.py also, MANIFEST.in is updated...

TLDR, I think we can drop -e from all CI 🦦

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Opened #15489 and #15490. Also related to #15474

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accelerator: tpu Tensor Processing Unit ci Continuous Integration ready PRs ready to be merged
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants