Skip to content
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

fix and adjust caiman cnmf #362

Merged
merged 4 commits into from
Jan 10, 2025
Merged
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ lauda = "*"
Pillow = "*"
pymatreader = "^0.0.32"
xmltodict = "*"
matplotlib = "==3.7.*"
matplotlib = "3.7.*"
scikit-image = "0.21"

[tool.poetry.group.dev]
Expand Down
3 changes: 1 addition & 2 deletions studio/app/optinist/wrappers/caiman/cnmf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import requests
import scipy

from studio.app.common.core.experiment.experiment import ExptOutputPathIds
from studio.app.common.core.logger import AppLogger
from studio.app.common.core.utils.filepath_creater import (
create_directory,
Expand Down Expand Up @@ -215,7 +214,7 @@ def caiman_cnmf(
from caiman.source_extraction.cnmf import cnmf, online_cnmf
from caiman.source_extraction.cnmf.params import CNMFParams

function_id = ExptOutputPathIds(output_dir).function_id
function_id = output_dir.split("/")[-1] # get function_id from output_dir path
logger.info(f"start caiman_cnmf: {function_id}")

# NOTE: evaluate_components requires cnn_model files in caiman_data directory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ init_params:
# NOTE: K would affect performance.
# Set lower values (like 4) for faster processing. (eg., for development)
# K: 2000 # for production.
K: 4
K: 10

gSig: [4, 4]
ssub: 1
Expand Down
1 change: 1 addition & 0 deletions studio/app/optinist/wrappers/expdb/conda/expdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ dependencies:
- pip:
- isx==1.0.*
- pynwb==2.6.0
- matplotlib==3.7.*
6 changes: 3 additions & 3 deletions studio/config/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ RUN pip3 install --no-cache-dir --upgrade pip && \
pip3 install poetry && \
poetry config virtualenvs.create false

# export requirements.txt from poetry and
# export requirements.txt from poetry and install
# * Some module versions are adjusted directly for batch environments.
RUN poetry export -f requirements.txt -o requirements.studio.txt --without-hashes && \
sed -e '/^h5py/d' -e '/^opencv-python/d' requirements.studio.txt > requirements.batch.txt
RUN poetry export -f requirements.txt -o requirements.studio.txt && \
sed -e '/^h5py/d' requirements.studio.txt > requirements.batch.txt

RUN pip3 install -r requirements.studio.txt

Expand Down
7 changes: 3 additions & 4 deletions studio/config/docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ RUN pip3 install --no-cache-dir --upgrade pip && \
pip3 install poetry && \
poetry config virtualenvs.create false

# export requirements.txt from poetry and
# export requirements.txt from poetry and install
# * Some module versions are adjusted directly for batch environments.
RUN poetry export -f requirements.txt -o requirements.studio.txt --without-hashes && \
sed -e '/^h5py/d' -e '/^opencv-python/d' requirements.studio.txt > requirements.batch.txt
RUN poetry export -f requirements.txt -o requirements.studio.txt && \
sed -e '/^h5py/d' requirements.studio.txt > requirements.batch.txt

RUN pip3 install -r requirements.studio.txt

Expand Down Expand Up @@ -111,4 +111,3 @@ USER optinist
COPY studio/app/optinist/wrappers/caiman/run_download_model_files.sh ./
RUN bash run_download_model_files.sh && rm run_download_model_files.sh
USER root

5 changes: 4 additions & 1 deletion studio/config/docker/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,7 @@ COPY pyproject.toml poetry.lock ./
RUN pip3 install --no-cache-dir --upgrade pip && \
pip3 install poetry && \
poetry config virtualenvs.create false
RUN poetry install --no-root --with test

# export requirements.txt from poetry and install
RUN poetry export -f requirements.txt -o requirements.studio.txt --with test
RUN pip3 install -r requirements.studio.txt
Loading