Skip to content

Migrate the Python stack from Poetry to uv #13

Description

@khaykingleb

Modernize the Python project using the conventions from khaykingleb/investment-workbench: PEP 621 metadata, Hatchling, uv dependency groups and locking, a pinned current Python toolchain, Ruff, ty, pydoclint, and pytest.

This migration also establishes a conventional package and CLI identity by renaming the src import package to ml_experiments and exposing an ml-experiments command.

Depends on #12.

Scope

  • Replace Poetry metadata and locking with PEP 621, Hatchling, and uv.
  • Resolve the newest mutually compatible Python and ML dependency stack.
  • Rename Python imports and Hydra _target_ references from src to ml_experiments.
  • Add an installed ml-experiments CLI entry point.
  • Update local setup, Make recipes, pre-commit, CI, release automation, Docker, and documentation.
  • Align quality tooling with the finance repository where it fits this codebase.

Acceptance criteria

  • pyproject.toml uses PEP 621 metadata and Hatchling.
  • uv.lock replaces poetry.lock, and stale lockfiles fail validation.
  • Python 3.14 is used if the complete current PyTorch, TorchAudio, Torchvision, Lightning, and project test stack verifies; otherwise the newest mutually supported Python is pinned and documented.
  • Current compatible project dependencies are locked reproducibly.
  • Imports and Hydra _target_ paths use ml_experiments.
  • The installed ml-experiments command exposes the existing CLI behavior.
  • Poetry is absent from project metadata, local setup, hooks, CI, releases, Docker, and documentation.
  • Ruff, ty, pydoclint, pytest, and uv lock checks are configured consistently.
  • CPU imports/tests and an audio-stack smoke test pass from a frozen uv environment.
  • Release versioning has one authoritative source and no Poetry commands.

Out of scope

  • Replacing Make with just; tracked separately
  • Redesigning the experiment runtime
  • Kubernetes submission
  • Storage backend integration

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions