次の方法で共有


CustomVisionError クラス

CustomVisionError。

Azure に送信するには、必要なすべてのパラメーターを設定する必要があります。

継承
CustomVisionError

コンストラクター

CustomVisionError(*, code, message: str, **kwargs)

パラメーター

code
str または CustomVisionErrorCodes
必須

必須。 エラー コード。 使用できる値は、'NoError'、'BadRequest'、'BadRequestExceededBatchSize'、'BadRequestNotSupported'、'BadRequestInvalidIds'、 'BadRequestProjectName'、'BadRequestProjectNameNotUnique'、'BadRequestProjectDescription'、'BadRequestProjectUnknownDomain'、'BadRequestProjectUnknownClassification'、'BadRequestProjectUnsupportedDomainTypeChange'、'BadRequestProjectUnsupportedExportPlatform'、'BadRequestProjectImagePreprocessingSettings'、'BadRequestProjectDuplicated'、'BadRequestIterationName'、'BadRequestIterationNameNotUnique'、'BadRequestIterationDescription'、'BadRequestIterationIsNotTrained'、 'BadRequestIterationValidationFailed'、'BadRequestWorkspaceCannotBeModified'、'BadRequestWorkspaceNotDeletable'、'BadRequestTagName'、'BadRequestTagNameNotUnique'、'BadRequestTagDescription'、'BadRequestTagType'、'BadRequestMultipleNegativeTag'、'BadRequestMultipleGeneralProductTag'、'BadRequestImageTags'、'BadRequestImageRegions'、'BadRequestNegativeAndRegularTagOnSameImage'、'BadRequestUnsupportedDomain'、'BadRequestRequiredParamIsNull'、'BadRequestIterationIsPublished'、 'BadRequestInvalidPublishName'、'BadRequestInvalidPublishTarget'、'BadRequestUnpublishFailed'、'BadRequestIterationNotPublished'、'BadRequestSubscriptionApi'、'BadRequestExceedProjectLimit'、'BadRequestExceedIterationPerProjectLimit'、'BadRequestExceedTagPerProjectLimit'、'BadRequestExceedTagPerImageLimit'、'BadRequestExceededQuota'、'BadRequestCannotMigrateProjectWithName'、'BadRequestNotLimitedTrial'、'BadRequestImageBatch'、 'BadRequestImageStream'、'BadRequestImageUrl'、'BadRequestImageFormat'、'BadRequestImageSizeBytes'、'BadRequestImageDimensions'、'BadRequestImageExceededCount'、'BadRequestTrainingNotNeeded'、'BadRequestTrainingNotNeededButTrainingPipelineUpdated'、'BadRequestTrainingValidationFailed'、'BadRequestClassificationTrainingValidationFailed'、'BadRequestMultiClassificationTrainingValidationFailed'、'BadRequestMultiLabelClassificationTrainingValidationFailed'、 'BadRequestDetectionTrainingValidationFailed', 'BadRequestTrainingAlreadyInProgress', 'BadRequestDetectionTrainingNotAllowNegativeTag', 'BadRequestInvalidEmailAddress', 'BadRequestDomainNotSupportedForAdvancedTraining', 'BadRequestExportPlatformNotSupportedForAdvancedTraining', 'BadRequestReservedBudgetInHoursNotEnoughForAdvancedTraining', 'BadRequestExportValidationFailed', 'BadRequestExportAlreadyInProgress', 'BadRequestPredictionIdsMissing', 'BadRequestPredictionIdsExceededCount'、'BadRequestPredictionTagsExceededCount'、'BadRequestPredictionResultsExceededCount'、'BadRequestPredictionInvalidApplicationName'、'BadRequestPredictionInvalidQueryParameters'、'BadRequestInvalidImportToken'、'BadRequestExportWhileTraining'、'BadRequestImageMetadataKey'、'BadRequestImageMetadataValue'、'BadRequestOperationNotSupported'、'BadRequestInvalidArtifactUri'、'BadRequestCustomerManagedKeyRevoked'、 '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'、'ErrorIterationCopyFailed'、'ErrorPreparePerformanceMigrationFailed'、'ErrorProjectInvalidWorkspace'、'ErrorProjectInvalidPipelineConfiguration'、'ErrorProjectInvalidDomain'、'ErrorProjectTrainingRequestFailed'、'ErrorProjectImportRequestFailed'、'ErrorProjectExportRequestFailed'、'ErrorFeaturizationServiceUnavailable'、'ErrorFeaturizationQueueTimeout'、 'ErrorFeaturizationInvalidFeaturizer'、'ErrorFeaturizationAugmentationUnavailable'、'ErrorFeaturizationUnrecognizedJob'、'ErrorFeaturizationAugmentationError'、'ErrorExporterInvalidPlatform'、'ErrorExporterInvalidFeaturizer'、'ErrorExporterInvalidClassifier'、'ErrorPredictionServiceUnavailable'、'ErrorPredictionModelNotFound'、'ErrorPredictionModelNotCached'、'ErrorPrediction'、'ErrorPredictionStorage'、'ErrorRegionProposal'、'ErrorUnknownBaseModel'、'ErrorInvalid'

