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

Feature/SK-974 | Add example notebook for tuning of server side hyperparameters #697

Merged
merged 11 commits into from
Sep 12, 2024
10 changes: 6 additions & 4 deletions docs/apiclient.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FEDn comes with an *APIClient* - a Python3 library that can be used to interact
In this tutorial we show how to use the APIClient to initialize the server-side with the compute package and seed models,
run and control training sessions, use different aggregators, and to retrieve models and metrics.

We assume a basic understanding of the FEDn framework, i.e. that the user have taken the Getting Started tutorial: :ref:`quickstart-label`
We assume a basic understanding of the FEDn framework, i.e. that the user has taken the :ref:`quickstart-label` tutorial.

**Installation**

Expand All @@ -20,7 +20,10 @@ The APIClient is available as a Python package on PyPI, and can be installed usi
**Initialize the APIClient to a FEDn Studio project**

The FEDn REST API is available at <controller-host>/api/v1/. To access this API you need the url to the controller-host, as well as an admin API token. The controller host can be found in the project dashboard (top right corner).
To obtain an admin API token, navigate to the "Settings" tab in your Studio project and click on the "Generate token" button. Copy the 'access' token and use it to access the API using the instructions below.
To obtain an admin API token,

#. Navigate to the "Settings" tab in your Studio project and click on the "Generate token" button.
#. Copy the 'access' token and use it to access the API using the instructions below.

.. code-block:: python
Expand All @@ -30,6 +33,7 @@ To obtain an admin API token, navigate to the "Settings" tab in your Studio proj
Alternatively, the access token can be sourced from an environment variable.

.. code-block:: bash
$ export FEDN_AUTH_TOKEN=<access-token>
Then passing a token as an argument is not required.
Expand All @@ -45,8 +49,6 @@ To set the active compute package in the FEDn Studio Project:

.. code:: python
>>> from fedn import APIClient
>>> client = APIClient(host="<controller-host>", token="<access-token>", secure=True, verify=True)
>>> client.set_active_package("package.tgz", helper="numpyhelper")
>>> client.set_active_model("seed.npz")
Expand Down
Loading
Loading