Skip to content

Commit eff54e6

Browse files
mnabianktangsali
andauthored
CorrDiff: Remove pickle dependency (#445)
* remove pickle * Remove unused io library --------- Co-authored-by: Kaustubh Tangsali <[email protected]>
1 parent 0168c00 commit eff54e6

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3131

3232
### Removed
3333

34+
- Pickle dependency for CorrDiff.
35+
3436
### Fixed
3537

3638
- Consistent handling of single GPU runs in DistributedManager

modulus/utils/generative/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
get_obj_by_name,
3737
get_obj_from_module,
3838
get_top_level_function_name,
39-
is_pickleable,
4039
is_top_level_function,
4140
list_dir_recursively_with_ignore,
4241
named_params_and_buffers,

modulus/utils/generative/utils.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
import fnmatch
2424
import importlib
2525
import inspect
26-
import io
2726
import os
28-
import pickle
2927
import re
3028
import shutil
3129
import sys
@@ -209,15 +207,6 @@ def get_dtype_and_ctype(type_obj: Any) -> Tuple[np.dtype, Any]: # pragma: no co
209207
return my_dtype, my_ctype
210208

211209

212-
def is_pickleable(obj: Any) -> bool: # TODO remove # pragma: no cover
213-
try:
214-
with io.BytesIO() as stream:
215-
pickle.dump(obj, stream)
216-
return True
217-
except:
218-
return False
219-
220-
221210
# Functionality to import modules/objects by name, and call functions by name
222211
# -------------------------------------------------------------------------------------
223212

0 commit comments

Comments
 (0)