コード例 #1
0
ファイル: main.py プロジェクト: tyomj/polyaxon-cli
def cli(context, verbose, offline):
    """ Polyaxon CLI tool to:

        * Parse, Validate, and Check Polyaxonfiles.

        * Interact with Polyaxon server.

        * Run and Monitor experiments.

    Check the help available for each command listed below.
    """

    try:
        configure_logger(verbose or GlobalConfigManager.get_value('verbose'))
    except ValidationError:
        GlobalConfigManager.purge()
    non_check_cmds = [
        'completion', 'config', 'version', 'login', 'logout', 'deploy',
        'admin', 'teardown'
    ]
    context.obj = context.obj or {}
    context.obj["offline"] = offline
    if offline:
        os.environ['POLYAXON_IS_OFFLINE'] = 'true'
        settings.IS_OFFLINE = True
    if not (context.invoked_subcommand in non_check_cmds or offline):
        check_cli_version()
コード例 #2
0
def cli(context, verbose):
    """ Polyaxon CLI tool to:

        * parse Polyaxonfiles

        * interact with Polyaxon server

        * execute commands.


    Check the help available for each command listed below.
    """
    configure_logger(verbose or GlobalConfigManager.get_value('verbose'))
    if context.invoked_subcommand not in ['config', 'version']:
        check_cli_version()
コード例 #3
0
ファイル: main.py プロジェクト: codeaudit/polyaxon-cli
def cli(context, verbose):
    """ Polyaxon CLI tool to:

        * Parse, Validate, and Check Polyaxonfiles.

        * Interact with Polyaxon server.

        * Run and Monitor experiments.

    Check the help available for each command listed below.
    """
    configure_logger(verbose or GlobalConfigManager.get_value('verbose'))
    if context.invoked_subcommand not in [
            'config', 'version', 'login', 'logout'
    ]:
        check_cli_version()
コード例 #4
0
def cli(context, verbose):
    """ Polyaxon CLI tool to:

        * Parse, Validate, and Check Polyaxonfiles.

        * Interact with Polyaxon server.

        * Run and Monitor experiments.

    Check the help available for each command listed below.
    """

    try:
        configure_logger(verbose or GlobalConfigManager.get_value('verbose'))
    except ValidationError:
        GlobalConfigManager.purge()
    non_check_cmds = [
        'completion', 'config', 'version', 'login', 'logout', 'deploy',
        'admin', 'teardown'
    ]
    if context.invoked_subcommand not in non_check_cmds:
        check_cli_version()