Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into regenerate_keys

* 'master' of https://github.com/Azure/azure-sdk-for-python:
  Resolve Pip Related Errors (Azure#12157)
  [Service Bus] Delete swagger file (Azure#12097)
  Add set_delete_after_tag as a parameter on ResourceGroupPreparer (Azure#11749)
  Custom Vision Training: release_3_3 Prediction: release_3_1 (Azure#12105)
  Don't redact Key Vault header values in logs (Azure#12077)
  • Loading branch information
iscai-msft committed Jun 23, 2020
2 parents c4589a0 + c5ca969 commit bf3ee1c
Show file tree
Hide file tree
Showing 26 changed files with 919 additions and 1,178 deletions.
2 changes: 1 addition & 1 deletion eng/ci_tools.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# requirements leveraged by ci tools
setuptools==44.1.0; python_version == '2.7'
setuptools==45.1.0; python_version >= '3.5'
virtualenv==20.0.24
wheel==0.34.2
Jinja2==2.11.1
packaging==20.4
Expand Down Expand Up @@ -32,4 +33,3 @@ pytest-cov==2.8.1
./tools/azure-sdk-tools



32 changes: 16 additions & 16 deletions eng/pipelines/templates/steps/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,27 @@ steps:
- template: /eng/common/pipelines/templates/steps/verify-agent-os.yml

- script: |
python -m pip install pip == 20.1
pip install -r eng/ci_tools.txt
pip --version
python -m pip install -r eng/ci_tools.txt
mkdir $(Build.SourcesDirectory)/env
python -m virtualenv $(Build.SourcesDirectory)/env
displayName: 'Prep Environment'
- ${{ parameters.BeforeTestSteps }}

- task: PythonScript@0
displayName: 'Run Tests'
inputs:
scriptPath: 'scripts/devops_tasks/setup_execute_tests.py'
arguments: >-
"${{ parameters.BuildTargetingString }}"
${{ parameters.AdditionalTestArgs }}
${{ parameters.CoverageArg }}
--mark_arg="${{ parameters.TestMarkArgument }}"
--service="${{ parameters.ServiceDirectory }}"
--toxenv="${{ parameters.ToxTestEnv }}"
--injected-packages="${{ parameters.InjectedPackages }}"
${{ parameters.ToxEnvParallel }}
- pwsh: |
$env:Path = "$(Build.SourcesDirectory)/env;" + $env:Path
python -m pip install pip==20.1
python -m pip install -r eng/ci_tools.txt
python -m pip --version
$env:PYTHON_HOME = ""
$env:VIRTUAL_ENV = "$(Build.SourcesDirectory)/env"
Write-Host 'python ./scripts/devops_tasks/setup_execute_tests.py "${{ parameters.BuildTargetingString }}" ${{ parameters.AdditionalTestArgs }} ${{ parameters.CoverageArg }} --mark_arg="${{ parameters.TestMarkArgument }}" --service="${{ parameters.ServiceDirectory }}" --toxenv="${{ parameters.ToxTestEnv }}" --injected-packages="${{ parameters.InjectedPackages }}" ${{ parameters.ToxEnvParallel }}"'
python ./scripts/devops_tasks/setup_execute_tests.py "${{ parameters.BuildTargetingString }}" ${{ parameters.AdditionalTestArgs }} ${{ parameters.CoverageArg }} --mark_arg="${{ parameters.TestMarkArgument }}" --service="${{ parameters.ServiceDirectory }}" --toxenv="${{ parameters.ToxTestEnv }}" --injected-packages="${{ parameters.InjectedPackages }}" ${{ parameters.ToxEnvParallel }}
env: ${{ parameters.EnvVars }}
displayName: 'Run Tests'
- ${{ parameters.AfterTestSteps }}

Expand Down
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
Loading

0 comments on commit bf3ee1c

Please sign in to comment.