-
Notifications
You must be signed in to change notification settings - Fork 85
Add unified encoder pytorch implementation #251
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
Open
CeliaBenquet
wants to merge
91
commits into
AdaptiveMotorControlLab:batched-inference-and-padding
Choose a base branch
from
CeliaBenquet:unified-cebra
base: batched-inference-and-padding
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add unified encoder pytorch implementation #251
CeliaBenquet
wants to merge
91
commits into
AdaptiveMotorControlLab:batched-inference-and-padding
from
CeliaBenquet:unified-cebra
Conversation
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
* apply auto-fixes * Fix linting errors in tests/ * Fix version check
* Add support for new __sklearn_tags__ * fix inheritance order * Add more tests * fix added test
) * Started implementing improved goodness of fit implementation * add tests and improve implementation * Fix examples * Fix docstring error * Handle batch size = None for goodness of fit computation * adapt GoF implementation * Fix docstring tests * Update docstring for goodness_of_fit_score Co-authored-by: Célia Benquet <[email protected]> * add annotations to goodness_of_fit_history Co-authored-by: Célia Benquet <[email protected]> * fix typo Co-authored-by: Célia Benquet <[email protected]> * improve err message Co-authored-by: Célia Benquet <[email protected]> * make numerical test less conversative * Add tests for exception handling * fix tests --------- Co-authored-by: Célia Benquet <[email protected]>
…trolLab#221) * Drop numpy constraint * Implement workaround for pytables * better error message * pin numpy only for python 3.9 * update dependencies * Upgrade torch version * Fix based on python version * Add support for torch.load with weights_only=True * Implement safe loading for torch models starting in torch 2.6 * Fix windows specs * fix docstring * Revert changes to loading logic
* Make bump_version script runnable on MacOS * Bump version to 0.5.0rc1 * fix minor formatting issues * remove commented code --------- Co-authored-by: Mackenzie Mathis <[email protected]>
* force packaging upgrade to 24.2 for twine * Bump version to 0.5.0rc2 * remove universal compatibility option * revert tag * adapt files to new wheel name due to py3
This is a lazy solution to AdaptiveMotorControlLab#223
…olLab#227) * Change text consistency max from 99 to 100 * Update cebra/integrations/matplotlib.py --------- Co-authored-by: Mackenzie Mathis <[email protected]> Co-authored-by: Steffen Schneider <[email protected]>
…Lab#230) Update assets.py - mkdir was failing in 0.5.0rc1; attempt to fix
* user note added to usage.rst - link added * Update usage.rst - more detailed note on the effect of temp. * Update usage.rst - add in temp to demo model - testout put thanks @stes * Update docs/source/usage.rst Co-authored-by: Steffen Schneider <[email protected]> * Update docs/source/usage.rst Co-authored-by: Steffen Schneider <[email protected]> * Update docs/source/usage.rst Co-authored-by: Steffen Schneider <[email protected]> --------- Co-authored-by: Steffen Schneider <[email protected]>
* Update installation.rst - python 3.9+ * Update index.rst * Update figures.rst * Update index.rst -typo fix * Update usage.rst - update suggestion on data split * Update docs/source/usage.rst Co-authored-by: Steffen Schneider <[email protected]> * Update usage.rst - indent error fixed * Update usage.rst - changed infoNCE to new GoF * Update usage.rst - finx numpy() doctest * Update usage.rst - small typo fix (label) * Update usage.rst --------- Co-authored-by: Steffen Schneider <[email protected]>
- adding link to new notebook icon
* website refresh
* Improve build setup for docs * update pydata theme options * Add README for docs folder * Fix demo notebook build * Finish build setup * update git workflow * add timeout to workflow * add timeout also to docs build * switch build back to sphinx for gh actions * attempt to fix build workflow * update to sphinx-build * fix build workflow * fix indent error * fix build system * revert demos to main * increase timeout to 30
* Allow indexing of the cebra docs * Fix docs workflow
* Add multiobjective solver and regularized training (#783) * Add multiobjective solver and regularized training * Add example for multiobjective training * Add jacobian regularizer and SAM * update license headers * add api draft for multiobjective training * add all necessary modules to run the complete xcebra pipeline * add notebooks to reproduce xcebra pipeline * add first working notebook * add notebook with hybrid learning * add notebook with creation of synthetic data * add notebook with hybrid training * add plot with R2 for different parts of the embedding * add new API * update api wrapper with more checks and messages * add tests and notebook with new api * merge xcebra into attribution * separate xcebra dataset from cebra * some minor refactoring of cebra dataset * separate xcebra loader from cebra * remove xcebra distributions from cebra * minor refactoring with distributions * separate xcebra criterions from cebra * minor refactoring on criterion * separate xcebra models/criterions/layers from cebra * refactoring multiobjective * more refactoring... * separate xcebra solvers from cebra * more refactoring * move xcebra to its own package * move more files into xcebra package * more files and remove changes with the registry * remove unncessary import * add folder structure * move back distributions * add missing init * remove wrong init * make loader and dataset run with new imports * making it run! * make attribution run * Run pre-commit * move xcebra repo one level up * update gitignore and add __init__ from data * add init to distributions * add correct init for attribution pacakge * add correct init for model package * fix remaining imports * fix tests * add examples back to xcebra repo * update imports from graphs_xcebra * add setup.py to create a package * update imports of graph_xcebra * update notebooks * Formatting code for submission Co-authored-by: Rodrigo Gonzalez <[email protected]> * move test into xcebra * Add README * move distributions back to main package * clean up examples * adapt tests * Add LICENSE * add train/eval notebook again * add notebook with clean results * rm synthetic data * change name from xcebra to regcl * change names of modules and adapt imports * change name from graphs_xcebra to synthetic_data * Integrate into CEBRA * Fix remaining imports and make notebook runnable * Add dependencies, add version flag * Remove synthetic data files * reset dockerfile, move vmf * apply pre-commit * Update notice * add some docstrings * Apply license headers * add new scd notebook * add notebook with scd --------- Co-authored-by: Steffen Schneider <[email protected]> * Fix tests * bump version * update dockerfile * fix progress bar * remove outdated test * rename models * Apply fixes to pass ruff tests * Fix typos * Update license headers, fix additional ruff errors * remove unused comment * rename regcl in codebase * change regcl name in dockerfile * Improve attribution module * Fix imports name naming * add basic integration test * temp disable of binary check * Add legacy multiobjective model for backward compat * add synth import back in * Fix docstrings and type annot in cebra/models/jacobian_regularizer.py * add xcebra to tests * add missing cvxpy dep * fix docstrings * more docstrings to fix attr error * Improve build setup for docs * update pydata theme options * Add README for docs folder * Fix demo notebook build * Finish build setup * update git workflow * Move demo notebooks to CEBRA-demos repo See AdaptiveMotorControlLab/CEBRA-demos#28 * revert unneeded changes in solver * formatting in solver * further minimize solver diff * Revert unneeded updates to the solver * fix citation * fix docs build, missing refs * remove file dependency from xcebra int test * remove unneeded change in registry * update gitignore * update docs * exclude some assets * include binary file check again * add timeout to workflow * add timeout also to docs build * switch build back to sphinx for gh actions * pin sphinx version in setup.cfg * attempt workflow fix * attempt to fix build workflow * update to sphinx-build * fix build workflow * fix indent error * fix build system * revert demos to main * adapt workflow for testing * bump version to 0.6.0rc1 * format imports * docs writing * enable build on dev branch * fix some review comments * extend multiobjective docs * Set version to alpha * make tempdir platform independent * Remove ratinabox and ephysiopy as deps * Apply review comments * Update Makefile - setting coverage threshold to 80% to not delay good code being made public. In the near future this can be fixed and raised again to 90%. --------- Co-authored-by: Steffen Schneider <[email protected]> Co-authored-by: Steffen Schneider <[email protected]> Co-authored-by: Mackenzie Mathis <[email protected]>
* apply auto-fixes * Fix linting errors in tests/ * Fix version check
* Add support for new __sklearn_tags__ * fix inheritance order * Add more tests * fix added test
* Update conf.py - adding link to xCEBRA link for demo notebook * Update conf.py * Update conf.py * Update conf.py
Co-authored-by: Steffen Schneider <[email protected]>
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.
This PR adds a PyTorch implementation of a unified CEBRA encoder, which is composed of:
🚧 A preprint is pending "A Unified Encoder for Modeling Neural Dynamics with Contrastive Learning" by Célia Benquet, Hossein Mirzaei, Steffen Schneider, Mackenzie W. Mathis.