From 83e4bcc7408275d791680648547c537632ff2a53 Mon Sep 17 00:00:00 2001 From: pytorchbot Date: Wed, 27 Nov 2024 11:34:57 +0000 Subject: [PATCH] 2024-11-27 nightly release (b33aef4b6f113c8b553de0d0cdcc25f2fd30d019) --- .github/workflows/lint.yml | 4 ++-- torchvision/csrc/io/decoder/memory_buffer.cpp | 2 +- torchvision/csrc/io/decoder/sync_decoder_test.cpp | 4 ++-- torchvision/csrc/io/image/cpu/encode_jpeg.cpp | 4 ++-- torchvision/models/maxvit.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7e9943668cd..22ada97fba8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -72,7 +72,7 @@ jobs: script: | set -euo pipefail - export PYTHON_VERSION=3.9 + export PYTHON_VERSION=3.11 export GPU_ARCH_TYPE=cpu export GPU_ARCH_VERSION='' @@ -83,7 +83,7 @@ jobs: conda activate ci echo '::group::Install lint tools' - pip install --progress-bar=off mypy + pip install --progress-bar=off "mypy==1.13.0" echo '::endgroup::' echo '::group::Lint Python types' diff --git a/torchvision/csrc/io/decoder/memory_buffer.cpp b/torchvision/csrc/io/decoder/memory_buffer.cpp index 4e420c3b3cd..8cf14c42b63 100644 --- a/torchvision/csrc/io/decoder/memory_buffer.cpp +++ b/torchvision/csrc/io/decoder/memory_buffer.cpp @@ -54,7 +54,7 @@ DecoderInCallback MemoryBuffer::getCallback( MemoryBuffer object(buffer, size); return [object](uint8_t* out, int size, int whence, uint64_t timeoutMs) mutable - -> int { + -> int { if (out) { // see defs.h file // read mode return object.read(out, size); diff --git a/torchvision/csrc/io/decoder/sync_decoder_test.cpp b/torchvision/csrc/io/decoder/sync_decoder_test.cpp index 980725c2fcb..e668090e100 100644 --- a/torchvision/csrc/io/decoder/sync_decoder_test.cpp +++ b/torchvision/csrc/io/decoder/sync_decoder_test.cpp @@ -361,7 +361,7 @@ TEST(SyncDecoder, TestMemoryBufferNoSeekableWithFullRead) { CHECK(decoder.init( params, [object](uint8_t* out, int size, int whence, uint64_t timeoutMs) mutable - -> int { + -> int { if (out) { // see defs.h file // read mode return object.read(out, size); @@ -401,7 +401,7 @@ TEST(SyncDecoder, TestMemoryBufferNoSeekableWithPartialRead) { CHECK(!decoder.init( params, [object](uint8_t* out, int size, int whence, uint64_t timeoutMs) mutable - -> int { + -> int { if (out) { // see defs.h file // read mode return object.read(out, size); diff --git a/torchvision/csrc/io/image/cpu/encode_jpeg.cpp b/torchvision/csrc/io/image/cpu/encode_jpeg.cpp index d2ed73071a2..67ca424560f 100644 --- a/torchvision/csrc/io/image/cpu/encode_jpeg.cpp +++ b/torchvision/csrc/io/image/cpu/encode_jpeg.cpp @@ -28,8 +28,8 @@ torch::Tensor encode_jpeg(const torch::Tensor& data, int64_t quality) { C10_LOG_API_USAGE_ONCE( "torchvision.csrc.io.image.cpu.encode_jpeg.encode_jpeg"); // Define compression structures and error handling - struct jpeg_compress_struct cinfo {}; - struct torch_jpeg_error_mgr jerr {}; + struct jpeg_compress_struct cinfo{}; + struct torch_jpeg_error_mgr jerr{}; // Define buffer to write JPEG information to and its size JpegSizeType jpegSize = 0; diff --git a/torchvision/models/maxvit.py b/torchvision/models/maxvit.py index 2dbdca69f05..2a3888b2af3 100644 --- a/torchvision/models/maxvit.py +++ b/torchvision/models/maxvit.py @@ -688,7 +688,7 @@ def __init__( p_stochastic=p_stochastic[p_idx : p_idx + num_layers], ), ) - input_size = self.blocks[-1].grid_size + input_size = self.blocks[-1].grid_size # type: ignore[assignment] p_idx += num_layers # see https://github.com/google-research/maxvit/blob/da76cf0d8a6ec668cc31b399c4126186da7da944/maxvit/models/maxvit.py#L1137-L1158