コード例 #1
0
def projects_tensorboard_start(project_id):
    project = get_valid_project(project_id=project_id)
    if not project or not project.tensorboard:
        _logger.warning('Project does not have a tensorboard.')
        return None

    if project.tensorboard.last_status == JobLifeCycle.RUNNING:
        _logger.warning('Tensorboard is already running.')
        return None
    tensorboard_scheduler.start_tensorboard(project.tensorboard)
コード例 #2
0
def tensorboards_start(tensorboard_job_id):
    tensorboard = get_valid_tensorboard(tensorboard_job_id=tensorboard_job_id)
    if not tensorboard:
        return None

    if not JobLifeCycle.can_transition(status_from=tensorboard.last_status,
                                       status_to=JobLifeCycle.SCHEDULED):
        _logger.info('Tensorboard `%s` cannot transition from `%s` to `%s`.',
                     tensorboard.unique_name, tensorboard.last_status,
                     JobLifeCycle.SCHEDULED)

    tensorboard_scheduler.start_tensorboard(tensorboard)
コード例 #3
0
ファイル: tensorboards.py プロジェクト: ttsvetanov/polyaxon
def tensorboards_start(tensorboard_job_id):
    tensorboard = get_valid_tensorboard(tensorboard_job_id=tensorboard_job_id)
    if not tensorboard:
        _logger.warning('Tensorboard %s does not exist anymore.', tensorboard_job_id)
        return None

    if not JobLifeCycle.can_transition(status_from=tensorboard.last_status,
                                       status_to=JobLifeCycle.SCHEDULED):
        _logger.info('Tensorboard `%s` cannot transition from `%s` to `%s`.',
                     tensorboard.unique_name, tensorboard.last_status, JobLifeCycle.SCHEDULED)

    tensorboard_scheduler.start_tensorboard(tensorboard)
コード例 #4
0
ファイル: tensorboards.py プロジェクト: yutiansut/polyaxon
def tensorboards_start(tensorboard_job_id):
    tensorboard = get_valid_tensorboard(tensorboard_job_id=tensorboard_job_id)
    if not tensorboard:
        return None

    if not JobLifeCycle.can_transition(status_from=tensorboard.last_status,
                                       status_to=JobLifeCycle.SCHEDULED):
        _logger.info('Tensorboard `%s` cannot transition from `%s` to `%s`.',
                     tensorboard.unique_name, tensorboard.last_status, JobLifeCycle.SCHEDULED)

    try:
        tensorboard_scheduler.start_tensorboard(tensorboard)
    except StoreNotFoundError:
        tensorboard.set_status(status=JobLifeCycle.FAILED,
                               message='Tensorboard failed to start, '
                                       'the outputs volume/storage was not found.')