Skip to content

Collab

monitor

monitor(
    ctx,
    show_help=Option(
        False,
        "--help",
        "-h",
        is_flag=True,
        help="Show help message and exit.",
    ),
)

Start collaborative training monitor.

Parameters:

Name Type Description Default
ctx Context

Typer (Click like) special internal object that holds state relevant for the script execution at every single level.

required
show_help bool, default

Show remote train options.

Option(False, '--help', '-h', is_flag=True, help='Show help message and exit.')
Source code in src/trecover/app/cli/collab.py
@cli.command(context_settings={'allow_extra_args': True, 'ignore_unknown_options': True},
             add_help_option=False,
             help='Start collaborative training monitor')
def monitor(ctx: Context,
            show_help: bool = Option(False, '--help', '-h', is_flag=True, help='Show help message and exit.')
            ) -> None:
    """
    Start collaborative training monitor.

    Parameters
    ----------
    ctx : Context
        Typer (Click like) special internal object that holds state relevant
        for the script execution at every single level.
    show_help : bool, default=False
        Show remote train options.

    """

    from trecover.train.collab import monitor, get_monitor_parser

    if show_help:
        get_monitor_parser().print_help()
    else:
        monitor(cli_args=ctx.args)

visualize

visualize(
    ctx,
    show_help=Option(
        False,
        "--help",
        "-h",
        is_flag=True,
        help="Show help message and exit.",
    ),
)

Visualize collaborative training progress.

Parameters:

Name Type Description Default
ctx Context

Typer (Click like) special internal object that holds state relevant for the script execution at every single level.

required
show_help bool, default

Show remote train options.

Option(False, '--help', '-h', is_flag=True, help='Show help message and exit.')
Source code in src/trecover/app/cli/collab.py
@cli.command(context_settings={'allow_extra_args': True, 'ignore_unknown_options': True},
             add_help_option=False,
             help='Visualize collaborative training progress')
def visualize(ctx: Context,
              show_help: bool = Option(False, '--help', '-h', is_flag=True, help='Show help message and exit.')
              ) -> None:
    """
    Visualize collaborative training progress.

    Parameters
    ----------
    ctx : Context
        Typer (Click like) special internal object that holds state relevant
        for the script execution at every single level.
    show_help : bool, default=False
        Show remote train options.

    """

    from trecover.train.collab import visualize, get_visualization_parser

    if show_help:
        get_visualization_parser().print_help()
    else:
        visualize(cli_args=ctx.args)

tune

tune(
    ctx,
    show_help=Option(
        False,
        "--help",
        "-h",
        is_flag=True,
        help="Show help message and exit.",
    ),
)

Tune batch size for this machine.

Parameters:

Name Type Description Default
ctx Context

Typer (Click like) special internal object that holds state relevant for the script execution at every single level.

required
show_help bool, default

Show tune options.

Option(False, '--help', '-h', is_flag=True, help='Show help message and exit.')
Source code in src/trecover/app/cli/collab.py
@cli.command(context_settings={'allow_extra_args': True, 'ignore_unknown_options': True},
             add_help_option=False,
             help='Tune batch size for this machine')
def tune(ctx: Context,
         show_help: bool = Option(False, '--help', '-h', is_flag=True, help='Show help message and exit.')
         ) -> None:
    """
    Tune batch size for this machine.

    Parameters
    ----------
    ctx : Context
        Typer (Click like) special internal object that holds state relevant
        for the script execution at every single level.
    show_help : bool, default=False
        Show tune options.

    """

    from trecover.train.collab import tune, get_train_parser

    if show_help:
        get_train_parser().print_help()
    else:
        tune(cli_args=ctx.args)

train

train(
    ctx,
    show_help=Option(
        False,
        "--help",
        "-h",
        is_flag=True,
        help="Show help message and exit.",
    ),
)

Start collaborative training.

Parameters:

Name Type Description Default
ctx Context

Typer (Click like) special internal object that holds state relevant for the script execution at every single level.

required
show_help bool, default

Show collab train options.

Option(False, '--help', '-h', is_flag=True, help='Show help message and exit.')
Source code in src/trecover/app/cli/collab.py
@cli.command(context_settings={'allow_extra_args': True, 'ignore_unknown_options': True},
             add_help_option=False,
             help='Start collaborative training')
def train(ctx: Context,
          show_help: bool = Option(False, '--help', '-h', is_flag=True, help='Show help message and exit.')
          ) -> None:
    """
    Start collaborative training.

    Parameters
    ----------
    ctx : Context
        Typer (Click like) special internal object that holds state relevant
        for the script execution at every single level.
    show_help : bool, default=False
        Show collab train options.

    """

    from trecover.train.collab import train, get_train_parser

    if show_help:
        get_train_parser().print_help()
    else:
        train(cli_args=ctx.args)

aux

aux(
    ctx,
    show_help=Option(
        False,
        "--help",
        "-h",
        is_flag=True,
        help="Show help message and exit.",
    ),
)

Start auxiliary peers for gradient averaging (for cpu-only workers).

Parameters:

Name Type Description Default
ctx Context

Typer (Click like) special internal object that holds state relevant for the script execution at every single level.

required
show_help bool, default

Show collab train options.

Option(False, '--help', '-h', is_flag=True, help='Show help message and exit.')
Source code in src/trecover/app/cli/collab.py
@cli.command(context_settings={'allow_extra_args': True, 'ignore_unknown_options': True},
             add_help_option=False,
             help='Start auxiliary peer (for cpu-only workers)')
def aux(ctx: Context,
        show_help: bool = Option(False, '--help', '-h', is_flag=True, help='Show help message and exit.')
        ) -> None:
    """
    Start auxiliary peers for gradient averaging (for cpu-only workers).

    Parameters
    ----------
    ctx : Context
        Typer (Click like) special internal object that holds state relevant
        for the script execution at every single level.
    show_help : bool, default=False
        Show collab train options.

    """

    from trecover.train.collab import auxiliary, get_auxiliary_parser

    if show_help:
        get_auxiliary_parser().print_help()
    else:
        auxiliary(cli_args=ctx.args)