ccflow_celery.evaluators¶
Classes¶
Evaluator that dispatches model execution to Celery workers. |
|
Evaluator that parallelizes DAG execution via Celery. |
Module Contents¶
- class ccflow_celery.evaluators.CeleryEvaluator(/, **data: Any)[source]¶
Bases:
ccflow.EvaluatorBaseEvaluator that dispatches model execution to Celery workers.
Serializes the model and context, submits as a Celery task, and waits for the result. The model must be reconstructable from its Pydantic config dump.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- app: ccflow_celery.app.CeleryApp = None¶
- timeout: float | None = None¶
- task_name: str = None¶
- _celery_app: Any = None¶
- __call__(context: ccflow.callable.ModelEvaluationContext) Any[source]¶
This method produces the result for the given context.
Instead of passing the context, one can pass an object that pydantic will try to validate as the context. Additionally, if kwargs are passed instead of the context, it will use these to construct the context.
- class ccflow_celery.evaluators.CeleryGraphEvaluator(/, **data: Any)[source]¶
Bases:
ccflow.EvaluatorBaseEvaluator that parallelizes DAG execution via Celery.
Builds the dependency graph (like GraphEvaluator), then submits independent nodes as parallel Celery tasks using Celery groups. Nodes that depend on other nodes wait for their dependencies first.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- app: ccflow_celery.app.CeleryApp = None¶
- timeout: float | None = None¶
- task_name: str = None¶
- _celery_app: Any = None¶
- _is_evaluating: bool = None¶
- __call__(context: ccflow.callable.ModelEvaluationContext) Any[source]¶
This method produces the result for the given context.
Instead of passing the context, one can pass an object that pydantic will try to validate as the context. Additionally, if kwargs are passed instead of the context, it will use these to construct the context.