Fix broken CLI; remove duplicate metadata from setup.py (#2136)
* 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 <dan@axolotl.ai>
This commit is contained in:
4
.github/workflows/tests-nightly.yml
vendored
4
.github/workflows/tests-nightly.yml
vendored
@@ -58,6 +58,10 @@ jobs:
|
|||||||
python scripts/cutcrossentropy_install.py | sh
|
python scripts/cutcrossentropy_install.py | sh
|
||||||
pip3 install -r requirements-dev.txt -r requirements-tests.txt
|
pip3 install -r requirements-dev.txt -r requirements-tests.txt
|
||||||
|
|
||||||
|
- name: Ensure axolotl CLI was installed
|
||||||
|
run: |
|
||||||
|
axolotl --help
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
pytest -n8 --dist loadfile --ignore=tests/e2e/ --ignore=tests/patched/ tests/
|
pytest -n8 --dist loadfile --ignore=tests/e2e/ --ignore=tests/patched/ tests/
|
||||||
|
|||||||
8
.github/workflows/tests.yml
vendored
8
.github/workflows/tests.yml
vendored
@@ -77,6 +77,10 @@ jobs:
|
|||||||
python scripts/cutcrossentropy_install.py | sh
|
python scripts/cutcrossentropy_install.py | sh
|
||||||
pip3 install -r requirements-dev.txt -r requirements-tests.txt
|
pip3 install -r requirements-dev.txt -r requirements-tests.txt
|
||||||
|
|
||||||
|
- name: Ensure axolotl CLI was installed
|
||||||
|
run: |
|
||||||
|
axolotl --help
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
pytest -n8 --dist loadfile --ignore=tests/e2e/ --ignore=tests/patched/ tests/
|
pytest -n8 --dist loadfile --ignore=tests/e2e/ --ignore=tests/patched/ tests/
|
||||||
@@ -122,6 +126,10 @@ jobs:
|
|||||||
pip3 install dist/axolotl*.tar.gz
|
pip3 install dist/axolotl*.tar.gz
|
||||||
pip3 install -r requirements-dev.txt -r requirements-tests.txt
|
pip3 install -r requirements-dev.txt -r requirements-tests.txt
|
||||||
|
|
||||||
|
- name: Ensure axolotl CLI was installed
|
||||||
|
run: |
|
||||||
|
axolotl --help
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
pytest -n8 --dist loadfile --ignore=tests/e2e/ --ignore=tests/patched/ tests/
|
pytest -n8 --dist loadfile --ignore=tests/e2e/ --ignore=tests/patched/ tests/
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ description = "LLM Trainer"
|
|||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.10"
|
requires-python = ">=3.10"
|
||||||
|
|
||||||
|
[project.scripts]
|
||||||
|
axolotl = "axolotl.cli.main:main"
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
Homepage = "https://axolotl-ai-cloud.github.io/axolotl/"
|
Homepage = "https://axolotl-ai-cloud.github.io/axolotl/"
|
||||||
Repository = "https://github.com/axolotl-ai-cloud/axolotl.git"
|
Repository = "https://github.com/axolotl-ai-cloud/axolotl.git"
|
||||||
|
|||||||
6
setup.py
6
setup.py
@@ -92,13 +92,7 @@ def parse_requirements():
|
|||||||
|
|
||||||
install_requires, dependency_links = parse_requirements()
|
install_requires, dependency_links = parse_requirements()
|
||||||
|
|
||||||
|
|
||||||
setup(
|
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"},
|
package_dir={"": "src"},
|
||||||
packages=find_packages("src"),
|
packages=find_packages("src"),
|
||||||
install_requires=install_requires,
|
install_requires=install_requires,
|
||||||
|
|||||||
@@ -70,20 +70,3 @@ def test_fetch_from_github_network_error():
|
|||||||
with patch("requests.get", side_effect=requests.RequestException):
|
with patch("requests.get", side_effect=requests.RequestException):
|
||||||
with pytest.raises(requests.RequestException):
|
with pytest.raises(requests.RequestException):
|
||||||
fetch_from_github("examples/", None)
|
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()
|
|
||||||
|
|||||||
Reference in New Issue
Block a user