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

Custom Vision Training: release_3_3 Prediction: release_3_1 #12105

Merged
merged 2 commits into from
Jun 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Release History

## 3.0.0 (2020-06-22)

*Training 3.3*

**Features**

- Model ImageUrlCreateBatch has a new parameter metadata
- Model ImageIdCreateBatch has a new parameter metadata
- Model Prediction has a new parameter tag_type
- Model ImageFileCreateBatch has a new parameter metadata
- Model Image has a new parameter metadata
- Added operation get_images
- Added operation update_image_metadata
- Added operation get_artifact
- Added operation get_image_count

**Breaking changes**

- Operation import_project has a new signature
- Operation publish_iteration has a new signature
- Operation create_images_from_files has a new signature
- Operation create_images_from_urls has a new signature
- Operation create_images_from_predictions has a new signature

*Prediction 3.1*

**Features**

- Model Prediction has a new parameter tag_type

## 2.0.0 (2020-05-14)

**Features**
Expand All @@ -21,7 +51,7 @@

**Breaking changes**

- Credentials are now longer a simple string, but a `msrest.authentication.ApiKeyCredentials` instance instead
- Credentials are now longer a simple string, but a `msrest.authentication.ApiKeyCredentials` instance instead

**General Breaking changes**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(
raise ValueError("Parameter 'endpoint' must not be None.")
if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
base_url = '{Endpoint}/customvision/v3.0/prediction'
base_url = '{Endpoint}/customvision/v3.1/prediction'

super(CustomVisionPredictionClientConfiguration, self).__init__(base_url)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(
super(CustomVisionPredictionClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '3.0'
self.api_version = '3.1'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from ._models import Prediction
from ._custom_vision_prediction_client_enums import (
CustomVisionErrorCodes,
TagType,
)

__all__ = [
Expand All @@ -32,4 +33,5 @@
'ImageUrl',
'Prediction',
'CustomVisionErrorCodes',
'TagType',
]
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,31 @@ class CustomVisionErrorCodes(str, Enum):
bad_request_project_unknown_classification = "BadRequestProjectUnknownClassification"
bad_request_project_unsupported_domain_type_change = "BadRequestProjectUnsupportedDomainTypeChange"
bad_request_project_unsupported_export_platform = "BadRequestProjectUnsupportedExportPlatform"
bad_request_project_image_preprocessing_settings = "BadRequestProjectImagePreprocessingSettings"
bad_request_project_duplicated = "BadRequestProjectDuplicated"
bad_request_iteration_name = "BadRequestIterationName"
bad_request_iteration_name_not_unique = "BadRequestIterationNameNotUnique"
bad_request_iteration_description = "BadRequestIterationDescription"
bad_request_iteration_is_not_trained = "BadRequestIterationIsNotTrained"
bad_request_iteration_validation_failed = "BadRequestIterationValidationFailed"
bad_request_workspace_cannot_be_modified = "BadRequestWorkspaceCannotBeModified"
bad_request_workspace_not_deletable = "BadRequestWorkspaceNotDeletable"
bad_request_tag_name = "BadRequestTagName"
bad_request_tag_name_not_unique = "BadRequestTagNameNotUnique"
bad_request_tag_description = "BadRequestTagDescription"
bad_request_tag_type = "BadRequestTagType"
bad_request_multiple_negative_tag = "BadRequestMultipleNegativeTag"
bad_request_multiple_general_product_tag = "BadRequestMultipleGeneralProductTag"
bad_request_image_tags = "BadRequestImageTags"
bad_request_image_regions = "BadRequestImageRegions"
bad_request_negative_and_regular_tag_on_same_image = "BadRequestNegativeAndRegularTagOnSameImage"
bad_request_unsupported_domain = "BadRequestUnsupportedDomain"
bad_request_required_param_is_null = "BadRequestRequiredParamIsNull"
bad_request_iteration_is_published = "BadRequestIterationIsPublished"
bad_request_invalid_publish_name = "BadRequestInvalidPublishName"
bad_request_invalid_publish_target = "BadRequestInvalidPublishTarget"
bad_request_unpublish_failed = "BadRequestUnpublishFailed"
bad_request_iteration_not_published = "BadRequestIterationNotPublished"
bad_request_subscription_api = "BadRequestSubscriptionApi"
bad_request_exceed_project_limit = "BadRequestExceedProjectLimit"
bad_request_exceed_iteration_per_project_limit = "BadRequestExceedIterationPerProjectLimit"
Expand All @@ -58,6 +64,7 @@ class CustomVisionErrorCodes(str, Enum):
bad_request_image_url = "BadRequestImageUrl"
bad_request_image_format = "BadRequestImageFormat"
bad_request_image_size_bytes = "BadRequestImageSizeBytes"
bad_request_image_dimensions = "BadRequestImageDimensions"
bad_request_image_exceeded_count = "BadRequestImageExceededCount"
bad_request_training_not_needed = "BadRequestTrainingNotNeeded"
bad_request_training_not_needed_but_training_pipeline_updated = "BadRequestTrainingNotNeededButTrainingPipelineUpdated"
Expand All @@ -80,6 +87,13 @@ class CustomVisionErrorCodes(str, Enum):
bad_request_prediction_results_exceeded_count = "BadRequestPredictionResultsExceededCount"
bad_request_prediction_invalid_application_name = "BadRequestPredictionInvalidApplicationName"
bad_request_prediction_invalid_query_parameters = "BadRequestPredictionInvalidQueryParameters"
bad_request_invalid_import_token = "BadRequestInvalidImportToken"
bad_request_export_while_training = "BadRequestExportWhileTraining"
bad_request_image_metadata_key = "BadRequestImageMetadataKey"
bad_request_image_metadata_value = "BadRequestImageMetadataValue"
bad_request_operation_not_supported = "BadRequestOperationNotSupported"
bad_request_invalid_artifact_uri = "BadRequestInvalidArtifactUri"
bad_request_customer_managed_key_revoked = "BadRequestCustomerManagedKeyRevoked"
bad_request_invalid = "BadRequestInvalid"
unsupported_media_type = "UnsupportedMediaType"
forbidden = "Forbidden"
Expand All @@ -105,10 +119,13 @@ class CustomVisionErrorCodes(str, Enum):
conflict = "Conflict"
conflict_invalid = "ConflictInvalid"
error_unknown = "ErrorUnknown"
error_iteration_copy_failed = "ErrorIterationCopyFailed"
error_prepare_performance_migration_failed = "ErrorPreparePerformanceMigrationFailed"
error_project_invalid_workspace = "ErrorProjectInvalidWorkspace"
error_project_invalid_pipeline_configuration = "ErrorProjectInvalidPipelineConfiguration"
error_project_invalid_domain = "ErrorProjectInvalidDomain"
error_project_training_request_failed = "ErrorProjectTrainingRequestFailed"
error_project_import_request_failed = "ErrorProjectImportRequestFailed"
error_project_export_request_failed = "ErrorProjectExportRequestFailed"
error_featurization_service_unavailable = "ErrorFeaturizationServiceUnavailable"
error_featurization_queue_timeout = "ErrorFeaturizationQueueTimeout"
Expand All @@ -125,4 +142,12 @@ class CustomVisionErrorCodes(str, Enum):
error_prediction = "ErrorPrediction"
error_prediction_storage = "ErrorPredictionStorage"
error_region_proposal = "ErrorRegionProposal"
error_unknown_base_model = "ErrorUnknownBaseModel"
error_invalid = "ErrorInvalid"


class TagType(str, Enum):

regular = "Regular"
negative = "Negative"
general_product = "GeneralProduct"
Original file line number Diff line number Diff line change
Expand Up @@ -62,25 +62,29 @@ class CustomVisionError(Model):
'BadRequestProjectUnknownDomain',
'BadRequestProjectUnknownClassification',
'BadRequestProjectUnsupportedDomainTypeChange',
'BadRequestProjectUnsupportedExportPlatform', 'BadRequestIterationName',
'BadRequestProjectUnsupportedExportPlatform',
'BadRequestProjectImagePreprocessingSettings',
'BadRequestProjectDuplicated', 'BadRequestIterationName',
'BadRequestIterationNameNotUnique', 'BadRequestIterationDescription',
'BadRequestIterationIsNotTrained', 'BadRequestWorkspaceCannotBeModified',
'BadRequestWorkspaceNotDeletable', 'BadRequestTagName',
'BadRequestTagNameNotUnique', 'BadRequestTagDescription',
'BadRequestTagType', 'BadRequestMultipleNegativeTag',
'BadRequestIterationIsNotTrained', 'BadRequestIterationValidationFailed',
'BadRequestWorkspaceCannotBeModified', 'BadRequestWorkspaceNotDeletable',
'BadRequestTagName', 'BadRequestTagNameNotUnique',
'BadRequestTagDescription', 'BadRequestTagType',
'BadRequestMultipleNegativeTag', 'BadRequestMultipleGeneralProductTag',
'BadRequestImageTags', 'BadRequestImageRegions',
'BadRequestNegativeAndRegularTagOnSameImage',
'BadRequestRequiredParamIsNull', 'BadRequestIterationIsPublished',
'BadRequestInvalidPublishName', 'BadRequestInvalidPublishTarget',
'BadRequestUnpublishFailed', 'BadRequestSubscriptionApi',
'BadRequestUnsupportedDomain', 'BadRequestRequiredParamIsNull',
'BadRequestIterationIsPublished', 'BadRequestInvalidPublishName',
'BadRequestInvalidPublishTarget', 'BadRequestUnpublishFailed',
'BadRequestIterationNotPublished', 'BadRequestSubscriptionApi',
'BadRequestExceedProjectLimit',
'BadRequestExceedIterationPerProjectLimit',
'BadRequestExceedTagPerProjectLimit', 'BadRequestExceedTagPerImageLimit',
'BadRequestExceededQuota', 'BadRequestCannotMigrateProjectWithName',
'BadRequestNotLimitedTrial', 'BadRequestImageBatch',
'BadRequestImageStream', 'BadRequestImageUrl', 'BadRequestImageFormat',
'BadRequestImageSizeBytes', 'BadRequestImageExceededCount',
'BadRequestTrainingNotNeeded',
'BadRequestImageSizeBytes', 'BadRequestImageDimensions',
'BadRequestImageExceededCount', 'BadRequestTrainingNotNeeded',
'BadRequestTrainingNotNeededButTrainingPipelineUpdated',
'BadRequestTrainingValidationFailed',
'BadRequestClassificationTrainingValidationFailed',
Expand All @@ -98,7 +102,11 @@ class CustomVisionError(Model):
'BadRequestPredictionTagsExceededCount',
'BadRequestPredictionResultsExceededCount',
'BadRequestPredictionInvalidApplicationName',
'BadRequestPredictionInvalidQueryParameters', 'BadRequestInvalid',
'BadRequestPredictionInvalidQueryParameters',
'BadRequestInvalidImportToken', 'BadRequestExportWhileTraining',
'BadRequestImageMetadataKey', 'BadRequestImageMetadataValue',
'BadRequestOperationNotSupported', 'BadRequestInvalidArtifactUri',
'BadRequestCustomerManagedKeyRevoked', 'BadRequestInvalid',
'UnsupportedMediaType', 'Forbidden', 'ForbiddenUser',
'ForbiddenUserResource', 'ForbiddenUserSignupDisabled',
'ForbiddenUserSignupAllowanceExceeded', 'ForbiddenUserDoesNotExist',
Expand All @@ -107,19 +115,20 @@ class CustomVisionError(Model):
'NotFoundProject', 'NotFoundProjectDefaultIteration', 'NotFoundIteration',
'NotFoundIterationPerformance', 'NotFoundTag', 'NotFoundImage',
'NotFoundDomain', 'NotFoundApimSubscription', 'NotFoundInvalid',
'Conflict', 'ConflictInvalid', 'ErrorUnknown',
'ErrorProjectInvalidWorkspace',
'Conflict', 'ConflictInvalid', 'ErrorUnknown', 'ErrorIterationCopyFailed',
'ErrorPreparePerformanceMigrationFailed', 'ErrorProjectInvalidWorkspace',
'ErrorProjectInvalidPipelineConfiguration', 'ErrorProjectInvalidDomain',
'ErrorProjectTrainingRequestFailed', 'ErrorProjectExportRequestFailed',
'ErrorFeaturizationServiceUnavailable', 'ErrorFeaturizationQueueTimeout',
'ErrorFeaturizationInvalidFeaturizer',
'ErrorProjectTrainingRequestFailed', 'ErrorProjectImportRequestFailed',
'ErrorProjectExportRequestFailed', 'ErrorFeaturizationServiceUnavailable',
'ErrorFeaturizationQueueTimeout', 'ErrorFeaturizationInvalidFeaturizer',
'ErrorFeaturizationAugmentationUnavailable',
'ErrorFeaturizationUnrecognizedJob',
'ErrorFeaturizationAugmentationError', 'ErrorExporterInvalidPlatform',
'ErrorExporterInvalidFeaturizer', 'ErrorExporterInvalidClassifier',
'ErrorPredictionServiceUnavailable', 'ErrorPredictionModelNotFound',
'ErrorPredictionModelNotCached', 'ErrorPrediction',
'ErrorPredictionStorage', 'ErrorRegionProposal', 'ErrorInvalid'
'ErrorPredictionStorage', 'ErrorRegionProposal', 'ErrorUnknownBaseModel',
'ErrorInvalid'
:type code: str or
~azure.cognitiveservices.vision.customvision.prediction.models.CustomVisionErrorCodes
:param message: Required. A message explaining the error reported by the
Expand Down Expand Up @@ -236,20 +245,26 @@ class Prediction(Model):
:ivar bounding_box: Bounding box of the prediction.
:vartype bounding_box:
~azure.cognitiveservices.vision.customvision.prediction.models.BoundingBox
:ivar tag_type: Type of the predicted tag. Possible values include:
'Regular', 'Negative', 'GeneralProduct'
:vartype tag_type: str or
~azure.cognitiveservices.vision.customvision.prediction.models.TagType
"""

_validation = {
'probability': {'readonly': True},
'tag_id': {'readonly': True},
'tag_name': {'readonly': True},
'bounding_box': {'readonly': True},
'tag_type': {'readonly': True},
}

_attribute_map = {
'probability': {'key': 'probability', 'type': 'float'},
'tag_id': {'key': 'tagId', 'type': 'str'},
'tag_name': {'key': 'tagName', 'type': 'str'},
'bounding_box': {'key': 'boundingBox', 'type': 'BoundingBox'},
'tag_type': {'key': 'tagType', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -258,3 +273,4 @@ def __init__(self, **kwargs):
self.tag_id = None
self.tag_name = None
self.bounding_box = None
self.tag_type = None
Original file line number Diff line number Diff line change
Expand Up @@ -62,25 +62,29 @@ class CustomVisionError(Model):
'BadRequestProjectUnknownDomain',
'BadRequestProjectUnknownClassification',
'BadRequestProjectUnsupportedDomainTypeChange',
'BadRequestProjectUnsupportedExportPlatform', 'BadRequestIterationName',
'BadRequestProjectUnsupportedExportPlatform',
'BadRequestProjectImagePreprocessingSettings',
'BadRequestProjectDuplicated', 'BadRequestIterationName',
'BadRequestIterationNameNotUnique', 'BadRequestIterationDescription',
'BadRequestIterationIsNotTrained', 'BadRequestWorkspaceCannotBeModified',
'BadRequestWorkspaceNotDeletable', 'BadRequestTagName',
'BadRequestTagNameNotUnique', 'BadRequestTagDescription',
'BadRequestTagType', 'BadRequestMultipleNegativeTag',
'BadRequestIterationIsNotTrained', 'BadRequestIterationValidationFailed',
'BadRequestWorkspaceCannotBeModified', 'BadRequestWorkspaceNotDeletable',
'BadRequestTagName', 'BadRequestTagNameNotUnique',
'BadRequestTagDescription', 'BadRequestTagType',
'BadRequestMultipleNegativeTag', 'BadRequestMultipleGeneralProductTag',
'BadRequestImageTags', 'BadRequestImageRegions',
'BadRequestNegativeAndRegularTagOnSameImage',
'BadRequestRequiredParamIsNull', 'BadRequestIterationIsPublished',
'BadRequestInvalidPublishName', 'BadRequestInvalidPublishTarget',
'BadRequestUnpublishFailed', 'BadRequestSubscriptionApi',
'BadRequestUnsupportedDomain', 'BadRequestRequiredParamIsNull',
'BadRequestIterationIsPublished', 'BadRequestInvalidPublishName',
'BadRequestInvalidPublishTarget', 'BadRequestUnpublishFailed',
'BadRequestIterationNotPublished', 'BadRequestSubscriptionApi',
'BadRequestExceedProjectLimit',
'BadRequestExceedIterationPerProjectLimit',
'BadRequestExceedTagPerProjectLimit', 'BadRequestExceedTagPerImageLimit',
'BadRequestExceededQuota', 'BadRequestCannotMigrateProjectWithName',
'BadRequestNotLimitedTrial', 'BadRequestImageBatch',
'BadRequestImageStream', 'BadRequestImageUrl', 'BadRequestImageFormat',
'BadRequestImageSizeBytes', 'BadRequestImageExceededCount',
'BadRequestTrainingNotNeeded',
'BadRequestImageSizeBytes', 'BadRequestImageDimensions',
'BadRequestImageExceededCount', 'BadRequestTrainingNotNeeded',
'BadRequestTrainingNotNeededButTrainingPipelineUpdated',
'BadRequestTrainingValidationFailed',
'BadRequestClassificationTrainingValidationFailed',
Expand All @@ -98,7 +102,11 @@ class CustomVisionError(Model):
'BadRequestPredictionTagsExceededCount',
'BadRequestPredictionResultsExceededCount',
'BadRequestPredictionInvalidApplicationName',
'BadRequestPredictionInvalidQueryParameters', 'BadRequestInvalid',
'BadRequestPredictionInvalidQueryParameters',
'BadRequestInvalidImportToken', 'BadRequestExportWhileTraining',
'BadRequestImageMetadataKey', 'BadRequestImageMetadataValue',
'BadRequestOperationNotSupported', 'BadRequestInvalidArtifactUri',
'BadRequestCustomerManagedKeyRevoked', 'BadRequestInvalid',
'UnsupportedMediaType', 'Forbidden', 'ForbiddenUser',
'ForbiddenUserResource', 'ForbiddenUserSignupDisabled',
'ForbiddenUserSignupAllowanceExceeded', 'ForbiddenUserDoesNotExist',
Expand All @@ -107,19 +115,20 @@ class CustomVisionError(Model):
'NotFoundProject', 'NotFoundProjectDefaultIteration', 'NotFoundIteration',
'NotFoundIterationPerformance', 'NotFoundTag', 'NotFoundImage',
'NotFoundDomain', 'NotFoundApimSubscription', 'NotFoundInvalid',
'Conflict', 'ConflictInvalid', 'ErrorUnknown',
'ErrorProjectInvalidWorkspace',
'Conflict', 'ConflictInvalid', 'ErrorUnknown', 'ErrorIterationCopyFailed',
'ErrorPreparePerformanceMigrationFailed', 'ErrorProjectInvalidWorkspace',
'ErrorProjectInvalidPipelineConfiguration', 'ErrorProjectInvalidDomain',
'ErrorProjectTrainingRequestFailed', 'ErrorProjectExportRequestFailed',
'ErrorFeaturizationServiceUnavailable', 'ErrorFeaturizationQueueTimeout',
'ErrorFeaturizationInvalidFeaturizer',
'ErrorProjectTrainingRequestFailed', 'ErrorProjectImportRequestFailed',
'ErrorProjectExportRequestFailed', 'ErrorFeaturizationServiceUnavailable',
'ErrorFeaturizationQueueTimeout', 'ErrorFeaturizationInvalidFeaturizer',
'ErrorFeaturizationAugmentationUnavailable',
'ErrorFeaturizationUnrecognizedJob',
'ErrorFeaturizationAugmentationError', 'ErrorExporterInvalidPlatform',
'ErrorExporterInvalidFeaturizer', 'ErrorExporterInvalidClassifier',
'ErrorPredictionServiceUnavailable', 'ErrorPredictionModelNotFound',
'ErrorPredictionModelNotCached', 'ErrorPrediction',
'ErrorPredictionStorage', 'ErrorRegionProposal', 'ErrorInvalid'
'ErrorPredictionStorage', 'ErrorRegionProposal', 'ErrorUnknownBaseModel',
'ErrorInvalid'
:type code: str or
~azure.cognitiveservices.vision.customvision.prediction.models.CustomVisionErrorCodes
:param message: Required. A message explaining the error reported by the
Expand Down Expand Up @@ -236,20 +245,26 @@ class Prediction(Model):
:ivar bounding_box: Bounding box of the prediction.
:vartype bounding_box:
~azure.cognitiveservices.vision.customvision.prediction.models.BoundingBox
:ivar tag_type: Type of the predicted tag. Possible values include:
'Regular', 'Negative', 'GeneralProduct'
:vartype tag_type: str or
~azure.cognitiveservices.vision.customvision.prediction.models.TagType
"""

_validation = {
'probability': {'readonly': True},
'tag_id': {'readonly': True},
'tag_name': {'readonly': True},
'bounding_box': {'readonly': True},
'tag_type': {'readonly': True},
}

_attribute_map = {
'probability': {'key': 'probability', 'type': 'float'},
'tag_id': {'key': 'tagId', 'type': 'str'},
'tag_name': {'key': 'tagName', 'type': 'str'},
'bounding_box': {'key': 'boundingBox', 'type': 'BoundingBox'},
'tag_type': {'key': 'tagType', 'type': 'str'},
}

def __init__(self, **kwargs) -> None:
Expand All @@ -258,3 +273,4 @@ def __init__(self, **kwargs) -> None:
self.tag_id = None
self.tag_name = None
self.bounding_box = None
self.tag_type = None
Loading