POMDPPlanners.simulations.simulations_deployment.tasks package
Submodules
POMDPPlanners.simulations.simulations_deployment.tasks.environment_visualization_task module
Task that renders one environment’s visualizations on a worker.
The task wraps an ExperimentVisualizer along with the per-environment
inputs it needs. Dispatched via the simulator’s task manager (Dask, Joblib,
PBS, Sequential), it runs on a worker process. The worker writes artifacts
into a local scratch directory it creates itself, then returns a mapping from
POSIX-style relative path to file bytes. The simulator (parent process)
materializes those bytes on its own filesystem and handles MLflow logging.
This contract is OS-agnostic: no filesystem path crosses the wire, so a Linux client can dispatch tasks to Windows workers and vice versa.
Each task instance carries a unique config id so the cache-backed managers (Joblib, PBS) never serve a stale return from a previous run.
- class POMDPPlanners.simulations.simulations_deployment.tasks.environment_visualization_task.EnvironmentVisualizationTask(visualizer, env_name, environment, policy_results, policies, cache_visualizations)[source]
Bases:
SimulationTaskPer-environment visualization unit dispatched through the task manager.
The task is intentionally a self-contained value object: it holds the visualizer, the environment, and the per-policy results. Workers pickle and execute it without needing a back-reference to the simulator (which would drag the live task-manager client into the pickle stream and break Dask dispatch) and without any client-supplied filesystem path (which would either fail to unpickle on a foreign OS or point at a directory the worker cannot reach).
- Parameters:
visualizer (ExperimentVisualizer)
env_name (str)
environment (Environment)
cache_visualizations (bool)
- visualizer
Strategy that renders the artifacts.
- env_name
Name of the environment, used as the task identifier.
- environment
Environment instance for which artifacts are rendered.
- policy_results
Mapping from policy name to histories.
- policies
Policy instances corresponding to
policy_resultskeys.
- cache_visualizations
Whether to render per-episode env-specific caches.
- get_config_id()[source]
Return a unique identifier for this visualization task.
The id includes a per-instance UUID so the cached managers (Joblib, PBS) never serve a stale return from a previous run.
- Return type: