Documentation Index
Fetch the complete documentation index at: https://wb-21fd5541-sync-code-examples-8.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
class Html
HTML コンテンツを W&B にログするためのクラス。
method Html.__init__
__init__(
data: 'str | pathlib.Path | TextIO',
inject: 'bool' = True,
data_is_not_path: 'bool' = False
) → None
W&B の HTML オブジェクトを作成します。
引数:
data: 拡張子が “.html” のファイルへのパスを指定する文字列、または生の HTML を含む文字列もしくは IO オブジェクト。
inject: HTML オブジェクトにスタイルシートを追加します。False に設定すると、HTML は変更せずそのまま渡されます。
data_is_not_path: False に設定すると、data はファイルへのパスとして扱われます。
例:
ファイルパスを指定して初期化できます。
with wandb.init() as run:
run.log({"html": wandb.Html("./index.html")})
また、HTML のリテラルを文字列または IO オブジェクトとして渡して初期化することもできます。
with wandb.init() as run:
run.log({"html": wandb.Html("<h1>Hello, world!</h1>")})