Skip to content

Commit

Permalink
remove DeprecationWarning class to make the warning show up in sterr.
Browse files Browse the repository at this point in the history
  • Loading branch information
awaelchli committed Jun 16, 2021
1 parent 8092946 commit 5814213
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def check_fn(v):
warning_cache.warn(
f"One of the returned values {set(extra.keys())} has a `grad_fn`. We will detach it automatically"
" but this behaviour will change in v1.6. Please detach it manually:"
" `return {'loss': ..., 'something': something.detach()}`", DeprecationWarning
" `return {'loss': ..., 'something': something.detach()}`",
)
return v.detach()
return v
Expand Down

0 comments on commit 5814213

Please sign in to comment.