次の方法で共有


AutoMLException クラス

エラーの種類を指定する追加フィールドを含む例外。

新しい AutoMLException を構築します。

コンストラクター

AutoMLException(exception_message: str = '', target: str | None = None, details: List[str] | None = None, message_format: str | None = None, message_parameters: Dict[str, str] | None = None, reference_code: str | None = None, has_pii: bool = True, azureml_error: AzureMLError | None = None, inner_exception: BaseException | None = None)

パラメーター

名前 説明
exception_message
必須
str

エラーを説明するメッセージ。

target
str

例外がスローされる原因となった要素の名前。

規定値: None
details

その他のエラー応答やスタック トレースなど、エラーに関する追加情報。

規定値: None
message_format
str

変数の置換を使用しないexception_messageの書式設定されていないバージョン。

規定値: None
message_parameters
<xref:Dictionary>[str, str]

message_formatの内容に対応する値の置換

規定値: None
reference_code
str

エラーが発生したモジュールまたはコードのインジケーター

規定値: None
has_pii

例外メッセージに PII 情報があるかどうかを表すブール値。

規定値: True
azureml_error
規定値: None
inner_exception
規定値: None

メソッド

create_without_pii

PII を含まないものとしてタグ付けされた例外を作成します。

from_exception

任意の例外をこの例外の種類に変換します。 結果の例外は PII を含むものとしてマークされます。

get_pii_free_exception_msg_format
pii_free_msg

PII を含む情報の印刷が不適切な場合に使用するフォールバック メッセージ。

with_generic_msg

この例外に PII が含まれている場合は、テレメトリで使用される一般的なエラー メッセージを添付します。

create_without_pii

PII を含まないものとしてタグ付けされた例外を作成します。

create_without_pii(msg: str = '', target: str | None = None, reference_code: str | None = None) -> ExceptionT

パラメーター

名前 説明
cls
必須

型のクラス :class: azureml.automl.core.exceptions.AutoMLException

msg
必須

元の例外メッセージの代わりに使用する省略可能なメッセージ

target

例外のターゲットを指す省略可能な文字列

規定値: None
reference_code

エラーが発生したモジュールまたはコードのインジケーター

規定値: None

from_exception

任意の例外をこの例外の種類に変換します。 結果の例外は PII を含むものとしてマークされます。

from_exception(e: BaseException, msg: str | None = None, target: str | None = None, reference_code: str | None = None, has_pii: bool = True) -> AutoMLException

パラメーター

名前 説明
cls
必須

型のクラス :class: azureml.automl.core.exceptions.AutoMLException

e
必須

元の例外オブジェクト

msg

元の例外メッセージの代わりに使用する省略可能なメッセージ

規定値: None
target

例外のターゲットを指す省略可能な文字列

規定値: None
reference_code

エラーが発生したモジュールまたはコードのインジケーター

規定値: None
has_pii

この例外に PII が含まれているかどうか

規定値: True

戻り値

説明

元のスタック トレースを保持する、この型の新しい例外

get_pii_free_exception_msg_format

get_pii_free_exception_msg_format() -> str

pii_free_msg

PII を含む情報の印刷が不適切な場合に使用するフォールバック メッセージ。

pii_free_msg(scrubbed: bool = True) -> str

パラメーター

名前 説明
scrubbed

true の場合は、フォールバックとしてジェネリック '[PII を含む可能性があるため非表示]' を返します。それ以外の場合は空の文字列を返します。

規定値: True

戻り値

説明

テレメトリにログインするための安全なメッセージをログに記録する

with_generic_msg

この例外に PII が含まれている場合は、テレメトリで使用される一般的なエラー メッセージを添付します。

with_generic_msg(msg: str) -> ExceptionT

パラメーター

名前 説明
msg
必須

使用する汎用メッセージ

戻り値

説明

このオブジェクト

属性

error_code

この例外のエラー コードを取得します。

error_type

この例外のルート エラーの種類を取得します。

has_pii

この例外のメッセージに PII が含まれているかどうかを確認します。

message_format

ログ セーフな例外メッセージ (ある場合) を取得します。

target

例外がスローされる原因となった要素の名前。