diff options
author | Jen Herting <jen@herting.cc> | 2024-09-06 20:54:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-06 18:54:36 -0600 |
commit | 7d6b643b5887ee34868e033deded5caee1dcb9d9 (patch) | |
tree | ecfd94d2968c7f3ff8eb2c34703d167fcd0a63be /var | |
parent | 6f08db463149efdea126abf8fdc770f684b4199d (diff) | |
download | spack-7d6b643b5887ee34868e033deded5caee1dcb9d9.tar.gz spack-7d6b643b5887ee34868e033deded5caee1dcb9d9.tar.bz2 spack-7d6b643b5887ee34868e033deded5caee1dcb9d9.tar.xz spack-7d6b643b5887ee34868e033deded5caee1dcb9d9.zip |
[py-torch-fidelity] New package (#46257)
* [py-torch-fidelity] New package
* [py-torch-fidelity] add patch to fix missing requirements.txt
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/py-torch-fidelity/package.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-torch-fidelity/package.py b/var/spack/repos/builtin/packages/py-torch-fidelity/package.py new file mode 100644 index 0000000000..df20602e79 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-torch-fidelity/package.py @@ -0,0 +1,33 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +import os + +from spack.package import * + + +class PyTorchFidelity(PythonPackage): + """High-fidelity performance metrics for generative models in PyTorch""" + + homepage = "https://www.github.com/toshas/torch-fidelity" + pypi = "torch_fidelity/torch_fidelity-0.3.0.tar.gz" + + license("Apache-2.0", checked_by="qwertos") + + version("0.3.0", sha256="3d3e33db98919759cc4f3f24cb27e1e74bdc7c905d90a780630e4e1c18492b66") + + depends_on("py-setuptools", type="build") + depends_on("py-numpy", type=("build", "run")) + depends_on("pil", type=("build", "run")) + depends_on("py-scipy", type=("build", "run")) + depends_on("py-torch", type=("build", "run")) + depends_on("py-torchvision", type=("build", "run")) + depends_on("py-tqdm", type=("build", "run")) + + def patch(self): + os.rename( + join_path(self.stage.source_path, "torch_fidelity.egg-info", "requires.txt"), + join_path(self.stage.source_path, "requirements.txt"), + ) |