evaluator_pool_registry (faber_neuroevolution v1.2.4)
View SourceEvaluator pool registry for distributed evaluation.
Tracks the capacity and availability of evaluator nodes across the mesh. Provides load-balanced selection of evaluator nodes based on: - Current load (active evaluations) - Maximum capacity (CPU cores / configured limit) - Latency estimates - Node health
Summary
Functions
-spec get_all_evaluators() -> [#evaluator_node{node_id :: binary(), endpoint :: binary(), capacity :: pos_integer(), active :: non_neg_integer(), evaluator_module :: module(), latency_ms :: non_neg_integer(), last_heartbeat :: integer(), error_count :: non_neg_integer()}].
-spec get_available_evaluator() -> {ok, #evaluator_node{node_id :: binary(), endpoint :: binary(), capacity :: pos_integer(), active :: non_neg_integer(), evaluator_module :: module(), latency_ms :: non_neg_integer(), last_heartbeat :: integer(), error_count :: non_neg_integer()}} | {error, no_evaluators}.
-spec get_available_evaluator(Options :: map()) -> {ok, #evaluator_node{node_id :: binary(), endpoint :: binary(), capacity :: pos_integer(), active :: non_neg_integer(), evaluator_module :: module(), latency_ms :: non_neg_integer(), last_heartbeat :: integer(), error_count :: non_neg_integer()}} | {error, no_evaluators}.
-spec get_stats() -> map().
-spec report_evaluation_completed(NodeId :: binary(), LatencyMs :: non_neg_integer()) -> ok.
-spec report_evaluation_started(NodeId :: binary()) -> ok.
-spec unregister_evaluator(NodeId :: binary()) -> ok.