Skip to content

Commit

Permalink
Merge pull request easybuilders#3353 from boegel/20240608141437_new_p…
Browse files Browse the repository at this point in the history
…r_torchvision

always specify custom value for `sanity_check_paths` in custom easyblock for torchvision
  • Loading branch information
smoors authored Jun 8, 2024
2 parents ff6b0f5 + 53e0dd3 commit afad8e5
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions easybuild/easyblocks/t/torchvision.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,17 @@ def configure_step(self):

def sanity_check_step(self):
"""Custom sanity check for torchvision."""

# load module early ourselves rather than letting parent sanity_check_step method do so,
# so the correct 'python' command is used to by det_pylibdir() below;
if hasattr(self, 'sanity_check_module_loaded') and not self.sanity_check_module_loaded:
self.fake_mod_data = self.sanity_check_load_module(extension=self.is_extension)

custom_commands = []
custom_paths = None
custom_paths = {
'files': [],
'dirs': [det_pylibdir()],
}

# check whether torchvision was indeed built with CUDA support,
# cfr. https://discuss.pytorch.org/t/notimplementederror-could-not-run-torchvision-nms-with-arguments-from-\
Expand All @@ -103,10 +112,6 @@ def sanity_check_step(self):
" print(torchvision.ops.nms(boxes, scores, 0.5))",
])
custom_commands.append('python -c "%s"' % python_code)
custom_paths = {
'files': [],
'dirs': [det_pylibdir()],
}

if get_software_root('libjpeg-turbo'):
# check if torchvision was built with libjpeg support
Expand Down

0 comments on commit afad8e5

Please sign in to comment.