Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanjgupt/onlineproblem #55

Merged
merged 25 commits into from
May 10, 2021
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9a63c66
add online problem plus testing for it. Download method in problme
sanjgupt May 3, 2021
d83a6d5
nit
sanjgupt May 3, 2021
35620ab
add another assertion for online problems
sanjgupt May 3, 2021
926ad2a
update solver to handle online problmes
sanjgupt May 3, 2021
f473660
Raise error for setting fixed variables for online problem and test
sanjgupt May 3, 2021
b7a6b28
merge from upstream main
sanjgupt May 4, 2021
a15062f
codestyle errors
sanjgupt May 4, 2021
95d808d
nit
sanjgupt May 4, 2021
6ba91ab
Make online problem wrapper for name and url
sanjgupt May 4, 2021
40c1f0b
codestyle errors
sanjgupt May 4, 2021
cabf16e
add a small function to enable getting terms from index
sanjgupt May 4, 2021
89226d9
remove evalutate and fixed variables from online problem
sanjgupt May 5, 2021
cd4272f
update the download function to correctly authenticate the storage ac…
sanjgupt May 5, 2021
197754d
styling errors
sanjgupt May 5, 2021
ace7965
styling errors
sanjgupt May 5, 2021
1e108b6
Merge branch 'main' into sanjgupt/onlineproblem
sanjgupt May 6, 2021
0d3b9b2
nit
sanjgupt May 6, 2021
6d63cec
Merge branch 'main' of https://github.com/microsoft/qdk-python into s…
sanjgupt May 6, 2021
417939e
Merge branch 'sanjgupt/onlineproblem' of https://github.com/sanjgupt/…
sanjgupt May 6, 2021
9986d47
disablinb test for Online Problem for now till it becomes available i…
sanjgupt May 7, 2021
ee2a67c
Update azure-quantum/tests/unit/test_online_problem.py
sanjgupt May 10, 2021
e05559b
revert styles changes to _client. This folder should not be changed b…
sanjgupt May 10, 2021
e68e221
nit
sanjgupt May 10, 2021
342f430
commneting out onliune problem code till OnlineProblem can be made av…
sanjgupt May 10, 2021
bad7699
nit
sanjgupt May 10, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions azure-quantum/azure/quantum/_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from .quantum_client import QuantumClient
from .version import VERSION

__all__ = ['QuantumClient']
__all__ = ["QuantumClient"]

__version__ = VERSION

33 changes: 17 additions & 16 deletions azure-quantum/azure/quantum/_client/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,21 @@
)

__all__ = [
'ErrorData',
'JobDetails',
'BlobDetails',
'SasUriResponse',
'TargetStatus',
'ProviderStatus',
'Quota',
'RestError', 'RestErrorException',
'JobDetailsPaged',
'ProviderStatusPaged',
'QuotaPaged',
'JobStatus',
'ProviderAvailability',
'TargetAvailability',
'DimensionScope',
'MeterPeriod',
"ErrorData",
"JobDetails",
"BlobDetails",
"SasUriResponse",
"TargetStatus",
"ProviderStatus",
"Quota",
"RestError",
"RestErrorException",
"JobDetailsPaged",
"ProviderStatusPaged",
"QuotaPaged",
"JobStatus",
"ProviderAvailability",
"TargetAvailability",
"DimensionScope",
"MeterPeriod",
]
10 changes: 5 additions & 5 deletions azure-quantum/azure/quantum/_client/models/blob_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ class BlobDetails(Model):
"""

_validation = {
'container_name': {'required': True},
"container_name": {"required": True},
}

_attribute_map = {
'container_name': {'key': 'containerName', 'type': 'str'},
'blob_name': {'key': 'blobName', 'type': 'str'},
"container_name": {"key": "containerName", "type": "str"},
"blob_name": {"key": "blobName", "type": "str"},
}

def __init__(self, **kwargs):
super(BlobDetails, self).__init__(**kwargs)
self.container_name = kwargs.get('container_name', None)
self.blob_name = kwargs.get('blob_name', None)
self.container_name = kwargs.get("container_name", None)
self.blob_name = kwargs.get("blob_name", None)
10 changes: 6 additions & 4 deletions azure-quantum/azure/quantum/_client/models/blob_details_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@ class BlobDetails(Model):
"""

