e0fc7005738c0185768f67cc4fc67f6dc3ee5fb1,polyaxon/scheduler/tensorboard_scheduler.py,,start_tensorboard,#Any#,15

Before Change


    except ApiException:
        _logger.error("Could not start tensorboard, please check your polyaxon spec.",
                      exc_info=True)
        tensorboard.set_status(
            JobLifeCycle.FAILED,
            message="Could not start tensorboard, encountered a Kubernetes ApiException.")
        return
    except VolumeNotFoundError as e:
        _logger.error("Could not start the tensorboard, please check your volume definitions.",
                      exc_info=True)
        tensorboard.set_status(
            JobLifeCycle.FAILED,
            message="Could not start the tensorboard, "
                    "encountered a volume definition problem. %s" % e)
        return False
    except Exception as e:
        _logger.error("Could not start tensorboard, please check your polyaxon spec.",
                      exc_info=True)
        tensorboard.set_status(
            JobLifeCycle.FAILED,
            message="Could not start tensorboard encountered an {} exception.".format(
                e.__class__.__name__
            ))
        return
    tensorboard.definition = get_job_definition(results)
    tensorboard.save()

After Change


        namespace=settings.K8S_NAMESPACE,
        in_cluster=True)

    error = {}
    try:
        results = spawner.start_tensorboard(
            image=tensorboard.image,
            outputs_path=tensorboard.outputs_path,
            persistence_outputs=tensorboard.persistence_outputs,
            outputs_refs_jobs=tensorboard.outputs_refs_jobs,
            outputs_refs_experiments=tensorboard.outputs_refs_experiments,
            resources=tensorboard.resources,
            node_selector=tensorboard.node_selector,
            affinity=tensorboard.affinity,
            tolerations=tensorboard.tolerations)
        tensorboard.definition = get_job_definition(results)
        tensorboard.save()
        return
    except ApiException:
        _logger.error("Could not start tensorboard, please check your polyaxon spec.",
                      exc_info=True)
        error = {
            "raised": True,
            "traceback": traceback.format_exc(),
            "message": "Could not start the job, encountered a Kubernetes ApiException.",
        }
    except VolumeNotFoundError as e:
        _logger.error("Could not start the tensorboard, please check your volume definitions.",
                      exc_info=True)
        error = {
            "raised": True,
            "traceback": traceback.format_exc(),
            "message": "Could not start the job, encountered a volume definition problem. %s" % e,
        }
    except Exception as e:
        _logger.error("Could not start tensorboard, please check your polyaxon spec.",
                      exc_info=True)
        error = {
            "raised": True,
            "traceback": traceback.format_exc(),
            "message": "Could not start tensorboard encountered an {} exception.".format(
                e.__class__.__name__)
        }
    finally:
        if error.get("raised"):
            tensorboard.set_status(
                JobLifeCycle.FAILED,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 18

Instances


Project Name: polyaxon/polyaxon
Commit Name: e0fc7005738c0185768f67cc4fc67f6dc3ee5fb1
Time: 2018-09-19
Author: mouradmourafiq@gmail.com
File Name: polyaxon/scheduler/tensorboard_scheduler.py
Class Name:
Method Name: start_tensorboard


Project Name: polyaxon/polyaxon
Commit Name: e0fc7005738c0185768f67cc4fc67f6dc3ee5fb1
Time: 2018-09-19
Author: mouradmourafiq@gmail.com
File Name: polyaxon/scheduler/notebook_scheduler.py
Class Name:
Method Name: start_notebook


Project Name: polyaxon/polyaxon
Commit Name: e0fc7005738c0185768f67cc4fc67f6dc3ee5fb1
Time: 2018-09-19
Author: mouradmourafiq@gmail.com
File Name: polyaxon/scheduler/dockerizer_scheduler.py
Class Name:
Method Name: start_dockerizer


Project Name: polyaxon/polyaxon
Commit Name: e0fc7005738c0185768f67cc4fc67f6dc3ee5fb1
Time: 2018-09-19
Author: mouradmourafiq@gmail.com
File Name: polyaxon/scheduler/job_scheduler.py
Class Name:
Method Name: start_job


Project Name: polyaxon/polyaxon
Commit Name: e0fc7005738c0185768f67cc4fc67f6dc3ee5fb1
Time: 2018-09-19
Author: mouradmourafiq@gmail.com
File Name: polyaxon/scheduler/tensorboard_scheduler.py
Class Name:
Method Name: start_tensorboard