Skip to content

Commit ff883db

Browse files
authored
Revert "fix: add safety warning to pickle_memoize cache loading" (#18926)
Reverts #18925
1 parent 7b3fa38 commit ff883db

2 files changed

Lines changed: 0 additions & 34 deletions

File tree

python/tvm/contrib/pickle_memoize.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import os
2424
import pathlib
2525
import sys
26-
import warnings
2726

2827
try:
2928
import cPickle as pickle
@@ -72,13 +71,6 @@ def cache(self):
7271
if self.path.exists():
7372
with self.path.open("rb") as cache_file:
7473
try:
75-
warnings.warn(
76-
f"Loading cached pickle file from {self.path}. "
77-
"Pickle files can execute arbitrary code. "
78-
"Only load cache files you trust.",
79-
UserWarning,
80-
stacklevel=2,
81-
)
8274
cache = pickle.load(cache_file)
8375
except pickle.UnpicklingError:
8476
cache = {}

tests/python/contrib/test_pickle_memoize_warning.py

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)