_validation = {
'container_name': {'required': True},
"container_name": {"required": True},
}

_attribute_map = {
'container_name': {'key': 'containerName', 'type': 'str'},
'blob_name': {'key': 'blobName', 'type': 'str'},
"container_name": {"key": "containerName", "type": "str"},
"blob_name": {"key": "blobName", "type": "str"},
}

def __init__(self, *, container_name: str, blob_name: str=None, **kwargs) -> None:
def __init__(
self, *, container_name: str, blob_name: str = None, **kwargs
) -> None:
super(BlobDetails, self).__init__(**kwargs)
self.container_name = container_name
self.blob_name = blob_name
8 changes: 4 additions & 4 deletions azure-quantum/azure/quantum/_client/models/error_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ class ErrorData(Model):
"""

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
"code": {"key": "code", "type": "str"},
"message": {"key": "message", "type": "str"},
}

def __init__(self, **kwargs):
super(ErrorData, self).__init__(**kwargs)
self.code = kwargs.get('code', None)
self.message = kwargs.get('message', None)
self.code = kwargs.get("code", None)
self.message = kwargs.get("message", None)
8 changes: 5 additions & 3 deletions azure-quantum/azure/quantum/_client/models/error_data_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ class ErrorData(Model):
"""

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
"code": {"key": "code", "type": "str"},
"message": {"key": "message", "type": "str"},
}

