pending_inferrer
Inference of pending rule distribution for time estimation.
Classes¶
PendingRuleInferrer ¶
Infers the distribution of pending jobs by rule.
When we know the total pending count but not the breakdown by rule, this class infers the distribution based on: 1. Expected job counts (from Snakemake's Job stats table) if available 2. Proportional inference from completed job distribution otherwise
Source code in snakesee/estimation/pending_inferrer.py
Functions¶
infer ¶
infer(completed_by_rule: dict[str, int], pending_count: int, expected_job_counts: dict[str, int] | None = None, current_rules: set[str] | None = None, running_by_rule: dict[str, int] | None = None) -> dict[str, int]
Infer the distribution of pending jobs by rule.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
completed_by_rule
|
dict[str, int]
|
Count of completed jobs per rule. |
required |
pending_count
|
int
|
Total number of pending jobs. |
required |
expected_job_counts
|
dict[str, int] | None
|
Expected counts from Job stats table (most accurate). |
None
|
current_rules
|
set[str] | None
|
Set of rules in current workflow (filters deleted rules). |
None
|
running_by_rule
|
dict[str, int] | None
|
Count of running jobs per rule. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, int]
|
Estimated count of pending jobs per rule. |