Skip to content

Commit 5755af2

Browse files
authored
Merge pull request #17 from MilagrosMarin/feat_outliers_removal
Major Changes! Modernize, add new features, adapt to the latest kpms version, pipeline redesign, new `report` schema
2 parents ce3a500 + 59d5728 commit 5755af2

File tree

15 files changed

+1873
-892
lines changed

15 files changed

+1873
-892
lines changed

.devcontainer/Dockerfile

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
FROM python:3.9-slim@sha256:5f0192a4f58a6ce99f732fe05e3b3d00f12ae62e183886bca3ebe3d202686c7f
1+
ARG PY_VER=3.11
2+
ARG DISTRO=bullseye
3+
FROM mcr.microsoft.com/devcontainers/python:${PY_VER}-${DISTRO}
24

3-
ENV PATH /usr/local/bin:$PATH
4-
ENV PYTHON_VERSION 3.9.17
5+
# Avoid warnings by switching to noninteractive
6+
ENV DEBIAN_FRONTEND=noninteractive
7+
8+
USER root
59

610
RUN \
7-
adduser --system --disabled-password --shell /bin/bash vscode && \
811
# install docker
912
apt-get update && \
1013
apt-get install ca-certificates curl gnupg lsb-release -y && \
@@ -31,27 +34,19 @@ COPY ./ /tmp/element-moseq/
3134

3235
RUN \
3336
# pipeline dependencies
34-
apt-get update && \
35-
apt-get install -y gcc ffmpeg graphviz && \
36-
pip install ipywidgets && \
37-
pip install --no-cache-dir -e /tmp/element-moseq[kpms,elements,tests] && \
37+
apt-get install gcc g++ ffmpeg libsm6 libxext6 -y && \
38+
pip install --no-cache-dir -e /tmp/element-moseq[elements,tests] && \
3839
# clean up
39-
rm -rf /tmp/element-moseq/ && \
40+
rm -rf /tmp/element-moseq && \
4041
apt-get clean
4142

42-
# Install CPU version for KPMS
43-
RUN pip install "jax[cpu]==0.3.22" -f https://storage.googleapis.com/jax-releases/jax_releases.html
44-
4543
ENV DJ_HOST fakeservices.datajoint.io
4644
ENV DJ_USER root
4745
ENV DJ_PASS simple
4846

49-
ENV DATA_MOUNTPOINT /workspaces/element-moseq/example_data
50-
ENV KPMS_ROOT_DATA_DIR $DATA_MOUNTPOINT/inbox
51-
ENV KPMS_PROCESSED_DATA_DIR $DATA_MOUNTPOINT/outbox
47+
ENV KPMS_ROOT_DATA_DIR /workspaces/element-moseq/example_data
5248
ENV DATABASE_PREFIX neuro_
5349

5450
USER vscode
55-
CMD bash -c "sudo rm /var/run/docker.pid; sudo dockerd"
5651

57-
ENV LD_LIBRARY_PATH="/lib:/opt/conda/lib"
52+
CMD bash -c "sudo rm /var/run/docker.pid; sudo dockerd"

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,39 @@
33
Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
44
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.
55

6+
## [1.0.0] - 2025-09-10
7+
8+
> **BREAKING CHANGES** - This version contains breaking changes due to keypoint-moseq upgrade and API refactoring. Please review the changes below and update your code accordingly.
9+
10+
### Breaking Changes
11+
+ **BREAKING**: Upgrade keypoint-moseq from pinned 0.4.8 version to the latest version from source with breaking changes adding new features that are not compatible with the previous kpms versions
12+
+ **BREAKING**: Rename `kpms_reader` functions to generate, load, and update kpms config files
13+
+ **BREAKING**: Rename `PCAPrep` to `PreProcessing` table and add new attributes
14+
+ **BREAKING**: Add feature to remove outlier keypoints in `PreProcessing` table with new `outlier_scale_factor` attribute in `PCATask`, only available in latest version of kpms
15+
+ **BREAKING**: Add `sigmasq_loc` feature in `PreFit` and `FullFit` to automatically estimate sigmasq_loc (prior controlling the centroid movement across frames), only available in latest version of kpms
16+
17+
### New Features and Fixes
18+
+ Feat - Add support to load from both DLC `config.yml` and `config.yaml` file extensions
19+
+ Feat - Add new `mosesq_report` schema with comprehensive reporting capabilities
20+
+ Feat - Refactor `PreProcessing` table to use 3-part make function, add a new `Video` part table, and add new attributes `video_duration`, `frame_rate` and `average_frame_rate` to store these new computations
21+
+ Feat - Move and refactor `viz_utils` into new `plotting` module
22+
+ Feat - Update `model_name` varchar and folder naming
23+
+ Feat - Migrate from `setup.py` to `pyproject.toml` and `conda_env.yml` for modern Python packaging standards
24+
+ Fix - Update devcontainer to use Python 3.11 and upgrade dependencies
25+
+ Fix - Remove JAX dependencies from `pyproject.toml`
26+
+ Fix - Update pre-commit hooks for improved linting and consistency
27+
+ Fix - Correct generation of `kpms_dj_config.yml` and refactor `moseq_train` and `moseq_infer` to use the renamed functions
28+
+ Fix - Refactor `moseq_infer` and `moseq_train`, and implement a three-part make function in the most resource-intensive functions
29+
+ Fix - Update folder naming logic to use string of combined primary attributes instead of datetime in `PreFit` and `FullFit`
30+
+ Fix - Improve path and directory handling using `Path` objects and robust existence checks
31+
+ Fix - Remove redundancy of variables in `PreProcessing` table
32+
+ Fix - Update deprecated datetime usage
33+
+ Fix - Fix filename generation in `Inference` table
34+
+ Fix - Bugfix in `Model` imported foreign key
35+
+ Fix - Update tutorial_pipeline
36+
+ Add - Update docstrings across all modules
37+
+ Add - Update pipeline images to reflect new architecture
38+
639
## [0.3.2] - 2025-08-25
740
+ Feat - modernize packaging and environment management migrating from `setup.py` to `pyproject.toml`and `env.yml`
841
+ Fix - JAX compatibility issues
File renamed without changes.

0 commit comments

Comments
 (0)