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 261da3f commit c7dcdf3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/e2e/mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Import the MD5 patch utility
from utils_md5 import apply_md5_patch

# Apply the patch to ignore MD5 check
apply_md5_patch()

import os

import torch
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

# Modifying method to ignore MD5 check
def check_md5(fpath, md5=None):
return True

# Apply the modified check_md5 function
def apply_md5_patch():
utils.check_md5 = check_md5

0 comments on commit c7dcdf3

Please sign in to comment.