Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v6.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand All @@ -9,18 +9,18 @@ repos:
- id: check-executables-have-shebangs
- id: check-toml
- repo: https://github.com/google/yapf
rev: v0.33.0
rev: v0.43.0
hooks:
- id: yapf
additional_dependencies:
- pyproject.toml
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 8.0.1
hooks:
- id: isort
additional_dependencies:
- pyproject.toml
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.280
rev: v0.15.18
hooks:
- id: ruff
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ Steffen Schneider, Rodrigo González Laiz, Anastasiia Filipova, Markus Frey, Mac
[Learnable latent embeddings for joint behavioral and neural analysis.](https://arxiv.org/abs/2204.00673)
Steffen Schneider*, Jin Hwa Lee* and Mackenzie Weygandt Mathis

# Patent Information
# Patent Information

- [Dimensionality reduction of time-series data, and systems and devices that use the resultant embeddings](https://patents.google.com/patent/US12499131B2/en). Steffen Schneider* & Mackenzie Weygandt Mathis*. Awarded Dec 2025. Please contact the [TTO office](adam.swetloff@epfl.ch) at EPFL for licensing.
- [Dimensionality reduction of time-series data, and systems and devices that use the resultant embeddings](https://patents.google.com/patent/US12499131B2/en). Steffen Schneider* & Mackenzie Weygandt Mathis*. Awarded Dec 2025. Please contact the [TTO office](adam.swetloff@epfl.ch) at EPFL for licensing.

# License

Expand Down
3 changes: 1 addition & 2 deletions cebra/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ def wrapper(*args, patched_version=None, **kwargs):
installed_version = packaging.version.parse(
patched_version) # Use the patched version if provided
else:
installed_version = packaging.version.parse(
module.__version__)
installed_version = packaging.version.parse(module.__version__)

if installed_version < required_version:
raise ImportError(
Expand Down
3 changes: 2 additions & 1 deletion cebra/integrations/plotly.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def _define_colorscale(self, cmap: str):
Returns:
colorscale: List of scaled colors to plot the embeddings
"""
colorscale = _convert_cmap2colorscale(matplotlib.colormaps.get_cmap(cmap))
colorscale = _convert_cmap2colorscale(
matplotlib.colormaps.get_cmap(cmap))

return colorscale

Expand Down
2 changes: 1 addition & 1 deletion docs/source/api/integrations/data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Data Loading

.. automodule:: cebra.data.load
:show-inheritance:
:members:
:members:
2 changes: 0 additions & 2 deletions docs/source/api/integrations/deeplabcut.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ DeepLabCut
.. automodule:: cebra.integrations.deeplabcut
:show-inheritance:
:members:


1 change: 0 additions & 1 deletion docs/source/api/integrations/matplotlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ Plotting with ``matplotlib``
.. automodule:: cebra.integrations.matplotlib
:show-inheritance:
:members:

1 change: 0 additions & 1 deletion docs/source/api/integrations/plotly.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ Plotting with ``plotly``
.. automodule:: cebra.integrations.plotly
:show-inheritance:
:members:

5 changes: 2 additions & 3 deletions tests/test_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,8 @@ def test_allen():


@pytest.mark.requires_dataset
@pytest.mark.parametrize("options",
cebra.datasets.get_options("*",
expand_parametrized=False))
@pytest.mark.parametrize(
"options", cebra.datasets.get_options("*", expand_parametrized=False))
def test_options(options):
assert len(options) > 0
assert len(multisubject_options) > 0
Expand Down
4 changes: 3 additions & 1 deletion tests/test_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ def _get_loader(data_name, loader_initfunc):
loader = loader_initfunc(data, **kwargs)
return loader, data


OUTPUT_DIMENSION = 3


def _make_model(dataset, model_architecture="offset10-model"):
# TODO flexible input dimension
# return nn.Sequential(
Expand Down Expand Up @@ -398,4 +400,4 @@ def test_unified_session(data_name, model_architecture, loader_initfunc,
assert emb.shape == (loader.dataset.num_timepoints, 3)

emb = solver.transform(data, labels, session_id=i, batch_size=300)
assert emb.shape == (loader.dataset.num_timepoints, 3)
assert emb.shape == (loader.dataset.num_timepoints, 3)
Loading