online_runtime
online_runtime
¶
Policy runtime used by online explainability runs.
ExplainabilityPolicyRuntime
¶
Bases: PolicyRuntime
Runs policy inference with the checkpoint already loaded by the explainer.
Initialize the runtime from the explainer checkpoint loader.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
checkpoint_loader
|
FloatCheckpointLoader
|
Loader owned by |
required |
checkpoint_name
|
str
|
Checkpoint filename used to build the client identifier registered with the environment server. |
required |
Source code in src/versatil/explainability/online_runtime.py
run_inference
¶
Run action prediction for the already-preprocessed inference batch.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
obs_dict
|
dict[str, Tensor]
|
Observation window produced by |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Tensor]
|
Policy action tensors keyed by action component. |