Tracers#
The policyengine_core.tracers module contains classes used to represent tracers, which are used to track the computation involved in calculating variables.
ComputationLog#
- class policyengine_core.tracers.computation_log.ComputationLog(full_tracer: FullTracer)[source]#
Bases:
object- print_log(aggregate=False, max_depth=100) None[source]#
Print the computation log of a simulation.
If
aggregateisFalse(default), print the value of each computed vector.If
aggregateisTrue, only print the minimum, maximum, and average value of each computed vector.This mode is more suited for simulations on a large population.
If
max_depthisNone(default), print the entire computation.If
max_depthis set, for example to3, only print computed vectors up to a depth ofmax_depth.
FlatTrace#
- class policyengine_core.tracers.flat_trace.FlatTrace(full_tracer: FullTracer)[source]#
Bases:
object
FullTracer#
PerformanceLog#
- class policyengine_core.tracers.performance_log.PerformanceLog(full_tracer: FullTracer)[source]#
Bases:
object
SimpleTracer#
TraceNode#
- class policyengine_core.tracers.trace_node.TraceNode(name: 'str', period: 'str', branch_name: 'str' = 'default', parent: 'typing.Optional[TraceNode]' = None, children: 'typing.List[TraceNode]' = <factory>, parameters: 'typing.List[TraceNode]' = <factory>, value: 'typing.Optional[Array]' = None, start: 'float' = 0, end: 'float' = 0)[source]#
Bases:
object
TracingParameterNodeAtInstant#
- class policyengine_core.tracers.tracing_parameter_node_at_instant.TracingParameterNodeAtInstant(parameter_node_at_instant: ParameterNode, tracer: tracers.FullTracer, branch_name: str)[source]#
Bases:
object