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

feat(workflows): add configuration for pbmc5k data #632

Merged
merged 3 commits into from
Aug 18, 2024
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 MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pyrovelocity MODULE

module(
name = "pyrovelocity",
version = "0.4.0b1",
version = "0.4.0b2",
compatibility_level = 1,
)

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -913,8 +913,8 @@ approve-prs: ## Approve github pull requests from bots: PR_ENTRIES="2-5 10 12-18
fi; \
done

PREVIOUS_VERSION := 0.3.0
NEXT_VERSION := 0.4.0b1
PREVIOUS_VERSION := 0.4.0b1
NEXT_VERSION := 0.4.0b2
VERSION_FILES := \
pyproject.toml \
conda/colab/construct.yaml \
Expand Down
2 changes: 1 addition & 1 deletion conda/colab/construct.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: pyrovelocity-colab
version: 0.4.0b1
version: 0.4.0b2

channels:
- pytorch
Expand Down
2 changes: 1 addition & 1 deletion containers/gpu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ COPY . /root
# development
RUN pip install --no-deps -e .
# distribution
# RUN pip install pyrovelocity==0.4.0b1
# RUN pip install pyrovelocity==0.4.0b2

ARG tag
ENV FLYTE_INTERNAL_IMAGE $tag
2 changes: 1 addition & 1 deletion containers/pkg.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ COPY . /root
# development
RUN pip install --no-deps -e .
# distribution
# RUN pip install pyrovelocity==0.4.0b1
# RUN pip install pyrovelocity==0.4.0b2

ARG tag
ENV FLYTE_INTERNAL_IMAGE $tag
2 changes: 1 addition & 1 deletion docs/source/notebooks/pyrovelocity_colab_template.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
}
],
"source": [
"pyrovelocity_version = \"0.4.0b1\"\n",
"pyrovelocity_version = \"0.4.0b2\"\n",
"pyrovelocity_colab_script_url = (\n",
" \"https://storage.googleapis.com/pyrovelocity/data/scripts/\"\n",
" + f\"pyrovelocity-colab-{pyrovelocity_version}-Linux-x86_64.sh\"\n",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyrovelocity"
version = "0.4.0b1"
version = "0.4.0b2"
packages = [{ include = "pyrovelocity", from = "src" }]
description = "A multivariate RNA Velocity model to estimate future cell states with uncertainty using probabilistic modeling with pyro."
authors = ["pyrovelocity team"]
Expand Down
8 changes: 4 additions & 4 deletions scripts/conda
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -euo pipefail

PACKAGE_NAME="pyrovelocity"
PACKAGE_VERSION="0.4.0b1"
PACKAGE_VERSION="0.4.0b2"
CONDA_BUILD_STRING="pyhff70e4c"
CONDA_BUILD_NUMBER="0"
# CONDA_CHANNEL_LABEL="pyrovelocity_dev"
Expand Down Expand Up @@ -32,7 +32,7 @@ Example:

./conda \\
--name pyrovelocity \\
--version 0.4.0b1.dev1 \\
--version 0.4.0b2.dev1 \\
--build-string pyhff70e4c \\
--build-number 0 \\
--label pyrovelocity_dev
Expand Down Expand Up @@ -67,9 +67,9 @@ PACKAGE_SPEC="conda-forge/label/\
$CONDA_CHANNEL_LABEL::\
$PACKAGE_NAME=$PACKAGE_VERSION=$CONDA_BUILD_STRING"_"$CONDA_BUILD_NUMBER"

BLUE="\0.4.0b1;34;1m"
BLUE="\0.4.0b2;34;1m"
BOLD="\033[1m"
NO_COLOR="\0.4.0b1m"
NO_COLOR="\0.4.0b2m"
if [ "$USE_COLOR" = false ]; then
BLUE=""
BOLD=""
Expand Down
43 changes: 43 additions & 0 deletions src/pyrovelocity/workflows/main_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,49 @@ class CombinedMetricsOutputs(DataClassJSONMixin):
summarizing_resources_limits=default_resource_limits,
)


pbmc5k_dataset_args = DownloadDatasetInterface(
data_set_name="pbmc5k",
)
pbmc5k_preprocess_data_args = PreprocessDataInterface(
data_set_name=f"{pbmc5k_dataset_args.data_set_name}",
adata=f"{pbmc5k_dataset_args.data_external_path}/{pbmc5k_dataset_args.data_set_name}.h5ad",
use_obs_subset=SUBSET_OBS,
use_vars_subset=SUBSET_VARS,
cell_state="celltype",
)
pbmc5k_train_model1_args = PyroVelocityTrainInterface(
adata=f"{pbmc5k_preprocess_data_args.data_processed_path}/{pbmc5k_dataset_args.data_set_name}_processed.h5ad",
data_set_name=f"{pbmc5k_dataset_args.data_set_name}",
model_identifier="model1",
guide_type="auto_t0_constraint",
offset=False,
max_epochs=MAX_EPOCHS,
)
pbmc5k_train_model2_args = PyroVelocityTrainInterface(
adata=f"{pbmc5k_preprocess_data_args.data_processed_path}/{pbmc5k_dataset_args.data_set_name}_processed.h5ad",
data_set_name=f"{pbmc5k_dataset_args.data_set_name}",
model_identifier="model2",
max_epochs=MAX_EPOCHS,
)
pbmc5k_postprocess_configuration = PostprocessConfiguration(
number_posterior_samples=NUMBER_POSTERIOR_SAMPLES,
)
pbmc5k_configuration = WorkflowConfiguration(
download_dataset=pbmc5k_dataset_args,
preprocess_data=pbmc5k_preprocess_data_args,
training_configuration_1=pbmc5k_train_model1_args,
training_configuration_2=pbmc5k_train_model2_args,
postprocess_configuration=pbmc5k_postprocess_configuration,
training_resources_requests=large_training_resource_requests,
training_resources_limits=large_training_resource_limits,
postprocessing_resources_requests=large_resource_requests,
postprocessing_resources_limits=large_resource_limits,
summarizing_resources_requests=large_resource_requests,
summarizing_resources_limits=large_resource_limits,
)


pbmc68k_dataset_args = DownloadDatasetInterface(
data_set_name="pbmc68k",
)
Expand Down
4 changes: 3 additions & 1 deletion src/pyrovelocity/workflows/main_workflow.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import json
import os
from dataclasses import asdict
from datetime import timedelta
from pathlib import Path
Expand Down Expand Up @@ -56,6 +55,7 @@
larry_multilineage_configuration,
larry_neu_configuration,
pancreas_configuration,
pbmc5k_configuration,
pbmc68k_configuration,
pons_configuration,
simulated_configuration,
Expand Down Expand Up @@ -568,6 +568,7 @@ def combine_all_metrics(
def training_workflow(
simulated_configuration: WorkflowConfiguration = simulated_configuration,
pancreas_configuration: WorkflowConfiguration = pancreas_configuration,
pbmc5k_configuration: WorkflowConfiguration = pbmc5k_configuration,
pbmc68k_configuration: WorkflowConfiguration = pbmc68k_configuration,
pons_configuration: WorkflowConfiguration = pons_configuration,
larry_configuration: WorkflowConfiguration = larry_configuration,
Expand All @@ -587,6 +588,7 @@ def training_workflow(
if not PYROVELOCITY_DATA_SUBSET:
configurations += [
(pancreas_configuration, "pancreas"),
(pbmc5k_configuration, "pbmc5k"),
# (pbmc68k_configuration, "pbmc68k"),
# (pons_configuration, "pons"),
# (larry_configuration, "larry"),
Expand Down
Loading