From a6714f23ee3ca310363c9dae1c810f0e165cb11c Mon Sep 17 00:00:00 2001 From: oksanabaza Date: Tue, 10 Sep 2024 13:26:29 +0100 Subject: [PATCH] Adjust CodeFlare SDK tests to run on FIPS --- tests/e2e/mnist.py | 3 +++ tests/e2e/utils_md5.py | 7 +++++++ 2 files changed, 10 insertions(+) create mode 100644 tests/e2e/utils_md5.py diff --git a/tests/e2e/mnist.py b/tests/e2e/mnist.py index 143a6b6c9..8b5f72214 100644 --- a/tests/e2e/mnist.py +++ b/tests/e2e/mnist.py @@ -16,6 +16,7 @@ import torch import requests +from utils_md5 import apply_md5_patch from pytorch_lightning import LightningModule, Trainer from pytorch_lightning.callbacks.progress import TQDMProgressBar from torch import nn @@ -138,6 +139,8 @@ def configure_optimizers(self): #################### def prepare_data(self): + apply_md5_patch() + # download print("Downloading MNIST dataset...") diff --git a/tests/e2e/utils_md5.py b/tests/e2e/utils_md5.py new file mode 100644 index 000000000..ece5ae997 --- /dev/null +++ b/tests/e2e/utils_md5.py @@ -0,0 +1,7 @@ +import torchvision.datasets.utils as utils + +def check_md5(fpath, md5=None): + return True + +def apply_md5_patch(): + utils.check_md5 = check_md5 \ No newline at end of file