opto.trace.utils#

Module Contents#

Functions#

sum_feedback

Aggregate the feedback of a list of nodes.

contain

parse_eqs_to_dict

Parse the text of equations into a dictionary

x0 = 1 x1=2 x2=`2` x3= def fun():

print(‘hello’)

abc_test1=test

would be parsed into

{‘x0’: ‘1’, ‘x1’: ‘2’, ‘x2’: ‘2’, ‘x3’: “def fun():

for_all_methods

Applying a decorator to all methods of a class.

render_opt_step

Data#

builtins_list

global_functions_list

API#

builtins_list = 'dir(...)'#
global_functions_list = None#
sum_feedback(nodes)[source]#

Aggregate the feedback of a list of nodes.

contain(container_of_nodes, node)[source]#
parse_eqs_to_dict(text)[source]#

Parse the text of equations into a dictionary

x0 = 1 x1=2 x2=`2` x3= def fun():

print(‘hello’)

abc_test1=test

would be parsed into

{‘x0’: ‘1’, ‘x1’: ‘2’, ‘x2’: ‘2’, ‘x3’: “def fun():

print(‘hello’)”, ‘abc_test1’: ‘test’}

for_all_methods(decorator)[source]#

Applying a decorator to all methods of a class.

render_opt_step(step_idx, optimizer, no_trace_graph=False, no_improvement=False)[source]#