Skip to content

test(webapp): cover decentralized browser training - #1232

Open
ale18V wants to merge 4 commits into
test/federated-webapp-trainingfrom
test/decentralized-webapp-ci
Open

ale18V wants to merge 4 commits into
test/federated-webapp-trainingfrom
test/decentralized-webapp-ci

Conversation

@ale18V

@ale18V ale18V commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

What & why

This PR implements the decentralized portion of #1196 with an end-to-end webapp test for the default MNIST task. A Chrome browser trains with two Node participants over real WebRTC connections. The test also exposed a DiscoJS race that could label outgoing weights with the next aggregation round and leave peers waiting indefinitely; this PR fixes that race.

Technical plan

A dedicated Cypress job starts a real Disco server and two Node participants, then drives the browser through collaborative training. All three participants use the repository's compact CIFAR image fixture as image input for the MNIST task, assigning the images to digit label 0. The test checks completion of all epochs and model-sharing rounds, and waits for the Node peers to close during teardown. DiscoJS captures the aggregation round once for each payload exchange so concurrent arrivals cannot change outgoing message labels.

Deviations from plan

The test uses the existing 24-image CIFAR fixture rather than MNIST samples. It validates image preprocessing, browser-to-Node WebRTC, and model sharing, rather than classification quality or multiclass MNIST accuracy. The CI run also revealed the aggregation-round race, which is fixed in this PR because it prevented reliable completion.

Todo

None.

@ale18V
ale18V marked this pull request as ready for review September 23, 2026 21:41
@ale18V
ale18V force-pushed the test/decentralized-webapp-ci branch from 52131a5 to 73e9130 Compare September 24, 2026 12:38
@ale18V
ale18V added this pull request to stack #1235 September 24, 2026 13:05
@ale18V
ale18V force-pushed the test/decentralized-webapp-ci branch from 73e9130 to 194a7c6 Compare September 24, 2026 20:31
@ale18V
ale18V requested a review from JulienVig September 28, 2026 09:56

@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.

cf. review for #1230, current implementation doesn't test browser-browser collaboration

This branch has not been deployed

No deployments
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