Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
Flower Framework
Logo
main

튜토리얼

  • 연합 학습이란 무엇입니까?
  • Get started with Flower
  • Use a federated learning strategy
  • Build a strategy from scratch
  • Customize the client
  • 빠른 시작 튜토리얼
    • Quickstart PyTorch
    • Quickstart TensorFlow
    • Quickstart MLX
    • Quickstart 🤗 Transformers
    • Quickstart JAX
    • Quickstart Pandas
    • Quickstart fastai
    • Quickstart PyTorch Lightning
    • Quickstart scikit-learn
    • Quickstart XGBoost
    • Quickstart Android
    • Quickstart iOS

How-to Guides

  • Build
    • Flower 설치
    • Configure Clients
    • Design stateful ClientApps
    • 전략 사용하기
    • 전략 구현
    • 종합 평가 결과
    • Save and Load Model Checkpoints
    • 기본 제공 모드 사용
    • 차분 개인정보 보호 사용
    • Implement FedBN
    • Use CLI JSON output
    • Flower 1.0으로 업그레이드
    • Upgrade to Flower 1.13
  • Simulate
    • 시뮬레이션 실행
  • Deploy
    • Run Flower with the Deployment Engine
    • Enable TLS connections
    • SuperNodes 인증하기
    • Configure logging
    • Run Flower on Azure
    • Docker를 사용하여 Flower 실행
      • Quickstart with Docker
      • Enable TLS for Secure Connections
      • Persist the State of the SuperLink
      • Set Environment Variables
      • Run with Root User Privileges
      • Run ServerApp or ClientApp as a Subprocess
      • Pin a Docker Image to a Specific Version
      • Use a Different Flower Version
      • Quickstart with Docker Compose
      • Run Flower Quickstart Examples with Docker Compose
      • Deploy Flower on Multiple Machines with Docker Compose

설명

  • 연합 평가
  • 차등 프라이버시
  • Flower 아키텍처

참조

  • Reference
    • flwr
      • 클라이언트
        • start_client
        • start_numpy_client
        • 클라이언트
        • 클라이언트앱
        • NumPyClient
        • mod
          • adaptiveclipping_mod
          • arrays_size_mod
          • fixedclipping_mod
          • make_ffn
          • message_size_mod
          • secagg_mod
          • secaggplus_mod
          • LocalDpMod
      • 공통
        • array_from_numpy
        • bytes_to_ndarray
        • 구성
        • 이벤트
        • 로그
        • ndarray_to_bytes
        • ndarrays_to_parameters
        • now
        • parameters_to_ndarrays
        • 배열
        • ArrayRecord
        • 클라이언트 메시지
        • 코드
        • Config
        • ConfigRecord
        • 컨피그 레코드
        • 컨텍스트
        • 연결 해제
        • 오류
        • 평가
        • EvaluateRes
        • 이벤트 타입
        • FitIns
        • FitRes
        • GetParametersIns
        • GetParametersRes
        • GetPropertiesIns
        • GetPropertiesRes
        • Message
        • MessageType
        • MessageTypeLegacy
        • Metadata
        • MetricRecord
        • Metrics
        • MetricsRecord
        • NDArray
        • NDArrays
        • 파라미터
        • ParametersRecord
        • Properties
        • ReconnectIns
        • RecordDict
        • RecordSet
        • ServerMessage
        • Status
      • 서버
        • start_server
        • ClientManager
        • Driver
        • Grid
        • History
        • LegacyContext
        • Server
        • ServerApp
        • ServerAppComponents
        • ServerConfig
        • SimpleClientManager
        • strategy
          • Bulyan
          • DPFedAvgAdaptive
          • DPFedAvgFixed
          • DifferentialPrivacyClientSideAdaptiveClipping
          • DifferentialPrivacyClientSideFixedClipping
          • DifferentialPrivacyServerSideAdaptiveClipping
          • DifferentialPrivacyServerSideFixedClipping
          • FaultTolerantFedAvg
          • FedAdagrad
          • FedAdam
          • FedAvg
          • FedAvgAndroid
          • FedAvgM
          • FedMedian
          • FedOpt
          • FedProx
          • FedTrimmedAvg
          • FedXgbBagging
          • FedXgbCyclic
          • FedXgbNnAvg
          • FedYogi
          • Krum
          • QFedAvg
          • Strategy
        • workflow
          • DefaultWorkflow
          • SecAggPlusWorkflow
          • SecAggWorkflow
      • simulation
        • run_simulation
        • run_simulation_process
        • start_simulation
        • SimulationIoConnection
    • Flower CLI 참조
    • Example projects
    • Telemetry
    • Changelog
    • Flower Network Communication
    • Exit Codes
      • [0] SUCCESS
      • [1] GRACEFUL_EXIT_SIGINT
      • [2] GRACEFUL_EXIT_SIGQUIT
      • [3] GRACEFUL_EXIT_SIGTERM
      • [100] SUPERLINK_THREAD_CRASH
      • [300] SUPERNODE_REST_ADDRESS_INVALID
      • [301] SUPERNODE_NODE_AUTH_KEYS_REQUIRED
      • [302] SUPERNODE_NODE_AUTH_KEYS_INVALID
      • [600] COMMON_ADDRESS_INVALID
      • [601] COMMON_MISSING_EXTRA_REST
      • [602] COMMON_TLS_NOT_SUPPORTED
    • 자주 묻는 질문

