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

build: update base and development dependencies #8

Merged
merged 4 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ jobs:
python-version: ["3.10", "3.12"]
runs-on: [ubuntu-latest, macos-latest, windows-latest]

include:
- python-version: pypy-3.10
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
Expand Down
15 changes: 7 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,22 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.3.5"
rev: v0.4.6
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
args: ["--fix", "--show-fixes", "--preview"]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.9.0"
rev: v1.10.0
hooks:
- id: mypy
files: src|tests
args: [--no-install-types]
additional_dependencies:
- pytest
Copy link
Contributor

Choose a reason for hiding this comment

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

You should add pytest again, it now complains about that in the test.

- typing-extensions>=4.10.0
- types-all

- dace==0.15.1
- jax[cpu]==0.4.28
- numpy==1.26.4
- repo: https://github.com/codespell-project/codespell
rev: "v2.2.6"
hooks:
Expand All @@ -81,7 +80,7 @@ repos:
- id: disallow-caps
name: Disallow improper capitalization
language: pygrep
entry: PyBind|Numpy|Cmake|CCache|Github|PyTest
entry: PyBind|Numpy|Cmake|CCache|Github|PyTest|Dace|Jace
exclude: .pre-commit-config.yaml

- repo: https://github.com/abravalheri/validate-pyproject
Expand Down
4 changes: 2 additions & 2 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ A kind of roadmap that gives a rough idea about how the project will be continue
- [x] Being able to perform _some_ translations [PR#3](https://github.com/GridTools/jace/pull/3).
- [ ] Basic functionalities:
- [ ] Annotation `@jace.jit`.
- [ ] Composable with Jax, i.e. take the Jax derivative of a Jace annotated function.
- [ ] Composable with Jax, i.e. take the Jax derivative of a JaCe annotated function.
- [ ] Implementing the `stages` model that is supported by Jax.
- [ ] Handling Jax arrays as native input (only on single host).
- [ ] Cache the compilation and lowering results for later reuse.
Expand Down Expand Up @@ -56,7 +56,7 @@ These are more general topics that should be addressed at one point.

# Optimization & Transformations

The SDFG generated by Jace have a very particular structure, thus we could and probably should write some highly targeted optimization passes for them.
The SDFG generated by JaCe have a very particular structure, thus we could and probably should write some highly targeted optimization passes for them.
Our experiments with the prototype showed that the most important transformation is Map fusion and the one in DaCe is essentially broken.

- [ ] Modified state fusion; Because of the structure we have, this could make `Simplify` much more efficient.
Expand Down
21 changes: 18 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,25 @@ classifiers = [
"Topic :: Scientific/Engineering",
"Typing :: Typed"
]
dependencies = []
dependencies = [
"dace>=0.15",
"jax[cpu]>=0.4.24",
"numpy>=1.26.0"
]
description = "JAX jit using DaCe (Data Centric Parallel Programming)"
name = "JaCe"
readme = "README.md"
requires-python = ">=3.10"
version = "0.1.0"
license.file = "LICENSE"

[project.optional-dependencies]
cuda12 = [
"cupy-cuda12x>=12.1.0",
"jax[cuda12]>=0.4.24",
"optuna>=3.4.0"
]

[project.urls]
"Bug Tracker" = "https://github.com/GridTools/JaCe/issues"
Changelog = "https://github.com/GridTools/JaCe/releases"
Expand Down Expand Up @@ -65,7 +76,7 @@ warn_unused_ignores = true
disallow_incomplete_defs = false
disallow_untyped_defs = false
ignore_missing_imports = true
module = "tests.*"
module = ["tests.*", "dace.*", "jax.*", "jaxlib.*"]

# -- pytest --
[tool.pytest]
Expand Down Expand Up @@ -112,14 +123,15 @@ extend-select = [
"SIM", # flake8-simplify # TODO: in evaluation
"T10", # flake8-debugger
"T20", # flake8-print # TODO: in evaluation
"TCH", # flake8-type-checking # TODO: in evaluation
"NPY" # NumPy specific rules
]
ignore = [
'B905', # [zip-without-explicit-strict]
'E501', # [line-too-long]
'UP038' # [non-pep604-isinstance]
]
ignore-init-module-imports = true
# ignore-init-module-imports = true # deprecated in preview mode
unfixable = []

[tool.ruff.lint.isort]
Expand All @@ -145,6 +157,9 @@ section-order = [
'local-folder'
]

[tool.ruff.lint.isort.sections]
tests = ["tests", "unit_tests", "integration_tests"]

[tool.ruff.lint.per-file-ignores]
"!tests/**.py" = ["PT"] # Ignore `flake8-pytest-style` everywhere except in `tests/`
"noxfile.py" = ["T20"] # Ignore `flake8-print`
Expand Down