flip_api.db.seed.fl_kit_slots
Attributes
Functions
|
Extract the trailing integer from a slot name ( |
|
Populate the |
Module Contents
- flip_api.db.seed.fl_kit_slots._SLOT_NUMBER_RE
- flip_api.db.seed.fl_kit_slots._slot_number(slot_name: str) int
Extract the trailing integer from a slot name (
Trust_007→7).Slots are conventionally named with a trailing
_<N>so the Flower side can pick a per-supernode key with the matchingsupernode_credentials_<N>suffix. Falls back to 0 for slot names without a trailing integer — those still work for NVFLARE (which only cares about the directory name) but break Flower’s per-slot key lookup.
- flip_api.db.seed.fl_kit_slots.seed_fl_kit_slots(session: sqlmodel.Session) None
Populate the
fl_kit_slotpool fromFL_KIT_SLOT_NAMES.Inserts one row per configured slot name if not already present. Never deletes, re-assigns, or un-assigns rows — operators rely on the assignment table to be stable across restarts.
register_trustclaims a free slot atomically when a trust is registered, so the seed has no slot→trust binding to do.- Parameters:
session (Session) – The SQLModel session used for reads and inserts.