python-docs-samples
python-docs-samples copied to clipboard
ppai/weather: add weather forecasting sample
Description
This is an end-to-end sample to train a PyTorch model in Google Cloud. It uses Dataflow to create the datasets using Earth Engine data, then trains a PyTorch model in Vertex AI with GPUs, deploys the model to Cloud Run and gets predictions.
Checklist
- [ ] I have followed Sample Guidelines from AUTHORING_GUIDE.MD
- [ ] README is updated to include all relevant information
- [ ] Tests pass:
nox -s py-3.9
(see Test Environment Setup) - [ ] Lint pass:
nox -s lint
(see Test Environment Setup) - [ ] These samples need a new API enabled in testing projects to pass (let us know which ones)
- [ ] These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
- [ ] Please merge this PR for me once it is approved.
- [ ] This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
I am working on adding Cloud Run predictions. The code itself remains pretty much the same, but I had to refactor the directory structures due to Python packaging and how Dataflow and Vertex AI expect files.
I refactored a lot of the directory structure to be able to share the local packages with the appropriate stages of the sample. I also had to split the notebook into multiple notebooks, and make each test independent because there are dependency version incompatibilities between Apache Beam and HuggingFace Datasets (https://github.com/apache/beam/issues/24458).
Overall, the code itself stayed pretty much the same, just some of the files changed place and added a couple extra steps like building the local packages.
Tests are passing locally, although there are currently issues with the testing infrastructure.
HTTPError: 503 Server Error: Service Unavailable
-- transient error, retesting
Merge-on-green attempted to merge your PR for 6 hours, but it was not mergeable because either one of your required status checks failed, one of your required reviews was not approved, or there is a do not merge label. Learn more about your required status checks here: https://help.github.com/en/github/administering-a-repository/enabling-required-status-checks. You can remove and reapply the label to re-run the bot.
Merge-on-green attempted to merge your PR for 6 hours, but it was not mergeable because either one of your required status checks failed, one of your required reviews was not approved, or there is a do not merge label. Learn more about your required status checks here: https://help.github.com/en/github/administering-a-repository/enabling-required-status-checks. You can remove and reapply the label to re-run the bot.
FYI, I just set the "do not merge" label because that build check was stuck. Now it's green.