Skip to content

Conversation

@ChuanyuXue
Copy link
Owner

No description provided.

@ChuanyuXue
Copy link
Owner Author

This pull request introduces significant improvements to the simulation testing workflow, especially in the handling of parallelism and error reporting. It refactors the debug utilities to use multiprocessing for dataset evaluation, improves error handling and reporting, and updates documentation for installation and optimizer requirements. The most important changes are grouped below:

Parallelization and Workflow Refactor

  • Refactored the simulation test runner in tsnkit/test/debug/_common.py to use multiprocessing (Pool) for parallel evaluation of datasets, with a new process_single_dataset worker function and dynamic worker count selection. This enables faster and more robust testing across multiple datasets and algorithms. [1] [2] [3]
  • Added a --workers command-line argument to allow users to specify the number of parallel workers for simulation testing, improving flexibility and resource management. [1] [2]

Error Handling and Reporting

  • Improved error handling in the simulation test runner: now gracefully handles timeouts, simulation errors, and algorithm-not-found cases, and provides clearer output lines for each result. The reporting is more robust and informative, including error messages and flags for each dataset processed. [1] [2] [3]

Simulation and Visualization Updates

  • Moved imports for plotting libraries (seaborn, matplotlib.pyplot) inside the draw function in tsnkit/simulation/draw.py to avoid unnecessary imports when not drawing, reducing memory usage and potential import errors. [1] [2]
  • Added a disable_pbar argument to the tas.simulation function and used it to prevent progress bar rendering in worker processes, avoiding semaphore leaks and improving stability in parallel runs. [1] [2] [3]

Documentation Improvements

  • Updated installation instructions in doc/source/quickstarted.md to recommend pip install -r requirements.txt for source installs and clarified CPLEX CP Optimizer requirements, including academic version limitations and installation steps. [1] [2] [3]

These changes together make the simulation testing workflow more scalable, robust, and user-friendly.

@ChuanyuXue ChuanyuXue merged commit 6ecfe01 into main Sep 7, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants