diff --git a/docs/user-guide/index.md b/docs/user-guide/index.md index 6045cc5..fc2f7ce 100644 --- a/docs/user-guide/index.md +++ b/docs/user-guide/index.md @@ -41,9 +41,10 @@ Your name in the sidebar opens a menu with your e-mail address and (workflow type `NVFLARE`, version `2.9`). Choose that service under **Workflows**, choose the workflow type `NVFLARE` and version `2.9`, enter the name of one of its jobs as the workflow URL (e.g. - `logreg-fedavg`) and the sites as parameters, e.g. - `{"sites": ["site-1", "site-2"]}`; or use the **Federated learning** - example. Follow the run to `COMPLETE`; its details list the outputs, + `logreg-fedavg-4`) and the sites as parameters, e.g. + `{"sites": ["tesk-fi", "tesk-cz", "poiesis-fi", "poiesis-cz"]}`; or use + the **Federated learning** example. Follow the run to `COMPLETE`; its + details list the outputs, such as the path of the trained global model, which Krini can't download yet (see [Federated learning](workflow-examples.md#federated-learning)). diff --git a/docs/user-guide/workflow-examples.md b/docs/user-guide/workflow-examples.md index 99a9cfa..f5b7758 100644 --- a/docs/user-guide/workflow-examples.md +++ b/docs/user-guide/workflow-examples.md @@ -100,23 +100,30 @@ a workflow with one task, which greets the name it gets as its only input ## Federated learning -**Federated learning**: the demo job `logreg-fedavg` of the NVFlare hub of -[nvflare-wes-testbed](https://github.com/elixir-cloud-aai/nvflare-wes-testbed), -which trains a logistic regression model at two sites and averages it +**Federated learning**: the demo job `logreg-fedavg-4` of the NVFlare hub +of [nvflare-wes-testbed](https://github.com/elixir-cloud-aai/nvflare-wes-testbed), +which trains a logistic regression model at four sites and averages it (federated averaging). A federated learning run is a WES run like any other: the workflow type is `NVFLARE`, version `2.9`, the workflow URL is the name of a job that the hub offers, and the parameters name the sites (as many as the job takes; the hub's service info lists its sites under `tags`). The form offers this example only for services that run -`NVFLARE` 2.9. Its sites, `site-1` and `site-2`, are those of the hub of -ELIXIR On-Cloud; for a hub with other sites, change them. +`NVFLARE` 2.9. Its sites are those of the hub of ELIXIR On-Cloud: the +TESK (`tesk-fi`, `tesk-cz`) and Poiesis (`poiesis-fi`, `poiesis-cz`) +deployments of two Nodes, Finland and the Czech Republic, so the run uses +two TES implementations at two Nodes, each site with its own share of the +synthetic test data. For a hub with other sites, change them, and choose +the job for that number of sites (`logreg-fedavg` for two, +`logreg-fedavg-3` for three). ```json { - "workflow_url": "logreg-fedavg", + "workflow_url": "logreg-fedavg-4", "workflow_type": "NVFLARE", "workflow_type_version": "2.9", - "workflow_params": { "sites": ["site-1", "site-2"] } + "workflow_params": { + "sites": ["tesk-fi", "tesk-cz", "poiesis-fi", "poiesis-cz"] + } } ``` diff --git a/e2e/examples.spec.ts b/e2e/examples.spec.ts index fcb9832..c5303cd 100644 --- a/e2e/examples.spec.ts +++ b/e2e/examples.spec.ts @@ -118,7 +118,7 @@ test.describe("members", () => { page.getByRole("textbox", { name: "https://example.com/workflow.cwl", }), - ).toHaveValue("logreg-fedavg"); + ).toHaveValue("logreg-fedavg-4"); await page.getByRole("button", { name: "Submit Run" }).click(); const submissions = async () => @@ -132,11 +132,16 @@ test.describe("members", () => { path: "/runs", authorization: `Bearer ${token}`, fields: { - workflow_url: "logreg-fedavg", + workflow_url: "logreg-fedavg-4", workflow_type: "NVFLARE", workflow_type_version: "2.9", workflow_params: JSON.stringify({ - sites: ["site-1", "site-2"], + sites: [ + "tesk-fi", + "tesk-cz", + "poiesis-fi", + "poiesis-cz", + ], }), }, }, diff --git a/e2e/settings.ts b/e2e/settings.ts index 9b1ab4a..4e47917 100644 --- a/e2e/settings.ts +++ b/e2e/settings.ts @@ -51,10 +51,12 @@ const workflowExamples = [ { name: "Federated learning", run: { - workflow_url: "logreg-fedavg", + workflow_url: "logreg-fedavg-4", workflow_type: "NVFLARE", workflow_type_version: "2.9", - workflow_params: { sites: ["site-1", "site-2"] }, + workflow_params: { + sites: ["tesk-fi", "tesk-cz", "poiesis-fi", "poiesis-cz"], + }, }, }, ]; diff --git a/src/lib/examples.test.ts b/src/lib/examples.test.ts index 3b3e3c0..23e9aa9 100644 --- a/src/lib/examples.test.ts +++ b/src/lib/examples.test.ts @@ -367,10 +367,12 @@ describe("workflowExamples", () => { ).map((val) => val.run); expect(runs).toEqual([ { - workflow_url: "logreg-fedavg", + workflow_url: "logreg-fedavg-4", workflow_type: "NVFLARE", workflow_type_version: "2.9", - workflow_params: { sites: ["site-1", "site-2"] }, + workflow_params: { + sites: ["tesk-fi", "tesk-cz", "poiesis-fi", "poiesis-cz"], + }, }, ]); }); diff --git a/src/lib/examples.ts b/src/lib/examples.ts index 7eacfa1..f2530e5 100644 --- a/src/lib/examples.ts +++ b/src/lib/examples.ts @@ -138,7 +138,7 @@ const DEFAULT_TASK_EXAMPLES: TaskExample[] = [ * The built-in workflows: one per language that Conquest runs, from public * GitHub repositories at a full commit SHA, as Conquest requires * (`revision`), without inputs; and the demo job of the NVFlare hub of - * nvflare-wes-testbed, a federated learning run at two sites (the hub's + * nvflare-wes-testbed, a federated learning run at four sites (the hub's * WES takes the name of a job in its image as the workflow URL, and the * sites in the parameters) */ @@ -188,12 +188,14 @@ const DEFAULT_WORKFLOW_EXAMPLES: WorkflowExample[] = [ { name: "Federated learning", description: - "NVFlare demo job logreg-fedavg: trains a model at two sites with federated averaging", + "NVFlare demo job logreg-fedavg-4: trains a model at four sites with federated averaging", run: { - workflow_url: "logreg-fedavg", + workflow_url: "logreg-fedavg-4", workflow_type: "NVFLARE", workflow_type_version: "2.9", - workflow_params: { sites: ["site-1", "site-2"] }, + workflow_params: { + sites: ["tesk-fi", "tesk-cz", "poiesis-fi", "poiesis-cz"], + }, }, }, ];