{ "admission_bound_changed_explicitly": true, "ast": { "added_runtime_callbacks": [ "_runtime.install(weights, graph, apl_out_mask, upload, out_dir, source_provenance, device)", "_runtime.finish(ring, apl_ring, apl, steps, out_dir)", "_runtime.timing(steps, pending)", "_runtime.after_tick(tick, v, g, ref, drive, apl_state, h, applied_h)", "_runtime.arrivals(expanded, destination, ref)" ], "admission_edit": "0 < steps <= 1000 -> 0 < steps <= spec.max_steps", "aj_source_sha256": "af1975ba5e5e700208c0a598d3cbe648a3cf10885c6231239b6e4b28f76d173b", "derived_math_ast_sha256": "e46b7d037862b54c0000381ea50df3ba416c7c2c134e3cea78fa90ddf549f710", "derived_module_ast_sha256": "4572043a15a53b3874766b40b4521422567761dbc75db57535ab44b817210429", "derived_namespace_file": "/data/digital-drosophila/models/male-cns-lif/olfactory-conditioning-lab-v1/runtime_light.py", "math_ast_sha256": "e46b7d037862b54c0000381ea50df3ba416c7c2c134e3cea78fa90ddf549f710", "mathematical_ast_identical": true, "mode": "light", "old_globals_patched": false, "original_module_file": "/data/digital-drosophila/models/male-cns-lif/apl-timing-lab-v1/gpu_timing.py", "output_metadata_binding": "new write_json only labels recording/within-trial scope; no old global mutated", "post_loop_terminal_recording": "_runtime.finish(ring, apl_ring, apl, steps, out_dir)", "pre_loop_installation": "_runtime.install(weights, graph, apl_out_mask, upload, out_dir, source_provenance, device)", "reference_entire_tick_loop_identical": false, "removed_diagnostic_statements": [ "Assign(targets=[Subscript(value=Name(id='maps', ctx=Load()), slice=Constant(value='apl_applied'), ctx=Store())], value=Call(func=Name(id='new_array', ctx=Load()), args=[BinOp(left=Name(id='out_dir', ctx=Load()), op=Div(), right=Constant(value='apl-applied.float32.npy')), Attribute(value=Name(id='np', ctx=Load()), attr='float32', ctx=Load()), Tuple(elts=[Name(id='steps', ctx=Load()), Constant(value=4064)], ctx=Load())], keywords=[]))", "For(target=Tuple(elts=[Name(id='name', ctx=Store()), Name(id='width', ctx=Store())], ctx=Store()), iter=Tuple(elts=[Tuple(elts=[Constant(value='drive'), Constant(value=2)], ctx=Load()), Tuple(elts=[Constant(value='state'), Constant(value=2)], ctx=Load()), Tuple(elts=[Constant(value='inhibition'), Constant(value=4064)], ctx=Load())], ctx=Load()), body=[Assign(targets=[Subscript(value=Name(id='maps', ctx=Load()), slice=BinOp(left=Constant(value='apl_'), op=Add(), right=Name(id='name', ctx=Load())), ctx=Store())], value=Call(func=Name(id='new_array', ctx=Load()), args=[BinOp(left=Name(id='out_dir', ctx=Load()), op=Div(), right=BinOp(left=BinOp(left=Constant(value='apl-'), op=Add(), right=Name(id='name', ctx=Load())), op=Add(), right=Constant(value='.float32.npy'))), Attribute(value=Name(id='np', ctx=Load()), attr='float32', ctx=Load()), Tuple(elts=[Name(id='steps', ctx=Load()), Name(id='width', ctx=Load())], ctx=Load())], keywords=[]))], orelse=[])", "If(test=Subscript(value=Name(id='spec', ctx=Load()), slice=Constant(value='record_history'), ctx=Load()), body=[For(target=Tuple(elts=[Name(id='name', ctx=Store()), Name(id='dtype', ctx=Store())], ctx=Store()), iter=Tuple(elts=[Tuple(elts=[Constant(value='v'), Attribute(value=Name(id='np', ctx=Load()), attr='float64', ctx=Load())], ctx=Load()), Tuple(elts=[Constant(value='g'), Attribute(value=Name(id='np', ctx=Load()), attr='float64', ctx=Load())], ctx=Load()), Tuple(elts=[Constant(value='ref'), Attribute(value=Name(id='np', ctx=Load()), attr='int32', ctx=Load())], ctx=Load())], ctx=Load()), body=[Assign(targets=[Subscript(value=Name(id='maps', ctx=Load()), slice=Name(id='name', ctx=Load()), ctx=Store())], value=Call(func=Name(id='new_array', ctx=Load()), args=[BinOp(left=Name(id='out_dir', ctx=Load()), op=Div(), right=BinOp(left=BinOp(left=BinOp(left=Name(id='name', ctx=Load()), op=Add(), right=Constant(value='-history.')), op=Add(), right=Attribute(value=Call(func=Attribute(value=Name(id='np', ctx=Load()), attr='dtype', ctx=Load()), args=[Name(id='dtype', ctx=Load())], keywords=[]), attr='name', ctx=Load())), op=Add(), right=Constant(value='.npy'))), Name(id='dtype', ctx=Load()), Tuple(elts=[Name(id='steps', ctx=Load()), Name(id='n', ctx=Load())], ctx=Load())], keywords=[])), Assign(targets=[Subscript(value=Name(id='maps', ctx=Load()), slice=BinOp(left=Constant(value='pre_'), op=Add(), right=Name(id='name', ctx=Load())), ctx=Store())], value=Call(func=Name(id='new_array', ctx=Load()), args=[BinOp(left=Name(id='out_dir', ctx=Load()), op=Div(), right=BinOp(left=BinOp(left=BinOp(left=BinOp(left=Constant(value='preAPL-'), op=Add(), right=Name(id='name', ctx=Load())), op=Add(), right=Constant(value='.')), op=Add(), right=Attribute(value=Call(func=Attribute(value=Name(id='np', ctx=Load()), attr='dtype', ctx=Load()), args=[Name(id='dtype', ctx=Load())], keywords=[]), attr='name', ctx=Load())), op=Add(), right=Constant(value='.npy'))), Name(id='dtype', ctx=Load()), Tuple(elts=[Name(id='steps', ctx=Load()), Name(id='n', ctx=Load())], ctx=Load())], keywords=[]))], orelse=[])], orelse=[])", "Assign(targets=[Name(id='expanded_global', ctx=Store())], value=Call(func=Attribute(value=Name(id='np', ctx=Load()), attr='empty', ctx=Load()), args=[Constant(value=0)], keywords=[keyword(arg='dtype', value=Attribute(value=Name(id='np', ctx=Load()), attr='int64', ctx=Load()))]))", "Assign(targets=[Name(id='accepted_cpu', ctx=Store())], value=Call(func=Attribute(value=Name(id='np', ctx=Load()), attr='empty', ctx=Load()), args=[Constant(value=0)], keywords=[keyword(arg='dtype', value=Attribute(value=Name(id='np', ctx=Load()), attr='uint8', ctx=Load()))]))", "Assign(targets=[Name(id='expanded_global', ctx=Store())], value=Call(func=Attribute(value=Subscript(value=Subscript(value=Name(id='graph', ctx=Load()), slice=Constant(value='edge_id'), ctx=Load()), slice=Call(func=Attribute(value=Call(func=Attribute(value=Name(id='expanded', ctx=Load()), attr='cpu', ctx=Load()), args=[], keywords=[]), attr='numpy', ctx=Load()), args=[], keywords=[]), ctx=Load()), attr='copy', ctx=Load()), args=[], keywords=[]))", "Assign(targets=[Name(id='accepted_cpu', ctx=Store())], value=Call(func=Attribute(value=Call(func=Attribute(value=Call(func=Attribute(value=Call(func=Attribute(value=Compare(left=Subscript(value=Name(id='ref', ctx=Load()), slice=Call(func=Attribute(value=Name(id='destination', ctx=Load()), attr='long', ctx=Load()), args=[], keywords=[]), ctx=Load()), ops=[Eq()], comparators=[Constant(value=0)]), attr='to', ctx=Load()), args=[Attribute(value=Name(id='torch', ctx=Load()), attr='uint8', ctx=Load())], keywords=[]), attr='cpu', ctx=Load()), args=[], keywords=[]), attr='numpy', ctx=Load()), args=[], keywords=[]), attr='copy', ctx=Load()), args=[], keywords=[]))", "Assign(targets=[Name(id='queue', ctx=Store())], value=Call(func=Name(id='queue_summary', ctx=Load()), args=[Name(id='tick', ctx=Load()), Name(id='expanded_global', ctx=Load()), Name(id='accepted_cpu', ctx=Load())], keywords=[]))", "Expr(value=Call(func=Attribute(value=Name(id='queue_output', ctx=Load()), attr='write', ctx=Load()), args=[BinOp(left=Call(func=Attribute(value=Name(id='json', ctx=Load()), attr='dumps', ctx=Load()), args=[Name(id='queue', ctx=Load())], keywords=[keyword(arg='allow_nan', value=Constant(value=False))]), op=Add(), right=Constant(value='\\n'))], keywords=[]))", "AugAssign(target=Name(id='due_total', ctx=Store()), op=Add(), value=Subscript(value=Name(id='queue', ctx=Load()), slice=Constant(value='count'), ctx=Load()))", "AugAssign(target=Name(id='accepted_due_total', ctx=Store()), op=Add(), value=Subscript(value=Name(id='queue', ctx=Load()), slice=Constant(value='accepted_count'), ctx=Load()))", "If(test=Subscript(value=Name(id='spec', ctx=Load()), slice=Constant(value='record_history'), ctx=Load()), body=[For(target=Tuple(elts=[Name(id='name', ctx=Store()), Name(id='value', ctx=Store())], ctx=Store()), iter=Tuple(elts=[Tuple(elts=[Constant(value='v'), Name(id='v', ctx=Load())], ctx=Load()), Tuple(elts=[Constant(value='g'), Name(id='g', ctx=Load())], ctx=Load()), Tuple(elts=[Constant(value='ref'), Name(id='ref', ctx=Load())], ctx=Load())], ctx=Load()), body=[Assign(targets=[Subscript(value=Subscript(value=Name(id='maps', ctx=Load()), slice=BinOp(left=Constant(value='pre_'), op=Add(), right=Name(id='name', ctx=Load())), ctx=Load()), slice=Name(id='tick', ctx=Load()), ctx=Store())], value=Call(func=Attribute(value=Call(func=Attribute(value=Name(id='value', ctx=Load()), attr='cpu', ctx=Load()), args=[], keywords=[]), attr='numpy', ctx=Load()), args=[], keywords=[]))], orelse=[])], orelse=[])", "Assign(targets=[Name(id='apl_cpu', ctx=Store())], value=Dict(keys=[Constant(value='drive'), Constant(value='state'), Constant(value='inhibition'), Constant(value='applied')], values=[Call(func=Attribute(value=Call(func=Attribute(value=Call(func=Attribute(value=Name(id='drive', ctx=Load()), attr='cpu', ctx=Load()), args=[], keywords=[]), attr='numpy', ctx=Load()), args=[], keywords=[]), attr='copy', ctx=Load()), args=[], keywords=[]), Call(func=Attribute(value=Call(func=Attribute(value=Call(func=Attribute(value=Name(id='apl_state', ctx=Load()), attr='cpu', ctx=Load()), args=[], keywords=[]), attr='numpy', ctx=Load()), args=[], keywords=[]), attr='copy', ctx=Load()), args=[], keywords=[]), Call(func=Attribute(value=Call(func=Attribute(value=Call(func=Attribute(value=Name(id='h', ctx=Load()), attr='cpu', ctx=Load()), args=[], keywords=[]), attr='numpy', ctx=Load()), args=[], keywords=[]), attr='copy', ctx=Load()), args=[], keywords=[]), Call(func=Attribute(value=Call(func=Attribute(value=Call(func=Attribute(value=Name(id='applied_h', ctx=Load()), attr='cpu', ctx=Load()), args=[], keywords=[]), attr='numpy', ctx=Load()), args=[], keywords=[]), attr='copy', ctx=Load()), args=[], keywords=[])]))", "For(target=Tuple(elts=[Name(id='name', ctx=Store()), Name(id='value', ctx=Store())], ctx=Store()), iter=Call(func=Attribute(value=Name(id='apl_cpu', ctx=Load()), attr='items', ctx=Load()), args=[], keywords=[]), body=[Assign(targets=[Subscript(value=Subscript(value=Name(id='maps', ctx=Load()), slice=BinOp(left=Constant(value='apl_'), op=Add(), right=Name(id='name', ctx=Load())), ctx=Load()), slice=Name(id='tick', ctx=Load()), ctx=Store())], value=Name(id='value', ctx=Load()))], orelse=[])", "Assign(targets=[Name(id='actual', ctx=Store())], value=Dict(keys=[Constant(value='v'), Constant(value='g'), Constant(value='ref')], values=[Call(func=Attribute(value=Call(func=Attribute(value=Call(func=Attribute(value=Name(id='v', ctx=Load()), attr='cpu', ctx=Load()), args=[], keywords=[]), attr='numpy', ctx=Load()), args=[], keywords=[]), attr='copy', ctx=Load()), args=[], keywords=[]), Call(func=Attribute(value=Call(func=Attribute(value=Call(func=Attribute(value=Name(id='g', ctx=Load()), attr='cpu', ctx=Load()), args=[], keywords=[]), attr='numpy', ctx=Load()), args=[], keywords=[]), attr='copy', ctx=Load()), args=[], keywords=[]), Call(func=Attribute(value=Call(func=Attribute(value=Call(func=Attribute(value=Name(id='ref', ctx=Load()), attr='cpu', ctx=Load()), args=[], keywords=[]), attr='numpy', ctx=Load()), args=[], keywords=[]), attr='copy', ctx=Load()), args=[], keywords=[])]))", "Assign(targets=[Name(id='finite', ctx=Store())], value=Call(func=Name(id='all', ctx=Load()), args=[GeneratorExp(elt=Call(func=Name(id='bool', ctx=Load()), args=[Call(func=Attribute(value=Call(func=Attribute(value=Name(id='np', ctx=Load()), attr='isfinite', ctx=Load()), args=[Name(id='value', ctx=Load())], keywords=[]), attr='all', ctx=Load()), args=[], keywords=[])], keywords=[]), generators=[comprehension(target=Name(id='value', ctx=Store()), iter=BinOp(left=Call(func=Name(id='list', ctx=Load()), args=[Call(func=Attribute(value=Name(id='actual', ctx=Load()), attr='values', ctx=Load()), args=[], keywords=[])], keywords=[]), op=Add(), right=Call(func=Name(id='list', ctx=Load()), args=[Call(func=Attribute(value=Name(id='apl_cpu', ctx=Load()), attr='values', ctx=Load()), args=[], keywords=[])], keywords=[])), ifs=[], is_async=0)])], keywords=[]))", "Assign(targets=[Name(id='row', ctx=Store())], value=Dict(keys=[Constant(value='tick'), None], values=[Name(id='tick', ctx=Load()), DictComp(key=BinOp(left=Name(id='name', ctx=Load()), op=Add(), right=Constant(value='_sha256')), value=Call(func=Name(id='raw_hash', ctx=Load()), args=[Name(id='value', ctx=Load()), IfExp(test=Compare(left=Name(id='name', ctx=Load()), ops=[Eq()], comparators=[Constant(value='ref')]), body=Constant(value='