Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Middleware #2580

Merged
merged 124 commits into from
Dec 19, 2023
Merged
Changes from 1 commit
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
4886c77
Decouple client and app
danieljanes Sep 19, 2023
fb8ba3d
Merge branch 'main' into decouple-client
danieljanes Sep 28, 2023
fca2187
Merge branch 'main' into decouple-client
danieljanes Oct 13, 2023
5e5fec6
Merge branch 'main' into decouple-client
danieljanes Oct 14, 2023
c3e82b7
Merge branch 'main' into decouple-client
danieljanes Oct 16, 2023
1223f90
Shorten line
danieljanes Oct 16, 2023
555d89a
Merge branch 'main' into decouple-client
danieljanes Oct 25, 2023
a7c57d6
Add comments to main client loop
danieljanes Oct 25, 2023
9a20a0c
Refactor start_client
danieljanes Oct 30, 2023
d65601b
Merge branch 'main' into decouple-client
danieljanes Oct 30, 2023
82df0a3
Merge branch 'refactor-start-client' into decouple-client
danieljanes Oct 30, 2023
32e4973
Format code
danieljanes Oct 30, 2023
11bf509
Add type hint
danieljanes Oct 30, 2023
d097096
Merge branch 'refactor-start-client' into decouple-client
danieljanes Oct 30, 2023
a1a647a
Test with Iterator
charlesbvll Oct 30, 2023
ce2bbb8
Working solution (I think)
charlesbvll Oct 30, 2023
7617335
Fix imports
charlesbvll Oct 30, 2023
d9a7318
Merge branch 'refactor-start-client' into decouple-client
danieljanes Oct 30, 2023
46acb9d
Merge branch 'main' into decouple-client
danieljanes Oct 30, 2023
e61c91a
Merge branch 'main' into decouple-client
danieljanes Nov 1, 2023
156aad0
Move task execution into Flower app
danieljanes Nov 4, 2023
a47a760
Enable --app in flower-client
danieljanes Nov 4, 2023
77bfc04
Merge branch 'main' into decouple-client
danieljanes Nov 4, 2023
90058f9
Add comments to start_client
danieljanes Nov 4, 2023
86c1473
Handle control messages in a separate function
danieljanes Nov 4, 2023
9bc1349
Change comment
danieljanes Nov 4, 2023
ee87393
Merge branch 'refactor-start-client-comments' into refactor-start-cli…
danieljanes Nov 4, 2023
1691340
Update comments
danieljanes Nov 4, 2023
7d732e9
Update comments
danieljanes Nov 4, 2023
9f6472f
Format
danieljanes Nov 4, 2023
7e72fda
Merge branch 'refactor-start-client-comments' into refactor-start-cli…
danieljanes Nov 4, 2023
270b322
Merge branch 'refactor-start-client-control-message' into decouple-cl…
danieljanes Nov 5, 2023
c92ea66
Remove exception typing
danieljanes Nov 6, 2023
10ed750
Merge branch 'main' into refactor-start-client-control-message
danieljanes Nov 6, 2023
e37d2bf
Update message handler
danieljanes Nov 6, 2023
3d84159
Update tests
danieljanes Nov 6, 2023
58c2d96
Merge branch 'refactor-start-client-control-message' into decouple-cl…
danieljanes Nov 6, 2023
78356d0
Remove early exit
danieljanes Nov 6, 2023
7812c42
Return DisconnectRes to the server
danieljanes Nov 6, 2023
f30b014
Update tests
danieljanes Nov 6, 2023
5cf817b
Merge branch 'refactor-start-client-control-message' into decouple-cl…
danieljanes Nov 6, 2023
27f7099
Remove data field from Fwd/Bwd
danieljanes Nov 6, 2023
ebbb8d5
Remove Fwd/Bwd
danieljanes Nov 6, 2023
6bce092
Merge branch 'main' into decouple-client
danieljanes Nov 6, 2023
4a67ba0
Add type annotations
danieljanes Nov 6, 2023
61926b1
Merge branch 'main' into decouple-client
danieljanes Nov 6, 2023
0d3ad20
Merge branch 'main' into decouple-client
danieljanes Nov 6, 2023
daca6bc
Replace dict with WorkloadState
danieljanes Nov 6, 2023
37c74ac
Format
danieljanes Nov 6, 2023
faf5b47
Merge branch 'main' into decouple-client
danieljanes Nov 6, 2023
9b71c87
Merge branch 'main' into decouple-client
danieljanes Nov 6, 2023
dc5e7ce
Move Flower callable and run_client
danieljanes Nov 6, 2023
9cd55b7
Merge branch 'main' into decouple-client
danieljanes Nov 7, 2023
26a2245
Resolve merge conflict
danieljanes Nov 7, 2023
80b3cf2
Merge branch 'main' into decouple-client
danieljanes Nov 7, 2023
19e126b
Merge branch 'main' into decouple-client
danieljanes Nov 7, 2023
a7729ac
init
panh99 Nov 7, 2023
436ff40
add toy example
panh99 Nov 8, 2023
0d274da
Merge branch 'main' into decouple-client
danieljanes Nov 8, 2023
b6dfe7f
add doc
panh99 Nov 9, 2023
a21a0aa
add middleware.rst
panh99 Nov 9, 2023
d7a7752
Merge branch 'main' into decouple-client
danieljanes Nov 10, 2023
383f6ae
Add custom function to load Flower callable
danieljanes Nov 10, 2023
74f5959
Merge branch 'decouple-client' into middleware
panh99 Nov 11, 2023
aadfb19
update signature
panh99 Nov 11, 2023
c5f89c6
Merge branch 'main' into middleware
panh99 Nov 14, 2023
45a31df
update flower callable and fix cyclic imports
panh99 Nov 14, 2023
7976dbc
Add type annotation
danieljanes Nov 15, 2023
bad7f1f
Merge branch 'main' into decouple-client
danieljanes Nov 15, 2023
445b2f1
Merge branch 'decouple-client' into middleware
panh99 Nov 16, 2023
6753aab
amend doc
panh99 Nov 16, 2023
d748c18
Merge branch 'main' into middleware
panh99 Nov 16, 2023
90667e3
Merge branch 'main' into decouple-client
panh99 Nov 16, 2023
6613b87
Merge branch 'decouple-client' into middleware
panh99 Nov 16, 2023
c996328
Merge branch 'main' into decouple-client
danieljanes Nov 21, 2023
9a3cbfc
Merge branch 'decouple-client' of github.com:adap/flower into decoupl…
danieljanes Nov 21, 2023
65b4369
Remove --grpc-rere
danieljanes Nov 21, 2023
1107cad
Create mt-pytorch-app example
danieljanes Nov 21, 2023
22b5159
Reset quickstart-pytorch example
danieljanes Nov 21, 2023
ec6fcfc
Remove how-to-deploy doc
danieljanes Nov 21, 2023
c3dae4a
Rename --app to --callable
danieljanes Nov 21, 2023
77b2313
Rename mt-pytorch-app to mt-pytorch-callable
danieljanes Nov 21, 2023
edbe3cc
Finish renaming to callable
danieljanes Nov 21, 2023
81c13e3
Update docstring
danieljanes Nov 21, 2023
20f6f59
Rename callable to flower
danieljanes Nov 21, 2023
29e0c5a
Merge branch 'main' into decouple-client
danieljanes Nov 21, 2023
a1c6f64
Use experimental feature warning
danieljanes Nov 21, 2023
44c0129
Add README to mt-pytorch-callable
danieljanes Nov 21, 2023
b38226e
Merge branch 'main' into decouple-client
danieljanes Nov 21, 2023
578df87
Merge branch 'main' into decouple-client
danieljanes Nov 21, 2023
f05bd45
Merge branch 'decouple-client' into middleware
panh99 Nov 22, 2023
e3515a5
Merge branch 'main' into middleware
panh99 Nov 24, 2023
d0cc1f1
fix conflicts
panh99 Nov 24, 2023
45105f5
fix conflicts
panh99 Nov 24, 2023
fa3bf2c
update flower.py
panh99 Nov 24, 2023
6ffdb12
Merge branch 'main' into middleware
panh99 Nov 27, 2023
58aec35
fix cyclic import
panh99 Nov 27, 2023
f45cd97
use the same workload state in Fwd/Bwd
panh99 Nov 27, 2023
ae93cd9
Merge branch 'main' into middleware
panh99 Nov 27, 2023
0cbe49e
Merge branch 'main' into middleware
panh99 Nov 29, 2023
a3bb7ed
Merge branch 'main' into middleware
panh99 Nov 29, 2023
5d954af
update to main
panh99 Nov 29, 2023
3cc442a
update how-to tutorial
panh99 Nov 29, 2023
b214eb9
Merge branch 'main' into middleware
panh99 Nov 30, 2023
c4de6d6
Merge branch 'main' into middleware
panh99 Nov 30, 2023
8d97459
Merge branch 'middleware' of https://github.com/adap/flower into midd…
panh99 Nov 30, 2023
3861fb6
Update doc/source/how-to-use-middleware.rst
panh99 Nov 30, 2023
9a825ba
Update doc/source/how-to-use-middleware.rst
panh99 Nov 30, 2023
d4a9f7d
use FlowerCallable instead of App
panh99 Dec 1, 2023
2df4116
rename make_app to make_fc
panh99 Dec 1, 2023
2d1b983
fix typo
panh99 Dec 1, 2023
d897fe8
update naming
panh99 Dec 1, 2023
b8f25cd
Merge branch 'main' into middleware
panh99 Dec 1, 2023
c8fed7f
update tutorial
panh99 Dec 4, 2023
0f15a30
Merge branch 'middleware' of https://github.com/adap/flower into midd…
panh99 Dec 4, 2023
dba7c42
fix format
panh99 Dec 4, 2023
8daac9b
Merge branch 'main' into middleware
panh99 Dec 4, 2023
06d29c5
Merge branch 'main' into middleware
panh99 Dec 15, 2023
7088d8b
Merge branch 'main' into middleware
panh99 Dec 15, 2023
cb55d5d
Merge branch 'main' into middleware
panh99 Dec 18, 2023
d71f4e6
Update MW doc
panh99 Dec 19, 2023
8cd988b
update naming
panh99 Dec 19, 2023
69f40ab
Merge branch 'main' into middleware
panh99 Dec 19, 2023
1946484
Merge branch 'main' into middleware
danieljanes Dec 19, 2023
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
Prev Previous commit
Next Next commit
Update doc/source/how-to-use-middleware.rst
Co-authored-by: Daniel J. Beutel <daniel@flower.dev>
  • Loading branch information
panh99 and danieljanes authored Nov 30, 2023
commit 3861fb63d15e624c63861ba280ae1b6ada4ab5c3
1 change: 1 addition & 0 deletions doc/source/how-to-use-middleware.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ What is Middleware?
Middleware is a callable that wraps around an application. It can manipulate or inspect incoming tasks (``TaskIns``) in the ``Fwd`` and the resulting tasks (``TaskRes``) in the ``Bwd``. The signature for a middleware layer (``Layer``) is as follows:

.. code-block:: python
panh99 marked this conversation as resolved.
Show resolved Hide resolved

APP = Callable[[Fwd], Bwd]
panh99 marked this conversation as resolved.
Show resolved Hide resolved
Layer = Callable[[Fwd, App], Bwd]

Expand Down