ML node model management edge cases #461
Context
For each mlnode a participant can configure a list of models it supports, it’s done via node management admin API (or via node-config.json, but only on the first run of the api container).
Nodes are reported to the chain as HardwareNode proto’s via MsgSubmitHardwareDiff transactions.
During each PoC chain, assign a model to each participating mlnode; it should be a model that’s both a governance model (on-chain list) and a node-supported model (admin config). In decentralized-api this assigned model is stored in node state: NodeState.EpochModel
Admin config model changes tasks
We need to make sure model changes are handled correctly:
- A participant changes a list of models their mlnode supports during the Inference phase
- Make sure the initially assigned
EpochModelis being served to the end of the epoch - Edge case 1: make sure the right
EpochModelis served even if we restart the api container, meaning that api should fetchEpochModel - Edge case 2: make sure the right
EpochModelis being served during PoC if a node is allocated to serve inference during PoC - Make sure that starting next epoch, we serve a different model, supported by the admin config list
Questions:
- What should we do and when should we switch models if it were the only mlnode serving a particular model?
- What if we switch too early, and we will have missed validations because of it?
MLNode disabled tasks
Participants can disable their nodes via /admin/v1/nodes/:id/disable endpoint. We need to make sure the behavior is as desired:
- MLnode continues to serve Inference until the start of the next epoch
- MLnode serves inference during PoC if it was allocated to do so
- Mlnode participates in PoC batch validation if it wasn’t allocated to serve inference during PoC, but it should generate batches itself!
- When a new epoch starts, the node just sits disabled, but in the Inference state with one of the models listed in the config. Participants can later delete it completely. Question: let’s choose the least presented model?
Important
The same edge case could happen, it was the only node serving a particular model, and we may need to run validations on it before claimReward
💬 Comments (1)
🔄 Auto-synced from Issue #461 every hour.
Postponing and closing for now.