From 5852fa4467220b38ca79d2d2fb4cc402fbb625f8 Mon Sep 17 00:00:00 2001 From: Yuri Victorovich Date: Fri, 3 Oct 2025 18:25:20 -0700 Subject: [PATCH] misc/py-ml-collections: New port: Python collections library designed for ML usecases --- misc/Makefile | 1 + misc/py-ml-collections/Makefile | 24 ++++++++++++++++++++++++ misc/py-ml-collections/distinfo | 3 +++ misc/py-ml-collections/pkg-descr | 8 ++++++++ 4 files changed, 36 insertions(+) create mode 100644 misc/py-ml-collections/Makefile create mode 100644 misc/py-ml-collections/distinfo create mode 100644 misc/py-ml-collections/pkg-descr diff --git a/misc/Makefile b/misc/Makefile index f21c590c9af3..8bab1c206b7c 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -501,6 +501,7 @@ SUBDIR += py-mem0ai SUBDIR += py-mffpy SUBDIR += py-mixpanel + SUBDIR += py-ml-collections SUBDIR += py-mmcv SUBDIR += py-mmdet SUBDIR += py-mmengine diff --git a/misc/py-ml-collections/Makefile b/misc/py-ml-collections/Makefile new file mode 100644 index 000000000000..d09238b08e61 --- /dev/null +++ b/misc/py-ml-collections/Makefile @@ -0,0 +1,24 @@ +PORTNAME= ml-collections +DISTVERSION= 1.1.0 +CATEGORIES= misc python # machine-learning +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTNAME= ${PORTNAME:S/-/_/}-${DISTVERSION} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Python collections library designed for ML usecases +WWW= https://github.com/google/ml_collections + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}flit-core>=3.8:devel/py-flit-core@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}absl-py>0:devel/py-absl-py@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyyaml>0:devel/py-pyyaml@${PY_FLAVOR} + +USES= python +USE_PYTHON= pep517 concurrent autoplist + +NO_ARCH= yes + +.include diff --git a/misc/py-ml-collections/distinfo b/misc/py-ml-collections/distinfo new file mode 100644 index 000000000000..c87b2db74135 --- /dev/null +++ b/misc/py-ml-collections/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1759525601 +SHA256 (ml_collections-1.1.0.tar.gz) = 0ac1ac6511b9f1566863e0bb0afad0c64e906ea278ad3f4d2144a55322671f6f +SIZE (ml_collections-1.1.0.tar.gz) = 61356 diff --git a/misc/py-ml-collections/pkg-descr b/misc/py-ml-collections/pkg-descr new file mode 100644 index 000000000000..7653b8068dbd --- /dev/null +++ b/misc/py-ml-collections/pkg-descr @@ -0,0 +1,8 @@ +ML Collections is a library of Python collections designed for ML usecases. + +ML Collections provides: +* ConfigDict: A 'dict' with additional functionality for easier management + of configuration dictionaries +* FrozenConfigDict: A configuration dictionary which is immutable +* FieldReference: A way to reference a field in a nested data structure +* lazy_imports: A mechanism to import modules when they are actually used