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
ColossalAI
Commits
bfdc5ccb
"...git@developer.sourcefind.cn:OpenDAS/colossalai.git" did not exist on "da3cef27adcb71847ca59519324ac96b55f7abec"
Unverified
Commit
bfdc5ccb
authored
Jun 07, 2022
by
Frank Lee
Committed by
GitHub
Jun 07, 2022
Browse files
[context] maintain the context object in with statement (#1073)
parent
c5cd3b0f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
colossalai/utils/model/utils.py
colossalai/utils/model/utils.py
+1
-0
No files found.
colossalai/utils/model/utils.py
View file @
bfdc5ccb
...
@@ -72,6 +72,7 @@ class InsertPostInitMethodToModuleSubClasses(object):
...
@@ -72,6 +72,7 @@ class InsertPostInitMethodToModuleSubClasses(object):
torch
.
nn
.
modules
.
module
.
Module
.
__init_subclass__
=
classmethod
(
_init_subclass
)
torch
.
nn
.
modules
.
module
.
Module
.
__init_subclass__
=
classmethod
(
_init_subclass
)
self
.
_pre_context_exec
()
self
.
_pre_context_exec
()
return
self
def
__exit__
(
self
,
exc_type
,
exc_value
,
traceback
):
def
__exit__
(
self
,
exc_type
,
exc_value
,
traceback
):
...
...
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