Skip to content

Commit

Permalink
auto-versioning and adding axolotl.__version__ (#2127)
Browse files Browse the repository at this point in the history
* auto-versioning and adding axolotl.__version__

* removing file meant for codecov PR

* adding dynamic dependencies, project metadata

* extras/optional-dependencies are dynamic too

---------

Co-authored-by: Dan Saunders <[email protected]>
Co-authored-by: Wing Lian <[email protected]>
  • Loading branch information
3 people authored Dec 6, 2024
1 parent fc973f4 commit 2f3ebbc
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
16 changes: 16 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[build-system]
requires = ["setuptools>=64", "wheel", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[project]
name = "axolotl"
dynamic = ["version", "dependencies", "optional-dependencies"]
description = "LLM Trainer"
readme = "README.md"
requires-python = ">=3.10"

[project.urls]
Homepage = "https://axolotl-ai-cloud.github.io/axolotl/"
Repository = "https://github.com/axolotl-ai-cloud/axolotl.git"

[tool.setuptools_scm]
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""setup.py for axolotl"""

import platform
import re
from importlib.metadata import PackageNotFoundError, version
Expand Down Expand Up @@ -96,7 +95,8 @@ def parse_requirements():

setup(
name="axolotl",
version="0.5.2",
use_scm_version=True,
setup_requires=["setuptools_scm"],
description="LLM Trainer",
long_description="Axolotl is a tool designed to streamline the fine-tuning of various AI models, offering support for multiple configurations and architectures.",
package_dir={"": "src"},
Expand Down
8 changes: 8 additions & 0 deletions src/axolotl/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"""Axolotl - Train and fine-tune large language models"""

try:
from importlib.metadata import version

__version__ = version("axolotl")
except ImportError:
__version__ = "unknown"

0 comments on commit 2f3ebbc

Please sign in to comment.