기여자 문서

  • Contribute
    • GitHub에서 기여하기
    • 기여자로 시작하기
    • 개발 버전 설치하기
    • 가상 환경 설정
    • VSCode Dev Container에서 개발
    • 문서 작성
    • Flower 릴리즈 하기
    • 번역 기여
    • How to Build Docker Flower Images Locally
    • Public and private APIs
    • 훌륭한 첫 번째 기여
    • Secure Aggregation 프로토콜
  • v1.8.0
  • v1.9.0
  • v1.10.0
  • v1.11.0
  • v1.11.1
  • v1.12.0
  • v1.13.0
  • v1.13.1
  • v1.14.0
  • v1.15.0
  • v1.15.1
  • v1.15.2
  • v1.16.0
  • v1.17.0
  • v1.18.0
  • main
🇬🇧 🇫🇷 🇨🇳 🇰🇷
Back to top
View this page

Persist the State of the SuperLink¶

By default, the Flower SuperLink keeps its state in-memory. When using the Docker flag --rm, the state is not persisted between container starts.

If you want to persist the state of the SuperLink on your host system, all you need to do is specify a directory where you want to save the file on your host system and a name for the database file.

By default, the SuperLink container runs with a non-root user called app with the user ID 49999. When working with Docker on Linux, it is recommended to create a new directory and set the user ID to 49999 to ensure the mounted directory has the proper permissions.

If you later want to delete the directory, you can change the user ID back to the current user ID by running sudo chown -R $USER:$(id -gn) state.

예시¶

In the example below, we create a new directory called state, change the user ID and tell Docker via the flag --volume to mount the local state directory into the /app/state directory of the container. Lastly, we use the flag --database to specify the name of the database file.

$ mkdir state
$ sudo chown -R 49999:49999 state
$ docker run --rm \
     --volume ./state/:/app/state flwr/superlink:1.18.0 \
     --database state.db \
     <additional-args>

As soon as the SuperLink starts, the file state.db is created in the state directory on your host system. If the file already exists, the SuperLink tries to restore the state from the file. To start the SuperLink with an empty database, ensure that there is no database called state.db in the state directory (rm state.db) before you execute the docker run command above.

Next
Set Environment Variables
Previous
Enable TLS for Secure Connections
Copyright © 2025 Flower Labs GmbH
Made with Sphinx and @pradyunsg's Furo
On this page
  • Persist the State of the SuperLink
    • 예시