From 9584261b6fc63c3b3472382430e29d1bc61aa4ef Mon Sep 17 00:00:00 2001 From: Andres Paz Date: Fri, 19 Jun 2020 21:15:50 -0700 Subject: [PATCH] optional storage --- src/quantum/azext_quantum/_validators.py | 5 ----- src/quantum/azext_quantum/operations/job.py | 5 +++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/quantum/azext_quantum/_validators.py b/src/quantum/azext_quantum/_validators.py index d4836392727..04a55fbc214 100644 --- a/src/quantum/azext_quantum/_validators.py +++ b/src/quantum/azext_quantum/_validators.py @@ -44,8 +44,3 @@ def validate_workspace_and_target_info(cmd, namespace): """ validate_workspace_info(cmd, namespace) validate_target_info(cmd, namespace) - - # For the time being (Private Preview), we also need the AZURE_QUANTUM_STORAGE env variable populated - # with the Azure Storage connection string to use to upload the program. - if 'AZURE_QUANTUM_STORAGE' not in os.environ: - raise ValueError(f"Please set the AZURE_QUANTUM_STORAGE environment variable with an Azure Storage's connection string.") diff --git a/src/quantum/azext_quantum/operations/job.py b/src/quantum/azext_quantum/operations/job.py index 12b94e8a9bd..fba1d901d2b 100644 --- a/src/quantum/azext_quantum/operations/job.py +++ b/src/quantum/azext_quantum/operations/job.py @@ -96,8 +96,9 @@ def _generate_submit_args(program_args, ws, target, token, project, job_name, sh args.append("--output") args.append("Id") - args.append("--storage") - args.append(os.environ['AZURE_QUANTUM_STORAGE']) + if 'AZURE_QUANTUM_STORAGE' in os.environ: + args.append("--storage") + args.append(os.environ['AZURE_QUANTUM_STORAGE']) args.append("--aad-token") args.append(token)