Fix torch 2.4.0 fix

This commit is contained in:
doctorpangloss 2024-07-30 11:17:25 -07:00
parent 249b60e354
commit 4e851e2cfa

View File

@ -59,6 +59,7 @@ def _fix_pytorch_240():
if os.path.exists(dest): if os.path.exists(dest):
break break
try:
with open(test_file, 'rb') as f: with open(test_file, 'rb') as f:
contents = f.read() contents = f.read()
# todo: dubious # todo: dubious
@ -72,6 +73,8 @@ def _fix_pytorch_240():
shutil.copyfile(os.path.join(lib_folder, "libiomp5md.dll"), dest) shutil.copyfile(os.path.join(lib_folder, "libiomp5md.dll"), dest)
except Exception as exc_info: except Exception as exc_info:
logging.error("While trying to patch a fix for torch 2.4.0, an error occurred, which means this is unlikely to work", exc_info=exc_info) logging.error("While trying to patch a fix for torch 2.4.0, an error occurred, which means this is unlikely to work", exc_info=exc_info)
except:
pass
def _create_tracer(): def _create_tracer():