sagemaker_run_notebook/run_notebook.py [780:812]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    if "/" not in image:
        account = session.client("sts").get_caller_identity()["Account"]
        region = session.region_name
        image = "{}.dkr.ecr.{}.amazonaws.com/{}:latest".format(account, region, image)

    if not role:
        try:
            role = get_execution_role(session)
        except ValueError:
            role = "BasicExecuteNotebookRole-{}".format(session.region_name)

    if "/" not in role:
        account = session.client("sts").get_caller_identity()["Account"]
        role = "arn:aws:iam::{}:role/{}".format(account, role)

    if input_path is None:
        input_path = upload_notebook(notebook)
    if output_prefix is None:
        output_prefix = get_output_prefix()

    extra_args = {}
    for f in extra_fns:
        extra_args = f(extra_args)

    args = {
        "image": image,
        "input_path": input_path,
        "output_prefix": output_prefix,
        "notebook": os.path.basename(notebook),
        "parameters": parameters,
        "role": role,
        "instance_type": instance_type,
        "extra_args": extra_args,
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



sagemaker_run_notebook/run_notebook.py [905:937]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    if "/" not in image:
        account = session.client("sts").get_caller_identity()["Account"]
        region = session.region_name
        image = "{}.dkr.ecr.{}.amazonaws.com/{}:latest".format(account, region, image)

    if not role:
        try:
            role = get_execution_role(session)
        except ValueError:
            role = "BasicExecuteNotebookRole-{}".format(session.region_name)

    if "/" not in role:
        account = session.client("sts").get_caller_identity()["Account"]
        role = "arn:aws:iam::{}:role/{}".format(account, role)

    if input_path is None:
        input_path = upload_notebook(notebook)
    if output_prefix is None:
        output_prefix = get_output_prefix()

    extra_args = {}
    for f in extra_fns:
        extra_args = f(extra_args)

    args = {
        "image": image,
        "input_path": input_path,
        "output_prefix": output_prefix,
        "notebook": os.path.basename(notebook),
        "parameters": parameters,
        "role": role,
        "instance_type": instance_type,
        "extra_args": extra_args,
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



