Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Apr 2024 01:42:44 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: dc61470677e1 - main - misc/py-accelerate: New port: PyTorch: simple way to launch, train, use PyTorch models on any device
Message-ID:  <202404270142.43R1giOQ092668@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=dc61470677e1276f07b4a902a7e3b127e8739d72

commit dc61470677e1276f07b4a902a7e3b127e8739d72
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-04-27 00:45:56 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-04-27 01:42:39 +0000

    misc/py-accelerate: New port: PyTorch: simple way to launch, train, use PyTorch models on any device
---
 misc/Makefile                |  1 +
 misc/py-accelerate/Makefile  | 31 +++++++++++++++++++++++++++++++
 misc/py-accelerate/distinfo  |  3 +++
 misc/py-accelerate/pkg-descr |  3 +++
 4 files changed, 38 insertions(+)

diff --git a/misc/Makefile b/misc/Makefile
index c3132eeab21f..2f2339470284 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -400,6 +400,7 @@
     SUBDIR += py-SQSnobFit
     SUBDIR += py-SimpleSoapy
     SUBDIR += py-SoapySDR
+    SUBDIR += py-accelerate
     SUBDIR += py-alive-progress
     SUBDIR += py-apache-beam
     SUBDIR += py-ascii-magic
diff --git a/misc/py-accelerate/Makefile b/misc/py-accelerate/Makefile
new file mode 100644
index 000000000000..33b4d9973601
--- /dev/null
+++ b/misc/py-accelerate/Makefile
@@ -0,0 +1,31 @@
+PORTNAME=	accelerate
+DISTVERSION=	0.29.3
+CATEGORIES=	misc # machine-learning
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	PyTorch: simple way to launch, train, use PyTorch models on any device
+WWW=		https://huggingface.co/docs/accelerate/index
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PY_SETUPTOOLS} \
+		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}huggingface-hub>0:misc/py-huggingface-hub@${PY_FLAVOR} \
+		${PYNUMPY} \
+		${PYTHON_PKGNAMEPREFIX}packaging>=20.0:devel/py-packaging@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}psutil>0:sysutils/py-psutil@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pytorch>0:misc/py-pytorch@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}safetensors>=0.3.1:misc/py-safetensors@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR}
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}parameterized>0:devel/py-parameterized@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}torchvision>0:misc/py-torchvision@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	pep517 autoplist pytest # tests fail because they depend on the module 'transformers' that depends on 'accelerate' and isn't yet ported
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/misc/py-accelerate/distinfo b/misc/py-accelerate/distinfo
new file mode 100644
index 000000000000..f94fa499a48a
--- /dev/null
+++ b/misc/py-accelerate/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1714171436
+SHA256 (accelerate-0.29.3.tar.gz) = 1a5a845b06b24b41736b219b2b20fd021ca5dff4070a252445fd6de736e347ac
+SIZE (accelerate-0.29.3.tar.gz) = 295357
diff --git a/misc/py-accelerate/pkg-descr b/misc/py-accelerate/pkg-descr
new file mode 100644
index 000000000000..b86585b66d26
--- /dev/null
+++ b/misc/py-accelerate/pkg-descr
@@ -0,0 +1,3 @@
+The accelerate module was created for PyTorch users who like to write the
+training loop of PyTorch models but are reluctant to write and maintain the
+boilerplate code needed to use multi-GPUs/TPU/fp16.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202404270142.43R1giOQ092668>