-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathpyproject.toml
More file actions
164 lines (149 loc) · 4.94 KB
/
Copy pathpyproject.toml
File metadata and controls
164 lines (149 loc) · 4.94 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
[build-system]
requires = ["uv_build>=0.11.3,<0.12"]
build-backend = "uv_build"
[project]
name = "unilab"
version = "0.1.0"
description = "Universal Lab for Robot Learning"
readme = "README.md"
license = "Apache-2.0"
license-files = ["LICENSE"]
requires-python = ">=3.10,<3.14"
dependencies = [
"numpy",
"numba",
"torch==2.9.0 ; sys_platform == 'linux' and platform_machine == 'aarch64'",
"torch==2.7.0 ; sys_platform != 'linux' or platform_machine != 'aarch64'",
"gymnasium",
"imageio",
"etils",
"hydra-core>=1.3",
"tensordict",
"rsl-rl-lib>=5.0.0",
"packaging",
"mediapy",
"tensorboard",
"setuptools<70",
"rich",
"tqdm",
"typing-extensions",
"mlx ; sys_platform == 'darwin'",
"lark>=1.3.1",
"wandb",
"notebook>=7.5.5",
"onnxruntime<1.20 ; python_version < '3.11'",
"onnxruntime>=1.20 ; python_version >= '3.11'",
"huggingface_hub>=0.25",
"ninja ; sys_platform == 'linux'",
"imageio-ffmpeg>=0.6.0",
]
[project.scripts]
train = "unilab.cli:train_main"
eval = "unilab.cli:eval_main"
demo = "unilab.cli:demo_main"
unilab-complete = "unilab.tools.completion:main"
unilab-viz-nan = "unilab.tools.viz_nan:main"
unilab-export-scene = "unilab.tools.export_scene:main"
unilab-render-teaser = "unilab.tools.render_teaser:main"
unilab-import-robot = "unilab.tools.import_robot:main"
unilab-pull-assets = "unilab.tools.pull_assets:main"
[project.optional-dependencies]
mujoco = [
"mujoco>=3.5,<3.11",
"mujoco-uni-runtime==0.3.0",
# pybind11/wheel are build requirements of mujoco-uni-runtime, which is
# compiled in this environment (see no-build-isolation-package below).
"pybind11>=2.12",
"wheel",
]
motrix = ["motrixsim-core==0.8.2"]
viser = ["viser>=1.0.26", "trimesh>=3.21.7"]
[dependency-groups]
dev = ["pytest", "pytest-cov", "ruff", "mypy", "pyright>=1.1.408"]
[[tool.uv.index]]
name = "pytorch-cu128"
url = "https://download.pytorch.org/whl/cu128"
explicit = true
[[tool.uv.index]]
name = "r2-cu130"
url = "https://download-r2.pytorch.org/whl/cu130"
explicit = true
[tool.uv.sources]
torch = [
{ index = "r2-cu130", marker = "sys_platform=='linux' and platform_machine=='aarch64'" },
{ index = "pytorch-cu128", marker = "sys_platform=='linux' and platform_machine=='x86_64'" },
{ index = "pytorch-cu128", marker = "sys_platform=='win32'" },
]
[tool.uv]
exclude-dependencies = ["torchvision"]
# Build mujoco-uni-runtime against the mujoco version locked in this project
# environment instead of an isolated build env (its native extension records
# the build-time mujoco version and refuses to load on mismatch). Prebuilt
# wheels on the index are bound to one specific mujoco build, so always
# compile from the sdist here. After changing the mujoco version, run
# `uv cache clean mujoco-uni-runtime && uv sync --extra mujoco
# --reinstall-package mujoco-uni-runtime` to force a fresh in-env build
# (uv's build cache cannot see that the extension depends on mujoco).
no-build-isolation-package = ["mujoco-uni-runtime"]
no-binary-package = ["mujoco-uni-runtime"]
required-environments = [
"sys_platform == 'darwin' and platform_machine == 'arm64'",
"sys_platform == 'linux' and platform_machine == 'x86_64'",
"sys_platform == 'linux' and platform_machine == 'aarch64'",
]
[tool.ruff]
line-length = 100
target-version = "py310"
src = ["src"]
extend-exclude = [".history"]
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W"]
ignore = [
"E501",
"N806",
"E402",
"F401",
"N801",
"F821",
"E741",
"N802",
"N803",
"N812",
]
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true
no_site_packages = true
exclude = [
"src/unilab/algos/torch/rsl_rl/", # vendored third-party, tracked in .gitignore
]
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"slow: long-running training or script smoke tests, or cumulatively expensive backend matrices",
]
addopts = "--tb=short -m 'not slow'"
[tool.coverage.run]
source = ["src/unilab"]
omit = ["*/rsl_rl/*"]
[tool.coverage.report]
exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:"]
[tool.pyright]
pythonVersion = "3.10"
venvPath = "."
venv = ".venv"
include = ["src/unilab"]
exclude = [
"src/unilab/algos/torch/rsl_rl/", # vendored third-party
"src/unilab/algos/mlx/", # MLX stubs incomplete, macOS-only
"src/unilab/algos/torch/common/ane_*", # Apple Neural Engine, macOS-only
"src/unilab/base/backend/", # mujoco-uni-runtime stubs mismatch; optional backends
"src/unilab/envs/", # mujoco-uni-runtime internal API, stubs mismatch
"src/unilab/terrains/", # mujoco-uni-runtime MjSpec API, stubs mismatch
"src/unilab/training/monitoring.py", # optional pynvml/psutil deps
"src/unilab/visualization/", # direct mujoco C bindings + optional viser deps
]
reportMissingImports = "warning"
reportMissingModuleSource = "none"