Skip to content

First stage refactoring#70

Open
gefanyang wants to merge 17 commits intoComputationalEvolutionaryMorphometry:refactoringfrom
gefanyang:refactoring
Open

First stage refactoring#70
gefanyang wants to merge 17 commits intoComputationalEvolutionaryMorphometry:refactoringfrom
gefanyang:refactoring

Conversation

@gefanyang
Copy link
Collaborator

The initial PR to Refactoring branch that contains refactoring and improvements on the code structure and docstrings.

Mostly, the main refactored part are mcmc module, where Sampler classes are introduced to replace the previous functional implementations, which provides a more flexible way to define customized samplers by inheriting the abstract class.

Meanwhile, part of code in execution module has been improved as well, mainly Orderexecutor, which provides a more uniform way to define operations functions by explicitly categorizing input arguments into prefixed (stand for local inputs, such as data from node's parent or children) and non-prefixed ones (stand for global inputs, such as tree parameters or other parameters or functions that are shared across the whole tree, e.g., neural networks).

A new notebook execution.ipynb is added to provide instruction on using new apis.

Minor improvements on the docstrings and type hints for automatic documentation generations are included.

Rickyang2233 and others added 17 commits March 4, 2025 15:16
- Updated pyproject.toml to streamline dependencies
- Simplified GitHub Actions workflows for documentation and testing
- Removed redundant printer_utils module
- Minor import and type hint improvements in tree and test modules
- Added documentation dependencies to pyproject.toml
- Simplified GitHub Actions workflows for documentation and testing
- Configured documentation build to use project dependencies
- Enabled pytest workflow on main branch pushes
…est notebooks locally (with instruction in CONTRIBUTION.md)
- Updated the import structure in `hyperiax/mcmc/__init__.py` to include a new `Parameter` class.
- Refactored model imports in `hyperiax/models/__init__.py` to streamline model access.
- Removed the obsolete `basemodel.py` and consolidated its functionality into `basemodels.py`.
- Introduced a comprehensive `basemodels.py` that defines abstract base classes for various model types, including `BaseModel`, `DownModel`, `UpModel`, `UpdateModel`, and `ReducerModel`.
- Enhanced `lambdamodels.py` to support lambda-based models for upward and downward passes, allowing for user-defined functions.
- Removed outdated `updatemodel.py` and `updownmodel.py` files, consolidating their functionality into the new structure.
- Improved utility functions in `utils.py` for better keyword filtering and reduction mapping.
- Fixed a minor bug in `tree.py` related to the shape of the node depths array.
…optional dependencies in pyproject.toml, and remove setup.py
…optional dependencies in pyproject.toml, and remove setup.py
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