In this article
A partial factory can reuse captured keyword objects across calls; distinct outer instances do not guarantee independent nested state.
Inspect independence below the outer object
A researcher constructs several evaluators from the same Hydra partial factory. Each evaluator is a new object, but they unexpectedly share a mutable statistics collector. The instantiation guide documents reuse of captured keyword arguments in partial factories, including a nested instance shared by distinct outer results. The correct independence question therefore concerns the object graph, not merely whether the top-level evaluator identities differ after construction.
Distinguish deferred construction from deferred everything
Partial instantiation postpones the selected call while retaining its prepared arguments. It does not imply that every nested dependency will be constructed afresh on every later factory invocation. Identify what is already instantiated when the factory is created and what is supplied when it is called. This boundary matters for mutable caches, counters and random generators. A stateful dependency can carry information from one evaluation into another even when both wrappers were created with otherwise identical configuration.
Understand captured argument identity
The Python partial reference explains a callable with bound arguments. Binding an object is different from specifying a recipe to create a fresh object. The copy documentation likewise distinguishes object bindings and copying. Do not assume a new containing object recursively duplicates its dependencies. Decide whether sharing is intentional: reusing an immutable vocabulary can be useful, while sharing a mutable accumulator changes the meaning of supposedly isolated evaluation results.
Choose an explicit ownership policy
For dependencies that must reset per evaluation, construct them inside the per-evaluation boundary or pass a new instance at the intended call site. If sharing is required, make the shared lifetime visible and define reset behavior. Blindly deep-copying an arbitrary model stack is not a general substitute for design; devices, handles and external resources can have their own ownership constraints. The policy should describe which state is local to a trial and which resource is deliberately common.
Test mutation across factory results
Construct separate outer objects, mutate a recognizable nested counter in one and inspect the other. Repeat through the chosen independent construction path. Related material explains random-state replay and autograd graph state. This fixture establishes the sharing boundary without requiring a long model evaluation. Distinct object names and identical configuration text are useful descriptors, but only an explicit dependency lifetime explains whether the resulting evaluations are isolated.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.