DiscreetAI¶
JS Library¶
DiscreetAI’s custom JS library for setting up datasets on the client side for training.
API¶
-
bootstrapLibrary
(repoID, X, y)¶ Bootstrap the library by storing the initial data and connecting to the server.
- Arguments
repoID (string) – The repo ID associated with the dataset.
X (tf.Tensor2D) – The datapoints to train on.
y (tf.Tensor1D) – The labels for the datapoints.
-
addMoreData
(repoID, X, y)¶ Add more data after bootstrapping.
- Arguments
repoID (string) – The repo ID associated with the dataset.
X (tf.Tensor2D) – The datapoints to train on.
y (tf.Tensor1D) – The labels for the datapoints.
-
isBootstrapped
()¶ Returns true if the library is bootstrapped, false otherwise.
Explora¶
Explora is a customized Jupyter Notebook used for starting decentralized training sessions.
explora¶
-
async
explora.
start_new_session
(self, repo_id, model, hyperparameters, percentage_averaged=0.75, max_rounds=5, library_type='PYTHON', checkpoint_frequency=1)¶ Validate arguments and then start a new session by sending a message to the server with the given configuration. Designed to be called in Explora.ipynb.
- Parameters
repo_id (str) – The repo ID associated with the current dataset.
model (keras.engine.Model) – The initial Keras model to train with. The model must be compiled!
hyperparams (dict) – The hyperparameters to be used during training. Must include batch_size!
percentage_averaged (float) – Percentage of nodes to be averaged before moving on to the next round.
max_rounds (int) – Maximum number of rounds to train for.
library_type (str) – The type of library to train with. Must be either PYTHON or JAVASCRIPT.
checkpoint_frequency (int) – Save the model in S3 every checkpoint_frequency rounds.
Examples
>>> start_new_session( ... repo_id="c9bf9e57-1685-4c89-bafb-ff5af830be8a", ... model=keras.models.load_model("model.h5"), ... hyperparameters={"batch_size": 100}, ... percentage_averaged=0.75, ... max_rounds=5, ... library_type="PYTHON", ... checkpoint_frequency=1, ... ) Starting session! Waiting... Session complete! Check dashboard for final model!