content: [build-system]
  requires = ["setuptools>=61.0,<=69.0"]
  build-backend = "setuptools.build_meta"
  
  [project]
  name = "lm-buddy"
  version = "0.15.0"
  authors = [
      { name = "Sean Friedowitz", email = "sean@mozilla.ai" },
      { name = "Aaron Gonzales", email = "aaron@mozilla.ai" },
      { name = "Vicki Boykis", email = "vicki@mozilla.ai" },
      { name = "Davide Eynard", email = "davide@mozilla.ai" },
      { name = "Imtihan Ahmed", email = "imtihan@mozilla.ai" },
  ]
  description = "Ray-centric library for finetuning and evaluation of (large) language models."
  readme = "README.md"
  license = { file = "LICENSE.md" }
  
  requires-python = ">=3.11,<3.12"
  
  dependencies = [
      # Core
      "click>=8.1.7",
      "scipy==1.13.1",
      "numpy<2.0.0",
      "wandb==0.16.3",
      "protobuf>=3.20.2",
      "urllib3>=1.26.18,<2",
      "pydantic>=2.6.4",
      "pydantic-yaml>=1.2.0",
      "ray[default]==2.30.0",
      "loguru==0.7.2",
      "s3fs==2024.5.0",
  ]
  
  [project.optional-dependencies]
  ruff = ["ruff==0.5.5"]
  jobs = [
      # HuggingFace / pytorch
      "torch==2.4.0",
      "datasets==2.20.0",
      "transformers==4.43.4",
      "accelerate==0.33.0",
      "peft==0.12.0",
      "trl==0.9.6",
      "bitsandbytes==0.42.0",
      "bert_score==0.3.13",
      # Evaluation frameworks
      "lm-eval==0.4.3",
      "einops==0.8.0",
      "openai==1.38.0",
      "ragas==0.1.12",
      "langchain-community==0.2.11",
      "langchain_openai==0.1.20",
      "sentencepiece==0.2.0",
      "evaluate==0.4.2",
      "mistralai==0.4.2",
  ]
  test = ["pytest==8.3.2", "pytest-cov==5.0.0"]
  docs = [
      "Sphinx==7.4.7",
      "nbsphinx==0.9.4",
      "sphinx-codeautolink==0.15.2",
      "myst-parser==3.0.1",
      "furo==2024.7.18",
  ]
  dev = ["lm-buddy[jobs,ruff,test,docs]", "pre-commit==3.8.0", "jupyter>=1.0.0"]
  
  [project.scripts]
  lm-buddy = "lm_buddy.cli:cli"
  lm_buddy = "lm_buddy.cli:cli"
  
  [project.urls]
  Homepage = "https://github.com/mozilla-ai/lm-buddy"
  Repository = "https://github.com/mozilla-ai/lm-buddy"
  Documentation = "https://mozilla-ai.github.io/lm-buddy/"
  
  [tool.pytest.ini_options]
  addopts = "-v --cov src --no-cov-on-fail --disable-warnings"
  testpaths = ["tests"]
  
  [tool.ruff]
  target-version = "py311"
  
  exclude = [
      ".bzr",
      ".direnv",
      ".eggs",
      ".git",
      ".git-rewrite",
      ".hg",
      ".mypy_cache",
      ".nox",
      ".pants.d",
      ".pytype",
      ".ruff_cache",
      ".svn",
      ".tox",
      ".venv",
      "__pypackages__",
      "_build",
      "buck-out",
      "build",
      "dist",
      "node_modules",
      "venv",
  ]
  
  extend-include = ["*.ipynb"]
  
  line-length = 100
  
  [tool.ruff.lint]
  select = [
      "E",   # pycodestyle
      "F",   # pyflakes
      "UP",  # pyupgrade
      "I",   # import sorting
      "N",   # pep8 naming
      "ISC", # flake8 implicit string concat
      "PTH", # flake8-use-pathlib use Path library
      "PD",  # pandas-vet
  ]
  
  ignore = [
      "D417", # documentation for every function parameter.
      "N806", # ignore uppercased variables
      "N812", # import as uppercased
      "N803", # lowercased args
      "N817", # imported as acryonym
      "B023", # doesn't bind loop var, we do this a lot in torch
      "D100", # module-level docstrings
      "N805", # first param needs to be self; pydantic breaks this sometimes
  ]
  
  # Only format Jupyter notebooks, but don't lint them
  exclude = ["*.ipynb"]
  
  # Avoid trying to fix some violations
  unfixable = ["B", "SIM", "TRY", "RUF"]
  
  [tool.ruff.lint.isort]
  known-first-party = ["lm_buddy"]
  
  [tool.ruff.lint.extend-per-file-ignores]
  "__init__.py" = [
      "E402", # import violations
      "F401", # import unused
      "F403", # import undefined
  ]
  
  [tool.ruff.format]
  quote-style = "double"
  indent-style = "space"
  line-ending = "auto"
  skip-magic-trailing-comma = false
  