Skip to content

Commit a6714f2

Browse files
committed
Adjust CodeFlare SDK tests to run on FIPS
1 parent 0813065 commit a6714f2

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

tests/e2e/mnist.py

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import torch
1818
import requests
19+
from utils_md5 import apply_md5_patch
1920
from pytorch_lightning import LightningModule, Trainer
2021
from pytorch_lightning.callbacks.progress import TQDMProgressBar
2122
from torch import nn
@@ -138,6 +139,8 @@ def configure_optimizers(self):
138139
####################
139140

140141
def prepare_data(self):
142+
apply_md5_patch()
143+
141144
# download
142145
print("Downloading MNIST dataset...")
143146

tests/e2e/utils_md5.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import torchvision.datasets.utils as utils
2+
3+
def check_md5(fpath, md5=None):
4+
return True
5+
6+
def apply_md5_patch():
7+
utils.check_md5 = check_md5

0 commit comments

Comments
 (0)