content: [project]
  name = "lalamo"
  description = "JAX library for optimization and export of models for use with the UZU inference engine."
  requires-python = ">=3.12, <4"
  dependencies = [
      "cattrs[msgpack]>=24.1.2",
      "click>=8.1.8",
      "einops>=0.8.0",
      "equinox>=0.11.11",
      "huggingface-hub[hf-transfer]>=0.27.1",
      "jax>=0.7.2",
      "jaxtyping>=0.2.36",
      "jinja2>=3.1.6",
      "ml-dtypes>=0.5.1",
      "optax>=0.2.4",
      "rich>=14.0.0",
      "thefuzz>=0.22.1",
      "tokenizers>=0.21.2",
      "typer>=0.15.1",
      "safetensors>=0.6.2",
      "polars>=1.33.1",
      "xxhash>=3.5.0",
      # "jax-metal>=0.1.1 ; sys_platform == 'darwin'",
  ]
  readme = { file = "README.md", content-type = "text/markdown" }
  dynamic = ["version"]
  
  [project.optional-dependencies]
  cpu = ["jax[cpu]>=0.7.2"]
  cuda = ["jax[cuda]>=0.7.2"]
  tpu = ["jax[tpu]>=0.7.2"]
  
  [dependency-groups]
  dev = [
      "accelerate>=1.7.0",
      "autoawq>=0.2.9; platform_system == 'Linux' and platform_machine == 'x86_64'",
      "beartype>=0.19.0",
      "ipykernel>=6.29.5",
      "ipywidgets>=8.1.5",
      "kernels>=0.10.2",
      "memray>=1.17.2",
      "pytest-env>=1.1.5",
      "pytest>=8.3.4",
      "torch>=2.8.0",
      "torchao>=0.7.0",
      "transformers>=4.56.0",
      "twine>=6.1.0",
  ]
  
  [project.scripts]
  lalamo = "lalamo.main:app"
  
  [build-system]
  requires = ["setuptools>=65.5.0", "wheel"]
  build-backend = "setuptools.build_meta"
  
  [tool.setuptools.packages.find]
  where = ["."]
  include = ["lalamo*"]
  namespaces = false
  
  [tool.setuptools.dynamic]
  version = { attr = "lalamo.__version__" }
  
  
  [tool.uv]
  package = true
  
  [[tool.uv.index]]
  name = "torch-cpu"
  url = "https://download.pytorch.org/whl/cpu"
  explicit = true
  
  [[tool.uv.index]]
  name = "torch-gpu"
  url = "https://download.pytorch.org/whl/cu129"
  explicit = true
  
  [[tool.uv.index]]
  name = "testpypi"
  url = "https://test.pypi.org/simple/"
  publish-url = "https://test.pypi.org/legacy/"
  explicit = true
  
  [tool.uv.sources]
  torch = [
      { index = "torch-cpu", marker = "platform_system != 'Linux' or platform_machine != 'x86_64'" },
      { index = "torch-gpu", marker = "platform_system == 'Linux' and platform_machine == 'x86_64'" },
  ]
  
  [tool.pytest.ini_options]
  # Disable jaxtyping for now because of its internal bug.
  # addopts = "--jaxtyping-packages=lalamo,beartype.beartype"
  
  [tool.pytest_env]
  JAX_DEBUG_NANS = "True"
  JAX_DEBUG_KEY_REUSE = "True"
  JAX_TRACEBACK_FILTERING = "off"
  XLA_PYTHON_CLIENT_ALLOCATOR = "platform"
  TORCH_COMPILE_DISABLE = "1"
  
  [tool.pyright]
  venv = "."
  venvPath = ".venv"
  pythonVersion = "3.12"
  typeCheckingMode = "standard"
  
  [tool.ruff]
  target-version = "py312"
  line-length = 119
  
  [tool.ruff.lint]
  select = ["ALL"]
  ignore = [
      "C408",
      "C901",
      "D",
      "EM101",
      "EM102",
      "F722",
      "FBT001",
      "FBT002",
      "N812",
      "PD008",
      "PGH003",
      "PLR0913",
      "PLR0915",
      "PLR2004",
      "PT",
      "PTH123",
      "RET503",
      "RET504",
      "S",
      "SIM108",
      "T20",
      "TD003",
      "TRY003",
  ]
  