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
ee222dfb
Unverified
Commit
ee222dfb
authored
Apr 25, 2022
by
Frank Lee
Committed by
GitHub
Apr 25, 2022
Browse files
[usability] added assertion message in registry (#864)
parent
f0e65455
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
colossalai/registry/registry.py
colossalai/registry/registry.py
+1
-1
No files found.
colossalai/registry/registry.py
View file @
ee222dfb
...
...
@@ -35,7 +35,7 @@ class Registry:
AssertionError: Raises an AssertionError if the module has already been registered before.
"""
module_name
=
module_class
.
__name__
assert
module_name
not
in
self
.
_registry
assert
module_name
not
in
self
.
_registry
,
f
"
{
module_name
}
not found in
{
self
.
name
}
"
self
.
_registry
[
module_name
]
=
module_class
# return so as to use it normally if via importing
...
...
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