Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytorch 2.5.0 torchvision 0.20.0 #194877

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions Formula/o/openai-whisper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

desc "General-purpose speech recognition model"
homepage "https://github.com/openai/whisper"
url "https://files.pythonhosted.org/packages/ed/a9/81f65f3443778a1e1088e80089fc970f1f160abec2bfc3d71abfed8cbc34/openai-whisper-20240927.tar.gz"
sha256 "5b322442b03704e245e3d6d3a577d7a3845f884e50edbf15990cb26a134dffff"
url "https://files.pythonhosted.org/packages/f5/77/952ca71515f81919bd8a6a4a3f89a27b09e73880cebf90957eda8f2f8545/openai-whisper-20240930.tar.gz"
sha256 "b7178e9c1615576807a300024f4daa6353f7e1a815dac5e38c33f1ef055dd2d2"
license "MIT"
head "https://github.com/openai/whisper.git", branch: "main"

Expand All @@ -22,16 +22,16 @@
depends_on "ffmpeg"
depends_on "llvm@16" # LLVM 17 PR: https://github.com/numba/llvmlite/pull/1042
depends_on "numpy"
depends_on "python@3.12"
depends_on "python@3.13"
depends_on "pytorch"

on_linux do
depends_on "pkg-config" => :build
end

resource "charset-normalizer" do
url "https://files.pythonhosted.org/packages/63/09/c1bc53dab74b1816a00d8d030de5bf98f724c52c1635e07681d312f20be8/charset-normalizer-3.3.2.tar.gz"
sha256 "f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"
url "https://files.pythonhosted.org/packages/f2/4f/e1808dc01273379acc506d18f1504eb2d299bd4131743b9fc54d7be4df1e/charset_normalizer-3.4.0.tar.gz"
sha256 "223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e"
end

resource "idna" do
Expand Down Expand Up @@ -69,8 +69,8 @@
end

resource "tiktoken" do
url "https://files.pythonhosted.org/packages/c4/4a/abaec53e93e3ef37224a4dd9e2fc6bb871e7a538c2b6b9d2a6397271daf4/tiktoken-0.7.0.tar.gz"
sha256 "1077266e949c24e0291f6c350433c6f0971365ece2b173a23bc3b9f9defef6b6"
url "https://files.pythonhosted.org/packages/37/02/576ff3a6639e755c4f70997b2d315f56d6d71e0d046f4fb64cb81a3fb099/tiktoken-0.8.0.tar.gz"
sha256 "9ccbb2740f24542534369c5635cfd9b2b3c2490754a78ac8831d99f89f94eeb2"
end

resource "tqdm" do
Expand All @@ -83,8 +83,9 @@
sha256 "e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"
end

def install

Check failure on line 86 in Formula/o/openai-whisper.rb

View workflow job for this annotation

GitHub Actions / macOS 15-arm64

`brew install --verbose --formula --build-bottle openai-whisper` failed on macOS Sequoia (15) on Apple Silicon!

