Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
3ca2f77
Generated from 1630f5cb8b1aa7cfc7a7c197314cce790d30b9b8
AutorestCI Feb 6, 2019
81dafa2
Packaging update of azure-cognitiveservices-vision-customvision
azuresdkci Feb 6, 2019
5f0b743
Generated from eebaa5a8e8f1f30d9688d8f8f79f570ca5ef8df3
AutorestCI Feb 19, 2019
4313fc9
Generated from dd550d7caa1acd50b4ed7ba1f7d86f56b8c3975b
AutorestCI Feb 27, 2019
128ff9f
Generated from dbcb8fc77937f546d431b904d13442140041eb49
AutorestCI Feb 27, 2019
0116def
Generated from 370169abdf402f69926ea95090bfd7a16965be25
AutorestCI Mar 4, 2019
2677542
Packaging update of azure-cognitiveservices-vision-customvision
azuresdkci Mar 4, 2019
9d5154c
Generated from 1569f403797a5e34f098a04d0d69c5d4678bbbac
AutorestCI Mar 8, 2019
5e2cb17
Packaging update of azure-cognitiveservices-vision-customvision
azuresdkci Mar 8, 2019
2babd4a
Generated from 5a874832754b7eb77befdb2e49d2123478896da5
AutorestCI Mar 12, 2019
0ed3059
Generated from 2cd4f8e34ca378f2e83d492d91b745ca83f50d2d
AutorestCI Mar 12, 2019
fd53319
Generated from 28061f5764b1232660469010b44c16d5a91a116e
AutorestCI Mar 12, 2019
986f6ec
Generated from 47d990ef0e304c8b3d7dd30987d1d7ef9e6e55c6
AutorestCI Mar 12, 2019
185fddb
Generated from 5adc21c930bdad8bccc0fbb82ac7c049aae4b9b0
AutorestCI Mar 20, 2019
4c76606
Generated from 79d1c5ef4f2f3e560fb15ffe3f439e8a8fbf13bd
AutorestCI Mar 20, 2019
f75a72b
Generated from 88b8b15c44d7c0f1fad2ba6d8bbad585ca4d8150
AutorestCI Mar 20, 2019
5d57dac
1.0.0
lmazuel Mar 22, 2019
f9e0fe8
Fix changeLog
lmazuel Mar 22, 2019
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
1 change: 1 addition & 0 deletions azure-cognitiveservices-vision-customvision/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/cognitiveservices/__init__.py
Expand Down
22 changes: 3 additions & 19 deletions azure-cognitiveservices-vision-customvision/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,6 @@ This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell

pip freeze

If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell

pip uninstall azure


Usage
=====

