MCPcopy Create free account
hub / github.com/NVIDIA/DALI / PseudoInvocation

Class PseudoInvocation

dali/test/python/experimental_mode/test_eval_context.py:82–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80
81
82class PseudoInvocation:
83 def __init__(self, value, run_count_container=None):
84 self.value = value
85 self.run_count = 0
86 self.run_count_container = run_count_container
87
88 def run(self, ctx):
89 assert isinstance(ctx, ndd.EvalContext)
90 self.run_count += 1
91 if self.run_count_container is not None:
92 self.run_count_container.run_count += 1
93 ctx.cache_results(self, self.value)
94 return self.value
95
96
97def test_eval_context_evaluate_all():

Calls

no outgoing calls