Metadata-Version: 2.4
Name: aps-ai-beamline-controller
Version: 0.0.70
Summary: AI-driven Beamline Controller
Author-email: Luca Rebuffi <lrebuffi@anl.gov>
Maintainer-email: "XSD-OPT Group @ APS-ANL" <lrebuffi@anl.gov>
License-Expression: BSD-3-Clause
Project-URL: Homepage, https://github.com/APS-XSD-OPT-Group/AI-Beamline-Controller
Project-URL: Download, https://github.com/APS-XSD-OPT-Group/AI-Beamline-Controller
Keywords: dictionary,glossary,synchrotron,simulation
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: X11 Applications :: Qt
Classifier: Environment :: Console
Classifier: Environment :: Plugins
Classifier: Programming Language :: Python
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aps-beamline-driver>=1.0.48
Requires-Dist: scikit-learn
Requires-Dist: torch==2.12.1
Requires-Dist: torchvision==0.27.1
Requires-Dist: torchaudio==2.11.0
Requires-Dist: ax-platform==1.3.1
Dynamic: license-file
Dynamic: requires-dist

# AI-Beamline-Controller
Ai-driven autonomous beamline controller


`pip install aps-ai-beamline-controller` detects the **installing machine's** NVIDIA driver and
pulls the matching torch / torchvision / torchaudio build, plus `ax-platform`.
No `--index-url` needed by the user.

## How it works

Dependencies are declared `dynamic` (PEP 643), so they are computed when the
user's pip **builds the wheel locally** from the sdist. At that point
`setup.py`:

1. runs `nvidia-smi` to read the host's max CUDA version,
2. maps it to a `(torch release, CUDA build)` tier,
3. queries the PyTorch index and finds the exact wheel URLs matching the
   running interpreter's tags,
4. emits them as PEP 508 direct-reference requirements (`torch @ https://...`).

pip then downloads those exact wheels.

Tier map (edit `TIERS` in `setup.py` to change):

| driver CUDA | torch  | build |
|-------------|--------|-------|
| ≥ 13.0      | 2.12.1 | cu130 |
| 12.8–12.9   | 2.11.0 | cu128 |
| 12.6–12.7   | 2.12.1 | cu126 |
| 12.4–12.5   | 2.6.0  | cu124 |
| 11.8–12.3   | 2.6.0  | cu118 |
| none/older  | 2.12.1 | cpu   |

## Publishing — sdist ONLY

This is the load-bearing rule. If a wheel is on PyPI, pip installs it and the
detection never runs. Build and upload **only** the sdist:

```bash
python -m build --sdist        # produces dist/*.tar.gz only
twine upload dist/*.tar.gz     # do NOT upload any .whl
```

The uploaded sdist's metadata says `dynamic = ["dependencies"]` (no direct
URLs), so PyPI accepts it. The direct URLs exist only in the wheel each user
builds locally, which PyPI never sees.