Expand All @@ -41,3 +22,6 @@ Provide Feedback
If you encounter any bugs or have suggestions, please file an issue in the
`Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
section of the project.


.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-cognitiveservices-vision-customvision%2FREADME.png

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,22 @@
from .bounding_box_py3 import BoundingBox
from .prediction_py3 import Prediction
from .image_prediction_py3 import ImagePrediction
from .custom_vision_error_py3 import CustomVisionError, CustomVisionErrorException
except (SyntaxError, ImportError):
from .image_url import ImageUrl
from .bounding_box import BoundingBox
from .prediction import Prediction
from .image_prediction import ImagePrediction
from .custom_vision_error import CustomVisionError, CustomVisionErrorException
from .custom_vision_prediction_client_enums import (
CustomVisionErrorCodes,
)

__all__ = [
'ImageUrl',
'BoundingBox',
'Prediction',
'ImagePrediction',
'CustomVisionError', 'CustomVisionErrorException',
'CustomVisionErrorCodes',
]
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,27 @@


class BoundingBox(Model):
"""BoundingBox.
"""Bounding box that defines a region of an image.

:param left:
All required parameters must be populated in order to send to Azure.

:param left: Required. Coordinate of the left boundary.
:type left: float
:param top:
:param top: Required. Coordinate of the top boundary.
:type top: float
:param width:
:param width: Required. Width.
:type width: float
:param height:
:param height: Required. Height.
:type height: float
"""

_validation = {
'left': {'required': True},
'top': {'required': True},
'width': {'required': True},
'height': {'required': True},
}

_attribute_map = {
'left': {'key': 'left', 'type': 'float'},
'top': {'key': 'top', 'type': 'float'},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,35 @@


class BoundingBox(Model):
"""BoundingBox.
"""Bounding box that defines a region of an image.

:param left:
All required parameters must be populated in order to send to Azure.

:param left: Required. Coordinate of the left boundary.
:type left: float
:param top:
:param top: Required. Coordinate of the top boundary.
:type top: float
:param width:
:param width: Required. Width.
:type width: float
:param height:
:param height: Required. Height.
:type height: float
"""

_validation = {
'left': {'required': True},
'top': {'required': True},
'width': {'required': True},
'height': {'required': True},
}

_attribute_map = {
'left': {'key': 'left', 'type': 'float'},
'top': {'key': 'top', 'type': 'float'},
'width': {'key': 'width', 'type': 'float'},
'height': {'key': 'height', 'type': 'float'},
}

def __init__(self, *, left: float=None, top: float=None, width: float=None, height: float=None, **kwargs) -> None:
def __init__(self, *, left: float, top: float, width: float, height: float, **kwargs) -> None:
super(BoundingBox, self).__init__(**kwargs)
self.left = left
self.top = top
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model
from msrest.exceptions import HttpOperationError


class CustomVisionError(Model):
"""CustomVisionError.

All required parameters must be populated in order to send to Azure.

:param code: Required. The error code. Possible values include: 'NoError',
'BadRequest', 'BadRequestExceededBatchSize', 'BadRequestNotSupported',
'BadRequestInvalidIds', 'BadRequestProjectName',
'BadRequestProjectNameNotUnique', 'BadRequestProjectDescription',
'BadRequestProjectUnknownDomain',
'BadRequestProjectUnknownClassification',
'BadRequestProjectUnsupportedDomainTypeChange',
'BadRequestProjectUnsupportedExportPlatform', 'BadRequestIterationName',
'BadRequestIterationNameNotUnique', 'BadRequestIterationDescription',
'BadRequestIterationIsNotTrained', 'BadRequestWorkspaceCannotBeModified',
'BadRequestWorkspaceNotDeletable', 'BadRequestTagName',
'BadRequestTagNameNotUnique', 'BadRequestTagDescription',
'BadRequestTagType', 'BadRequestMultipleNegativeTag',
'BadRequestImageTags', 'BadRequestImageRegions',
'BadRequestNegativeAndRegularTagOnSameImage',
'BadRequestRequiredParamIsNull', 'BadRequestIterationIsPublished',
'BadRequestInvalidPublishName', 'BadRequestInvalidPublishTarget',
'BadRequestUnpublishFailed', 'BadRequestSubscriptionApi',
'BadRequestExceedProjectLimit',
'BadRequestExceedIterationPerProjectLimit',
'BadRequestExceedTagPerProjectLimit', 'BadRequestExceedTagPerImageLimit',
'BadRequestExceededQuota', 'BadRequestCannotMigrateProjectWithName',
'BadRequestNotLimitedTrial', 'BadRequestImageBatch',
'BadRequestImageStream', 'BadRequestImageUrl', 'BadRequestImageFormat',
'BadRequestImageSizeBytes', 'BadRequestImageExceededCount',
'BadRequestTrainingNotNeeded',
'BadRequestTrainingNotNeededButTrainingPipelineUpdated',
'BadRequestTrainingValidationFailed',
'BadRequestClassificationTrainingValidationFailed',
'BadRequestMultiClassClassificationTrainingValidationFailed',
'BadRequestMultiLabelClassificationTrainingValidationFailed',
'BadRequestDetectionTrainingValidationFailed',
'BadRequestTrainingAlreadyInProgress',
'BadRequestDetectionTrainingNotAllowNegativeTag',
'BadRequestInvalidEmailAddress',
'BadRequestDomainNotSupportedForAdvancedTraining',
'BadRequestExportPlatformNotSupportedForAdvancedTraining',
'BadRequestReservedBudgetInHoursNotEnoughForAdvancedTraining',
'BadRequestExportValidationFailed', 'BadRequestExportAlreadyInProgress',
'BadRequestPredictionIdsMissing', 'BadRequestPredictionIdsExceededCount',
'BadRequestPredictionTagsExceededCount',
'BadRequestPredictionResultsExceededCount',
'BadRequestPredictionInvalidApplicationName',
'BadRequestPredictionInvalidQueryParameters', 'BadRequestInvalid',
'UnsupportedMediaType', 'Forbidden', 'ForbiddenUser',
'ForbiddenUserResource', 'ForbiddenUserSignupDisabled',
'ForbiddenUserSignupAllowanceExceeded', 'ForbiddenUserDoesNotExist',
'ForbiddenUserDisabled', 'ForbiddenUserInsufficientCapability',
'ForbiddenDRModeEnabled', 'ForbiddenInvalid', 'NotFound',
'NotFoundProject', 'NotFoundProjectDefaultIteration', 'NotFoundIteration',
'NotFoundIterationPerformance', 'NotFoundTag', 'NotFoundImage',
'NotFoundDomain', 'NotFoundApimSubscription', 'NotFoundInvalid',
'Conflict', 'ConflictInvalid', 'ErrorUnknown',
'ErrorProjectInvalidWorkspace',
'ErrorProjectInvalidPipelineConfiguration', 'ErrorProjectInvalidDomain',
'ErrorProjectTrainingRequestFailed', 'ErrorProjectExportRequestFailed',
'ErrorFeaturizationServiceUnavailable', 'ErrorFeaturizationQueueTimeout',
'ErrorFeaturizationInvalidFeaturizer',
'ErrorFeaturizationAugmentationUnavailable',
'ErrorFeaturizationUnrecognizedJob',
'ErrorFeaturizationAugmentationError', 'ErrorExporterInvalidPlatform',
'ErrorExporterInvalidFeaturizer', 'ErrorExporterInvalidClassifier',
'ErrorPredictionServiceUnavailable', 'ErrorPredictionModelNotFound',
'ErrorPredictionModelNotCached', 'ErrorPrediction',
'ErrorPredictionStorage', 'ErrorRegionProposal', 'ErrorInvalid'
:type code: str or
~azure.cognitiveservices.vision.customvision.prediction.models.CustomVisionErrorCodes
:param message: Required. A message explaining the error reported by the
service.
:type message: str
"""

_validation = {
'code': {'required': True},
'message': {'required': True},
}

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

def __init__(self, **kwargs):
super(CustomVisionError, self).__init__(**kwargs)
self.code = kwargs.get('code', None)
self.message = kwargs.get('message', None)


class CustomVisionErrorException(HttpOperationError):
"""Server responsed with exception of type: 'CustomVisionError'.

:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""

def __init__(self, deserialize, response, *args):

super(CustomVisionErrorException, self).__init__(deserialize, response, 'CustomVisionError', *args)
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model
from msrest.exceptions import HttpOperationError


class CustomVisionError(Model):
"""CustomVisionError.

All required parameters must be populated in order to send to Azure.

:param code: Required. The error code. Possible values include: 'NoError',
'BadRequest', 'BadRequestExceededBatchSize', 'BadRequestNotSupported',
'BadRequestInvalidIds', 'BadRequestProjectName',
'BadRequestProjectNameNotUnique', 'BadRequestProjectDescription',
'BadRequestProjectUnknownDomain',
'BadRequestProjectUnknownClassification',
'BadRequestProjectUnsupportedDomainTypeChange',
'BadRequestProjectUnsupportedExportPlatform', 'BadRequestIterationName',
'BadRequestIterationNameNotUnique', 'BadRequestIterationDescription',
'BadRequestIterationIsNotTrained', 'BadRequestWorkspaceCannotBeModified',
'BadRequestWorkspaceNotDeletable', 'BadRequestTagName',
'BadRequestTagNameNotUnique', 'BadRequestTagDescription',
'BadRequestTagType', 'BadRequestMultipleNegativeTag',
'BadRequestImageTags', 'BadRequestImageRegions',
'BadRequestNegativeAndRegularTagOnSameImage',
'BadRequestRequiredParamIsNull', 'BadRequestIterationIsPublished',
'BadRequestInvalidPublishName', 'BadRequestInvalidPublishTarget',
'BadRequestUnpublishFailed', 'BadRequestSubscriptionApi',
'BadRequestExceedProjectLimit',
'BadRequestExceedIterationPerProjectLimit',
'BadRequestExceedTagPerProjectLimit', 'BadRequestExceedTagPerImageLimit',
'BadRequestExceededQuota', 'BadRequestCannotMigrateProjectWithName',
'BadRequestNotLimitedTrial', 'BadRequestImageBatch',
'BadRequestImageStream', 'BadRequestImageUrl', 'BadRequestImageFormat',
'BadRequestImageSizeBytes', 'BadRequestImageExceededCount',
'BadRequestTrainingNotNeeded',
'BadRequestTrainingNotNeededButTrainingPipelineUpdated',
'BadRequestTrainingValidationFailed',
'BadRequestClassificationTrainingValidationFailed',
'BadRequestMultiClassClassificationTrainingValidationFailed',
'BadRequestMultiLabelClassificationTrainingValidationFailed',
'BadRequestDetectionTrainingValidationFailed',
'BadRequestTrainingAlreadyInProgress',
'BadRequestDetectionTrainingNotAllowNegativeTag',
'BadRequestInvalidEmailAddress',
'BadRequestDomainNotSupportedForAdvancedTraining',
'BadRequestExportPlatformNotSupportedForAdvancedTraining',
'BadRequestReservedBudgetInHoursNotEnoughForAdvancedTraining',
'BadRequestExportValidationFailed', 'BadRequestExportAlreadyInProgress',
'BadRequestPredictionIdsMissing', 'BadRequestPredictionIdsExceededCount',
'BadRequestPredictionTagsExceededCount',
'BadRequestPredictionResultsExceededCount',
'BadRequestPredictionInvalidApplicationName',
'BadRequestPredictionInvalidQueryParameters', 'BadRequestInvalid',
'UnsupportedMediaType', 'Forbidden', 'ForbiddenUser',
'ForbiddenUserResource', 'ForbiddenUserSignupDisabled',
'ForbiddenUserSignupAllowanceExceeded', 'ForbiddenUserDoesNotExist',
'ForbiddenUserDisabled', 'ForbiddenUserInsufficientCapability',
'ForbiddenDRModeEnabled', 'ForbiddenInvalid', 'NotFound',
'NotFoundProject', 'NotFoundProjectDefaultIteration', 'NotFoundIteration',
'NotFoundIterationPerformance', 'NotFoundTag', 'NotFoundImage',
'NotFoundDomain', 'NotFoundApimSubscription', 'NotFoundInvalid',
'Conflict', 'ConflictInvalid', 'ErrorUnknown',
'ErrorProjectInvalidWorkspace',
'ErrorProjectInvalidPipelineConfiguration', 'ErrorProjectInvalidDomain',
'ErrorProjectTrainingRequestFailed', 'ErrorProjectExportRequestFailed',
'ErrorFeaturizationServiceUnavailable', 'ErrorFeaturizationQueueTimeout',
'ErrorFeaturizationInvalidFeaturizer',
'ErrorFeaturizationAugmentationUnavailable',
'ErrorFeaturizationUnrecognizedJob',
'ErrorFeaturizationAugmentationError', 'ErrorExporterInvalidPlatform',
'ErrorExporterInvalidFeaturizer', 'ErrorExporterInvalidClassifier',
'ErrorPredictionServiceUnavailable', 'ErrorPredictionModelNotFound',
'ErrorPredictionModelNotCached', 'ErrorPrediction',
'ErrorPredictionStorage', 'ErrorRegionProposal', 'ErrorInvalid'
:type code: str or
~azure.cognitiveservices.vision.customvision.prediction.models.CustomVisionErrorCodes
:param message: Required. A message explaining the error reported by the
service.
:type message: str
"""

_validation = {
'code': {'required': True},
'message': {'required': True},
}

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

def __init__(self, *, code, message: str, **kwargs) -> None:
super(CustomVisionError, self).__init__(**kwargs)
self.code = code
self.message = message


class CustomVisionErrorException(HttpOperationError):
"""Server responsed with exception of type: 'CustomVisionError'.

:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""

def __init__(self, deserialize, response, *args):

super(CustomVisionErrorException, self).__init__(deserialize, response, 'CustomVisionError', *args)
Loading