_guard_py_ver() ~~~~~~~~~~~~~^^ File "/private/tmp/openai-whisper--numba-20241019-54441-wn6izh/setup.py", line 47, in _guard_py_ver raise RuntimeError(msg.format(cur_py, min_py, max_py)) RuntimeError: Cannot install on Python version 3.13.0; only versions >=3.9,<3.13 are supported. error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. full command: /opt/homebrew/Cellar/openai-whisper/20240930/libexec/bin/python -c ' exec(compile('"'"''"'"''"'"' # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py # # - It imports setuptools before invoking setup.py, to enable projects that directly # import from `distutils.core` to work with newer packaging standards. # - It provides a clear error message when setuptools is not installed. # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so # setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning: # manifest_maker: standard file '"'"'-c'"'"' not found". # - It generates a shim setup.py, for handling setup.cfg-only projects. import os, sys, tokenize try: import setuptools except ImportError as error: print( "ERROR: Can not execute `setup.py` since setuptools is not available in " "the build environment.", file=sys.stderr, ) sys.exit(1) __file__ = %r sys.argv[0] = __file__ if os.path.exists(__file__): filename = __file__ with tokenize.open(__file__) as f: setup_py_code = f.read() else: filename = "<auto-generated setuptools caller>" setup_py_code = "from setuptools import setup; setup()" exec(compile(setup_py_code, filename, "exec")) '"'"''"'"''"'"' % ('"'"'/private/tmp/openai-whisper--numba-20241019-54441-wn6izh/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' egg_info --egg-base /private/tmp/pip-pip-egg-info-dggcj5dt cwd: /private/tmp/openai-whisper--numba-20241019-54441-wn6izh/ Preparing metadata (setup.py): finished with status 'error' error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details. ==> Formula Path: /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/o/openai-whisper.rb ==> Configuration HOMEBREW_VERSION: 4.4.1-62-g6f17b06 ORIGIN: https://github.com/Homebrew/brew HEAD: 6f17b0644771e0a1d7c15ac72471dae2ef87314a Last commit: 10 hours ago Core tap HEAD: 0b9cd6312782b59feb37cfb212edbd6612e31b0b Core tap last commit: 46 minutes ago Core tap JSON: 19 Oct 03:27 UTC Core cask tap JSON: 19 Oct 03:27 UTC HOMEBREW_PREFIX: /opt/homebrew HOMEBREW_CACHE: /Users/brew/Library/Caches/Homebrew HOMEBREW_CASK_OPTS: [] HOMEBREW_COLOR: set HOMEBREW_CURL_PATH: /usr/bin/curl HOMEBREW_FAIL_LOG_LINES: 150 HOMEBREW_GITHUB_API_TOKEN: set HOMEBREW_GIT_EMAIL: [email protected] HOMEBREW_GIT_NAME: BrewTestBot HOMEBREW_GIT_PATH: /usr/bin/git HOMEBREW_LOGS: /Users/brew/actions-runner/_work/homebrew-core/homebrew-core/bottles/logs HOMEBREW_MAKE_JOBS: 4 HOMEBREW_NO_AUTO_UPDATE: set HOMEBREW_NO_EMOJI: set HOMEBREW_NO_ENV_HINTS: set HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: set HOMEBREW_NO_INSTALL_FROM_API: set HOMEBREW_SORBET_RUNTIME: set HOMEBREW_VERIFY_ATTESTATIONS: set Homebrew Ruby: 3.3.5 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.5/bin/ruby CPU: quad-core 64-bit dunno Clang: 16.0.0 build 1600 Git: 2.39.5 => /usr/bin/git Curl: 8.7.1 => /usr/bin/curl macOS: 15.0-arm64 CLT: 16.0.0.0.1.1724870825 Xcode: 16.0 Rosetta 2: false ==> ENV HOMEBREW_CC: clang HOMEBREW_CXX: clang++ MAKEFLAGS: -j4 CMAKE_PREFIX_PATH: /opt/homebrew/opt/readline:/opt/homebrew/opt/sqlite:/opt/homebrew/opt/icu4c@75:/opt/homebrew/opt/libarchive:/opt/homebrew
ENV["LLVM_CONFIG"] = Formula["llvm@16"].opt_bin/"llvm-config"
inreplace "setup.py", "version=read_version()", "version='#{version}'"
venv = virtualenv_install_with_resources without: "numba"

# We depend on pytorch, but that's a separate formula, so install a `.pth` file to link them.
Expand Down
39 changes: 14 additions & 25 deletions Formula/p/pytorch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ class Pytorch < Formula

desc "Tensors and dynamic neural networks"
homepage "https://pytorch.org/"
url "https://github.com/pytorch/pytorch/releases/download/v2.4.1/pytorch-v2.4.1.tar.gz"
sha256 "39666a43c0c10f5fd46c1a7ca95dc74d3bc39de2678b70066481cbf02e58384f"
url "https://github.com/pytorch/pytorch/releases/download/v2.5.0/pytorch-v2.5.0.tar.gz"
sha256 "91b3ba7db9cd6ac48f672a615872dcf1e4c29783d9c615336b11553915d5298a"
license "BSD-3-Clause"

livecheck do
Expand All @@ -23,7 +23,7 @@ class Pytorch < Formula

depends_on "cmake" => :build
depends_on "ninja" => :build
depends_on "python@3.12" => [:build, :test]
depends_on "python@3.13" => [:build, :test]
depends_on xcode: :build
depends_on "abseil"
depends_on "eigen"
Expand Down Expand Up @@ -56,8 +56,8 @@ class Pytorch < Formula
end

resource "markupsafe" do
url "https://files.pythonhosted.org/packages/87/5b/aae44c6655f3801e81aa3eef09dbbf012431987ba564d7231722f68df02d/MarkupSafe-2.1.5.tar.gz"
sha256 "d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b"
url "https://files.pythonhosted.org/packages/b2/97/5d42485e71dfc078108a86d6de8fa46db44a1a9295e89c5d6d4a06e23a62/markupsafe-3.0.2.tar.gz"
sha256 "ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0"
end

resource "mpmath" do
Expand All @@ -66,19 +66,13 @@ class Pytorch < Formula
end

resource "networkx" do
url "https://files.pythonhosted.org/packages/04/e6/b164f94c869d6b2c605b5128b7b0cfe912795a87fc90e78533920001f3ec/networkx-3.3.tar.gz"
sha256 "0c127d8b2f4865f59ae9cb8aafcd60b5c70f3241ebd66f7defad7c4ab90126c9"
url "https://files.pythonhosted.org/packages/36/2b/20ad9eecdda3f1b0dc63fb8f82d2ea99163dbca08bfa392594fc2ed81869/networkx-3.4.1.tar.gz"
sha256 "f9df45e85b78f5bd010993e897b4f1fdb242c11e015b101bd951e5c0e29982d8"
end

resource "opt-einsum" do
url "https://files.pythonhosted.org/packages/7d/bf/9257e53a0e7715bc1127e15063e831f076723c6cd60985333a1c18878fb8/opt_einsum-3.3.0.tar.gz"
sha256 "59f6475f77bbc37dcf7cd748519c0ec60722e91e63ca114e68821c0c54a46549"

