Migration Guide

This guide covers API and configuration changes when upgrading between FLARE releases.

Upgrading from 2.9 to 2.10

Copy each existing client kit to a separate workspace and start it in a 2.10 environment, keeping the 2.9 client running. Shared workspaces conflict on PID and shutdown files. No certificate or endpoint changes are needed. The staged client probes under a distinct name without registering. It waits for a compatible server, retrying every 60 seconds (configurable via client.upgrade_probe_interval). Stop the process to cancel waiting.

At cutover, finish or abort jobs and issue shutdown all from the 2.9 admin console. Exit the old server process, then start 2.10 using its existing kit and workspace. Upgrade the admin environment and any relays; start upgraded relays after the 2.10 server is ready. A relay handshake identifies the relay’s protocol, not the root server’s protocol.

Staged clients join on a subsequent probe; late sites join when installed. Verify with nvflare system version. Leftover 2.9 peers are rejected before endpoint attachment and cannot replace a 2.10 connection. This procedure includes a server outage and does not resume running jobs across the upgrade.

Multi-process Executor Deprecation

MultiProcessExecutor and PTMultiProcessExecutor are deprecated in 2.10 while their imports and configuration remain available. For PyTorch DDP training, use job-based Client API with launch_external_process=True and torchrun, as in the multi-GPU example. Only global rank zero exchanges models with FLARE; the script synchronizes models and shutdown across ranks. Applications relying on the legacy wrapper’s arbitrary FL events or component graph must adapt those explicitly before migrating.

Upgrading from 2.7.2 to 2.8.0

Python and Removed Legacy Surfaces

FLARE 2.8.0 targets Python 3.10 through 3.14. Python 3.9 is no longer listed as a supported development target.

The deprecated FLAdminAPI surface has been removed. Use the FLARE API, Recipe API, Client API, and nvflare CLI workflows for new automation.

HA/Overseer code has also been removed from the 2.8 branch.

Client API Subprocess Timeout Validation

Subprocess-mode Client API jobs now validate two large-model safety settings at job initialization:

  • download_complete_timeout must not be None. The subprocess must stay alive after send_to_peer() ACKs so the server can finish downloading tensors from the subprocess DownloadService.

  • max_resends must not be None when using ClientAPILauncherExecutor. Unlimited resends can turn one delayed large-model transfer into an unbounded series of replacement download transactions.

If your 2.7.x job explicitly set either value to None, update it before running on 2.8.0. Recipe-based external-process jobs already serialize the default max_resends=3 in executor args, so the following setting is only needed when overriding a previous explicit None or choosing a different retry budget:

recipe.add_client_config({
    "download_complete_timeout": 1800,
    "max_resends": 3,  # finite non-negative integer; 0 disables retries
})

For large tensor or NumPy payloads, also keep the related streaming timeouts consistent. If you explicitly raise tensor_streaming_per_request_timeout or np_streaming_per_request_timeout, set PEER_READ_TIMEOUT and download_complete_timeout to values at least as large as the configured streaming per-request timeout, and keep tensor_min_download_timeout or np_min_download_timeout at least as large as the same value.

recipe.add_client_config({
    "tensor_streaming_per_request_timeout": 600,
    "tensor_min_download_timeout": 600,
    "PEER_READ_TIMEOUT": 600,
    "download_complete_timeout": 1800,
    "max_resends": 3,
})

Late Retry Handling for Finished Download Refs

FLARE 2.8.0 makes finished DownloadService refs retry-safe for the same requester. If a client completed a large download but retries because the final EOF response was delayed, the server returns the same terminal status instead of INVALID_REQUEST / no ref found. This is an internal reliability fix and does not require job-code changes, but it is most effective when the subprocess timeouts above are configured consistently for very large models.

Upcoming Main-Branch Changes

Job Clone Deprecation

The nvflare job clone command, the legacy interactive Admin CLI clone_job command, and the Python FLARE API clone_job() method are deprecated for NVFlare 2.10.0. They remain functional during the compatibility period, but cloning copies the stored job artifact without running the client-side signing path. The clone therefore retains the original .__nvfl_sig.json signatures and embedded .__nvfl_submitter.crt certificate, including its signer identity and absolute expiration. Cloning does not renew or replace the original signing certificate.

To retry or retrigger a job, re-export or reuse the original local job folder and submit it with current credentials so the artifact is signed with the current submitter certificate:

nvflare job submit -j JOB_FOLDER

If you no longer have the original local job folder, the clone command remains available during the compatibility period. For a finished job, you can download the job, reuse the job definition automatically extracted from job.zip, and submit that folder with current credentials. Downloading currently requires the job to have finished, so this recovery path does not cover every case supported by cloning.

Job Templates Removed

