MCPcopy Create free account
hub / github.com/pytorch/pytorch / as_python_constant

Method as_python_constant

torch/_dynamo/variables/dicts.py:425–426  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

423 raise RuntimeError("Illegal to getitem on a set")
424
425 def as_python_constant(self):
426 return self.python_type()([x.as_python_constant() for x in self.items])
427
428 def unpack_var_sequence(self, tx):
429 return list(self.items)

Callers 10

call_functionMethod · 0.45
call_functionMethod · 0.45
map_argMethod · 0.45
createMethod · 0.45
get_kwargsMethod · 0.45
call_methodMethod · 0.45
as_python_constantMethod · 0.45
get_keyMethod · 0.45
_as_set_elementMethod · 0.45
call_methodMethod · 0.45

Calls 1

python_typeMethod · 0.95

Tested by

no test coverage detected