trinity.explorer.workflow_runner module#
The Workflow Runner Module.
- class trinity.explorer.workflow_runner.Status(completed_runs: int, total_runs: int, metrics: List[Dict[str, float]], message: str | None = None)[源代码]#
基类:
objectStatus of the task running result.
- completed_runs: int#
- total_runs: int#
- metrics: List[Dict[str, float]]#
- message: str | None = None#
- property ok: bool#
- __init__(completed_runs: int, total_runs: int, metrics: List[Dict[str, float]], message: str | None = None) None#
- class trinity.explorer.workflow_runner.RunnerExecutionResult(status: Status, experiences: List[Experience])[源代码]#
基类:
objectExecution result for one runner task.
- experiences: List[Experience]#
- __init__(status: Status, experiences: List[Experience]) None#
- trinity.explorer.workflow_runner.calculate_run_level_metrics(experiences: List[Experience]) Dict[str, float][源代码]#
Calculate metrics from experiences.
For non-repeatable workflows, this function will average the metrics from experiences generated by each run, which is equivalent to calculating run level metrics.
For repeatable workflows, please do not use this function.
- class trinity.explorer.workflow_runner.WorkflowRunner(config: Config, model: InferenceModel, auxiliary_models: List[InferenceModel] | None = None, runner_id: int | None = None)[源代码]#
基类:
objectA Ray remote actor to run the workflow and generate experiences.
- __init__(config: Config, model: InferenceModel, auxiliary_models: List[InferenceModel] | None = None, runner_id: int | None = None) None[源代码]#
- class trinity.explorer.workflow_runner.DebugWorkflowRunner(config: Config, output_dir: str = 'debug_output', enable_profiling: bool = False, disable_overwrite: bool = False)[源代码]#
-
A WorkflowRunner for debugging.