Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AIS-SNU/Smart-Infinity
/ condition
Function
condition
DeepSpeedExample/megatron/core/utils.py:35–36 ·
view source on GitHub ↗
(model, attr)
Source
from the content-addressed store, hash-verified
33
34
if
allow_none:
35
def
condition(model, attr):
36
return
not hasattr(model, attr)
37
else
:
38
def
condition(model, attr):
39
return
getattr(model, attr, None) is None
Callers
1
get_attr_wrapped_model
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected