Skip to content

Bayesian fixes#332

Open
rozyczko wants to merge 6 commits into
bayesianfrom
bayesian_fixes
Open

Bayesian fixes#332
rozyczko wants to merge 6 commits into
bayesianfrom
bayesian_fixes

Conversation

@rozyczko

Copy link
Copy Markdown
Member

This pull request introduces several improvements across the codebase, focusing on error handling, logging, and code robustness, particularly in the Bayesian analysis and experiment management logic. It also includes changes to the minimizer selection behavior and some minor API and naming cleanups. The most important changes are grouped below.

Bayesian Analysis Improvements

  • Added a helper method _set_bayesian_attr to handle invalid Bayesian hyper-parameter assignments gracefully, logging warnings and ensuring the UI remains consistent. Updated all Bayesian setter slots to use this helper.
  • Improved error handling in _on_sample_finished to log errors for empty or invalid results, ensuring that UI signals are always emitted even on failure.
  • Added a setter for the posterior property in bayesian.py to allow safe assignment of posterior results.
  • Changed the computation of finite R-hat diagnostics to use np.isfinite for more robust filtering.

Logging and Error Reporting

  • Replaced print statements with logger.warning or logger.exception in experiment and parameter management code, ensuring errors are consistently logged and easier to trace.

Minimizer and Experiment Selection Logic

  • Changed the default minimizer selection to the first classical minimizer (index 1), requiring explicit user choice for Bayesian minimization.
  • Added bounds checking in set_minimizer_current_index to prevent out-of-range minimizer selections.
  • Renamed collect_selected_experiments_datagroup to collect_all_experiments_datagroup and clarified that Bayesian sampling always runs over all experiments, not just selected ones.

API and Naming Cleanups

  • Fixed dictionary type annotations in home.py and updated the way version and release date are accessed from PYPROJECT.
  • Changed the property name in the mock status QML backend from phaseCount to modelsCount for clarity.

Miscellaneous

  • Removed unnecessary or problematic calls to setTerminationEnabled on threads, improving compatibility and stability.
  • Simplified the localFileToUrl helper to always use QUrl.fromLocalFile, removing special handling for Windows.
  • Commented out Windows-specific certificate setup and signing steps in the GitHub Actions workflow, likely to temporarily disable code signing on Windows CI builds.

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.

1 participant