py-torchbenchmark: add new package (#35443)
This commit is contained in:
parent
313797e3d4
commit
0500a3cec0
22
var/spack/repos/builtin/packages/py-accelerate/package.py
Normal file
22
var/spack/repos/builtin/packages/py-accelerate/package.py
Normal file
@ -0,0 +1,22 @@
|
||||
# Copyright 2013-2023 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)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class PyAccelerate(PythonPackage):
|
||||
"""A simple way to train and use PyTorch models with multi-GPU, TPU, mixed-precision."""
|
||||
|
||||
homepage = "https://github.com/huggingface/accelerate"
|
||||
pypi = "accelerate/accelerate-0.16.0.tar.gz"
|
||||
|
||||
version("0.16.0", sha256="d13e30f3e6debfb46cada7b931af85560619b6a6a839d0cafeeab6ed7c6a498d")
|
||||
|
||||
depends_on("py-setuptools", type="build")
|
||||
depends_on("py-numpy@1.17:", type=("build", "run"))
|
||||
depends_on("py-packaging@20:", type=("build", "run"))
|
||||
depends_on("py-psutil", type=("build", "run"))
|
||||
depends_on("py-pyyaml", type=("build", "run"))
|
||||
depends_on("py-torch@1.4:", type=("build", "run"))
|
20
var/spack/repos/builtin/packages/py-iopath/package.py
Normal file
20
var/spack/repos/builtin/packages/py-iopath/package.py
Normal file
@ -0,0 +1,20 @@
|
||||
# Copyright 2013-2023 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)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class PyIopath(PythonPackage):
|
||||
"""A library for providing I/O abstraction."""
|
||||
|
||||
homepage = "https://github.com/facebookresearch/iopath"
|
||||
pypi = "iopath/iopath-0.1.10.tar.gz"
|
||||
|
||||
version("0.1.10", sha256="3311c16a4d9137223e20f141655759933e1eda24f8bff166af834af3c645ef01")
|
||||
|
||||
depends_on("py-setuptools", type="build")
|
||||
depends_on("py-tqdm", type=("build", "run"))
|
||||
depends_on("py-typing-extensions", type=("build", "run"))
|
||||
depends_on("py-portalocker", type=("build", "run"))
|
22
var/spack/repos/builtin/packages/py-libcst/package.py
Normal file
22
var/spack/repos/builtin/packages/py-libcst/package.py
Normal file
@ -0,0 +1,22 @@
|
||||
# Copyright 2013-2023 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)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class PyLibcst(PythonPackage):
|
||||
"""A Concrete Syntax Tree (CST) parser and serializer library for Python."""
|
||||
|
||||
homepage = "https://github.com/Instagram/LibCST"
|
||||
pypi = "libcst/libcst-0.4.9.tar.gz"
|
||||
|
||||
version("0.4.9", sha256="01786c403348f76f274dbaf3888ae237ffb73e6ed6973e65eba5c1fc389861dd")
|
||||
|
||||
depends_on("py-setuptools", type="build")
|
||||
depends_on("py-setuptools-rust", type="build")
|
||||
depends_on("py-setuptools-scm", type="build")
|
||||
depends_on("py-typing-extensions@3.7.4.2:", type=("build", "run"))
|
||||
depends_on("py-typing-inspect@0.4:", type=("build", "run"))
|
||||
depends_on("py-pyyaml@5.2:", type=("build", "run"))
|
19
var/spack/repos/builtin/packages/py-monkeytype/package.py
Normal file
19
var/spack/repos/builtin/packages/py-monkeytype/package.py
Normal file
@ -0,0 +1,19 @@
|
||||
# Copyright 2013-2023 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)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class PyMonkeytype(PythonPackage):
|
||||
"""Generating type annotations from sampled production types."""
|
||||
|
||||
homepage = "https://github.com/instagram/MonkeyType"
|
||||
pypi = "MonkeyType/MonkeyType-22.2.0.tar.gz"
|
||||
|
||||
version("22.2.0", sha256="6b0c00b49dcc5095a2c08d28246cf005e05673fc51f64d203f9a6bca2036dfab")
|
||||
|
||||
depends_on("py-setuptools", type="build")
|
||||
depends_on("py-mypy-extensions", type=("build", "run"))
|
||||
depends_on("py-libcst@0.3.7:", type=("build", "run"))
|
17
var/spack/repos/builtin/packages/py-patch/package.py
Normal file
17
var/spack/repos/builtin/packages/py-patch/package.py
Normal file
@ -0,0 +1,17 @@
|
||||
# Copyright 2013-2023 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)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class PyPatch(PythonPackage):
|
||||
"""Library to parse and apply unified diffs."""
|
||||
|
||||
homepage = "https://github.com/techtonik/python-patch"
|
||||
pypi = "patch/patch-1.16.zip"
|
||||
|
||||
version("1.16", sha256="c62073f356cff054c8ac24496f1a3d7cfa137835c31e9af39a9f5292fd75bd9f")
|
||||
|
||||
depends_on("py-setuptools", type="build")
|
@ -0,0 +1,65 @@
|
||||
# Copyright 2013-2023 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)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class PyTorchbenchmark(Package):
|
||||
"""A collection of open source benchmarks used to evaluate PyTorch performance."""
|
||||
|
||||
homepage = "https://github.com/pytorch/benchmark"
|
||||
git = "https://github.com/pytorch/benchmark.git"
|
||||
|
||||
maintainers("adamjstewart")
|
||||
|
||||
version("main", branch="main")
|
||||
|
||||
# README.md
|
||||
depends_on("python@3.8:+pythoncmd", type=("build", "run"))
|
||||
depends_on("git-lfs", type=("build", "run"))
|
||||
depends_on("py-torch", type=("build", "run"))
|
||||
depends_on("py-torchaudio", type=("build", "run"))
|
||||
depends_on("py-torchtext", type=("build", "run"))
|
||||
depends_on("py-torchvision", type=("build", "run"))
|
||||
|
||||
# requirements.txt
|
||||
depends_on("py-accelerate", type=("build", "run"))
|
||||
depends_on("py-beautifulsoup4", type=("build", "run"))
|
||||
depends_on("py-patch", type=("build", "run"))
|
||||
depends_on("py-py-cpuinfo", type=("build", "run"))
|
||||
depends_on("py-distro", type=("build", "run"))
|
||||
depends_on("py-iopath", type=("build", "run"))
|
||||
depends_on("py-pytest", type=("build", "run"))
|
||||
depends_on("py-pytest-benchmark", type=("build", "run"))
|
||||
depends_on("py-requests", type=("build", "run"))
|
||||
depends_on("py-tabulate", type=("build", "run"))
|
||||
depends_on("py-timm", type=("build", "run"))
|
||||
depends_on("py-transformers", type=("build", "run"))
|
||||
depends_on("py-monkeytype", type=("build", "run"))
|
||||
depends_on("py-psutil", type=("build", "run"))
|
||||
depends_on("py-pyyaml", type=("build", "run"))
|
||||
depends_on("py-numpy", type=("build", "run"))
|
||||
depends_on("py-kornia", type=("build", "run"))
|
||||
depends_on("py-scipy", type=("build", "run"))
|
||||
depends_on("py-submitit", type=("build", "run"))
|
||||
|
||||
# torchbenchmark/models/BERT_pytorch/setup.py
|
||||
depends_on("py-setuptools", type="build")
|
||||
|
||||
def patch(self):
|
||||
# Avoid attempts to install dependencies
|
||||
filter_file(r" = pip_install_requirements\(.*\)", " = True, 'skip'", "install.py")
|
||||
filter_file(
|
||||
r" = _install_deps\(.*\)",
|
||||
" = (True, None, None)",
|
||||
join_path("torchbenchmark", "__init__.py"),
|
||||
)
|
||||
|
||||
def install(self, spec, prefix):
|
||||
# Downloads datasets and models
|
||||
python("install.py", "--verbose")
|
||||
|
||||
# Copy to installation prefix
|
||||
install_tree(".", prefix)
|
@ -0,0 +1,19 @@
|
||||
# Copyright 2013-2023 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)
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
class PyTypingInspect(PythonPackage):
|
||||
"""Runtime inspection utilities for typing module."""
|
||||
|
||||
homepage = "https://github.com/ilevkivskyi/typing_inspect"
|
||||
pypi = "typing_inspect/typing_inspect-0.8.0.tar.gz"
|
||||
|
||||
version("0.8.0", sha256="8b1ff0c400943b6145df8119c41c244ca8207f1f10c9c057aeed1560e4806e3d")
|
||||
|
||||
depends_on("py-setuptools", type="build")
|
||||
depends_on("py-mypy-extensions@0.3:", type=("build", "run"))
|
||||
depends_on("py-typing-extensions@3.7.4:", type=("build", "run"))
|
Loading…
Reference in New Issue
Block a user