# Backport ConfigParser fix for Python 3.12 support
patch do
url "https://github.com/dgasmith/opt_einsum/commit/7c8f193f90b6771a6b3065bb5cf6ec2747af8209.patch?full_index=1"
sha256 "7c90ac470278deca8aa9d7ecb4bb2b31a2f79928e1783ae1316fcc3aa81f348a"
end
url "https://files.pythonhosted.org/packages/8c/b9/2ac072041e899a52f20cf9510850ff58295003aa75525e58343591b0cbfb/opt_einsum-3.4.0.tar.gz"
sha256 "96ca72f1b886d148241348783498194c577fa30a8faac108586b14f1ba4473ac"
end

resource "pyyaml" do
Expand All @@ -87,13 +81,13 @@ class Pytorch < Formula
end

resource "setuptools" do
url "https://files.pythonhosted.org/packages/27/b8/f21073fde99492b33ca357876430822e4800cdf522011f18041351dfa74b/setuptools-75.1.0.tar.gz"
sha256 "d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538"
url "https://files.pythonhosted.org/packages/07/37/b31be7e4b9f13b59cde9dcaeff112d401d49e0dc5b37ed4a9fc8fb12f409/setuptools-75.2.0.tar.gz"
sha256 "753bb6ebf1f465a1912e19ed1d41f403a79173a9acf66a42e7e6aec45c3c16ec"
end

resource "sympy" do
url "https://files.pythonhosted.org/packages/11/8a/5a7fd6284fa8caac23a26c9ddf9c30485a48169344b4bd3b0f02fef1890f/sympy-1.13.3.tar.gz"
sha256 "b27fd2c6530e0ab39e275fc9b683895367e51d5da91baa8d3d64db2565fec4d9"
url "https://files.pythonhosted.org/packages/ca/99/5a5b6f19ff9f083671ddf7b9632028436167cd3d33e11015754e41b249a4/sympy-1.13.1.tar.gz"
sha256 "9cebf7e04ff162015ce31c9c6c9144daa34a93bd082f54fd8f12deca4f47515f"
end

resource "typing-extensions" do
Expand All @@ -102,7 +96,7 @@ class Pytorch < Formula
end

def install
python3 = "python3.12"
python3 = "python3.13"

# Avoid building AVX512 code
inreplace "cmake/Modules/FindAVX.cmake", /^CHECK_SSE\(CXX "AVX512"/, "#\\0"
Expand All @@ -126,11 +120,6 @@ def install
ENV["USE_SYSTEM_SLEEF"] = "ON"
ENV["USE_MPS"] = "ON" if OS.mac?

# Work around superenv removing `-Werror=` but leaving `-Wno-error=` breaking flag detection
if ENV.compiler.to_s.start_with?("gcc")
inreplace "CMakeLists.txt", /^\s*append_cxx_flag_if_supported\(\s*"-Wno-error=inconsistent-missing-[^)]*\)/, ""
end

# Avoid references to Homebrew shims
inreplace "caffe2/core/macros.h.in", "${CMAKE_CXX_COMPILER}", ENV.cxx

Expand Down
12 changes: 6 additions & 6 deletions Formula/t/torchvision.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ class Torchvision < Formula

desc "Datasets, transforms, and models for computer vision"
homepage "https://github.com/pytorch/vision"
url "https://github.com/pytorch/vision/archive/refs/tags/v0.19.1.tar.gz"
sha256 "083e75c467285595ec3eb3c7aa8493c19e53d7eb42f13046fb56a07c8897e5a8"
url "https://github.com/pytorch/vision/archive/refs/tags/v0.20.0.tar.gz"
sha256 "b59d9896c5c957c6db0018754bbd17d079c5102b82b9be0b438553b40a7b6029"
license "BSD-3-Clause"

livecheck do
Expand All @@ -23,7 +23,7 @@ class Torchvision < Formula

depends_on "cmake" => :build
depends_on "ninja" => :build
depends_on "python@3.12" => [:build, :test]
depends_on "python@3.13" => [:build, :test]
depends_on "abseil"
depends_on "certifi"
depends_on "jpeg-turbo"
Expand All @@ -44,10 +44,10 @@ def install

jpeg = Formula["jpeg-turbo"]
inreplace "setup.py",
"(jpeg_found, jpeg_conda, jpeg_include, jpeg_lib) = find_library(\"jpeglib\", vision_include)",
"(jpeg_found, jpeg_conda, jpeg_include, jpeg_lib) = (True, False, \"#{jpeg.include}\", \"#{jpeg.lib}\")"
'jpeg_found, jpeg_include_dir, jpeg_library_dir = find_library(header="jpeglib.h")',
"jpeg_found, jpeg_include_dir, jpeg_library_dir = True, '#{jpeg.include}', '#{jpeg.lib}'"

python3 = "python3.12"
python3 = "python3.13"
venv = virtualenv_create(libexec, python3)
venv.pip_install resources

Expand Down
Loading