Skip to main content

Python CLI for interacting with Flower-AI stacks on SLURM via florago

Project description

FloraLab

FloraLab is a Python CLI tool for managing Flower-AI federated learning deployments on SLURM clusters.

Features

  • 🚀 Automated deployment of Flower-AI stacks on SLURM
  • 🔧 Seamless integration with florago backend
  • 📦 Bundled binaries - no manual setup required
  • 🌐 SSH tunnel management for secure communication
  • ⚡ Simple 3-command workflow: init, run, stop

Installation

pip install floralab

Or with uv:

uv pip install floralab

Quick Start

1. Initialize Configuration

floralab-cli init your-slurm-login-node.edu

This adds Flower-AI configuration to your pyproject.toml.

2. Run Federated Learning Job

floralab-cli run --nodes 3

This will:

  • Copy florago to the SLURM cluster
  • Initialize the environment
  • Start the API server
  • Spin up a Flower stack (1 server + 3 clients)
  • Run your federated learning job with flwr run

3. Stop the Stack

floralab-cli stop

Tears down the Flower stack and cancels the SLURM job.

Commands

floralab-cli init <login-node>

Initialize floralab configuration in your project's pyproject.toml.

Arguments:

  • login-node - Hostname of your SLURM login node

Options:

  • --dir, -d - Project directory (default: current directory)

floralab-cli run

Run a federated learning job on the SLURM cluster.

Options:

  • --nodes, -n - Number of client nodes (default: 2)
  • --partition, -p - SLURM partition
  • --memory, -m - Memory per node (e.g., "4G")
  • --time, -t - Time limit (e.g., "01:00:00")
  • --dir, -d - Project directory (default: current directory)
  • --ssh-port - Local port for SSH tunnel (default: 8080)

floralab-cli stop

Stop the running Flower stack.

Options:

  • --dir, -d - Project directory (default: current directory)
  • --ssh-port - Local port for SSH tunnel (default: 8080)

Configuration

FloraLab adds the following to your pyproject.toml:

[tool.floralab]
login-node = "your-slurm-login-node.edu"

[tool.flwr.federations.floralab]
address = "127.0.0.1:9093"
insecure = true
root-certificates = null

The address field is automatically updated when you run floralab-cli run to point to the actual Flower server.

Requirements

  • Python 3.12+
  • SSH access to a SLURM cluster
  • Flower AI installed (flwr command available)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

floralab-0.1.0.tar.gz (26.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

floralab-0.1.0-py3-none-any.whl (11.1 MB view details)

Uploaded Python 3

File details

Details for the file floralab-0.1.0.tar.gz.

File metadata

  • Download URL: floralab-0.1.0.tar.gz
  • Upload date:
  • Size: 26.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.6

File hashes

Hashes for floralab-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f2a77adfd6d3aac2fdd7ab1282dcc3899d0d751b933fbb6f52c51d26263ba352
MD5 9418f66fd86e8ba36d729df14583776b
BLAKE2b-256 1f41d79115784939a27f2a97effd8788363de61b58eda3c1cf1d46d785745a46

See more details on using hashes here.

File details

Details for the file floralab-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: floralab-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.6

File hashes

Hashes for floralab-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7e0f2e90b882cafa08f12e3b9668d460abd2c9a8ad29ea5195efe4e4eebc348
MD5 e353e7abcc1f0c171b18801534726247
BLAKE2b-256 2b4b71d07493d40b31f35c1656acdc209d6d556a6107506675395e01ada3591d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page