-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
115 lines (100 loc) · 3.23 KB
/
pyproject.toml
File metadata and controls
115 lines (100 loc) · 3.23 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
[project]
name = "rulka"
version = "1.8.0"
description = "Trackmania AI with reinforcement learning - Rulka fork"
license = {text = "MIT"}
requires-python = ">=3.10,<3.12"
readme = "README.md"
authors = [
{name = "artyo"},
]
dependencies = [
# Core ML (PyTorch version/source pinned under [tool.uv.sources])
"torch>=2.7.0",
"torchvision>=0.22.0",
"torchaudio>=2.7.0",
"torchrl>=0.6.0",
# Scientific computing
"numpy>=1.26.4,<2.0", # numpy 2.x breaks numba
"scipy>=1.14.0",
"numba>=0.60.0",
# Visualization & monitoring
"matplotlib>=3.9.0",
"tensorboard>=2.18.0",
"prettytable>=3.11.0",
"art>=6.3",
# Image processing
"opencv-python>=4.10.0",
# Utilities
"joblib>=1.4.0",
"psutil>=6.0.0",
"tqdm>=4.66.0",
"setuptools",
"pydantic>=2.0",
"pydantic-settings>=2.0",
"pyyaml>=6.0",
"python-dotenv>=1.0",
# BC pretrain (scripts/pretrain_bc.py) and Level-0 pretrain Lightning path
"lightning>=2.0.0",
# TrackMania specific
"readwritememory",
"tminterface",
"pygbx",
# Windows specific
"pywin32>=306 ; sys_platform == 'win32'",
"triton-windows>=3.2.0 ; sys_platform == 'win32'", # Triton backend for torch.compile on Windows
# Linux specific
"python-libxdo>=0.1.0 ; sys_platform == 'linux'",
]
[project.optional-dependencies]
dev = [
"ruff>=0.8.0",
]
# For trackmania_rl.pretrain (scripts/pretrain_visual_backbone.py): lightly (SimCLR), timm (future backbones). Lightning is a core dependency.
pretrain = [
"lightly>=1.5.0",
"timm>=1.0.0",
]
# Build docs: pip install -e ".[doc]". For IQN architecture diagrams, install system Graphviz (dot on PATH).
doc = [
"sphinx>=8.0.0",
"sphinx_rtd_theme>=3.0.0",
"sphinxcontrib-youtube>=1.4.0",
]
# For scripts/dataset/convert_to_hf_dataset.py and push_to_hf.py: Hugging Face Hub upload.
hf = [
"datasets>=3.0.0",
"huggingface_hub>=0.25.0",
]
# PPO with optional Hugging Face vision backbone (ViT etc.): pip install -e ".[policy]"
# timm: Hub ids like timm/vit_* use transformers TimmWrapper and require timm at runtime.
policy = [
"transformers>=4.45.0",
"accelerate>=1.0.0",
"timm>=1.0.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["trackmania_rl", "config_files"]
[tool.ruff]
include = ["pyproject.toml", "trackmania_rl/**/*.py", "scripts/**/*.py", "config_files/**/*.py"]
line-length = 140
[tool.uv]
# Windows x64 only: PyTorch cu128 nightlies on Linux pull triton with exact git builds that uv's
# indexes do not provide, so the lock becomes unsatisfiable for linux-* even when resolving on Windows.
# On Linux/WSL: install torch yourself (pip / pytorch.org) or maintain a separate lock for Linux.
environments = [
"sys_platform == 'win32' and platform_machine == 'AMD64'",
]
# PyTorch nightly with CUDA 12.8 (e.g. RTX 50xx / sm_120)
index-strategy = "unsafe-best-match"
[[tool.uv.index]]
name = "pytorch-cu128-nightly"
url = "https://download.pytorch.org/whl/nightly/cu128"
explicit = true
[tool.uv.sources]
torch = { index = "pytorch-cu128-nightly" }
torchvision = { index = "pytorch-cu128-nightly" }
torchaudio = { index = "pytorch-cu128-nightly" }