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 e451f92
Show file tree
Hide file tree
Showing 2 changed files with 12 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
9 changes: 9 additions & 0 deletions tests/e2e/utils_md5.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
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 e451f92

Please sign in to comment.