Job templates are removed. The job_templates directory is no longer part of the repository or the installed package, and the following are removed with it:

  • nvflare job create

  • nvflare job list-templates (alias list_templates)

  • nvflare job show-variables (alias show_variables)

  • nvflare config -jt/--job_templates_dir

Impact:

  • Scripts that call these commands now fail with an invalid-command or invalid-argument error. nvflare job submit is unchanged.

Define jobs with the Job Recipe API instead. Use nvflare recipe list and nvflare recipe show <recipe> to discover recipes, export the job with python job.py --export --export-dir <job_folder>, and submit it with nvflare job submit -j <job_folder>.

HOCON and OmegaConf Config Support Removed

FLARE’s generic configuration loader reads only JSON (.json, with .json.default as the fallback). HOCON (.conf) and OmegaConf (.yml/.yaml) job and site configs are no longer recognized, and pyhocon is no longer a dependency. The CONFIG and core_opt install extras are removed. Provisioning, Kubernetes, local/study_runtime.yaml, and integration test scenario YAML files are not affected; they use separate PyYAML readers. See Configuration Files for the formats used by each configuration type.

Impact:

  • Jobs with HOCON or YAML configs, including stored jobs and jobs submitted by older clients, are rejected. Rewrite their meta, config_fed_server and config_fed_client files as JSON, or re-export them with the Job Recipe API.

  • Hand-written .conf or .yml site configs are ignored. Provisioned site configs are already JSON.

  • CLI settings move from ~/.nvflare/config.conf to ~/.nvflare/config.json. The old file is no longer read; the CLI prints a warning while it exists. Re-register startup kits with nvflare config add <id> <startup-kit-dir> and nvflare config use <id>, and set the POC workspace with nvflare poc config --pw <dir>.

  • nvflare job submit looks only for meta.json and config_fed_*.json.

Legacy Client API Stack Removal

The legacy converter, launcher, agent, exchanger, and pipe APIs have been removed. This includes BaseScriptRunner and ExternalConfigurator in addition to the legacy executor and pipe classes. Migrate client jobs to ClientAPIExecutor using in_process, external_process, or attach mode.

Recipe-level pipe_type and pipe_root_path settings are no longer accepted. Select transport in site comm_config.json instead; the F3 FileDriver remains available as scheme shared-file for an attached trainer. A launched external-process trainer instead requires a clear TCP listener bound to loopback. For custom model representation logic, transform parameters explicitly around flare.receive() and flare.send() or use helpers in nvflare.client.converter_utils.

FLARE API Compatibility Note

On the current main branch, NoConnection now subclasses Python’s built-in ConnectionError instead of directly subclassing Exception.

Impact:

  • Existing code that catches ConnectionError will now also catch NoConnection.

  • Existing code that catches NoConnection continues to work unchanged.

If your application distinguishes FLARE connection failures from broader OS or network exceptions, review any broad except ConnectionError: handlers before upgrading to the next release built from main.

FLARE API Lifecycle Restriction

On the current main branch, Session.shutdown and Session.restart are now restricted to TargetType.SERVER only.

Impact:

  • Existing callers that pass TargetType.ALL or TargetType.CLIENT will now fail.

  • Server-scoped lifecycle control continues to work unchanged.

  • Session.shutdown_system is unchanged and still supports whole-system shutdown.

For whole local PoC lifecycle control, use the PoC start/stop flow instead of the general system admin API.

FLARE API Abort of a Starting Job

On the current main branch, Session.abort_job retries for up to 30 seconds when the server replies that the job is still starting (“is starting; retry abort.”). Previously this reply raised InternalError immediately.

Impact:

  • Callers no longer need their own retry loop around abort_job for a job that was just submitted. This includes the Recipe Run.abort(), the POC and production environments, and the nvflare job abort command.

  • A call can now block for up to 30 seconds before raising if the job is still starting, for example while another thread holds the same Run lock.

  • All other errors, including authorization failures, are raised immediately and are not retried. Existing handlers for them continue to work unchanged.

CLI Startup Kit Resolution Change

On the current main branch, server-connected CLI commands use a shared active startup kit registry in ~/.nvflare/config.json.

Impact:

  • Use nvflare config add <id> <startup-kit-dir> and nvflare config use <id> to register and activate a startup kit.

  • nvflare config -d/--startup_kit_dir remains accepted for compatibility with 2.7.x scripts, but is deprecated.

  • NVFLARE_STARTUP_KIT_DIR remains an automation override and takes precedence over the active registry entry when set.

  • Root nvflare config continues to manage local settings such as the POC workspace. Startup kit paths are managed by the nvflare config subcommands.

If you use shell profiles or CI settings that export NVFLARE_STARTUP_KIT_DIR, review them before upgrading because they override the active registry entry.

CLI Config Flag Compatibility

On the current main branch, nvflare config keeps the 2.7.x POC workspace flag names.

