Skip to content

Commit

Permalink
Finished text description
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-davidyuk committed Aug 19, 2021
1 parent d961a41 commit 010ca93
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 11 deletions.
10 changes: 10 additions & 0 deletions docs/bash_autocomplete_activation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,23 @@ If not use the instruction :ref:`install_initial_steps`.

Create ~/.fx-autocomplete.sh script
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This step need to be done only one time when you don't have `~/.fx-autocomplete.sh` or `~/.fx-autocomplete.sh` have corrupted content.

.. code-block:: console
$ _FX_COMPLETE=bash_source fx > ~/.fx-autocomplete.sh
Check that command was executed correctly.

.. code-block:: console
$ cat ~/.fx-autocomplete.sh
Console output should look like example below (Click==8.0.1), but could be different depend on `Click https://click.palletsprojects.com/en/8.0.x/`_ version:

.. code-block:: console
_fx_completion() {
local IFS=$'\n'
local response
Expand Down Expand Up @@ -57,15 +62,20 @@ Create ~/.fx-autocomplete.sh script
Activate autocomplete feature
~~~~~~~~~~~~~~~~~~~~~

This step should be done every time when you open a new terminal window.

.. code-block:: console
$ source ~/.fx-autocomplete.sh
Auto activation autocomplete
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To save your time you can add autocomplete activation step to `~/.bashrc`.

.. code-block:: bash
. ~/.fx-autocomplete.sh
Save `~/.bashrc`.
Open new terminal to use updated `~/.bashrc`.
8 changes: 5 additions & 3 deletions docs/source/openfl/components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ Spawning components
Aggregator
===========

The aggregator is a short-living entity, which means that its lifespan is limited by experiment execution time. It orchestrates collaborators according to the FL plan and performs model updates aggregation.
The aggregator is a short-living entity, which means that its lifespan is limited by experiment execution time.
It orchestrates collaborators according to the FL plan and performs model updates aggregation.
The aggregator is spawned by the Director (described below) when a new experiment is submitted.


Expand All @@ -48,5 +49,6 @@ Director support several concurrent frontend connections (yet experiments are ru
Envoy
=========

Some text

|productName| comes with another long-existing actor called Envoy. It runs on collaborator machines connected to a *Director*.
There is one to one mapping between *Envoys* and Dataset shards: every *Envoy* needs exactly one *Shard Descriptor* to run.
When the *Director* starts an experiment, *Envoy* will accept the experiment workspace, prepare the environment and start a *Collaborator*
16 changes: 8 additions & 8 deletions docs/source/workflow/director_based_workflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -315,16 +315,16 @@ User must subclass :code:`DataInterface` and implement the following methods:
# so on, see the full list of methods below
* Shard Descriptor setter and getter methods:
:code:`shard_descriptor(self, shard_descriptor)` setter is the most important method. It will be called during collaborator
:code:`shard_descriptor(self, shard_descriptor)` setter is the most important method. It will be called during the *Collaborator*
initialization procedure with the local Shard Descriptor. Any logic that is triggered with the Shard Descriptor replacement
must be also put here.
* :code:`get_train_loader(self, **kwargs)` will be called before training tasks execution. This method must return anything user expects to recieve in the training task with :code:`data_loader` contract argument. :code:`kwargs` dict holds the same information that was provided during :code:`DataInterface` initialization.
* :code:`get_train_loader(self, **kwargs)` will be called before training tasks execution. This method must return anything the user expects to receive in the training task with :code:`data_loader` contract argument. :code:`kwargs` dict holds the same information that was provided during :code:`DataInterface` initialization.
* :code:`get_valid_loader(self, **kwargs)` - see the point above (just replace training with validation)
* :code:`get_train_data_size(self)` - return number of samples in local train dataset. Use the information provided by Shard Descriptor, take into account you train / validation split.
* :code:`get_train_data_size(self)` - return number of samples in local train dataset. Use the information provided by Shard Descriptor, take into account your train / validation split.
* :code:`get_valid_data_size(self)` - return number of samples in local validation dataset.

User Dataset class should be instantiated to pass futher to the *Experiment* object. Dummy *Shard Descriptor*
(or custom local one) may be set up to test the augmentation or batching pipeline.
User Dataset class should be instantiated to pass further to the *Experiment* object. Dummy *Shard Descriptor*
(or a custom local one) may be set up to test the augmentation or batching pipeline.
Keyword arguments used during initialization on the frontend node may be used during dataloaders construction on collaborator machines.


Expand All @@ -337,11 +337,11 @@ Instances of interface classes :code:`(TaskInterface, DataInterface, ModelInterf

This method:

* Compiles all provided setings to a Plan object. Plan is the central place where all actors in federation look up their parameters.
* Compiles all provided settings to a Plan object. The Plan is the central place where all actors in federation look up their parameters.
* Saves plan.yaml to the :code:`plan/` folder inside the workspace.
* Serializes interface objects on the disk.
* Prepares :code:`requirements.txt` for remote Python environment setup.
* Compressess the whole workspace to an archive.
* Compresses the whole workspace to an archive.
* Sends the experiment archive to the Director so it may distribute the archive across the Federation and start the *Aggregator*.

Observing the Experiment execution
Expand All @@ -358,5 +358,5 @@ and :code:`Flexperiment.get_last_model()` metods.
When the Experiment is finished
----------------------------------

User may utilize the same Federation object to report another experiment or even schedule several experiments that
Users may utilize the same Federation object to report another experiment or even schedule several experiments that
will be executed one by one.

0 comments on commit 010ca93

Please sign in to comment.