Skip to content

Commit

Permalink
Adjust CodeFlare SDK tests to run on FIPS
Browse files Browse the repository at this point in the history
  • Loading branch information
oksanabaza committed Sep 10, 2024
1 parent 0813065 commit a6714f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/e2e/mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -138,6 +139,8 @@ def configure_optimizers(self):
####################

def prepare_data(self):
apply_md5_patch()

# download
print("Downloading MNIST dataset...")

Expand Down
7 changes: 7 additions & 0 deletions tests/e2e/utils_md5.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a6714f2

Please sign in to comment.