Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
AutoAWQ
Commits
be0f9e01
Unverified
Commit
be0f9e01
authored
Feb 15, 2024
by
Casper
Committed by
GitHub
Feb 15, 2024
Browse files
Fix workflow (#345)
parent
171c7aff
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
5 deletions
+19
-5
.github/workflows/build.yaml
.github/workflows/build.yaml
+1
-1
scripts/download_wheels.sh
scripts/download_wheels.sh
+1
-1
setup.py
setup.py
+17
-3
No files found.
.github/workflows/build.yaml
View file @
be0f9e01
scripts/download_wheels.sh
View file @
be0f9e01
#!/bin/bash
#!/bin/bash
# Set variables
# Set variables
AWQ_VERSION
=
"0.
1.6
"
AWQ_VERSION
=
"0.
2.0
"
RELEASE_URL
=
"https://api.github.com/repos/casper-hansen/AutoAWQ/releases/tags/v
${
AWQ_VERSION
}
"
RELEASE_URL
=
"https://api.github.com/repos/casper-hansen/AutoAWQ/releases/tags/v
${
AWQ_VERSION
}
"
# Create a directory to download the wheels
# Create a directory to download the wheels
...
...
setup.py
View file @
be0f9e01
...
@@ -2,9 +2,9 @@ import os
...
@@ -2,9 +2,9 @@ import os
import
torch
import
torch
import
platform
import
platform
import
requests
import
requests
import
importlib_metadata
from
pathlib
import
Path
from
pathlib
import
Path
from
setuptools
import
setup
,
find_packages
from
setuptools
import
setup
,
find_packages
from
torch.utils.cpp_extension
import
CUDAExtension
def
get_latest_kernels_version
(
repo
):
def
get_latest_kernels_version
(
repo
):
...
@@ -88,15 +88,20 @@ requirements = [
...
@@ -88,15 +88,20 @@ requirements = [
"torch>=2.0.1"
,
"torch>=2.0.1"
,
"transformers>=4.35.0"
,
"transformers>=4.35.0"
,
"tokenizers>=0.12.1"
,
"tokenizers>=0.12.1"
,
"typing_extensions>=4.8.0"
"accelerate"
,
"accelerate"
,
"datasets"
,
"datasets"
,
"zstandard"
,
"zstandard"
,
]
]
try
:
try
:
importlib_metadata
.
version
(
"autoawq-kernels"
)
if
ROCM_VERSION
:
import
exlv2_ext
else
:
import
awq_ext
KERNELS_INSTALLED
=
True
KERNELS_INSTALLED
=
True
except
i
mport
lib_metadata
.
PackageNotFound
Error
:
except
I
mportError
:
KERNELS_INSTALLED
=
False
KERNELS_INSTALLED
=
False
# kernels can be downloaded from pypi for cuda+121 only
# kernels can be downloaded from pypi for cuda+121 only
...
@@ -133,5 +138,14 @@ setup(
...
@@ -133,5 +138,14 @@ setup(
"eval"
:
[
"lm_eval>=0.4.0"
,
"tabulate"
,
"protobuf"
,
"evaluate"
,
"scipy"
],
"eval"
:
[
"lm_eval>=0.4.0"
,
"tabulate"
,
"protobuf"
,
"evaluate"
,
"scipy"
],
"dev"
:
[
"black"
,
"mkdocstrings-python"
,
"mkdocs-material"
,
"griffe-typingdoc"
]
"dev"
:
[
"black"
,
"mkdocstrings-python"
,
"mkdocs-material"
,
"griffe-typingdoc"
]
},
},
# NOTE: We create an empty CUDAExtension because torch helps us with
# creating the right boilerplate to enable correct targeting of
# the autoawq-kernels package
ext_modules
=
[
CUDAExtension
(
name
=
"__build_artifact_for_awq_kernel_targeting"
,
sources
=
[],
)
],
**
common_setup_kwargs
,
**
common_setup_kwargs
,
)
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment