-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathpyproject.toml
More file actions
101 lines (89 loc) · 3.08 KB
/
pyproject.toml
File metadata and controls
101 lines (89 loc) · 3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Copyright 2025 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
#
# http://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.
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "torchax"
dependencies = []
requires-python = ">=3.11"
license = {file = "LICENSE"}
dynamic = ["version"]
authors = [
{name = "Han Qi", email = "qihan.dev@gmail.com"},
{name = "Google Cloud Inference Team", email = "cmcs-inference-eng@google.com"},
]
description = "torchax is a library for running Jax and PyTorch together"
readme = "README.md"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
[project.urls]
"Homepage" = "https://github.com/google/torchax"
[tool.hatch.version]
path = "torchax/__init__.py"
[project.optional-dependencies]
cpu = ["jax[cpu]>=0.6.2", "jax[cpu]"]
# Add libtpu index `-f https://storage.googleapis.com/libtpu-wheels/index.html -f https://storage.googleapis.com/libtpu-releases/index.html`
tpu = ["jax[cpu]>=0.6.2", "jax[tpu]"]
cuda = ["jax[cpu]>=0.6.2", "jax[cuda12]"]
odml = ["jax[cpu]>=0.6.2", "jax[cpu]"]
[tool.hatch.build.targets.wheel]
packages = ["torchax"]
[tool.ruff]
target-version = "py311"
line-length = 88
indent-width = 2
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # do not perform function calls in argument defaults
"B904", # Allow raising exceptions without from e
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # Allow unused imports in __init__.py
"test_*.py" = ["F401", "F811"] # Allow unused imports and redefinitions in tests
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.pytest.ini_options]
testpaths = ["test", "test_dist"]
python_files = "test_*.py"
python_classes = "Test*"
python_functions = "test_*"
addopts = "-v --tb=short"