Skip to content

Commit

Permalink
Fix broken CLI; remove duplicate metadata from setup.py (#2136)
Browse files Browse the repository at this point in the history
* Fix broken CLI; remove duplicate metadata from setup.py

* Adding tests.yml CLI check

* updating

* remove test with requests to github due to rate limiting

---------

Co-authored-by: Dan Saunders <[email protected]>
  • Loading branch information
djsaunde and Dan Saunders authored Dec 6, 2024
1 parent 6b3058b commit 08fa133
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 23 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/tests-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ jobs:
python scripts/cutcrossentropy_install.py | sh
pip3 install -r requirements-dev.txt -r requirements-tests.txt
- name: Ensure axolotl CLI was installed
run: |
axolotl --help
- name: Run tests
run: |
pytest -n8 --dist loadfile --ignore=tests/e2e/ --ignore=tests/patched/ tests/
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ jobs:
python scripts/cutcrossentropy_install.py | sh
pip3 install -r requirements-dev.txt -r requirements-tests.txt
- name: Ensure axolotl CLI was installed
run: |
axolotl --help
- name: Run tests
run: |
pytest -n8 --dist loadfile --ignore=tests/e2e/ --ignore=tests/patched/ tests/
Expand Down Expand Up @@ -122,6 +126,10 @@ jobs:
pip3 install dist/axolotl*.tar.gz
pip3 install -r requirements-dev.txt -r requirements-tests.txt
- name: Ensure axolotl CLI was installed
run: |
axolotl --help
- name: Run tests
run: |
pytest -n8 --dist loadfile --ignore=tests/e2e/ --ignore=tests/patched/ tests/
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ description = "LLM Trainer"
readme = "README.md"
requires-python = ">=3.10"

[project.scripts]
axolotl = "axolotl.cli.main:main"

[project.urls]
Homepage = "https://axolotl-ai-cloud.github.io/axolotl/"
Repository = "https://github.com/axolotl-ai-cloud/axolotl.git"
Expand Down
6 changes: 0 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,7 @@ def parse_requirements():

install_requires, dependency_links = parse_requirements()


setup(
name="axolotl",
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"},
packages=find_packages("src"),
install_requires=install_requires,
Expand Down
17 changes: 0 additions & 17 deletions tests/cli/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,3 @@ def test_fetch_from_github_network_error():
with patch("requests.get", side_effect=requests.RequestException):
with pytest.raises(requests.RequestException):
fetch_from_github("examples/", None)


@pytest.fixture
def integration_test_dir(tmp_path):
"""Fixture for integration test directory that cleans up after itself"""
test_dir = tmp_path / "github_downloads"
test_dir.mkdir(parents=True)
yield test_dir


def test_fetch_from_github_real(integration_test_dir):
"""Test actual GitHub API interaction"""
fetch_from_github("examples/", integration_test_dir)

# Verify some known files exist
assert (integration_test_dir / "openllama-3b" / "lora.yml").exists()
assert (integration_test_dir / "openllama-3b" / "qlora.yml").exists()

0 comments on commit 08fa133

Please sign in to comment.