Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/user-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)).
Expand Down
21 changes: 14 additions & 7 deletions docs/user-guide/workflow-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
}
```

Expand Down
11 changes: 8 additions & 3 deletions e2e/examples.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () =>
Expand All @@ -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",
],
}),
},
},
Expand Down
6 changes: 4 additions & 2 deletions e2e/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
},
},
},
];
Expand Down
6 changes: 4 additions & 2 deletions src/lib/examples.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
},
},
]);
});
Expand Down
10 changes: 6 additions & 4 deletions src/lib/examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
*/
Expand Down Expand Up @@ -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",
Comment thread
sourcery-ai[bot] marked this conversation as resolved.
Resolved
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"],
Comment thread
sourcery-ai[bot] marked this conversation as resolved.
Resolved
},
},
},
];
Expand Down