Skip to content

Commit

Permalink
Changed cli installation and updated plugin versions
Browse files Browse the repository at this point in the history
  • Loading branch information
achew010 committed Jul 15, 2024
1 parent 06dcc4d commit fef1fea
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 33 deletions.
2 changes: 1 addition & 1 deletion plugins/accelerated-peft/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "fms-acceleration-peft"
version = '0.0.1'
version = '0.1.0'
description = "FMS Acceleration for PeFT"
authors = [
{name = "Fabian Lim", email = "[email protected]"},
Expand Down
26 changes: 13 additions & 13 deletions plugins/accelerated-peft/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ commands =
isort {posargs:.}


# [testenv:build]
# description = build wheel
# deps =
# build
# commands = python -m build -w
# skip_install = True
#
# [testenv:twinecheck]
# description = check wheel
# deps =
# twine
# commands = twine check dist/*
# skip_install = True
[testenv:build]
description = build wheel
deps =
build
commands = python -m build -w
skip_install = True

[testenv:twinecheck]
description = check wheel
deps =
twine
commands = twine check dist/*
skip_install = True
22 changes: 17 additions & 5 deletions plugins/framework/src/fms_acceleration/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,30 @@ def install_plugin(
pipmain(["install", *args, pkg_name])
return

if pkg_name.startswith(PLUGIN_PREFIX):
pkg_name = pkg_name.replace(PLUGIN_PREFIX, "")

# otherwise should be an internet install
pipmain(
response = pipmain(
[
"install",
*args,
f"git+https://{GITHUB_URL}#subdirectory=plugins/accelerated-{pkg_name}",
pkg_name,
]
)

#Reference from https://github.com/pypa/pip/blob/main/src/pip/_internal/cli/status_codes.py
if response>0:
print("PyPi installation failed. Falling back to installation from Github.")

if pkg_name.startswith(PLUGIN_PREFIX):
pkg_name = pkg_name.replace(PLUGIN_PREFIX, "")

pipmain(
[
"install",
*args,
f"git+https://{GITHUB_URL}#subdirectory=plugins/accelerated-{pkg_name}",
]
)


def list_plugins():
print(
Expand Down
2 changes: 1 addition & 1 deletion plugins/fused-ops-and-kernels/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "fms-acceleration-foak"
version = '0.0.1'
version = '0.1.0'
description = "FMS Acceleration using Fused Operations and Kernels"
authors = [
{name = "Fabian Lim", email = "[email protected]"},
Expand Down
26 changes: 13 additions & 13 deletions plugins/fused-ops-and-kernels/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ commands =
black --exclude .*unsloth.* tests
isort .

# [testenv:build]
# description = build wheel
# deps =
# build
# commands = python -m build -w
# skip_install = True
#
# [testenv:twinecheck]
# description = check wheel
# deps =
# twine
# commands = twine check dist/*
# skip_install = True
[testenv:build]
description = build wheel
deps =
build
commands = python -m build -w
skip_install = True

[testenv:twinecheck]
description = check wheel
deps =
twine
commands = twine check dist/*
skip_install = True

0 comments on commit fef1fea

Please sign in to comment.