Skip to content
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
87 changes: 30 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ More information is available on the [MIP Website](https://ebrains.eu/data-tools
# Table of Contents <!-- omit in toc -->

- [About MIP](#about-mip)
- [9.2 Release](#mip-92-release--major-updates)
- [MIP 9.3.0 release](#mip-930-release)
- [What MIP Includes](#what-mip-includes)
- [Deployment](#deployment)
- [Federated Analysis Algorithms](#federated-analysis-algorithms)
Expand All @@ -27,58 +27,31 @@ federated statistical and machine-learning analyses across participating sites.
This repository collects the technical, deployment, data-management, and
architecture documentation needed to understand, deploy, and operate MIP.

# MIP 9.2 Release – Major Updates

## Advanced data handling in the UI

The redesigned Data Handling step makes advanced preparation part of the
Experiment Studio workflow. Researchers can configure cohort filters,
missing-value handling, outlier treatment, and transformations, then review
summaries and charts of the prepared data before choosing an analysis.

## More transformation options

Researchers can create new categorical columns from filter-based rules, defining
categories from conditions on existing variables. K-means is also available as
a preprocessing option: a fitted clustering result can be reused to create a
categorical cluster column for downstream analyses. These options extend the
existing missing-value, outlier, and longitudinal transformations.

## Revamped visualizations and simpler execution

The Experiment Studio guides researchers through data exploration, preparation,
algorithm configuration, execution, and results. Algorithm visualizations and
result tables have been redesigned, with PDF reports and CSV exports. The
updated dashboard supports experiment folders, search, and side-by-side result
comparison.

## Jupyter notebooks for federated research

**Jupyter notebooks are a major new feature in MIP.** Researchers can open a
JupyterLab workspace from the portal and build reproducible analyses in Python.
The pre-installed `mip` client provides data discovery, filters, preprocessing,
and algorithm execution through the platform backend. A welcome notebook,
example analyses, and client documentation help researchers get started while
patient-level records remain at the contributing sites.

The new [mip-jupyter repository](https://github.com/Medical-Informatics-Platform/mip-jupyter/tree/0.2.1)
provides the notebook workspace, Python client, and Jupyter images. Example notebooks
live in the [mip-examples repository](https://github.com/Medical-Informatics-Platform/mip-examples).

## Support agent for notebook creation and explanation

The notebook workspace includes **Cohort Scout**, a support agent that helps
researchers create and edit notebooks, explain analysis code and results, and
navigate the MIP Python client. It is available through Jupyter AI when the
assistant service is configured for the deployment.

## Expanded analytics and supporting services

Exaflow adds histogram-based quartile estimates, a binned Mann-Whitney U test,
Standardized Mean Difference, and richer K-means reporting and preprocessing.
The backend introduces analysis and specification endpoints and experiment
folder management to support the revised workflow. The component releases are
listed in [MIP building blocks](documentation/Components.md).
# MIP 9.3.0 Release

- **Programmatic and AI-assisted access.** Install `mip-client` to discover
data and run federated analyses from Python on your own computer or server.
The `mip` command adds sign-in and catalog discovery, and `mip agent init`
sets up a workspace for an AI assistant. [MIP Python client guide](documentation/notebooks.md#use-mip-from-your-own-computer)
- **Analysis Studio and Analyses Dashboard.** Explore variables and review
prepared data in the studio, inspect updated charts and tables, and organize
saved analyses into studies and analysis groups. API integrations use the
`/services/analyses` and `/services/studies` endpoints. [Component versions and API links](documentation/Components.md)
- **PCA and K-means preprocessing.** The new PCA Column Creator makes
principal component scores available as numerical inputs to downstream
analyses. The K-means Column Creator can now fit a model directly or reuse
an existing fit to assign cluster labels. [Federated algorithms and preprocessing](documentation/algorithms.md#preprocessing)
- **Clearer analysis errors.** Analysis messages distinguish invalid input
and insufficient data from execution failures. Service errors distinguish
an unavailable submission path from a run that exceeds the reply timeout.
[Analysis error handling](documentation/Architecture.md#analysis-errors)
- **RabbitMQ and simpler Exaflow deployment.** The backend submits analyses
and receives results through RabbitMQ. Exaflow's controller coordinates a
single type of worker, removing the dedicated global worker and its resource
requirements. [Kubernetes upgrade guide](deployment/kubernetes/README.md#upgrading-from-92x)
- **Notebook operator.** Kubernetes deployments can delegate notebook pod and
volume creation to the MIP notebook operator. Its optional HTTPS spawn API
lets JupyterHub do this without Kubernetes API access. [Notebook operator guide](documentation/notebook-operator.md)

# What MIP Includes

Expand All @@ -100,7 +73,7 @@ The algorithm documentation describes the available federated analyses and links
to the underlying Exaflow analytic engine documentation.

- [Available federated analysis algorithms](documentation/algorithms.md)
- [Exaflow Analytic Engine](https://github.com/madgik/exaflow/tree/1.2.1)
- [Exaflow Analytic Engine](https://github.com/madgik/exaflow/tree/1.4.0)

# Jupyter Notebooks and Support Agent

Expand All @@ -109,14 +82,14 @@ pipelines, run federated algorithms, and document results alongside Python code.
Cohort Scout can assist with notebook creation and explanation.

- [Notebook getting-started guide](documentation/notebooks.md)
- [MIP Jupyter workspace and Python client](https://github.com/Medical-Informatics-Platform/mip-jupyter/tree/0.2.1)
- [MIP Jupyter workspace and Python client](https://github.com/Medical-Informatics-Platform/mip-jupyter/tree/0.3.0)
- [MIP example notebooks](https://github.com/Medical-Informatics-Platform/mip-examples)

# Data Management

Data providers prepare and validate source datasets and metadata before upload.
Researchers configure filters and transformations per analysis in the Experiment
Studio or notebook pipelines; these operations do not rewrite uploaded files.
Researchers configure filters and transformations per analysis in the Analysis
Studio or notebook pipelines.

- [Dataset onboarding: Data Management Guide](documentation/MIP_Data_management_documentation.md)

Expand Down
10 changes: 5 additions & 5 deletions deployment/dev/.env.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Versions
EXAFLOW=1.2.1
PLATFORM_BACKEND=10.2.0
PLATFORM_UI=2.1.1
MIP_JUPYTER=0.2.1
MIP=9.2.1
EXAFLOW=1.4.0
PLATFORM_BACKEND=11.0.1
PLATFORM_UI=3.1.0
MIP_JUPYTER=0.3.0
MIP=9.3.0

# Toggle authentication
AUTHENTICATION=0
Expand Down
2 changes: 1 addition & 1 deletion deployment/dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

For source CSVs, data-model metadata, and dataset validation, follow the
[Data Management Guide](../../documentation/MIP_Data_management_documentation.md).
Configure per-analysis filters and transformations in the Experiment Studio or
Configure per-analysis filters and transformations in the Analysis Studio or
notebook pipelines.
The development setup exposes JupyterLab directly; portal-integrated JupyterHub
and authenticated notebook spawning are covered by the
Expand Down
1 change: 0 additions & 1 deletion deployment/dev/config/localworkers_config.json

This file was deleted.

1 change: 1 addition & 0 deletions deployment/dev/config/workers_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["172.28.0.12:5671"]
59 changes: 8 additions & 51 deletions deployment/dev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,14 @@ services:
DEPLOYMENT_TYPE: LOCAL
WORKER_LANDSCAPE_AGGREGATOR_UPDATE_INTERVAL: 30
WORKER_TASKS_TIMEOUT: 30
FLOWER_ENABLED: false
FLOWER_EXECUTION_TIMEOUT: 30
FLOWER_SERVER_PORT: 8080
LOCALWORKERS_CONFIG_FILE: /opt/config/localworkers_config.json
LOCALWORKERS_DNS: ""
LOCALWORKERS_PORT: ""
MAX_CONCURRENT_EXPERIMENTS: 32
WORKERS_CONFIG_FILE: /opt/config/workers_config.json
WORKERS_DNS: ""
WORKERS_PORT: ""
AGGREGATION_SERVER_ENABLED: true
AGGREGATION_SERVER_DNS: 172.28.0.13:50051
RABBITMQ_ENABLED: "true"
RABBITMQ_URL: amqp://mip:mip@rabbitmq:5672/%2F
SMPC_ENABLED: false
SMPC_OPTIONAL: false
SMPC_COORDINATOR_ADDRESS: ""
SMPC_GET_RESULT_INTERVAL: 10
SMPC_GET_RESULT_MAX_RETRIES: 100
DP_ENABLED: false
DP_SENSITIVITY: ""
DP_PRIVACY_BUDGET: ""
depends_on:
exaflow_aggregation_server:
condition: service_started
Expand All @@ -70,42 +60,10 @@ services:
default:
ipv4_address: 172.28.0.10

exaflow_global_worker:
image: madgik/exaflow_worker:${EXAFLOW}
environment:
WORKER_IDENTIFIER: globalworker
WORKER_ROLE: GLOBALWORKER
FEDERATION: dementia
LOG_LEVEL: INFO
FRAMEWORK_LOG_LEVEL: INFO
DUCKDB_PATH: /tmp/globalworker.duckdb
DATA_PATH: /opt/data
CONTROLLER_IP: 172.28.0.10
CONTROLLER_PORT: 5000
WORKER_TASKS_TIMEOUT: 30
PROTECT_LOCAL_DATA: false
GRPC_IP: 172.28.0.11
GRPC_PORT: 5670
AGGREGATION_SERVER_ENABLED: true
AGGREGATION_SERVER_DNS: 172.28.0.13:50051
SMPC_ENABLED: false
SMPC_OPTIONAL: false
SMPC_CLIENT_ID: ""
SMPC_CLIENT_ADDRESS: ""
SMPC_COORDINATOR_ADDRESS: ""
depends_on:
- exaflow_controller
- exaflow_aggregation_server
restart: unless-stopped
networks:
default:
ipv4_address: 172.28.0.11

exaflow_local_worker1:
image: madgik/exaflow_worker:${EXAFLOW}
environment:
WORKER_IDENTIFIER: localworker1
WORKER_ROLE: LOCALWORKER
FEDERATION: dementia
LOG_LEVEL: INFO
FRAMEWORK_LOG_LEVEL: INFO
Expand All @@ -117,13 +75,9 @@ services:
PROTECT_LOCAL_DATA: false
GRPC_IP: 172.28.0.12
GRPC_PORT: 5671
GRPC_MAX_WORKERS: 36
AGGREGATION_SERVER_ENABLED: true
AGGREGATION_SERVER_DNS: 172.28.0.13:50051
SMPC_ENABLED: false
SMPC_OPTIONAL: false
SMPC_CLIENT_ID: ""
SMPC_CLIENT_ADDRESS: ""
SMPC_COORDINATOR_ADDRESS: ""
depends_on:
- exaflow_controller
- exaflow_aggregation_server
Expand Down Expand Up @@ -206,6 +160,9 @@ services:
PLATFORM_BACKEND_SERVER: platform-backend:8080
PLATFORM_BACKEND_CONTEXT: services
NOTEBOOK_ENABLED: 0
# nginx resolves this at start; the dev stack has no JupyterHub.
JUPYTER_SERVER: 127.0.0.1:80
JUPYTER_CONTEXT: notebook
MIP_VERSION: "${MIP}"
KEYCLOAK_ORIGIN: "${KEYCLOAK_ORIGIN:-}"
depends_on:
Expand Down
29 changes: 16 additions & 13 deletions deployment/docs/BackupAndRecovery.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Backup and Recovery

This guide covers the MIP 9.2.1 Kubernetes web and notebook stack and the
This guide covers the MIP 9.3.0 Kubernetes web and notebook stack and the
Exaflow data held by participating sites. Persistent data can reside on several
nodes or in managed storage. Back up the actual PVCs and site data, together
with the configuration needed to recover them.
Expand All @@ -15,21 +15,24 @@ custom deployments for additional volumes and external services.
| Platform PostgreSQL database `portal` | `platform-backend-db-claim0`, mounted at `/var/lib/postgresql` in the `platform-backend-db` container | Database dump plus roles; alternatively, a tested PostgreSQL physical backup procedure. |
| Backend application files | `platform-backend-claim0`, mounted at `/opt/platform/api` | Storage snapshot or offline archive. |
| Backend logs | `platform-backend-logs-claim0`, mounted at `/var/log/platform-backend` | Retain according to the installation's audit policy. |
| RabbitMQ queues and broker state | `data-exaflow-rabbitmq-0`, mounted at `/var/lib/rabbitmq` in the `exaflow-rabbitmq` StatefulSet | Storage snapshot with the broker stopped. Record the broker identity, configuration, and image version needed to restore the volume. |
| JupyterHub database and local state | `jupyterhub-claim0`, mounted at `/srv/jupyterhub` | Snapshot or archive with the Hub stopped, including its database and cookie secret files. |
| Users' notebooks and files | Separate user home PVCs mounted at `/home/jovyan`; workspaces are under `/home/jovyan/work` | Snapshot or archive each home after stopping its notebook server. |
| Exaflow input data | Each site's CSV/data-model folders on hostPath storage or CSV PVCs | Site-local backups of CSVs, `CDEsMetadata.json`, and other required dataset assets. |
| Configuration and credentials | Helm overrides, image versions, ConfigMaps, Kubernetes Secrets, and externally managed settings | Protected configuration backup and secret-manager recovery procedure. |

Include `mip-secret`, `keycloak-credentials`, `jupyterhub-crypt`, and TLS
credentials, plus any registry or operator-specific secrets used by the
installation. The Hub crypt key must match the backed-up Hub auth state.
Include `mip-secret`, `exaflow-rabbitmq`, `keycloak-credentials`,
`jupyterhub-crypt`, and TLS credentials, plus any registry or operator-specific
secrets used by the installation. The Hub crypt key must match the backed-up
Hub auth state.
Coordinate recovery of the external Keycloak realm and clients with its owner.
For operator-based notebook spawning, retain the operator/CRD versions and
NotebookProfile configuration as well.

Exaflow's current workers build DuckDB files on `emptyDir` volumes. These files
are rebuilt from source datasets, rather than treated as durable backups.
In-flight analyses and aggregation contexts are transient and must be rerun.
Exaflow's workers rebuild their DuckDB files on `emptyDir` volumes from source
datasets. In-flight execution and aggregation state are transient. Restored
RabbitMQ messages can be redelivered, so reconcile queued and completed analyses
before resubmitting work.

## Prepare a consistent backup

Expand All @@ -38,17 +41,17 @@ In-flight analyses and aggregation contexts are transient and must be rerun.
versions. Choose the retention period and acceptable data-loss window for
the installation.
2. Schedule a maintenance window. Pause ingress or otherwise block new web and
notebook requests, allow active analyses to finish, and stop all user
notebook servers. Suspend GitOps/operator reconciliation where needed so
notebook requests, let queued and active analyses finish, and stop all
user notebook servers. Suspend GitOps/operator reconciliation where needed so
stopped services are not recreated during the backup.
3. Stop the JupyterHub workload before copying its state. Quiesce backend
application writes while keeping PostgreSQL running for a logical dump.
The backend and PostgreSQL share one Deployment/pod in this chart: scaling
`platform-backend` to zero stops both, so take the dump before scaling it
down. Include other API clients when blocking writes.
4. Back up PostgreSQL, then snapshot/archive backend files, Hub state, and every
notebook home while their writers are stopped. Coordinate site dataset
backups with data managers and pause any dataset updates during capture.
4. Back up PostgreSQL, then snapshot/archive backend files, the RabbitMQ PVC,
Hub state, and every notebook home while their writers are stopped. Coordinate
site dataset backups with data managers and pause dataset updates during capture.
5. Store configuration, secret recovery material, and the inventory with the
backup set. Encrypt backups, restrict access, and keep a copy independent
of the live storage. Clinical datasets stay within each site's governance
Expand Down Expand Up @@ -120,7 +123,7 @@ capture notebook files or Kubernetes configuration.
data models and datasets are available.
7. Stop the temporary PostgreSQL recovery workload before starting the regular
stack with its restored PVC. Start the backend and Hub with external access
still restricted. Confirm login, saved experiments and folders, and access
still restricted. Confirm login, saved analyses and studies, and access
permissions. Open a user's notebook and check saved files and
`mip.Client.from_env()`. Run a representative analysis from the portal and
a notebook.
Expand Down
Loading