src package

Subpackages

Submodules

src.config module

class src.config.ConfigParameters(num_workers: int = 5, staleness: int = 50, lr: float = 0.01, local_steps: int = 1, batch_size: int = 10, device: str = 'cpu', log_level: int = 20, tol: float = 1e-08, Amplitude: float = 1)[source]

Bases: object

Configuration for Stale Synchronous Parallel training for Asynchronous SGD (SSP-ASGD).

Parameters:
  • num_workers (int) – Number of worker processes.

  • staleness (int) – Staleness bound allowed for the workers during training. Represents the maximum number of versions a worker can be behind the latest version.

  • lr (float) – Learning rate for the model. Represents the step size for updating the model parameters.

  • local_steps (int) – Number of steps/updates each worker locally computes before pushing gradients to the server.

  • batch_size (int) – Batch size for each training step and the data loader.

  • device (str) – Device to use for training (e.g., “cuda” or “cpu”).

  • log_level (int) – Logging verbosity level.

Amplitude: float = 1
batch_size: int = 10
device: str = 'cpu'
local_steps: int = 1
log_level: int = 20
lr: float = 0.01
num_workers: int = 5
staleness: int = 50
tol: float = 1e-08

src.run_tests module

src.run_tests.main()[source]

Main function to run the experiment based on command line arguments. It accepts two arguments: test and overparameterization.

E.g. to run the script: python src/run_tests.py dasgd 200 python -m src.run_tests saasgd 110

Parameters:
  • test – The test/experiment to run. Options are ‘saasgd’, ‘dasgd’, ‘asap_sgd’.

  • overparam – The overparameterization size. Options are ‘110’, ‘150’, ‘200’.

Returns:

None

Module contents

Package Initialization Module

The file initializes the initializes the package and imports necessary modules.