Skip to content

Commit

Permalink
add deepspeed to try-except block
Browse files Browse the repository at this point in the history
  • Loading branch information
Quan-Sun committed Jun 11, 2023
1 parent a48d27c commit 64ce3e0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion EVA-CLIP/rei/eva_clip/eva_vit_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 16,10 @@
from .rope import VisionRotaryEmbedding, VisionRotaryEmbeddingFast

if os.getenv('ENV_TYPE') == 'deepspeed':
from deepspeed.runtime.activation_checkpointing.checkpointing import checkpoint
try:
from deepspeed.runtime.activation_checkpointing.checkpointing import checkpoint
except:
from torch.utils.checkpoint import checkpoint
else:
from torch.utils.checkpoint import checkpoint

Expand Down

0 comments on commit 64ce3e0

Please sign in to comment.