MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / prepare

Method prepare

tensorflow/python/autograph/core/converter_testing.py:124–142  ·  view source on GitHub ↗
(self, test_fn, namespace, recursive=True)

Source from the content-addressed store, hash-verified

122 setattr(module, k, v)
123
124 def prepare(self, test_fn, namespace, recursive=True):
125 namespace['ConversionOptions'] = converter.ConversionOptions
126
127 future_features = ('print_function', 'division')
128 node, source = parser.parse_entity(test_fn, future_features=future_features)
129 namer = naming.Namer(namespace)
130 program_ctx = converter.ProgramContext(
131 options=converter.ConversionOptions(recursive=recursive),
132 autograph_module=None)
133 entity_info = transformer.EntityInfo(
134 source_code=source,
135 source_file='<fragment>',
136 future_features=future_features,
137 namespace=namespace)
138 ctx = converter.EntityContext(
139 namer, entity_info, program_ctx, 'test_fn')
140 origin_info.resolve_entity(node, source, test_fn)
141 node = converter.standard_analysis(node, ctx, is_initial=True)
142 return node, ctx

Calls

no outgoing calls

Tested by

no test coverage detected