Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
fairscale
Commits
66dfe606
"examples/vscode:/vscode.git/clone" did not exist on "0ff817550ca218252215003fe892c10ef25a2d79"
Unverified
Commit
66dfe606
authored
Mar 17, 2021
by
Min Xu
Committed by
GitHub
Mar 17, 2021
Browse files
better backward debugging (#526)
parent
d3bfcbf5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
fairscale/nn/data_parallel/fully_sharded_data_parallel.py
fairscale/nn/data_parallel/fully_sharded_data_parallel.py
+5
-1
No files found.
fairscale/nn/data_parallel/fully_sharded_data_parallel.py
View file @
66dfe606
...
...
@@ -8,6 +8,7 @@ import copy
from
enum
import
Enum
,
auto
import
functools
from
math
import
inf
import
traceback
from
typing
import
TYPE_CHECKING
,
Any
,
Callable
,
Dict
,
Generator
,
List
,
NamedTuple
,
Optional
,
Tuple
,
Union
import
torch
...
...
@@ -1264,7 +1265,10 @@ class FullyShardedDataParallel(nn.Module):
msg
=
f
"expected to be in states
{
state
}
but current state "
f
"is
{
self
.
training_state
}
"
# In case we are failing in the context of autograd hook, asserting
# may not generate useful msg. So, let's print it to be sure.
if
self
.
rank
==
0
:
print
(
self
)
print
(
msg
)
traceback
.
print_stack
()
raise
ValueError
(
msg
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment