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-728 | Move Studio docs to Fedn docs #555

Merged
merged 16 commits into from
Apr 4, 2024
Merged

Conversation

niklastheman
Copy link
Contributor

Move Studio docs to Fedn docs

  • Added Studio docs
  • Expanded the APIClient docs
  • Uses custom css to style in Scaleout fashion
  • Uses Manrope font
  • Uses Scaleout favicon

If you have time to test this locally, please do... Use this sphinx command to build: sphinx-build . _build and then run a http server from the _build directory.

docs/studio.rst Outdated
Studio
===============

FEDn Studio is a web-based tool for managing and monitoring federated learning experiments. It provides a user-friendly interface for creating and managing federated learning experiments, monitoring the progress of training, and visualizing the results.
Copy link
Member

Choose a reason for hiding this comment

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

Repetition in text. Also highlight that Studio provides additional security (token-based auth, RBAC) and a managed FEDn network.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

docs/studio.rst Outdated
Create a project
----------------

Start by creating a new project. A project is a container for your federated learning experiments. You can create multiple projects to organize your experiments. A project can be shared with other users, allowing you to collaborate on experiments.
Copy link
Member

Choose a reason for hiding this comment

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

I think avoid 'container' to minimize risk that someone thinks Docker.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

docs/studio.rst Outdated
Configure and attach clients
----------------------------

This step is very similar to how connecting a client to a local FEDn instance (:doc:`quickstart`). The main difference is that the client needs an authorization token to connect to a federation hosted on FEDn Studio. These are the steps to configure and attach a client to a project:
Copy link
Member

Choose a reason for hiding this comment

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

..to how a client is connected to a local FEDn....

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

docs/studio.rst Outdated

This step is very similar to how connecting a client to a local FEDn instance (:doc:`quickstart`). The main difference is that the client needs an authorization token to connect to a federation hosted on FEDn Studio. These are the steps to configure and attach a client to a project:

In order to generate some data for training, on your local machine, navigate to the mnist-pytorch example:
Copy link
Member

Choose a reason for hiding this comment

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

In order to set up the local environment and configure local client data access, ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

docs/studio.rst Outdated
bin/split_data
bin/build.sh

This commands will generate some training data and two files: package.tgz and seed.npz. The first is a compute package file and the second is a model file that can be used as the inital seed model. (For a more detailed explanation of the commands, see the :doc:`quickstart`)
Copy link
Member

Choose a reason for hiding this comment

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

These commands will generate training data..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@niklastheman niklastheman requested a review from ahellander April 2, 2024 13:11
@@ -3,6 +3,8 @@ APIClient

FEDn comes with an *APIClient* for interacting with the FEDn network. The APIClient is a Python3 library that can be used to interact with the FEDn network programmatically.

Connect to the network
----------------------

The APIClient is available as a Python package on PyPI, and can be installed using pip:
Copy link
Member

Choose a reason for hiding this comment

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

Confusing, the APIClient is part of the fedn package, which is installed from pip?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

@@ -18,4 +20,60 @@ To initialize the APIClient, you need to provide the hostname and port of the FE
from fedn import APIClient
client = APIClient("localhost", 8092)

Inital setup
Copy link
Member

Choose a reason for hiding this comment

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

Set the active compute package and the active seed model

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

Inital setup
------------

Before you can start training models, you need to set the active package and an initail seed model. The active package can be set using the following code snippet:
Copy link
Member

Choose a reason for hiding this comment

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

Suggest to delete the sentence "Before you can start..."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed


.. code-block:: python

client.set_active_package(path="path/to/compute_package.zip", helper="numpyhelper")
Copy link
Member

Choose a reason for hiding this comment

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

I think packages need to be tar.gz, tgz ? Plz check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed


.. code-block:: python

client.set_active_model(path="path/to/seed_model.zip")
Copy link
Member

Choose a reason for hiding this comment

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

They are not usually zipped. Usually ends with ".npz" (numpy compressed)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

docs/studio.rst Outdated
Studio
===============

FEDn Studio is a web-based tool for managing and monitoring federated learning experiments. It provides a user-friendly interface for monitoring the progress of training and visualizing the results.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add / harmonize Studio intro with features mentioned in the new main README.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

docs/studio.rst Outdated
Getting started
---------------

Before you can start using Studio, you will need an account. Head over to `studio.scaleoutsystems.com/signup <https://studio.scaleoutsystems.com/signup/>`_ and sign up today!
Copy link
Member

Choose a reason for hiding this comment

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

"..sign up today!" -> "sign up."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

docs/studio.rst Outdated

Once you have created a project, you can find it via the sidebar link Projects. Here you will find the list of all your projects. When inside a project you can see the following tabs in the sidebar:

1. **Dashboard**: The dashboard provides an overview of the project. The controller and combiner(s) are listed under "Network". This is also where you can find the current FEDn version and get the option to upgrade to a newer version if available
Copy link
Member

Choose a reason for hiding this comment

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

Add punctuation to last sentence in all items.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

docs/studio.rst Outdated
.. image:: img/studio_project_overview.png


Configure and attach clients
Copy link
Member

Choose a reason for hiding this comment

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

This covers two things, "Initialize the project with a compute package and a seed model", and "connect a client".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

docs/studio.rst Outdated

Navigate to clients and click on the "Download config" button. This downloads a client config file. Place this file in the mnist-pytorch directory on your local machine. Rename the file to client.yaml. Then edit it to set the name of the client.

Later, in Studio, click on the "Connect client" button.
Copy link
Member

Choose a reason for hiding this comment

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

I think we should update this with "native instructions" also.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would like to leave this as is for now... Just until we've settled on a client connect view in studio.

@niklastheman niklastheman requested a review from ahellander April 3, 2024 12:49
@niklastheman niklastheman merged commit 7289de8 into master Apr 4, 2024
15 checks passed
@niklastheman niklastheman deleted the feature/SK-728 branch April 4, 2024 08:41
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