Skip to content

Commit

Permalink
Release 0.4.0 (#116)
Browse files Browse the repository at this point in the history
* Bump version to 0.4.0

* Seed `test_similarities` function to avoid test failure
  • Loading branch information
stes authored Jan 10, 2024
1 parent 45e2229 commit 31460de
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ RUN make dist
FROM cebra-base

# install the cebra wheel
ENV WHEEL=cebra-0.3.1-py2.py3-none-any.whl
ENV WHEEL=cebra-0.4.0-py2.py3-none-any.whl
WORKDIR /build
COPY --from=wheel /build/dist/${WHEEL} .
RUN pip install --no-cache-dir ${WHEEL}'[dev,integrations,datasets]'
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CEBRA_VERSION := 0.3.1
CEBRA_VERSION := 0.4.0

dist:
python3 -m pip install virtualenv
Expand Down
2 changes: 1 addition & 1 deletion PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Maintainer: Steffen Schneider <[email protected]>
pkgname=python-cebra
_pkgname=cebra
pkgver=0.3.1
pkgver=0.4.0
pkgrel=1
pkgdesc="Consistent Embeddings of high-dimensional Recordings using Auxiliary variables"
url="https://cebra.ai"
Expand Down
2 changes: 1 addition & 1 deletion cebra/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

import cebra.integrations.sklearn as sklearn

__version__ = "0.3.1"
__version__ = "0.4.0"
__all__ = ["CEBRA"]
__allow_lazy_imports = False
__lazy_imports = {}
Expand Down
2 changes: 1 addition & 1 deletion reinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pip uninstall -y cebra
# Get version info after uninstalling --- this will automatically get the
# most recent version based on the source code in the current directory.
# $(tools/get_cebra_version.sh)
VERSION=0.3.1
VERSION=0.4.0
echo "Upgrading to CEBRA v${VERSION}"

# Upgrade the build system (PEP517/518 compatible)
Expand Down
8 changes: 4 additions & 4 deletions tests/test_criterions.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,10 @@ def _reference_infonce(pos_dist, neg_dist):


def test_similiarities():

ref = torch.randn(10, 3)
pos = torch.randn(10, 3)
neg = torch.randn(12, 3)
rng = torch.Generator().manual_seed(42)
ref = torch.randn(10, 3, generator = rng)
pos = torch.randn(10, 3, generator = rng)
neg = torch.randn(12, 3, generator = rng)

pos_dist, neg_dist = _reference_dot_similarity(ref, pos, neg)
pos_dist_2, neg_dist_2 = cebra_criterions.dot_similarity(ref, pos, neg)
Expand Down

0 comments on commit 31460de

Please sign in to comment.