Skip to content

fix assert message#1040

Merged
tjruwase merged 2 commits intodeepspeedai:masterfrom
stas00:patch-1
May 3, 2021
Merged

fix assert message#1040
tjruwase merged 2 commits intodeepspeedai:masterfrom
stas00:patch-1

Conversation

@stas00
Copy link
Copy Markdown
Collaborator

@stas00 stas00 commented May 3, 2021

The current assert "Model must initialized in fp16 mode for ZeRO Stage 3." needs grammatical TLC - I rewrote it completely to match its cousin assert, so now we have 2 consistent matching asserts:

  • "fp16 is enabled but one or several model parameters have dtype that is not fp16"
  • "fp16 is not enabled but one or several model parameters have dtype of fp16"

This PR also removes the f"" as it's not needed.

The current assert "Model must initialized in fp16 mode for ZeRO Stage 3." needs TLC - I rewrote it completely to match its cousen assert, so now we have 2 consistent matching asserts:

- f"fp16 is enabled but one or several model parameters have dtype that is not fp16"
- f"fp16 is not enabled but one or several model parameters have dtype of fp16"
@tjruwase tjruwase merged commit 47ec97e into deepspeedai:master May 3, 2021
@stas00 stas00 deleted the patch-1 branch May 3, 2021 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants