Auto generate - #68
Open
Ziaeemehr wants to merge 82 commits into
Open
Conversation
…ecking module coverage
- Added test_features_utils.py (52 tests): is_sequence, make_mask, prepare_input_ts, get_intrah_mask, get_interh_mask, get_masks, set_k_diagonals, if_symmetric - Added test_features_utils_ext.py (75 tests): autocorr_norm, create_symmetric_matrix, lpc, kde, gaussian, calc_ecdf, compute_time, calc_fft, max_frequency, max_psd, spectral_centroid, spectral_spread, km_order, normalize_signal, seizure_onset_indicator, nat2bit, median_frequency, fundamental_frequency, spectral_distance - Improved docstrings for median_frequency, nat2bit All 230 tests pass (103 existing + 127 new). Closes #64
…JAX-compatible version with comprehensive tests for backward compatibility and overlap functionality.
…ty and output consistency
- Implemented NumpySimulator class for running simulations using NumPy. - Created NumpySweeper class for parameter sweeps with support for pipelines. - Defined model specifications for MontbrioPopulationRate (MPR) including state variables and parameters. - Established simulation specifications including integrator, coupling, and monitor configurations. - Added support for various monitor types (raw, subsample, tavg, gavg, bold) to capture simulation data. - Developed tests for validating the functionality of the NumPy backend, including deterministic and stochastic scenarios. - Ensured consistency between sweeper results and direct simulator runs.
- Mark M0 milestone as complete and detail implemented components. - Defer backend-specific feature extraction variants to respective milestones. - Refactor imports in `__init__.py` and `utils.py` to handle exceptions more gracefully. - Add validation tests for TVB reference in `test_mpr_numpy.py`.
… noise amplitude; add test for noise amplitude resolution based on style
…ator logic for zero-delay cases
…ulation setup for VBI and TVB comparisons
…on tests for NumPy backend
… to utilize MeanStdPipeline
…WW; update related references
…ment simulation and plotting functionality
- Added code generation for model-specific Numba functions in `codegen.py`. - Implemented the `NumbaSimulator` class for single-run simulations in `simulator.py`. - Created `NumbaSweeperCPU` for parallel parameter sweeps in `sweeper.py`. - Developed validation tests for the Numba backend in `test_mpr_numba.py`, ensuring results match the NumPy backend to specified tolerances. - Included support for deterministic and stochastic simulations, as well as handling of delays and monitor outputs.
…for consistency across Numba and NumPy backends
…andling and performance - Updated CudaSimulator to support coalesced memory layout and optional sparse connectivity. - Introduced automatic detection of sparse vs dense connectivity based on matrix density. - Enhanced parameter handling in CudaSweeperGPU to streamline device memory transfers. - Improved documentation for clarity on connectivity options and usage. - Adjusted kernel launch parameters to accommodate new data structures and layouts. - Added memory guard to warn about potential GPU memory issues during simulation.
…improved configuration
- Updated `validate_sweep_backends.py` to include JAX as a backend for numerical consistency checks, with adjustable tolerance levels for JAX. - Enhanced JAX integration in `jax_/simulator.py` to support float64 precision and noise handling. - Modified `IntegratorSpec` to allow specification of JAX data types (float32 or float64). - Updated `SweepSpec` to include a `same_noise` parameter for controlling noise realization consistency across JAX runs. - Added comprehensive tests in `test_mpr_jax.py` and `test_new_models_jax.py` to validate JAX outputs against NumPy, ensuring deterministic and stochastic behaviors are correctly implemented.
…le and add JaxSweeper class implementation
…upling to simulator
…h LaTeX support - Created a new Jupyter notebook `model_equations.ipynb` to describe equations for all models in `vbi.simulator.models`. - Enhanced `ModelSpec` to include `dfun_latex` for LaTeX representations of differential equations. - Updated existing models to provide LaTeX strings for their equations, improving documentation and usability in Jupyter notebooks. - Added supplementary notes in LaTeX format for clarity on model parameters and equations.
- Enhanced C++ backend to support Kuramoto coupling alongside linear coupling. - Updated JAX, Numba, and CUDA backends to implement Kuramoto coupling with phase frustration. - Modified coupling specifications to include an alpha parameter for phase offset. - Added tests to validate Kuramoto dynamics and ensure consistency across backends.
…tim_data function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
This is a major update that introduces the new main simulator pipeline. Existing workflows are intended to remain functional, while this new stack gradually replaces older implementations as validation and examples mature.
Summary
This PR adds the new VBI simulator stack built around backend-agnostic model specifications, generated backend implementations, validation tests, and example workflows.
Changes
vbi.simulatorAPI withSimulationSpec,ModelSpec, coupling, integrator, monitor, sweep, and stimulus specs.Notes
origin/mainwas used as the comparison base.StimSpec, including NumPy and Numba backend handling.