Summary
Move the repository-managed Python runtime from 3.12 to 3.14 and replace the optional TensorFlow/Keras experiment dependency with PyTorch. Preserve a lightweight default development environment while keeping a modern optional research surface that can support future 4D work.
This issue no longer assumes the repository will be archived immediately. It is independent of #104; neither issue is a native blocker for the other.
Python 3.14 remains in bugfix support through October 2030, while Python 3.12 is already security-fixes-only and reaches end of life in October 2028.
Motivation
- Standardize on PyTorch across related research repositories instead of maintaining TensorFlow expertise for one legacy experiment.
- Reduce friction when sharing experiment patterns, fixtures, and tooling with future 4D development.
- Keep CDT++ useful as a reproducible implementation reference if it later informs Praxis research, without making Python responsible for the scientific oracle.
- Retain Comet for consistent optional experiment tracking while keeping local artifacts authoritative and tests offline.
Compatibility basis
TensorFlow 2.21.0 currently publishes CPython wheels for 3.10 through 3.13, but not 3.14. PyTorch 2.13.0 publishes CPython 3.14 wheels for Windows x86-64, Linux x86-64/aarch64, and macOS 14 ARM64, including regular and free-threaded builds. This issue targets regular CPython; free-threaded support is optional follow-up work.
Comet provides a first-class PyTorch integration for automatic graph/loss logging, watch() support for weights, biases, and gradients, PyTorch checkpoint logging, and framework-independent manual metric/parameter/figure logging.
References:
Scope
- Update
.python-version and project.requires-python to select Python 3.14 as the sole supported minor.
- Regenerate
uv.lock for Python 3.14 using the repository-owned uv workflow.
- Align Ruff and ty configuration with the Python 3.14 source contract.
- Remove
from __future__ import annotations throughout repository-owned Python: Python 3.14 defers annotations by default, while the future import retains the older stringified behavior.
- Adjust typing-only imports and runtime annotation consumers as needed after removing the future import.
- Replace the
tensorflow/Keras dependency and implementation with PyTorch using a release that provides official CPython 3.14 wheels on every supported CI platform.
- Keep PyTorch and Comet in the optional experiments dependency group so normal bootstrap,
just python-check, and C++ CI do not download large research dependencies.
- Preserve import-safe entry points and dependency-free tests; tests must not require dataset downloads, GPUs, credentials, or hosted services.
- Decide whether the current MNIST command remains a small PyTorch portability example or is replaced by a CDT-specific research entry point better suited to prospective 4D work. Document the decision and remove stale command names.
- Retain and modernize Comet for PyTorch-backed experiments: use the current
comet_ml.start() API, initialize Comet before Torch when automatic logging is enabled, use watch() and log_model() where relevant, and preserve the existing explicit parameter, metric, and figure logging contracts.
- Keep complete local inputs, outputs, configurations, seeds, and checkpoints as the canonical reproducibility record; Comet is an optional indexed/hosted view, not the only copy.
- Verify PyTorch, Comet, and every retained optional dependency resolve from wheels on Linux, macOS, and Windows; forbid accidental source builds for native packages.
- Update GitHub Actions, Just recipes, package metadata, and documentation that still name Python 3.12, TensorFlow, or immediate archival as settled policy.
- Build the wheel and sdist, install the wheel in an isolated Python 3.14 environment outside the checkout, and exercise every published entry point.
Non-goals
- No Python 3.13 compatibility tier or multi-version support matrix.
- No requirement to support free-threaded CPython in this migration.
- No mandatory GPU, CUDA, ROCm, or accelerator CI; CPU execution is the portable baseline.
- No actual 4D C++ implementation or merge as part of the Python migration.
- No scientific-result changes disguised as framework translation.
- No unrelated dependency upgrades beyond those required for Python 3.14 and the PyTorch/Comet migration.
Acceptance criteria
.python-version, pyproject.toml, uv.lock, Ruff, ty, CI, Just recipes, and documentation agree on Python 3.14.
- No repository-owned Python module retains
from __future__ import annotations.
- TensorFlow and Keras are absent from direct and transitive project dependencies.
- The retained PyTorch dependency has official regular-CPython 3.14 wheels for every supported CI platform and is never built from source in repository workflows.
- The retained Comet SDK and its PyTorch integration import and run under Python 3.14.
- The default development group remains lightweight; PyTorch and Comet install only through the explicit experiments workflow.
- PyTorch-backed code is deterministic where required and has offline tests using synthetic/local data.
- A configured Comet run records declared hyperparameters and metrics plus applicable PyTorch graph, loss, and checkpoint data; local canonical artifacts remain complete without Comet access.
- The default development group and every retained optional dependency group resolve and install from the lockfile on supported CI platforms.
uv lock --check, just python-check, just check, and just ci pass under Python 3.14.
- Wheel and sdist contents are correct, and an isolated external consumer can import the package and invoke every published entry point.
- The C++ build/bootstrap workflow continues to work without requiring a separately installed Python 3.12 runtime.
- Documentation explains the supported Python/PyTorch/Comet versions, optional dependency setup, CPU baseline, accelerator policy, experiment data requirements, local artifact ownership, and relationship to potential future 4D and Praxis work.
Summary
Move the repository-managed Python runtime from 3.12 to 3.14 and replace the optional TensorFlow/Keras experiment dependency with PyTorch. Preserve a lightweight default development environment while keeping a modern optional research surface that can support future 4D work.
This issue no longer assumes the repository will be archived immediately. It is independent of #104; neither issue is a native blocker for the other.
Python 3.14 remains in bugfix support through October 2030, while Python 3.12 is already security-fixes-only and reaches end of life in October 2028.
Motivation
Compatibility basis
TensorFlow 2.21.0 currently publishes CPython wheels for 3.10 through 3.13, but not 3.14. PyTorch 2.13.0 publishes CPython 3.14 wheels for Windows x86-64, Linux x86-64/aarch64, and macOS 14 ARM64, including regular and free-threaded builds. This issue targets regular CPython; free-threaded support is optional follow-up work.
Comet provides a first-class PyTorch integration for automatic graph/loss logging,
watch()support for weights, biases, and gradients, PyTorch checkpoint logging, and framework-independent manual metric/parameter/figure logging.References:
Scope
.python-versionandproject.requires-pythonto select Python 3.14 as the sole supported minor.uv.lockfor Python 3.14 using the repository-owned uv workflow.from __future__ import annotationsthroughout repository-owned Python: Python 3.14 defers annotations by default, while the future import retains the older stringified behavior.tensorflow/Keras dependency and implementation with PyTorch using a release that provides official CPython 3.14 wheels on every supported CI platform.just python-check, and C++ CI do not download large research dependencies.comet_ml.start()API, initialize Comet before Torch when automatic logging is enabled, usewatch()andlog_model()where relevant, and preserve the existing explicit parameter, metric, and figure logging contracts.Non-goals
Acceptance criteria
.python-version,pyproject.toml,uv.lock, Ruff, ty, CI, Just recipes, and documentation agree on Python 3.14.from __future__ import annotations.uv lock --check,just python-check,just check, andjust cipass under Python 3.14.