a82d3aef0a0df9e58b4b7c03e8009aa7375dd62e,src/rastervision/runner/aws_batch_experiment_runner.py,,batch_submit,#Any#Any#Any#Any#Any#Any#Any#Any#Any#,31

Before Change


    if parent_job_ids is None:
        parent_job_ids = []

    full_command = ["run_rv", branch_name]
    full_command.extend(command.split())

    client = boto3.client("batch")

    job_name = "{}_{}".format(command_type, uuid.uuid4())
    depends_on = [{"jobId": job_id} for job_id in parent_job_ids]

    kwargs = {
        "jobName": job_name,
        "jobQueue": job_queue,
        "jobDefinition": job_definition,
        "containerOverrides": {
            "command": full_command
        },
        "retryStrategy": {
            "attempts": attempts
        },
        "dependsOn": depends_on
    }

    if array_size is not None:
        kwargs["arrayProperties"] = {"size": array_size}

    job_id = client.submit_job(**kwargs)["jobId"]

    click.echo("Submitted job with jobName={} and jobId={}".format(
        job_name, job_id))

    return job_id

After Change


    if parent_job_ids is None:
        parent_job_ids = []

    full_command = command.split()

    client = boto3.client("batch")

    job_name = "{}_{}".format(command_type, uuid.uuid4())
    depends_on = [{"jobId": job_id} for job_id in parent_job_ids]

    kwargs = {
        "jobName": job_name,
        "jobQueue": job_queue,
        "jobDefinition": job_definition,
        "containerOverrides": {
            "command": full_command
        },
        "retryStrategy": {
            "attempts": attempts
        },
        "dependsOn": depends_on
    }

    if array_size is not None:
        kwargs["arrayProperties"] = {"size": array_size}

    job_id = client.submit_job(**kwargs)["jobId"]

    msg = "{} command submitted job with jobName={} and jobId={}".format(
        command_type, job_name, job_id)
    click.echo(click.style(msg, fg="green"))

    return job_id
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: azavea/raster-vision
Commit Name: a82d3aef0a0df9e58b4b7c03e8009aa7375dd62e
Time: 2018-09-22
Author: rdemanuele@gmail.com
File Name: src/rastervision/runner/aws_batch_experiment_runner.py
Class Name:
Method Name: batch_submit


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: f427368dc042ade0b12459935014ce9dd4e626a5
Time: 2018-03-29
Author: dizcology@hotmail.com
File Name: vision/cloud-client/detect/detect.py
Class Name:
Method Name: detect_document_uri


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: f427368dc042ade0b12459935014ce9dd4e626a5
Time: 2018-03-29
Author: dizcology@hotmail.com
File Name: vision/cloud-client/detect/detect.py
Class Name:
Method Name: detect_document