From 9d9a9688c05d95dc0ad7e942dea23d15da1dd65d Mon Sep 17 00:00:00 2001 From: Dmitry Agapov Date: Tue, 5 Apr 2022 09:08:59 +0300 Subject: [PATCH] Diagrams --- docs/mermaid/director_aggregator.mmd | 22 +++++++++++ docs/mermaid/director_envoy.mmd | 55 ++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 docs/mermaid/director_aggregator.mmd create mode 100644 docs/mermaid/director_envoy.mmd diff --git a/docs/mermaid/director_aggregator.mmd b/docs/mermaid/director_aggregator.mmd new file mode 100644 index 0000000000..69cf6f11df --- /dev/null +++ b/docs/mermaid/director_aggregator.mmd @@ -0,0 +1,22 @@ +sequenceDiagram + participant D as Director + participant A as Aggregator + rect rgb(0, 255, 0,.1) + Note over D: An Experiment's start + D->>D: Get next experiment
from Experiment Registry + opt Docker specific logic + D->>D: Create aggregator docker build
context from experiment workspace.
(Add Dockerfile and execution script
to context specific for aggregator) + D->>D: Build aggregator docker image + D->>D: Create aggregator docker container + D->>D: Run aggregator docker container + D->>D: Monitor aggregator docker container + end + loop every round + A->>D: Send last/best model to director + D->>D: Save model on director + end + opt Docker specific logic + D->>D: Delete aggregator docker container
when experiment was finished + end + end + Note over D: The Experiment ended.
The Federation keeps existing. \ No newline at end of file diff --git a/docs/mermaid/director_envoy.mmd b/docs/mermaid/director_envoy.mmd new file mode 100644 index 0000000000..00bda8ac0e --- /dev/null +++ b/docs/mermaid/director_envoy.mmd @@ -0,0 +1,55 @@ +sequenceDiagram + participant N as NoteBook + participant D as Director + participant E as Envoy + rect rgb(0, 255, 0,.1) + Note over D,E: A Federation startup process + D->D: Starts + E->E: Adapting a dataset + E->E: Starts + Note over D,E: Exchange certs + E-->>D: Connects using FQDN and pwd + E-->>D: Communicates dataset info to + D-->D: Keeps a list of connected Envoys + D-->D: Ensures unified data interface + end + Note over D,E: We consider a Federation set up + rect rgb(0, 255, 0,.1) + Note over N,D: Create new experiment + N->>N: Prepare experiment in Notebook + N->>N: Connect to federation + N->>N: Run experiment + N->>D: Send Experiment workspace + D->>D: Create new experiment + D->>D: Add experiment to regestry + end + rect rgb(0, 255, 0,.1) + Note over D,E: An Experiment's start + D->>D: Get next experiment
from Experiment Registry + opt Docker specific logic + D->>D: Create aggregator docker build
context from experiment workspace.
(Add Dockerfile and execution script
to context specific for aggregator) + D->>D: Build aggregator docker image + D->>D: Create aggregator docker container + D->>D: Run aggregator docker container + D->>D: Monitor aggregator docker container + end + E->>D: WaitExperiment + D-->>E: Send Experiment name + E->>D: GetExperimentData(experiment_name) + D-->>E: Send Experiment workspace + opt Docker specific logic + E->>E: Create collaborator docker build
context from Experiment workspace.
(Add Dockerfile and execution script
to context specific for collaborator) + E->>E: Build collaborator docker image + E->>E: Create collaborator docker container + E->>E: Run collaborator docker container + E->>E: Monitor collaborator docker container + end + Note over D,E: Wait for last round finished + opt Docker specific logic + E->>E: Delete collaborator docker container
when experiment was finished + D->>D: Delete aggregator docker container
when experiment was finished + end + end + N->>D: Get best model + D-->>N: Send best model + Note over D,E: The Experiment ended.
The Federation keeps existing. \ No newline at end of file