Skip to content

Commit

Permalink
add ONEFLOW_DEBUG_CHECKPOINT
Browse files Browse the repository at this point in the history
  • Loading branch information
jackalcooper committed Aug 8, 2023
1 parent b664acc commit 1757891
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/oneflow/framework/check_point_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,9 @@ def is_file_and_support_pytorch_format(
content = torch.load(path, map_location="cpu")
return True, (content,)
except:
if os.getenv("ONEFLOW_DEBUG_CHECKPOINT") == "1":
import traceback
traceback.print_exc()
return False


Expand Down

0 comments on commit 1757891

Please sign in to comment.