Skip to content

Test federated webapp training - #1230

Merged
ale18V merged 18 commits into
mainfrom
test/federated-webapp-training
Oct 5, 2026
Merged

ale18V merged 18 commits into
mainfrom
test/federated-webapp-training

Conversation

@ale18V

@ale18V ale18V commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

What & why

Part of #1196. Add webapp end-to-end coverage for real federated training with the default Titanic and LUS COVID tasks. Each run drives one browser through the full UI alongside a Node participant and a real Disco server. The tests check participation, training completion, model-sharing progress, and absence of error toasts.

Technical plan

Organize end-to-end training specs under webapp/cypress/e2e/training, with local, federated, and decentralized subdirectories. Ordinary Cypress discovery excludes the dedicated training runs; separate CI jobs select their specs directly. The LUS test uses four epochs and a deterministic, disjoint split of the full image dataset across the two participants. A task-selecting Node peer serves only the model needed by each test.

Deviations from plan

The original Cypress harness and separate config were removed following review; a standalone server/peer process and the existing Cypress config are sufficient. The full LUS dataset is split between participants instead of duplicated on each participant, preserving full-dataset coverage while reducing redundant work. The task-specific package scripts were removed because the CI matrix already selects each federated spec.

Todo

None for this PR. Decentralized and browser-to-browser scenarios remain in stacked #1232 and #1239.

@ale18V
ale18V force-pushed the test/federated-webapp-training branch from 0e4db21 to 2f8bbc6 Compare September 24, 2026 12:37
@ale18V
ale18V changed the base branch from main to 1196-webapp-training-tests-ale September 24, 2026 12:37
@ale18V
ale18V added this pull request to stack #1235 September 24, 2026 13:05
@ale18V
ale18V force-pushed the test/federated-webapp-training branch from 2f8bbc6 to f1dc368 Compare September 24, 2026 20:31
@ale18V
ale18V requested a review from JulienVig September 28, 2026 06:15

@JulienVig JulienVig left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The objective of issue #1196 is to test browser-browser collaboration while the current implementation implements browser-Node.js collaboration. For federated learning this doesn't make a big difference since participants don't directly interact with each other but for decentralized learning the current approach doesn't really address the issue. I'm curious if there was a specific reason that pushed you towards relying on Node.js?

Also, I find the current implementation a bit overkill for what it does, do we actually need such a harness? I've pushed a temporary commit with an alternative implementation that doesn't rely on a harness or a separate cypress config (feel free to remove my commit). Were there cases that couldn't not be addressed in a simpler manner?

Let's discuss these points in tomorrow's meeting!

Comment thread webapp/cypress/collaborative/federated.cy.ts Outdated
Comment thread webapp/cypress/e2e/training/federated/titanic.cy.ts
Comment thread webapp/cypress/tsconfig.json Outdated
@JulienVig
JulienVig force-pushed the test/federated-webapp-training branch from 45fccc4 to 0b5c954 Compare September 28, 2026 13:04
@ale18V
ale18V force-pushed the test/federated-webapp-training branch from 0b5c954 to 1510f8f Compare October 1, 2026 12:06
Base automatically changed from 1196-webapp-training-tests-ale to main October 1, 2026 13:10
@ale18V
ale18V force-pushed the test/federated-webapp-training branch from 1510f8f to dc46423 Compare October 1, 2026 13:10
@ale18V
ale18V requested a review from JulienVig October 5, 2026 07:41

@JulienVig JulienVig left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I noticed that you removed the package.json commands to run the collaborative tests manually, was there a specific reason? I think it would be useful for debugging to be able to run the tests outside of the CI.

Other than that I only have a minor comments, feel free to adapt the suggested comments

Comment thread webapp/cypress/e2e/training/federated/lus_covid.cy.ts Outdated
Comment thread webapp/cypress/e2e/training/federated/lus_covid.cy.ts
Comment thread webapp/cypress/support/federated.ts
Comment thread webapp/cypress.config.ts Outdated
@ale18V

ale18V commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks! I noticed that you removed the package.json commands to run the collaborative tests manually, was there a specific reason? I think it would be useful for debugging to be able to run the tests outside of the CI.

I just wanted to be consistent with the local training PR. Also, the CI has a matrix job, the package.json command was one per task.

I agree it can be useful to have the tests as a command, For each local, federated and decentralized, I can try to add a command testing all tasks maybe

@JulienVig

Copy link
Copy Markdown
Collaborator

Yes could you the commands and document them in contributing.md?

@ale18V

ale18V commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator Author

I looked into it, but it's not as simple as it seems, as we need to start both the peer and the server for the given task. We would need some orchestration to run all tasks with one command.
I added the single command for local training, I will merge this PR and look into it later if we can somehow refactor.
Otherwise an alternative is to just run the command with a default task (e.g titanic)

@ale18V
ale18V merged commit adce108 into main Oct 5, 2026
19 checks passed
@ale18V
ale18V deleted the test/federated-webapp-training branch October 5, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants