Skip to content

Commit

Permalink
feature: move jobs to /jobs folder (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajberdy authored Aug 4, 2021
1 parent 48828b5 commit 34c6605
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/braket/aws/aws_quantum_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,18 +178,21 @@ def create(
default_bucket = aws_session.default_bucket()
code_location = code_location or aws_session.construct_s3_uri(
default_bucket,
"jobs",
job_name,
"script",
)
if not output_data_config.s3Path:
output_data_config.s3Path = aws_session.construct_s3_uri(
default_bucket,
"jobs",
job_name,
"output",
)
if not checkpoint_config.s3Uri:
checkpoint_config.s3Uri = aws_session.construct_s3_uri(
default_bucket,
"jobs",
job_name,
"checkpoints",
)
Expand Down
6 changes: 3 additions & 3 deletions test/unit_tests/braket/aws/test_aws_quantum_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ def _assert_create_job_called_with(
job_name = create_job_args["job_name"] or AwsQuantumJob._generate_default_job_name(image_uri)
default_bucket = aws_session.default_bucket()
code_location = create_job_args["code_location"] or aws_session.construct_s3_uri(
default_bucket, job_name, "script"
default_bucket, "jobs", job_name, "script"
)
role_arn = create_job_args["role_arn"] or aws_session.get_execution_role()
priority_access_devices = [
Expand All @@ -506,11 +506,11 @@ def _assert_create_job_called_with(
input_data_config = create_job_args["input_data_config"] or []
instance_config = create_job_args["instance_config"] or InstanceConfig()
output_data_config = create_job_args["output_data_config"] or OutputDataConfig(
s3Path=aws_session.construct_s3_uri(default_bucket, job_name, "output")
s3Path=aws_session.construct_s3_uri(default_bucket, "jobs", job_name, "output")
)
stopping_condition = create_job_args["stopping_condition"] or StoppingCondition()
checkpoint_config = create_job_args["checkpoint_config"] or CheckpointConfig(
s3Uri=aws_session.construct_s3_uri(default_bucket, job_name, "checkpoints")
s3Uri=aws_session.construct_s3_uri(default_bucket, "jobs", job_name, "checkpoints")
)
vpc_config = create_job_args["vpc_config"]
# tags = create_job_args["tags"] or {}
Expand Down

0 comments on commit 34c6605

Please sign in to comment.