def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None:
def __init__(
self, *, code: str = None, message: str = None, **kwargs
) -> None:
super(ErrorData, self).__init__(**kwargs)
self.code = code
self.message = message
79 changes: 41 additions & 38 deletions azure-quantum/azure/quantum/_client/models/job_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,51 +67,54 @@ class JobDetails(Model):
"""

_validation = {
'container_uri': {'required': True},
'input_data_format': {'required': True},
'provider_id': {'required': True},
'target': {'required': True},
'status': {'readonly': True},
'creation_time': {'readonly': True},
'begin_execution_time': {'readonly': True},
'end_execution_time': {'readonly': True},
'cancellation_time': {'readonly': True},
'error_data': {'readonly': True},
"container_uri": {"required": True},
"input_data_format": {"required": True},
"provider_id": {"required": True},
"target": {"required": True},
"status": {"readonly": True},
"creation_time": {"readonly": True},
"begin_execution_time": {"readonly": True},
"end_execution_time": {"readonly": True},
"cancellation_time": {"readonly": True},
"error_data": {"readonly": True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'container_uri': {'key': 'containerUri', 'type': 'str'},
'input_data_uri': {'key': 'inputDataUri', 'type': 'str'},
'input_data_format': {'key': 'inputDataFormat', 'type': 'str'},
'input_params': {'key': 'inputParams', 'type': 'object'},
'provider_id': {'key': 'providerId', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'metadata': {'key': 'metadata', 'type': '{str}'},
'output_data_uri': {'key': 'outputDataUri', 'type': 'str'},
'output_data_format': {'key': 'outputDataFormat', 'type': 'str'},
'status': {'key': 'status', 'type': 'str'},
'creation_time': {'key': 'creationTime', 'type': 'iso-8601'},
'begin_execution_time': {'key': 'beginExecutionTime', 'type': 'iso-8601'},
'end_execution_time': {'key': 'endExecutionTime', 'type': 'iso-8601'},
'cancellation_time': {'key': 'cancellationTime', 'type': 'iso-8601'},
'error_data': {'key': 'errorData', 'type': 'ErrorData'},
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"container_uri": {"key": "containerUri", "type": "str"},
"input_data_uri": {"key": "inputDataUri", "type": "str"},
"input_data_format": {"key": "inputDataFormat", "type": "str"},
"input_params": {"key": "inputParams", "type": "object"},
"provider_id": {"key": "providerId", "type": "str"},
"target": {"key": "target", "type": "str"},
"metadata": {"key": "metadata", "type": "{str}"},
"output_data_uri": {"key": "outputDataUri", "type": "str"},
"output_data_format": {"key": "outputDataFormat", "type": "str"},
"status": {"key": "status", "type": "str"},
"creation_time": {"key": "creationTime", "type": "iso-8601"},
"begin_execution_time": {
"key": "beginExecutionTime",
"type": "iso-8601",
},
"end_execution_time": {"key": "endExecutionTime", "type": "iso-8601"},
"cancellation_time": {"key": "cancellationTime", "type": "iso-8601"},
"error_data": {"key": "errorData", "type": "ErrorData"},
}

def __init__(self, **kwargs):
super(JobDetails, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
self.name = kwargs.get('name', None)
self.container_uri = kwargs.get('container_uri', None)
self.input_data_uri = kwargs.get('input_data_uri', None)
self.input_data_format = kwargs.get('input_data_format', None)
self.input_params = kwargs.get('input_params', None)
self.provider_id = kwargs.get('provider_id', None)
self.target = kwargs.get('target', None)
self.metadata = kwargs.get('metadata', None)
self.output_data_uri = kwargs.get('output_data_uri', None)
self.output_data_format = kwargs.get('output_data_format', None)
self.id = kwargs.get("id", None)
self.name = kwargs.get("name", None)
self.container_uri = kwargs.get("container_uri", None)
self.input_data_uri = kwargs.get("input_data_uri", None)
self.input_data_format = kwargs.get("input_data_format", None)
self.input_params = kwargs.get("input_params", None)
self.provider_id = kwargs.get("provider_id", None)
self.target = kwargs.get("target", None)
self.metadata = kwargs.get("metadata", None)
self.output_data_uri = kwargs.get("output_data_uri", None)
self.output_data_format = kwargs.get("output_data_format", None)
self.status = None
self.creation_time = None
self.begin_execution_time = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class JobDetailsPaged(Paged):
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[JobDetails]'}
"next_link": {"key": "nextLink", "type": "str"},
"current_page": {"key": "value", "type": "[JobDetails]"},
}

def __init__(self, *args, **kwargs):
Expand Down
74 changes: 46 additions & 28 deletions azure-quantum/azure/quantum/_client/models/job_details_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,39 +67,57 @@ class JobDetails(Model):
"""

