-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/SK-1220 | Update server-functions readme (#756)
- Loading branch information
1 parent
83fe388
commit 58ec837
Showing
1 changed file
with
25 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,31 @@ | ||
FEDn Project: Server functions toy example | ||
----------------------------- | ||
|
||
See server_functions.py for details. | ||
Beta useage will be available by request from FEDn 0.20.0 and onward. | ||
|
||
README Will be updated after studio update. | ||
See server_functions.py for details on server-functionality can be supplied. | ||
|
||
To run with server functions: | ||
To apply server-functionality in studio first connect to your project through the APIClient. | ||
|
||
from server_functions import ServerFunctions | ||
client.start_session(server_functions=ServerFunctions) | ||
See https://docs.scaleoutsystems.com/en/stable/apiclient.html for more information. | ||
|
||
When connected to the project API you can start sessions with your supplied server functions. | ||
|
||
Full commands to run through the API client: | ||
|
||
Get your token from the settings page in your studio project and add it in your system environment. | ||
|
||
.. code-block:: | ||
export FEDN_AUTH_TOKEN=<access token> | ||
Connect through the APIClient from a python instance, you can find your controller host on the studio Dashboard page. | ||
|
||
.. code-block:: | ||
from fedn import APIClient | ||
client = APIClient(host="<controller-host>", secure=True, verify=True) | ||
Start a session with your ServerFunctions code (assuming you have uploaded a model seed, compute package and have connected clients). | ||
|
||
.. code-block:: | ||
from server_functions import ServerFunctions | ||
client.start_session(server_functions=ServerFunctions) |