mirror of https://github.com/skygpu/skynet.git
Consolidate GPU abi location in constants and drop asks
parent
656693e719
commit
67cff51085
|
@ -203,50 +203,25 @@ frozenlist = ">=1.1.0"
|
|||
|
||||
[[package]]
|
||||
name = "anyio"
|
||||
version = "3.7.1"
|
||||
version = "4.8.0"
|
||||
description = "High level compatibility layer for multiple asynchronous event loop implementations"
|
||||
optional = false
|
||||
python-versions = ">=3.7"
|
||||
python-versions = ">=3.9"
|
||||
files = [
|
||||
{file = "anyio-3.7.1-py3-none-any.whl", hash = "sha256:91dee416e570e92c64041bd18b900d1d6fa78dff7048769ce5ac5ddad004fbb5"},
|
||||
{file = "anyio-3.7.1.tar.gz", hash = "sha256:44a3c9aba0f5defa43261a8b3efb97891f2bd7d804e0e1f56419befa1adfc780"},
|
||||
{file = "anyio-4.8.0-py3-none-any.whl", hash = "sha256:b5011f270ab5eb0abf13385f851315585cc37ef330dd88e27ec3d34d651fd47a"},
|
||||
{file = "anyio-4.8.0.tar.gz", hash = "sha256:1d9fe889df5212298c0c0723fa20479d1b94883a2df44bd3897aa91083316f7a"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
exceptiongroup = {version = "*", markers = "python_version < \"3.11\""}
|
||||
exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""}
|
||||
idna = ">=2.8"
|
||||
sniffio = ">=1.1"
|
||||
typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""}
|
||||
|
||||
[package.extras]
|
||||
doc = ["Sphinx", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme (>=1.2.2)", "sphinxcontrib-jquery"]
|
||||
test = ["anyio[trio]", "coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "mock (>=4)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"]
|
||||
trio = ["trio (<0.22)"]
|
||||
|
||||
[[package]]
|
||||
name = "asks"
|
||||
version = "3.0.0"
|
||||
description = "asks - async http"
|
||||
optional = false
|
||||
python-versions = ">= 3.6.2"
|
||||
files = [
|
||||
{file = "asks-3.0.0.tar.gz", hash = "sha256:e4d61dc8362594c81cfe0198eee9f3a208eef1c0023355d711566a6dcf65e986"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
anyio = ">=3.0,<4.0"
|
||||
async_generator = "*"
|
||||
h11 = "*"
|
||||
|
||||
[[package]]
|
||||
name = "async-generator"
|
||||
version = "1.10"
|
||||
description = "Async generators and context managers for Python 3.5+"
|
||||
optional = false
|
||||
python-versions = ">=3.5"
|
||||
files = [
|
||||
{file = "async_generator-1.10-py3-none-any.whl", hash = "sha256:01c7bf666359b4967d2cda0000cc2e4af16a0ae098cbffcb8472fb9e8ad6585b"},
|
||||
{file = "async_generator-1.10.tar.gz", hash = "sha256:6ebb3d106c12920aaae42ccb6f787ef5eefdcdd166ea3d628fa8476abe712144"},
|
||||
]
|
||||
doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx_rtd_theme"]
|
||||
test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21)"]
|
||||
trio = ["trio (>=0.26.1)"]
|
||||
|
||||
[[package]]
|
||||
name = "async-timeout"
|
||||
|
@ -811,17 +786,6 @@ websocket-client = ">=0.32.0"
|
|||
[package.extras]
|
||||
ssh = ["paramiko (>=2.4.3)"]
|
||||
|
||||
[[package]]
|
||||
name = "einops"
|
||||
version = "0.8.0"
|
||||
description = "A new flavour of deep learning operations"
|
||||
optional = false
|
||||
python-versions = ">=3.8"
|
||||
files = [
|
||||
{file = "einops-0.8.0-py3-none-any.whl", hash = "sha256:9572fb63046264a862693b0a87088af3bdc8c068fde03de63453cbbde245465f"},
|
||||
{file = "einops-0.8.0.tar.gz", hash = "sha256:63486517fed345712a8385c100cb279108d9d47e6ae59099b07657e983deae85"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "exceptiongroup"
|
||||
version = "1.2.2"
|
||||
|
@ -1175,23 +1139,6 @@ torchvision = "*"
|
|||
tqdm = "*"
|
||||
yapf = "*"
|
||||
|
||||
[[package]]
|
||||
name = "gguf"
|
||||
version = "0.14.0"
|
||||
description = "Read and write ML models in GGUF for GGML"
|
||||
optional = false
|
||||
python-versions = ">=3.8"
|
||||
files = [
|
||||
{file = "gguf-0.14.0-py3-none-any.whl", hash = "sha256:d279b33cd743d6211c09d96f0797eb36652c0d9d90844f8986a7c25e445906c4"},
|
||||
{file = "gguf-0.14.0.tar.gz", hash = "sha256:d9996f197a777831cf9e01efac24cbfa817787375305b8c4ee16074778e2bce8"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
numpy = ">=1.17"
|
||||
pyyaml = ">=5.1"
|
||||
sentencepiece = ">=0.1.98,<=0.2.0"
|
||||
tqdm = ">=4.27"
|
||||
|
||||
[[package]]
|
||||
name = "greenlet"
|
||||
version = "3.1.1"
|
||||
|
@ -1382,25 +1329,6 @@ files = [
|
|||
{file = "hpack-4.0.0.tar.gz", hash = "sha256:fc41de0c63e687ebffde81187a948221294896f6bdc0ae2312708df339430095"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hqq"
|
||||
version = "0.2.2"
|
||||
description = "Half-Quadratic Quantization (HQQ)"
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
files = [
|
||||
{file = "hqq-0.2.2.tar.gz", hash = "sha256:d78ee07470ae93c261ffae95ace6da1ac2d1e6864f2d0127916bbf4ee7b41292"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
accelerate = "*"
|
||||
einops = "*"
|
||||
huggingface_hub = "*"
|
||||
numpy = ">=1.24.4"
|
||||
termcolor = "*"
|
||||
tqdm = ">=4.64.1"
|
||||
transformers = ">=4.36.1"
|
||||
|
||||
[[package]]
|
||||
name = "httpcore"
|
||||
version = "1.0.7"
|
||||
|
@ -2167,35 +2095,6 @@ example = ["cairocffi (>=1.7)", "contextily (>=1.6)", "igraph (>=0.11)", "momepy
|
|||
extra = ["lxml (>=4.6)", "pydot (>=3.0.1)", "pygraphviz (>=1.14)", "sympy (>=1.10)"]
|
||||
test = ["pytest (>=7.2)", "pytest-cov (>=4.0)"]
|
||||
|
||||
[[package]]
|
||||
name = "ninja"
|
||||
version = "1.11.1.3"
|
||||
description = "Ninja is a small build system with a focus on speed"
|
||||
optional = false
|
||||
python-versions = ">=3.7"
|
||||
files = [
|
||||
{file = "ninja-1.11.1.3-py3-none-macosx_10_9_universal2.whl", hash = "sha256:2b4879ea3f1169f3d855182c57dcc84d1b5048628c8b7be0d702b81882a37237"},
|
||||
{file = "ninja-1.11.1.3-py3-none-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:bc3ebc8b2e47716149f3541742b5cd8e0b08f51013b825c05baca3e34854370d"},
|
||||
{file = "ninja-1.11.1.3-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a27e78ca71316c8654965ee94b286a98c83877bfebe2607db96897bbfe458af0"},
|
||||
{file = "ninja-1.11.1.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2883ea46b3c5079074f56820f9989c6261fcc6fd873d914ee49010ecf283c3b2"},
|
||||
{file = "ninja-1.11.1.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8c4bdb9fd2d0c06501ae15abfd23407660e95659e384acd36e013b6dd7d8a8e4"},
|
||||
{file = "ninja-1.11.1.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:114ed5c61c8474df6a69ab89097a20749b769e2c219a452cb2fadc49b0d581b0"},
|
||||
{file = "ninja-1.11.1.3-py3-none-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7fa2247fce98f683bc712562d82b22b8a0a5c000738a13147ca2d1b68c122298"},
|
||||
{file = "ninja-1.11.1.3-py3-none-musllinux_1_1_aarch64.whl", hash = "sha256:a38c6c6c8032bed68b70c3b065d944c35e9f903342875d3a3218c1607987077c"},
|
||||
{file = "ninja-1.11.1.3-py3-none-musllinux_1_1_i686.whl", hash = "sha256:56ada5d33b8741d298836644042faddebc83ee669782d661e21563034beb5aba"},
|
||||
{file = "ninja-1.11.1.3-py3-none-musllinux_1_1_ppc64le.whl", hash = "sha256:53409151da081f3c198bb0bfc220a7f4e821e022c5b7d29719adda892ddb31bb"},
|
||||
{file = "ninja-1.11.1.3-py3-none-musllinux_1_1_s390x.whl", hash = "sha256:1ad2112c2b0159ed7c4ae3731595191b1546ba62316fc40808edecd0306fefa3"},
|
||||
{file = "ninja-1.11.1.3-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:28aea3c1c280cba95b8608d50797169f3a34280e3e9a6379b6e340f0c9eaeeb0"},
|
||||
{file = "ninja-1.11.1.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:b6966f83064a88a51693073eea3decd47e08c3965241e09578ef7aa3a7738329"},
|
||||
{file = "ninja-1.11.1.3-py3-none-win32.whl", hash = "sha256:a4a3b71490557e18c010cbb26bd1ea9a0c32ee67e8f105e9731515b6e0af792e"},
|
||||
{file = "ninja-1.11.1.3-py3-none-win_amd64.whl", hash = "sha256:04d48d14ea7ba11951c156599ab526bdda575450797ff57c6fdf99b2554d09c7"},
|
||||
{file = "ninja-1.11.1.3-py3-none-win_arm64.whl", hash = "sha256:17978ad611d8ead578d83637f5ae80c2261b033db0b493a7ce94f88623f29e1b"},
|
||||
{file = "ninja-1.11.1.3.tar.gz", hash = "sha256:edfa0d2e9d7ead1635b03e40a32ad56cc8f56798b6e2e9848d8300b174897076"},
|
||||
]
|
||||
|
||||
[package.extras]
|
||||
test = ["coverage (>=4.2)", "importlib_metadata (>=2.0)", "pytest (>=6.0)", "pytest-cov (>=3)"]
|
||||
|
||||
[[package]]
|
||||
name = "numba"
|
||||
version = "0.60.0"
|
||||
|
@ -2451,28 +2350,6 @@ numpy = [
|
|||
{version = ">=1.21.2", markers = "platform_system != \"Darwin\" and python_version >= \"3.10\" and python_version < \"3.11\""},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "optimum-quanto"
|
||||
version = "0.2.6"
|
||||
description = "A pytorch quantization backend for optimum."
|
||||
optional = false
|
||||
python-versions = ">=3.9.0"
|
||||
files = [
|
||||
{file = "optimum_quanto-0.2.6-py3-none-any.whl", hash = "sha256:5b0d41757f982c7c70f8ec23bb843c7eb0e6fe3fd99d5e35d70003df2a6ee11f"},
|
||||
{file = "optimum_quanto-0.2.6.tar.gz", hash = "sha256:da9a3093a92102f11c3bd7794d566b3a9d7c100962f41800b3e9b330d0bdfb5e"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
huggingface_hub = "*"
|
||||
ninja = "*"
|
||||
numpy = "*"
|
||||
safetensors = "*"
|
||||
torch = ">=2.4.0"
|
||||
|
||||
[package.extras]
|
||||
dev = ["pytest", "ruff"]
|
||||
examples = ["accelerate", "datasets", "diffusers", "scipy", "sentencepiece", "torchvision", "transformers"]
|
||||
|
||||
[[package]]
|
||||
name = "outcome"
|
||||
version = "1.3.0.post0"
|
||||
|
@ -2862,6 +2739,7 @@ files = [
|
|||
{file = "psycopg2_binary-2.9.10-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:bb89f0a835bcfc1d42ccd5f41f04870c1b936d8507c6df12b7737febc40f0909"},
|
||||
{file = "psycopg2_binary-2.9.10-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f0c2d907a1e102526dd2986df638343388b94c33860ff3bbe1384130828714b1"},
|
||||
{file = "psycopg2_binary-2.9.10-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:f8157bed2f51db683f31306aa497311b560f2265998122abe1dce6428bd86567"},
|
||||
{file = "psycopg2_binary-2.9.10-cp313-cp313-win_amd64.whl", hash = "sha256:27422aa5f11fbcd9b18da48373eb67081243662f9b46e6fd07c3eb46e4535142"},
|
||||
{file = "psycopg2_binary-2.9.10-cp38-cp38-macosx_12_0_x86_64.whl", hash = "sha256:eb09aa7f9cecb45027683bb55aebaaf45a0df8bf6de68801a6afdc7947bb09d4"},
|
||||
{file = "psycopg2_binary-2.9.10-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b73d6d7f0ccdad7bc43e6d34273f70d587ef62f824d7261c4ae9b8b1b6af90e8"},
|
||||
{file = "psycopg2_binary-2.9.10-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ce5ab4bf46a211a8e924d307c1b1fcda82368586a19d0a24f8ae166f5c784864"},
|
||||
|
@ -3580,68 +3458,6 @@ dev = ["cython-lint (>=0.12.2)", "doit (>=0.36.0)", "mypy (==1.10.0)", "pycodest
|
|||
doc = ["intersphinx_registry", "jupyterlite-pyodide-kernel", "jupyterlite-sphinx (>=0.16.5)", "jupytext", "matplotlib (>=3.5)", "myst-nb", "numpydoc", "pooch", "pydata-sphinx-theme (>=0.15.2)", "sphinx (>=5.0.0,<8.0.0)", "sphinx-copybutton", "sphinx-design (>=0.4.0)"]
|
||||
test = ["Cython", "array-api-strict (>=2.0,<2.1.1)", "asv", "gmpy2", "hypothesis (>=6.30)", "meson", "mpmath", "ninja", "pooch", "pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "scikit-umfpack", "threadpoolctl"]
|
||||
|
||||
[[package]]
|
||||
name = "sentencepiece"
|
||||
version = "0.2.0"
|
||||
description = "SentencePiece python wrapper"
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
files = [
|
||||
{file = "sentencepiece-0.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:188779e1298a1c8b8253c7d3ad729cb0a9891e5cef5e5d07ce4592c54869e227"},
|
||||
{file = "sentencepiece-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bed9cf85b296fa2b76fc2547b9cbb691a523864cebaee86304c43a7b4cb1b452"},
|
||||
{file = "sentencepiece-0.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d7b67e724bead13f18db6e1d10b6bbdc454af574d70efbb36f27d90387be1ca3"},
|
||||
{file = "sentencepiece-0.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2fde4b08cfe237be4484c6c7c2e2c75fb862cfeab6bd5449ce4caeafd97b767a"},
|
||||
{file = "sentencepiece-0.2.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c378492056202d1c48a4979650981635fd97875a00eabb1f00c6a236b013b5e"},
|
||||
{file = "sentencepiece-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1380ce6540a368de2ef6d7e6ba14ba8f3258df650d39ba7d833b79ee68a52040"},
|
||||
{file = "sentencepiece-0.2.0-cp310-cp310-win32.whl", hash = "sha256:a1151d6a6dd4b43e552394aed0edfe9292820272f0194bd56c7c1660a0c06c3d"},
|
||||
{file = "sentencepiece-0.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:d490142b0521ef22bc1085f061d922a2a6666175bb6b42e588ff95c0db6819b2"},
|
||||
{file = "sentencepiece-0.2.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:17982700c4f6dbb55fa3594f3d7e5dd1c8659a274af3738e33c987d2a27c9d5c"},
|
||||
{file = "sentencepiece-0.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:7c867012c0e8bcd5bdad0f791609101cb5c66acb303ab3270218d6debc68a65e"},
|
||||
{file = "sentencepiece-0.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7fd6071249c74f779c5b27183295b9202f8dedb68034e716784364443879eaa6"},
|
||||
{file = "sentencepiece-0.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:27f90c55a65013cbb8f4d7aab0599bf925cde4adc67ae43a0d323677b5a1c6cb"},
|
||||
{file = "sentencepiece-0.2.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b293734059ef656dcd65be62ff771507bea8fed0a711b6733976e1ed3add4553"},
|
||||
{file = "sentencepiece-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e58b47f933aca74c6a60a79dcb21d5b9e47416256c795c2d58d55cec27f9551d"},
|
||||
{file = "sentencepiece-0.2.0-cp311-cp311-win32.whl", hash = "sha256:c581258cf346b327c62c4f1cebd32691826306f6a41d8c4bec43b010dee08e75"},
|
||||
{file = "sentencepiece-0.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:0993dbc665f4113017892f1b87c3904a44d0640eda510abcacdfb07f74286d36"},
|
||||
{file = "sentencepiece-0.2.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:ea5f536e32ea8ec96086ee00d7a4a131ce583a1b18d130711707c10e69601cb2"},
|
||||
{file = "sentencepiece-0.2.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d0cb51f53b6aae3c36bafe41e86167c71af8370a039f542c43b0cce5ef24a68c"},
|
||||
{file = "sentencepiece-0.2.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3212121805afc58d8b00ab4e7dd1f8f76c203ddb9dc94aa4079618a31cf5da0f"},
|
||||
{file = "sentencepiece-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2a3149e3066c2a75e0d68a43eb632d7ae728c7925b517f4c05c40f6f7280ce08"},
|
||||
{file = "sentencepiece-0.2.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:632f3594d3e7ac8b367bca204cb3fd05a01d5b21455acd097ea4c0e30e2f63d7"},
|
||||
{file = "sentencepiece-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f295105c6bdbb05bd5e1b0cafbd78ff95036f5d3641e7949455a3f4e5e7c3109"},
|
||||
{file = "sentencepiece-0.2.0-cp312-cp312-win32.whl", hash = "sha256:fb89f811e5efd18bab141afc3fea3de141c3f69f3fe9e898f710ae7fe3aab251"},
|
||||
{file = "sentencepiece-0.2.0-cp312-cp312-win_amd64.whl", hash = "sha256:7a673a72aab81fef5ebe755c6e0cc60087d1f3a4700835d40537183c1703a45f"},
|
||||
{file = "sentencepiece-0.2.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:4547683f330289ec4f093027bfeb87f9ef023b2eb6f879fdc4a8187c7e0ffb90"},
|
||||
{file = "sentencepiece-0.2.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7cd6175f7eaec7142d2bf6f6597ce7db4c9ac89acf93fcdb17410c3a8b781eeb"},
|
||||
{file = "sentencepiece-0.2.0-cp36-cp36m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:859ba1acde782609a0910a26a60e16c191a82bf39b5621107552c0cd79fad00f"},
|
||||
{file = "sentencepiece-0.2.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bcbbef6cc277f8f18f36959e305f10b1c620442d75addc79c21d7073ae581b50"},
|
||||
{file = "sentencepiece-0.2.0-cp36-cp36m-win32.whl", hash = "sha256:536b934e244829e3fe6c4f198652cd82da48adb9aa145c9f00889542726dee3d"},
|
||||
{file = "sentencepiece-0.2.0-cp36-cp36m-win_amd64.whl", hash = "sha256:0a91aaa3c769b52440df56fafda683b3aa48e3f2169cf7ee5b8c8454a7f3ae9b"},
|
||||
{file = "sentencepiece-0.2.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:787e480ca4c1d08c9985a7eb1eae4345c107729c99e9b5a9a00f2575fc7d4b4b"},
|
||||
{file = "sentencepiece-0.2.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f4d158189eb2ecffea3a51edf6d25e110b3678ec47f1a40f2d541eafbd8f6250"},
|
||||
{file = "sentencepiece-0.2.0-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d1e5ca43013e8935f25457a4fca47e315780172c3e821b4b13a890668911c792"},
|
||||
{file = "sentencepiece-0.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7140d9e5a74a0908493bb4a13f1f16a401297bd755ada4c707e842fbf6f0f5bf"},
|
||||
{file = "sentencepiece-0.2.0-cp37-cp37m-win32.whl", hash = "sha256:6cf333625234f247ab357b0bd9836638405ea9082e1543d5b8408f014979dcbf"},
|
||||
{file = "sentencepiece-0.2.0-cp37-cp37m-win_amd64.whl", hash = "sha256:ff88712338b01031910e8e61e7239aff3ce8869ee31a47df63cb38aadd591bea"},
|
||||
{file = "sentencepiece-0.2.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:20813a68d4c221b1849c62c30e1281ea81687894d894b8d4a0f4677d9311e0f5"},
|
||||
{file = "sentencepiece-0.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:926ef920ae2e8182db31d3f5d081ada57804e3e1d3a8c4ef8b117f9d9fb5a945"},
|
||||
{file = "sentencepiece-0.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:89f65f69636b7e9c015b79dff9c9985a9bc7d19ded6f79ef9f1ec920fdd73ecf"},
|
||||
{file = "sentencepiece-0.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0f67eae0dbe6f2d7d6ba50a354623d787c99965f068b81e145d53240198021b0"},
|
||||
{file = "sentencepiece-0.2.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:98501e075f35dd1a1d5a20f65be26839fcb1938752ec61539af008a5aa6f510b"},
|
||||
{file = "sentencepiece-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e3d1d2cc4882e8d6a1adf9d5927d7716f80617fc693385661caff21888972269"},
|
||||
{file = "sentencepiece-0.2.0-cp38-cp38-win32.whl", hash = "sha256:b99a308a2e5e569031ab164b74e6fab0b6f37dfb493c32f7816225f4d411a6dd"},
|
||||
{file = "sentencepiece-0.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:cdb701eec783d3ec86b7cd4c763adad8eaf6b46db37ee1c36e5e6c44b3fe1b5f"},
|
||||
{file = "sentencepiece-0.2.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:1e0f9c4d0a6b0af59b613175f019916e28ade076e21242fd5be24340d8a2f64a"},
|
||||
{file = "sentencepiece-0.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:298f21cc1366eb60311aedba3169d30f885c363ddbf44214b0a587d2908141ad"},
|
||||
{file = "sentencepiece-0.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3f1ec95aa1e5dab11f37ac7eff190493fd87770f7a8b81ebc9dd768d1a3c8704"},
|
||||
{file = "sentencepiece-0.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7b06b70af54daa4b4904cbb90b4eb6d35c9f3252fdc86c9c32d5afd4d30118d8"},
|
||||
{file = "sentencepiece-0.2.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:22e37bac44dd6603388cb598c64ff7a76e41ca774646f21c23aadfbf5a2228ab"},
|
||||
{file = "sentencepiece-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0461324897735512a32d222e3d886e24ad6a499761952b6bda2a9ee6e4313ea5"},
|
||||
{file = "sentencepiece-0.2.0-cp39-cp39-win32.whl", hash = "sha256:38aed822fb76435fa1f12185f10465a94ab9e51d5e8a9159e9a540ce926f0ffd"},
|
||||
{file = "sentencepiece-0.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:d8cf876516548b5a1d6ac4745d8b554f5c07891d55da557925e5c13ff0b4e6ad"},
|
||||
{file = "sentencepiece-0.2.0.tar.gz", hash = "sha256:a52c19171daaf2e697dc6cbe67684e0fa341b1248966f6aebb541de654d15843"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "setuptools"
|
||||
version = "75.8.0"
|
||||
|
@ -3746,20 +3562,6 @@ files = [
|
|||
{file = "tensorboard_data_server-0.7.2-py3-none-manylinux_2_31_x86_64.whl", hash = "sha256:ef687163c24185ae9754ed5650eb5bc4d84ff257aabdc33f0cc6f74d8ba54530"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "termcolor"
|
||||
version = "2.5.0"
|
||||
description = "ANSI color formatting for output in terminal"
|
||||
optional = false
|
||||
python-versions = ">=3.9"
|
||||
files = [
|
||||
{file = "termcolor-2.5.0-py3-none-any.whl", hash = "sha256:37b17b5fc1e604945c2642c872a3764b5d547a48009871aea3edd3afa180afb8"},
|
||||
{file = "termcolor-2.5.0.tar.gz", hash = "sha256:998d8d27da6d48442e8e1f016119076b690d962507531df4890fcd2db2ef8a6f"},
|
||||
]
|
||||
|
||||
[package.extras]
|
||||
tests = ["pytest", "pytest-cov"]
|
||||
|
||||
[[package]]
|
||||
name = "tifffile"
|
||||
version = "2025.1.10"
|
||||
|
@ -4471,4 +4273,4 @@ cffi = ["cffi (>=1.11)"]
|
|||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = ">=3.10,<3.13"
|
||||
content-hash = "39cc139450cc956b48afc9471ef188e898c06a811235be81b22c3ecbe54c89cb"
|
||||
content-hash = "154c089a4cf2730278f49105961b44a5413a5d0227b1ac6c110d4e446bf5a374"
|
||||
|
|
|
@ -10,14 +10,12 @@ readme = 'README.md'
|
|||
python = '>=3.10,<3.13'
|
||||
pytz = '^2023.3.post1'
|
||||
trio = '^0.22.2'
|
||||
asks = '^3.0.0'
|
||||
Pillow = '^10.0.1'
|
||||
docker = '^6.1.3'
|
||||
py-leap = {git = 'https://github.com/guilledk/py-leap.git', rev = 'v0.1a32'}
|
||||
toml = '^0.10.2'
|
||||
msgspec = "^0.19.0"
|
||||
numpy = "<2.1"
|
||||
gguf = "^0.14.0"
|
||||
protobuf = "^5.29.3"
|
||||
zstandard = "^0.23.0"
|
||||
click = "^8.1.8"
|
||||
|
@ -60,8 +58,6 @@ transformers = {version = '4.48.0'}
|
|||
huggingface-hub = {version = '^0.27.1'}
|
||||
invisible-watermark = {version = '^0.2.0'}
|
||||
bitsandbytes = "^0.45.0"
|
||||
hqq = "^0.2.2"
|
||||
optimum-quanto = "^0.2.6"
|
||||
basicsr = "^1.4.2"
|
||||
realesrgan = "^0.3.0"
|
||||
|
||||
|
|
|
@ -280,3 +280,221 @@ TG_MAX_WIDTH = 1280
|
|||
TG_MAX_HEIGHT = 1280
|
||||
|
||||
DEFAULT_SINGLE_CARD_MAP = 'cuda:0'
|
||||
|
||||
GPU_CONTRACT_ABI = {
|
||||
"version": "eosio::abi/1.2",
|
||||
"types": [],
|
||||
"structs": [
|
||||
{
|
||||
"name": "account",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "user", "type": "name"},
|
||||
{"name": "balance", "type": "asset"},
|
||||
{"name": "nonce", "type": "uint64"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "card",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "id", "type": "uint64"},
|
||||
{"name": "owner", "type": "name"},
|
||||
{"name": "card_name", "type": "string"},
|
||||
{"name": "version", "type": "string"},
|
||||
{"name": "total_memory", "type": "uint64"},
|
||||
{"name": "mp_count", "type": "uint32"},
|
||||
{"name": "extra", "type": "string"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "clean",
|
||||
"base": "",
|
||||
"fields": []
|
||||
},
|
||||
{
|
||||
"name": "config",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "token_contract", "type": "name"},
|
||||
{"name": "token_symbol", "type": "symbol"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "dequeue",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "user", "type": "name"},
|
||||
{"name": "request_id", "type": "uint64"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "enqueue",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "user", "type": "name"},
|
||||
{"name": "request_body", "type": "string"},
|
||||
{"name": "binary_data", "type": "string"},
|
||||
{"name": "reward", "type": "asset"},
|
||||
{"name": "min_verification", "type": "uint32"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "gcfgstruct",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "token_contract", "type": "name"},
|
||||
{"name": "token_symbol", "type": "symbol"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "submit",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "worker", "type": "name"},
|
||||
{"name": "request_id", "type": "uint64"},
|
||||
{"name": "request_hash", "type": "checksum256"},
|
||||
{"name": "result_hash", "type": "checksum256"},
|
||||
{"name": "ipfs_hash", "type": "string"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "withdraw",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "user", "type": "name"},
|
||||
{"name": "quantity", "type": "asset"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "work_request_struct",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "id", "type": "uint64"},
|
||||
{"name": "user", "type": "name"},
|
||||
{"name": "reward", "type": "asset"},
|
||||
{"name": "min_verification", "type": "uint32"},
|
||||
{"name": "nonce", "type": "uint64"},
|
||||
{"name": "body", "type": "string"},
|
||||
{"name": "binary_data", "type": "string"},
|
||||
{"name": "timestamp", "type": "time_point_sec"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "work_result_struct",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "id", "type": "uint64"},
|
||||
{"name": "request_id", "type": "uint64"},
|
||||
{"name": "user", "type": "name"},
|
||||
{"name": "worker", "type": "name"},
|
||||
{"name": "result_hash", "type": "checksum256"},
|
||||
{"name": "ipfs_hash", "type": "string"},
|
||||
{"name": "submited", "type": "time_point_sec"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "workbegin",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "worker", "type": "name"},
|
||||
{"name": "request_id", "type": "uint64"},
|
||||
{"name": "max_workers", "type": "uint32"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "workcancel",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "worker", "type": "name"},
|
||||
{"name": "request_id", "type": "uint64"},
|
||||
{"name": "reason", "type": "string"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "worker",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "account", "type": "name"},
|
||||
{"name": "joined", "type": "time_point_sec"},
|
||||
{"name": "left", "type": "time_point_sec"},
|
||||
{"name": "url", "type": "string"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "worker_status_struct",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "worker", "type": "name"},
|
||||
{"name": "status", "type": "string"},
|
||||
{"name": "started", "type": "time_point_sec"}
|
||||
]
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{"name": "clean", "type": "clean", "ricardian_contract": ""},
|
||||
{"name": "config", "type": "config", "ricardian_contract": ""},
|
||||
{"name": "dequeue", "type": "dequeue", "ricardian_contract": ""},
|
||||
{"name": "enqueue", "type": "enqueue", "ricardian_contract": ""},
|
||||
{"name": "submit", "type": "submit", "ricardian_contract": ""},
|
||||
{"name": "withdraw", "type": "withdraw", "ricardian_contract": ""},
|
||||
{"name": "workbegin", "type": "workbegin", "ricardian_contract": ""},
|
||||
{"name": "workcancel", "type": "workcancel", "ricardian_contract": ""}
|
||||
],
|
||||
"tables": [
|
||||
{
|
||||
"name": "cards",
|
||||
"index_type": "i64",
|
||||
"key_names": [],
|
||||
"key_types": [],
|
||||
"type": "card"
|
||||
},
|
||||
{
|
||||
"name": "gcfgstruct",
|
||||
"index_type": "i64",
|
||||
"key_names": [],
|
||||
"key_types": [],
|
||||
"type": "gcfgstruct"
|
||||
},
|
||||
{
|
||||
"name": "queue",
|
||||
"index_type": "i64",
|
||||
"key_names": [],
|
||||
"key_types": [],
|
||||
"type": "work_request_struct"
|
||||
},
|
||||
{
|
||||
"name": "results",
|
||||
"index_type": "i64",
|
||||
"key_names": [],
|
||||
"key_types": [],
|
||||
"type": "work_result_struct"
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"index_type": "i64",
|
||||
"key_names": [],
|
||||
"key_types": [],
|
||||
"type": "worker_status_struct"
|
||||
},
|
||||
{
|
||||
"name": "users",
|
||||
"index_type": "i64",
|
||||
"key_names": [],
|
||||
"key_types": [],
|
||||
"type": "account"
|
||||
},
|
||||
{
|
||||
"name": "workers",
|
||||
"index_type": "i64",
|
||||
"key_names": [],
|
||||
"key_types": [],
|
||||
"type": "worker"
|
||||
}
|
||||
],
|
||||
"ricardian_clauses": [],
|
||||
"error_messages": [],
|
||||
"abi_extensions": [],
|
||||
"variants": [],
|
||||
"action_results": []
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@ import logging
|
|||
from pathlib import Path
|
||||
from functools import partial
|
||||
|
||||
import asks
|
||||
import trio
|
||||
import anyio
|
||||
import httpx
|
||||
|
@ -17,7 +16,7 @@ from PIL import Image, UnidentifiedImageError
|
|||
|
||||
from leap.cleos import CLEOS
|
||||
from leap.protocol import Asset
|
||||
from skynet.constants import DEFAULT_IPFS_DOMAIN
|
||||
from skynet.constants import DEFAULT_IPFS_DOMAIN, GPU_CONTRACT_ABI
|
||||
|
||||
from skynet.ipfs import AsyncIPFSHTTP, get_ipfs_file
|
||||
from skynet.dgpu.errors import DGPUComputeError
|
||||
|
@ -25,225 +24,6 @@ from skynet.dgpu.errors import DGPUComputeError
|
|||
|
||||
REQUEST_UPDATE_TIME = 3
|
||||
|
||||
gpu_abi = {
|
||||
"version": "eosio::abi/1.2",
|
||||
"types": [],
|
||||
"structs": [
|
||||
{
|
||||
"name": "account",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "user", "type": "name"},
|
||||
{"name": "balance", "type": "asset"},
|
||||
{"name": "nonce", "type": "uint64"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "card",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "id", "type": "uint64"},
|
||||
{"name": "owner", "type": "name"},
|
||||
{"name": "card_name", "type": "string"},
|
||||
{"name": "version", "type": "string"},
|
||||
{"name": "total_memory", "type": "uint64"},
|
||||
{"name": "mp_count", "type": "uint32"},
|
||||
{"name": "extra", "type": "string"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "clean",
|
||||
"base": "",
|
||||
"fields": []
|
||||
},
|
||||
{
|
||||
"name": "config",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "token_contract", "type": "name"},
|
||||
{"name": "token_symbol", "type": "symbol"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "dequeue",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "user", "type": "name"},
|
||||
{"name": "request_id", "type": "uint64"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "enqueue",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "user", "type": "name"},
|
||||
{"name": "request_body", "type": "string"},
|
||||
{"name": "binary_data", "type": "string"},
|
||||
{"name": "reward", "type": "asset"},
|
||||
{"name": "min_verification", "type": "uint32"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "gcfgstruct",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "token_contract", "type": "name"},
|
||||
{"name": "token_symbol", "type": "symbol"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "submit",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "worker", "type": "name"},
|
||||
{"name": "request_id", "type": "uint64"},
|
||||
{"name": "request_hash", "type": "checksum256"},
|
||||
{"name": "result_hash", "type": "checksum256"},
|
||||
{"name": "ipfs_hash", "type": "string"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "withdraw",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "user", "type": "name"},
|
||||
{"name": "quantity", "type": "asset"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "work_request_struct",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "id", "type": "uint64"},
|
||||
{"name": "user", "type": "name"},
|
||||
{"name": "reward", "type": "asset"},
|
||||
{"name": "min_verification", "type": "uint32"},
|
||||
{"name": "nonce", "type": "uint64"},
|
||||
{"name": "body", "type": "string"},
|
||||
{"name": "binary_data", "type": "string"},
|
||||
{"name": "timestamp", "type": "time_point_sec"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "work_result_struct",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "id", "type": "uint64"},
|
||||
{"name": "request_id", "type": "uint64"},
|
||||
{"name": "user", "type": "name"},
|
||||
{"name": "worker", "type": "name"},
|
||||
{"name": "result_hash", "type": "checksum256"},
|
||||
{"name": "ipfs_hash", "type": "string"},
|
||||
{"name": "submited", "type": "time_point_sec"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "workbegin",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "worker", "type": "name"},
|
||||
{"name": "request_id", "type": "uint64"},
|
||||
{"name": "max_workers", "type": "uint32"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "workcancel",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "worker", "type": "name"},
|
||||
{"name": "request_id", "type": "uint64"},
|
||||
{"name": "reason", "type": "string"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "worker",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "account", "type": "name"},
|
||||
{"name": "joined", "type": "time_point_sec"},
|
||||
{"name": "left", "type": "time_point_sec"},
|
||||
{"name": "url", "type": "string"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "worker_status_struct",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "worker", "type": "name"},
|
||||
{"name": "status", "type": "string"},
|
||||
{"name": "started", "type": "time_point_sec"}
|
||||
]
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{"name": "clean", "type": "clean", "ricardian_contract": ""},
|
||||
{"name": "config", "type": "config", "ricardian_contract": ""},
|
||||
{"name": "dequeue", "type": "dequeue", "ricardian_contract": ""},
|
||||
{"name": "enqueue", "type": "enqueue", "ricardian_contract": ""},
|
||||
{"name": "submit", "type": "submit", "ricardian_contract": ""},
|
||||
{"name": "withdraw", "type": "withdraw", "ricardian_contract": ""},
|
||||
{"name": "workbegin", "type": "workbegin", "ricardian_contract": ""},
|
||||
{"name": "workcancel", "type": "workcancel", "ricardian_contract": ""}
|
||||
],
|
||||
"tables": [
|
||||
{
|
||||
"name": "cards",
|
||||
"index_type": "i64",
|
||||
"key_names": [],
|
||||
"key_types": [],
|
||||
"type": "card"
|
||||
},
|
||||
{
|
||||
"name": "gcfgstruct",
|
||||
"index_type": "i64",
|
||||
"key_names": [],
|
||||
"key_types": [],
|
||||
"type": "gcfgstruct"
|
||||
},
|
||||
{
|
||||
"name": "queue",
|
||||
"index_type": "i64",
|
||||
"key_names": [],
|
||||
"key_types": [],
|
||||
"type": "work_request_struct"
|
||||
},
|
||||
{
|
||||
"name": "results",
|
||||
"index_type": "i64",
|
||||
"key_names": [],
|
||||
"key_types": [],
|
||||
"type": "work_result_struct"
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"index_type": "i64",
|
||||
"key_names": [],
|
||||
"key_types": [],
|
||||
"type": "worker_status_struct"
|
||||
},
|
||||
{
|
||||
"name": "users",
|
||||
"index_type": "i64",
|
||||
"key_names": [],
|
||||
"key_types": [],
|
||||
"type": "account"
|
||||
},
|
||||
{
|
||||
"name": "workers",
|
||||
"index_type": "i64",
|
||||
"key_names": [],
|
||||
"key_types": [],
|
||||
"type": "worker"
|
||||
}
|
||||
],
|
||||
"ricardian_clauses": [],
|
||||
"error_messages": [],
|
||||
"abi_extensions": [],
|
||||
"variants": [],
|
||||
"action_results": []
|
||||
}
|
||||
|
||||
|
||||
|
||||
async def failable(fn: partial, ret_fail=None):
|
||||
try:
|
||||
|
@ -252,8 +32,6 @@ async def failable(fn: partial, ret_fail=None):
|
|||
except (
|
||||
OSError,
|
||||
json.JSONDecodeError,
|
||||
asks.errors.RequestTimeout,
|
||||
asks.errors.BadHttpResponse,
|
||||
anyio.BrokenResourceError,
|
||||
httpx.ReadError
|
||||
) as e:
|
||||
|
@ -271,7 +49,7 @@ class SkynetGPUConnector:
|
|||
self.hyperion_url = config['hyperion_url']
|
||||
|
||||
self.cleos = CLEOS(endpoint=self.node_url)
|
||||
self.cleos.load_abi('gpu.scd', gpu_abi)
|
||||
self.cleos.load_abi('gpu.scd', GPU_CONTRACT_ABI)
|
||||
|
||||
self.ipfs_gateway_url = None
|
||||
if 'ipfs_gateway_url' in config:
|
||||
|
|
|
@ -29,224 +29,6 @@ from . import *
|
|||
from .utils import *
|
||||
from .handlers import create_handler_context
|
||||
|
||||
gpu_abi = {
|
||||
"version": "eosio::abi/1.2",
|
||||
"types": [],
|
||||
"structs": [
|
||||
{
|
||||
"name": "account",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "user", "type": "name"},
|
||||
{"name": "balance", "type": "asset"},
|
||||
{"name": "nonce", "type": "uint64"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "card",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "id", "type": "uint64"},
|
||||
{"name": "owner", "type": "name"},
|
||||
{"name": "card_name", "type": "string"},
|
||||
{"name": "version", "type": "string"},
|
||||
{"name": "total_memory", "type": "uint64"},
|
||||
{"name": "mp_count", "type": "uint32"},
|
||||
{"name": "extra", "type": "string"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "clean",
|
||||
"base": "",
|
||||
"fields": []
|
||||
},
|
||||
{
|
||||
"name": "config",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "token_contract", "type": "name"},
|
||||
{"name": "token_symbol", "type": "symbol"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "dequeue",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "user", "type": "name"},
|
||||
{"name": "request_id", "type": "uint64"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "enqueue",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "user", "type": "name"},
|
||||
{"name": "request_body", "type": "string"},
|
||||
{"name": "binary_data", "type": "string"},
|
||||
{"name": "reward", "type": "asset"},
|
||||
{"name": "min_verification", "type": "uint32"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "gcfgstruct",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "token_contract", "type": "name"},
|
||||
{"name": "token_symbol", "type": "symbol"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "submit",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "worker", "type": "name"},
|
||||
{"name": "request_id", "type": "uint64"},
|
||||
{"name": "request_hash", "type": "checksum256"},
|
||||
{"name": "result_hash", "type": "checksum256"},
|
||||
{"name": "ipfs_hash", "type": "string"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "withdraw",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "user", "type": "name"},
|
||||
{"name": "quantity", "type": "asset"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "work_request_struct",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "id", "type": "uint64"},
|
||||
{"name": "user", "type": "name"},
|
||||
{"name": "reward", "type": "asset"},
|
||||
{"name": "min_verification", "type": "uint32"},
|
||||
{"name": "nonce", "type": "uint64"},
|
||||
{"name": "body", "type": "string"},
|
||||
{"name": "binary_data", "type": "string"},
|
||||
{"name": "timestamp", "type": "time_point_sec"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "work_result_struct",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "id", "type": "uint64"},
|
||||
{"name": "request_id", "type": "uint64"},
|
||||
{"name": "user", "type": "name"},
|
||||
{"name": "worker", "type": "name"},
|
||||
{"name": "result_hash", "type": "checksum256"},
|
||||
{"name": "ipfs_hash", "type": "string"},
|
||||
{"name": "submited", "type": "time_point_sec"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "workbegin",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "worker", "type": "name"},
|
||||
{"name": "request_id", "type": "uint64"},
|
||||
{"name": "max_workers", "type": "uint32"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "workcancel",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "worker", "type": "name"},
|
||||
{"name": "request_id", "type": "uint64"},
|
||||
{"name": "reason", "type": "string"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "worker",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "account", "type": "name"},
|
||||
{"name": "joined", "type": "time_point_sec"},
|
||||
{"name": "left", "type": "time_point_sec"},
|
||||
{"name": "url", "type": "string"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "worker_status_struct",
|
||||
"base": "",
|
||||
"fields": [
|
||||
{"name": "worker", "type": "name"},
|
||||
{"name": "status", "type": "string"},
|
||||
{"name": "started", "type": "time_point_sec"}
|
||||
]
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{"name": "clean", "type": "clean", "ricardian_contract": ""},
|
||||
{"name": "config", "type": "config", "ricardian_contract": ""},
|
||||
{"name": "dequeue", "type": "dequeue", "ricardian_contract": ""},
|
||||
{"name": "enqueue", "type": "enqueue", "ricardian_contract": ""},
|
||||
{"name": "submit", "type": "submit", "ricardian_contract": ""},
|
||||
{"name": "withdraw", "type": "withdraw", "ricardian_contract": ""},
|
||||
{"name": "workbegin", "type": "workbegin", "ricardian_contract": ""},
|
||||
{"name": "workcancel", "type": "workcancel", "ricardian_contract": ""}
|
||||
],
|
||||
"tables": [
|
||||
{
|
||||
"name": "cards",
|
||||
"index_type": "i64",
|
||||
"key_names": [],
|
||||
"key_types": [],
|
||||
"type": "card"
|
||||
},
|
||||
{
|
||||
"name": "gcfgstruct",
|
||||
"index_type": "i64",
|
||||
"key_names": [],
|
||||
"key_types": [],
|
||||
"type": "gcfgstruct"
|
||||
},
|
||||
{
|
||||
"name": "queue",
|
||||
"index_type": "i64",
|
||||
"key_names": [],
|
||||
"key_types": [],
|
||||
"type": "work_request_struct"
|
||||
},
|
||||
{
|
||||
"name": "results",
|
||||
"index_type": "i64",
|
||||
"key_names": [],
|
||||
"key_types": [],
|
||||
"type": "work_result_struct"
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"index_type": "i64",
|
||||
"key_names": [],
|
||||
"key_types": [],
|
||||
"type": "worker_status_struct"
|
||||
},
|
||||
{
|
||||
"name": "users",
|
||||
"index_type": "i64",
|
||||
"key_names": [],
|
||||
"key_types": [],
|
||||
"type": "account"
|
||||
},
|
||||
{
|
||||
"name": "workers",
|
||||
"index_type": "i64",
|
||||
"key_names": [],
|
||||
"key_types": [],
|
||||
"type": "worker"
|
||||
}
|
||||
],
|
||||
"ricardian_clauses": [],
|
||||
"error_messages": [],
|
||||
"abi_extensions": [],
|
||||
"variants": [],
|
||||
"action_results": []
|
||||
}
|
||||
|
||||
|
||||
class SkynetTelegramFrontend:
|
||||
|
||||
|
@ -279,7 +61,7 @@ class SkynetTelegramFrontend:
|
|||
|
||||
self.bot = AsyncTeleBot(token, exception_handler=SKYExceptionHandler)
|
||||
self.cleos = CLEOS(endpoint=node_url)
|
||||
self.cleos.load_abi('gpu.scd', gpu_abi)
|
||||
self.cleos.load_abi('gpu.scd', GPU_CONTRACT_ABI)
|
||||
self.hyperion = HyperionAPI(hyperion_url)
|
||||
self.ipfs_node = AsyncIPFSHTTP(ipfs_node)
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
import logging
|
||||
from pathlib import Path
|
||||
|
||||
import asks
|
||||
import httpx
|
||||
|
||||
|
||||
class IPFSClientException(BaseException):
|
||||
class IPFSClientException(Exception):
|
||||
...
|
||||
|
||||
|
||||
|
@ -16,7 +16,8 @@ class AsyncIPFSHTTP:
|
|||
self.endpoint = endpoint
|
||||
|
||||
async def _post(self, sub_url: str, *args, **kwargs):
|
||||
resp = await asks.post(
|
||||
async with httpx.AsyncClient() as client:
|
||||
resp = await client.post(
|
||||
self.endpoint + sub_url,
|
||||
*args, **kwargs
|
||||
)
|
||||
|
@ -25,10 +26,10 @@ class AsyncIPFSHTTP:
|
|||
raise IPFSClientException(resp.text)
|
||||
|
||||
return resp.json()
|
||||
|
||||
#!/usr/bin/python
|
||||
async def add(self, file_path: Path, **kwargs):
|
||||
files = {
|
||||
'file': file_path
|
||||
'file': (file_path.name, file_path.open('rb'))
|
||||
}
|
||||
return await self._post(
|
||||
'/api/v0/add',
|
||||
|
@ -58,15 +59,16 @@ class AsyncIPFSHTTP:
|
|||
async def get_ipfs_file(ipfs_link: str, timeout: int = 60 * 5):
|
||||
logging.info(f'attempting to get image at {ipfs_link}')
|
||||
resp = None
|
||||
for i in range(timeout):
|
||||
for _ in range(timeout):
|
||||
try:
|
||||
resp = await asks.get(ipfs_link, timeout=3)
|
||||
async with httpx.AsyncClient() as client:
|
||||
resp = await client.get(ipfs_link, timeout=3)
|
||||
|
||||
except asks.errors.RequestTimeout:
|
||||
logging.warning('timeout...')
|
||||
except httpx.RequestError as e:
|
||||
logging.warning(f'Request error: {e}')
|
||||
|
||||
except asks.errors.BadHttpResponse as e:
|
||||
logging.error(f'ifps gateway exception: \n{e}')
|
||||
if resp is not None:
|
||||
break
|
||||
|
||||
if resp:
|
||||
logging.info(f'status_code: {resp.status_code}')
|
||||
|
|
Loading…
Reference in New Issue