_validation = {
'container_uri': {'required': True},
'input_data_format': {'required': True},
'provider_id': {'required': True},
'target': {'required': True},
'status': {'readonly': True},
'creation_time': {'readonly': True},
'begin_execution_time': {'readonly': True},
'end_execution_time': {'readonly': True},
'cancellation_time': {'readonly': True},
'error_data': {'readonly': True},
"container_uri": {"required": True},
"input_data_format": {"required": True},
"provider_id": {"required": True},
"target": {"required": True},
"status": {"readonly": True},
"creation_time": {"readonly": True},
"begin_execution_time": {"readonly": True},
"end_execution_time": {"readonly": True},
"cancellation_time": {"readonly": True},
"error_data": {"readonly": True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'container_uri': {'key': 'containerUri', 'type': 'str'},
'input_data_uri': {'key': 'inputDataUri', 'type': 'str'},
'input_data_format': {'key': 'inputDataFormat', 'type': 'str'},
'input_params': {'key': 'inputParams', 'type': 'object'},
'provider_id': {'key': 'providerId', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'metadata': {'key': 'metadata', 'type': '{str}'},
'output_data_uri': {'key': 'outputDataUri', 'type': 'str'},
'output_data_format': {'key': 'outputDataFormat', 'type': 'str'},
'status': {'key': 'status', 'type': 'str'},
'creation_time': {'key': 'creationTime', 'type': 'iso-8601'},
'begin_execution_time': {'key': 'beginExecutionTime', 'type': 'iso-8601'},
'end_execution_time': {'key': 'endExecutionTime', 'type': 'iso-8601'},
'cancellation_time': {'key': 'cancellationTime', 'type': 'iso-8601'},
'error_data': {'key': 'errorData', 'type': 'ErrorData'},
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"container_uri": {"key": "containerUri", "type": "str"},
"input_data_uri": {"key": "inputDataUri", "type": "str"},
"input_data_format": {"key": "inputDataFormat", "type": "str"},
"input_params": {"key": "inputParams", "type": "object"},
"provider_id": {"key": "providerId", "type": "str"},
"target": {"key": "target", "type": "str"},
"metadata": {"key": "metadata", "type": "{str}"},
"output_data_uri": {"key": "outputDataUri", "type": "str"},
"output_data_format": {"key": "outputDataFormat", "type": "str"},
"status": {"key": "status", "type": "str"},
"creation_time": {"key": "creationTime", "type": "iso-8601"},
"begin_execution_time": {
"key": "beginExecutionTime",
"type": "iso-8601",
},
"end_execution_time": {"key": "endExecutionTime", "type": "iso-8601"},
"cancellation_time": {"key": "cancellationTime", "type": "iso-8601"},
"error_data": {"key": "errorData", "type": "ErrorData"},
}

def __init__(self, *, container_uri: str, input_data_format: str, provider_id: str, target: str, id: str=None, name: str=None, input_data_uri: str=None, input_params=None, metadata=None, output_data_uri: str=None, output_data_format: str=None, **kwargs) -> None:
def __init__(
self,
*,
container_uri: str,
input_data_format: str,
provider_id: str,
target: str,
id: str = None,
name: str = None,
input_data_uri: str = None,
input_params=None,
metadata=None,
output_data_uri: str = None,
output_data_format: str = None,
**kwargs
) -> None:
super(JobDetails, self).__init__(**kwargs)
self.id = id
self.name = name
Expand Down
12 changes: 6 additions & 6 deletions azure-quantum/azure/quantum/_client/models/provider_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ class ProviderStatus(Model):
"""

_validation = {
'id': {'readonly': True},
'current_availability': {'readonly': True},
'targets': {'readonly': True},
"id": {"readonly": True},
"current_availability": {"readonly": True},
"targets": {"readonly": True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'current_availability': {'key': 'currentAvailability', 'type': 'str'},
'targets': {'key': 'targets', 'type': '[TargetStatus]'},
"id": {"key": "id", "type": "str"},
"current_availability": {"key": "currentAvailability", "type": "str"},
"targets": {"key": "targets", "type": "[TargetStatus]"},
}

def __init__(self, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class ProviderStatusPaged(Paged):
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[ProviderStatus]'}
"next_link": {"key": "nextLink", "type": "str"},
"current_page": {"key": "value", "type": "[ProviderStatus]"},
}

def __init__(self, *args, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ class ProviderStatus(Model):
"""

_validation = {
'id': {'readonly': True},
'current_availability': {'readonly': True},
'targets': {'readonly': True},
"id": {"readonly": True},
"current_availability": {"readonly": True},
"targets": {"readonly": True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'current_availability': {'key': 'currentAvailability', 'type': 'str'},
'targets': {'key': 'targets', 'type': '[TargetStatus]'},
"id": {"key": "id", "type": "str"},
"current_availability": {"key": "currentAvailability", "type": "str"},
"targets": {"key": "targets", "type": "[TargetStatus]"},
}

def __init__(self, **kwargs) -> None:
Expand Down
Loading