aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2023-05-30 08:05:14 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2023-05-30 08:34:13 +0000
commite18e8104d4044b18f7d4d40046a4f56c3167febf (patch)
tree163bafeae908a4139562f7082b1ec7ebf4b3f45a
parent887237b23c3275da9ed34dc79a44b9b84cb3e51e (diff)
misc/py-torchmetrics: New port: PyTorch native metrics
-rw-r--r--misc/Makefile1
-rw-r--r--misc/py-torchmetrics/Makefile30
-rw-r--r--misc/py-torchmetrics/distinfo3
-rw-r--r--misc/py-torchmetrics/pkg-descr8
4 files changed, 42 insertions, 0 deletions
diff --git a/misc/Makefile b/misc/Makefile
index 4f160640a5e6..b95f3a87cd4c 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -469,6 +469,7 @@
SUBDIR += py-tflite-support
SUBDIR += py-toil
SUBDIR += py-torch-geometric
+ SUBDIR += py-torchmetrics
SUBDIR += py-torchvision
SUBDIR += py-tqdm
SUBDIR += py-tvm
diff --git a/misc/py-torchmetrics/Makefile b/misc/py-torchmetrics/Makefile
new file mode 100644
index 000000000000..d67da7429b66
--- /dev/null
+++ b/misc/py-torchmetrics/Makefile
@@ -0,0 +1,30 @@
+PORTNAME= torchmetrics
+DISTVERSION= 0.11.4
+CATEGORIES= misc python # machine-learning
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= PyTorch native metrics
+WWW= https://torchmetrics.readthedocs.io/en/stable/
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+PY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}nltk>=3.6:textproc/py-nltk@${PY_FLAVOR} \
+ ${PYNUMPY} \
+ ${PYTHON_PKGNAMEPREFIX}packaging>0:devel/py-packaging@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytorch>0:misc/py-pytorch@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}regex>=2021.9.24:textproc/py-regex@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}scipy>=1.0.0:science/py-scipy@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}torchvision>0:misc/py-torchvision@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}tqdm>=4.41.0:misc/py-tqdm@${PY_FLAVOR} # some optional dependencies for some sections are missing
+BUILD_DEPENDS= ${PY_DEPENDS}
+RUN_DEPENDS= ${PY_DEPENDS}
+
+USES= python:3.7+
+USE_PYTHON= distutils autoplist
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/misc/py-torchmetrics/distinfo b/misc/py-torchmetrics/distinfo
new file mode 100644
index 000000000000..42fa25db6c86
--- /dev/null
+++ b/misc/py-torchmetrics/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1685432785
+SHA256 (torchmetrics-0.11.4.tar.gz) = 1fe45a14b44dd65d90199017dd5a4b5a128d56a8a311da7916c402c18c671494
+SIZE (torchmetrics-0.11.4.tar.gz) = 307144
diff --git a/misc/py-torchmetrics/pkg-descr b/misc/py-torchmetrics/pkg-descr
new file mode 100644
index 000000000000..4655d2f97f10
--- /dev/null
+++ b/misc/py-torchmetrics/pkg-descr
@@ -0,0 +1,8 @@
+TorchMetrics is a collection of 90+ PyTorch metrics implementations and an
+easy-to-use API to create custom metrics. It offers:
+* A standardized interface to increase reproducibility
+* Reduces Boilerplate
+* Distributed-training compatible
+* Rigorously tested
+* Automatic accumulation over batches
+* Automatic synchronization between multiple devices