-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PiperOrigin-RevId: 610838657
- Loading branch information
Showing
47 changed files
with
14,574 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: CI | ||
|
||
on: | ||
# Triggers the workflow on push or pull request events but only for the main branch | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: "python ${{ matrix.python-version }}" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.10", "3.11"] | ||
steps: | ||
- name: Cancel previous | ||
uses: styfle/cancel-workflow-action@0.7.0 | ||
with: | ||
access_token: ${{ github.token }} | ||
if: ${{github.ref != 'refs/head/main'}} | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: | | ||
python -m pip install --upgrade pip wheel | ||
echo "::set-output name=dir::$(pip cache dir)" | ||
- name: pip cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }} | ||
- name: Install NeuralGCM | ||
run: | | ||
pip install -e .[tests] | ||
- name: Run unit tests | ||
run: | | ||
pytest -v neuralgcm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
*.egg-info | ||
.DS_Store | ||
build | ||
dist | ||
docs/.ipynb_checkpoints | ||
docs/_build | ||
docs/_autosummary | ||
__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright 2024 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
"""Configure FLAGS with default values for absltest.""" | ||
from absl import app | ||
|
||
try: | ||
app.run(lambda argv: None) | ||
except SystemExit: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright 2024 Google LLC | ||
|
||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
|
||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
"""Defines the neuralgcm module.""" | ||
|
||
import neuralgcm.correctors | ||
import neuralgcm.decoders | ||
import neuralgcm.diagnostics | ||
import neuralgcm.embeddings | ||
import neuralgcm.encoders | ||
import neuralgcm.equations | ||
import neuralgcm.features | ||
import neuralgcm.filters | ||
import neuralgcm.forcings | ||
import neuralgcm.gin_utils | ||
import neuralgcm.initializers | ||
import neuralgcm.integrators | ||
import neuralgcm.layers | ||
import neuralgcm.mappings | ||
import neuralgcm.model_builder | ||
import neuralgcm.model_utils | ||
import neuralgcm.optimization | ||
import neuralgcm.orographies | ||
import neuralgcm.parameterizations | ||
import neuralgcm.perturbations | ||
import neuralgcm.stochastic | ||
import neuralgcm.towers | ||
|
||
__version__ = "0.1.0" | ||
|
Oops, something went wrong.