message
str
必須

必須。 サービスによって報告されたエラーを説明するメッセージ。

メソッド

as_dict

json.dump を使用して JSONify できる dict を返します。

高度な使用法では、必要に応じてコールバックをパラメーターとして使用できます。

キーは、Python で使用される属性名です。 Attr_descはメタデータのディクテーションです。 現在、msrest 型の 'type' と RestAPI でエンコードされたキーを持つ 'key' が含まれています。 値は、このオブジェクトの現在の値です。

返される文字列は、キーのシリアル化に使用されます。 戻り値の型がリストの場合、これは階層的な結果 dict と見なされます。

このファイルの 3 つの例を参照してください。

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

XML シリアル化が必要な場合は、kwargs is_xml=True を渡すことができます。

deserialize

RestAPI 構文を使用して str を解析し、モデルを返します。

enable_additional_properties_sending
from_dict

指定されたキー抽出器を使用してディクテーションを解析し、モデルを返します。

既定では、キー抽出器 (rest_key_case_insensitive_extractor、attribute_key_case_insensitive_extractor、last_rest_key_case_insensitive_extractor) を検討してください

is_xml_model
serialize

このモデルから Azure に送信される JSON を返します。

これは、 as_dict(full_restapi_key_transformer、keep_readonly=False) のエイリアスです

XML シリアル化が必要な場合は、kwargs is_xml=True を渡すことができます。

validate

このモデルを再帰的に検証し、ValidationError の一覧を返します。

as_dict

json.dump を使用して JSONify できる dict を返します。

高度な使用法では、必要に応じてコールバックをパラメーターとして使用できます。

キーは、Python で使用される属性名です。 Attr_descはメタデータのディクテーションです。 現在、msrest 型の 'type' と RestAPI でエンコードされたキーを持つ 'key' が含まれています。 値は、このオブジェクトの現在の値です。

返される文字列は、キーのシリアル化に使用されます。 戻り値の型がリストの場合、これは階層的な結果 dict と見なされます。

このファイルの 3 つの例を参照してください。

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

XML シリアル化が必要な場合は、kwargs is_xml=True を渡すことができます。

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

パラメーター

key_transformer
<xref:function>

キー トランスフォーマー関数。

keep_readonly
既定値: True

戻り値

dict JSON 互換オブジェクト

の戻り値の型 :

deserialize

RestAPI 構文を使用して str を解析し、モデルを返します。

deserialize(data, content_type=None)

パラメーター

data
str
必須

RestAPI 構造体を使用する str。 既定では JSON。

content_type
str
既定値: None

既定では JSON、XML の場合は application/xml を設定します。

戻り値

このモデルのインスタンス

例外

DeserializationError if something went wrong

enable_additional_properties_sending

enable_additional_properties_sending()

from_dict

指定されたキー抽出器を使用してディクテーションを解析し、モデルを返します。

既定では、キー抽出器 (rest_key_case_insensitive_extractor、attribute_key_case_insensitive_extractor、last_rest_key_case_insensitive_extractor) を検討してください

from_dict(data, key_extractors=None, content_type=None)

パラメーター

data
dict
必須

RestAPI 構造体を使用したディクテーション

content_type
str
既定値: None

既定では JSON、XML の場合は application/xml を設定します。

key_extractors
既定値: None

戻り値

このモデルのインスタンス

例外

DeserializationError if something went wrong

is_xml_model

is_xml_model()

serialize

このモデルから Azure に送信される JSON を返します。

これは、 as_dict(full_restapi_key_transformer、keep_readonly=False) のエイリアスです

XML シリアル化が必要な場合は、kwargs is_xml=True を渡すことができます。

serialize(keep_readonly=False, **kwargs)

パラメーター

keep_readonly
bool
既定値: False

読み取り専用属性をシリアル化する場合

戻り値

dict JSON 互換オブジェクト

の戻り値の型 :

validate

このモデルを再帰的に検証し、ValidationError の一覧を返します。

validate()

戻り値

検証エラーの一覧

の戻り値の型 :