MCPcopy Create free account
hub / github.com/apple/axlearn / set_state_update

Method set_state_update

axlearn/common/module.py:513–524  ·  view source on GitHub ↗

Sets the state update field of the output collection. Useful when writing a "transparent module" that needs its state to have a specific structure (e.g., a tuple) for backwards compatibility.

(self, value: Any)

Source from the content-addressed store, hash-verified

511 name: The output name.
512 value: The output tensor.
513
514 Raises:
515 OutputConflictError: If outputs of method already exist.
516 """
517 if name in self.output_collection.module_outputs:
518 raise OutputConflictError(f"Outputs of name '{name}' already exist")
519
520 self.output_collection.module_outputs[name] = value
521
522 def set_state_update(self, value: Any):
523 """Sets the state update field of the output collection.
524
525 Useful when writing a "transparent module" that needs its state to have a specific
526 structure (e.g., a tuple) for backwards compatibility.
527 """

Callers 2

transform_updateMethod · 0.80
test_set_state_updateMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_set_state_updateMethod · 0.64