Impact:

  • -pw and --poc_workspace_dir remain the supported flags for setting the POC workspace.

  • The interim development-only --poc.workspace spelling is not part of the public compatibility contract.

If you have older scripts that use -pw or --poc_workspace_dir, they continue to work.

Client Disable Semantics

nvflare system remove-client is not exposed as a supported public CLI command. The legacy interactive-console remove_client command is hidden from normal help and remains a registry cleanup operation only: it releases the active token so the client can register again. It does not stop the client process, revoke credentials, or prevent reconnect.

Use the new durable access-control commands when the intent is to keep a client out of the federation:

  • nvflare system disable-client <client> --force persists a disabled flag in the server workspace, removes any active registry entry, and rejects later registration or heartbeat from that client.

  • nvflare system enable-client <client> --force clears the disabled flag so the client can rejoin on the next registration or heartbeat.

This is operational disablement, not certificate revocation.

Study Name Validation Relaxation

On the current main branch, study names now allow underscores in internal positions, so names such as my_study are valid.

Impact:

  • project.yml validation now accepts study names with internal underscores.

  • Login and study-scoped authorization paths will accept the same names.

If you maintain external validation or naming policy around study identifiers, update those checks to match the new rule before upgrading.

Site Log Configuration Restriction

On the current main branch, Session.configure_site_log and the corresponding nvflare system log-config path now accept only simple log levels and built-in log modes.

Impact:

  • JSON dictConfig payloads are no longer accepted for site-wide log changes.

  • File-path based logging configs are no longer accepted for site-wide log changes.

  • Supported values remain the standard log levels plus built-in modes such as concise, progress, msg_only, full, verbose, and reload.

If you previously used advanced JSON/file-based configs with configure_site_log, switch to the supported level/mode values before upgrading to the next release built from main. For dict-based or file-path logging, use configure_job_log on a running job instead.

POC Start Defaults and Repeatable Selection

On the current main branch, the documented default behavior of nvflare poc start is clarified to reflect the actual runtime behavior: the default start set is the server plus client services, not every participant directory under the workspace.

Impact:

  • Running nvflare poc start with no explicit -p / --service starts the server and clients.

  • Admin consoles are not started unless explicitly selected.

  • -p / --service and -ex / --exclude can be repeated for poc start and poc stop. Earlier versions silently kept only the last value when an option was repeated.

  • poc stop -ex <participant> now leaves each excluded participant running; earlier versions ignored exclusions on the default coordinated shutdown path.

The default-start behavior is a documentation/help clarification. Preserving repeated participant options is new CLI behavior on main.

Upgrading from 2.7.0/2.7.1 to 2.7.2

Recipe API Changes

initial_model renamed to model

The initial_model parameter in all recipes has been renamed to model for clarity:

# Before (2.7.0/2.7.1)
recipe = FedAvgRecipe(
    ...
    initial_model=SimpleNetwork(),
)

# After (2.7.2)
recipe = FedAvgRecipe(
    ...
    model=SimpleNetwork(),
)

The model parameter now also accepts dict-based configuration with optional pretrained checkpoint:

recipe = FedAvgRecipe(
    ...
    model={"path": "my_module.MyModel", "args": {"hidden_size": 256}},
    initial_ckpt="pretrained.pt",
)

PTFedAvgEarlyStopping merged into PTFedAvg

PTFedAvgEarlyStopping has been merged into PTFedAvg with InTime aggregation support. A backward-compatible alias is provided, but new code should use PTFedAvg:

# Before
from nvflare.app_opt.pt.fedavg_early_stopping import PTFedAvgEarlyStopping
controller = PTFedAvgEarlyStopping(...)

# After
from nvflare.app_opt.pt.fedavg import PTFedAvg
controller = PTFedAvg(...)

MONAI Integration

The separate nvflare-monai wheel package is deprecated. Use the Client API directly for MONAI integration. See the updated examples in examples/advanced/monai/ and the MONAI Migration Guide.

New Features (No Migration Required)

The following 2.7.2 features work automatically with no code changes:

  • TensorDownloader: Transparent memory optimization for PyTorch model weight transfer. See FLARE Tensor Downloader.

  • Server-side memory cleanup: Automatic garbage collection and heap trimming. See Memory Management.

Backward Compatibility

  • Job Config API: Existing FedJob-based configurations continue to work alongside the new Recipe API.

  • Config-based Jobs: JSON/YAML configuration-based jobs continue to work as before.

  • Executor/ModelLearner APIs: Still functional but no longer the recommended pattern. Use Recipe API + Client API for new projects.

For the full list of changes, see the What’s New in 2.7.2 release notes.

Upgrading from 2.5/2.6 to 2.7

FLARE 2.7.0 introduced several major changes:

For migrating from the older FLAdminAPI to the Client API, see Migrating to FLARE API.

For the full list of 2.7.0 changes, see What’s New in FLARE v2.7.0.