-
Notifications
You must be signed in to change notification settings - Fork 0
Update to v0.14.0 #102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to v0.14.0 #102
Conversation
- Restructured Monte Carlo results: `baseline` is returned separately, and `results` now contains deduplicated failure patterns with `occurrence_count`. - Removed `baseline` parameter from Monte Carlo APIs; baseline now runs implicitly. - Added `FlowIterationResult.occurrence_count` to track how many iterations produced each failure pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces version 0.14.0 with breaking changes to the Monte Carlo analysis API. The main purpose is to restructure how Monte Carlo results are returned: baseline results are now separated from failure iterations, and failure results are deduplicated with an occurrence_count field to track pattern frequency.
Key Changes
- Removed the
baselineparameter from Monte Carlo APIs; baseline is now always run implicitly and returned separately - Restructured results to separate
baselinefromresultsarray, with deduplicated failure patterns tracked byoccurrence_count - Added
FlowIterationResult.failure_traceto capture detailed failure policy execution trace whenstore_failure_patterns=True
Reviewed changes
Copilot reviewed 43 out of 43 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ngraph/exec/failure/manager.py | Core refactoring: baseline always runs first, results deduplicated with occurrence_count tracking, failure_trace support |
| ngraph/results/flow.py | Added failure_trace and occurrence_count fields to FlowIterationResult with validation |
| ngraph/model/failure/policy.py | Extended apply_failures() to populate failure_trace dict when requested |
| ngraph/workflow/max_flow_step.py | Removed baseline parameter, updated to handle separate baseline result |
| ngraph/workflow/traffic_matrix_placement_step.py | Removed baseline parameter, updated to handle separate baseline result |
| tests/exec/failure/test_manager.py | Comprehensive test updates for new API, added tests for occurrence_count weighting |
| tests/exec/failure/test_manager_integration.py | Updated tests for deduplicated results and failure_trace |
| tests/model/failure/test_failure_trace.py | New test file for failure_trace functionality (378 lines) |
| tests/workflow/*.py | Updated all workflow tests to remove baseline parameter and handle new result structure |
| scenarios/*.yaml | Removed baseline parameter from all scenario YAML files |
| docs/* | Updated documentation to reflect API changes |
| CHANGELOG.md | Documented breaking changes for v0.14.0 |
| pyproject.toml, ngraph/_version.py | Version bump to 0.14.0 |
Comments suppressed due to low confidence (1)
ngraph/exec/failure/manager.py:590
- The metadata field 'unique_patterns' is computed from 'num_unique_tasks', which represents unique failure patterns. However, when iterations=0 (no failures), this will be 0. The metadata should accurately reflect that unique_patterns refers to failure patterns, not including the baseline. Consider explicitly documenting this behavior or verifying that num_unique_tasks is correctly set when there are no failure iterations.
"metadata": {
"iterations": iterations,
"parallelism": parallelism,
"analysis_function": func_name,
"policy_name": self.policy_name,
"execution_time": elapsed_time,
"unique_patterns": num_unique_tasks,
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "FlowIterationResult.occurrence_count must be a positive int: %r", | ||
| self.occurrence_count, | ||
| ) | ||
| raise ValueError("occurrence_count must be a positive int") |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The validation error message should clarify that occurrence_count must be a positive integer (greater than or equal to 1), not just any positive value. The current message "occurrence_count must be a positive int" is accurate but could be more explicit about the minimum value of 1.
| "FlowIterationResult.occurrence_count must be a positive int: %r", | |
| self.occurrence_count, | |
| ) | |
| raise ValueError("occurrence_count must be a positive int") | |
| "FlowIterationResult.occurrence_count must be a positive integer (>= 1): %r", | |
| self.occurrence_count, | |
| ) | |
| raise ValueError( | |
| "occurrence_count must be a positive integer (>= 1)" | |
| ) |
baselineis returned separately, andresultsnow contains deduplicated failure patterns withoccurrence_count.baselineparameter from Monte Carlo APIs; baseline now runs implicitly.FlowIterationResult.occurrence_countto track how many iterations produced each failure pattern.Note
Monte Carlo workflows now run a separate baseline automatically, dedupe failure iterations with occurrence_count, add optional failure_trace, remove the baseline parameter, and update steps, docs, scenarios, and tests accordingly (v0.14.0).
FailureManager: always runs a separate baseline, deduplicates failure patterns, tracksoccurrence_count, optionalfailure_trace; parallel/serial runners simplified.MaxFlowandTrafficMatrixPlacement: removedbaselineparam; acceptseed; writedata.baselineplus dedupeddata.flow_results; logging/metadata tweaks.FlowIterationResult: addoccurrence_countandfailure_trace; to_dict/export updated.baselineseparate;flow_results= unique patterns; metadata includesunique_patterns.apply_failures(...)acceptsfailure_traceand records mode/rule selections and expansions.baseline:field in YAML); added params (seeds, include/exclude lists); examples count increased.baselineparameter; new tests for tracing, dedup, weighting.0.14.0; changelog added with breaking changes.Written by Cursor Bugbot for commit c399e92. This will update automatically on new commits. Configure here.