> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-update-reference-docs-60.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Run

export const GitHubLink = ({url, compact = false}) => <a href={url} target="_blank" rel="noopener noreferrer" className={compact ? "source-link" : "github-source-link"}>
    {compact ? "ソースを表示" : <>
    <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
      <path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" />
    </svg>
    GitHub のソース
      </>}
  </a>;

<GitHubLink compact url="https://github.com/wandb/wandb/blob/main/wandb/apis/public/runs.py#L598" />

## <Badge color="yellow" size="lg" shape="rounded">クラス</Badge> wandb.apis.public.Run

entity と project に関連付けられた 1 つの run。

```python theme={null}
(service_api: 'ServiceApi',
entity: 'str',
project: 'str',
run_id: 'str',
attrs: 'Mapping | None' = None,
include_sweeps: 'bool' = False,
lazy: 'bool' = True,
api_key: 'str | None' = None)
```

<div id="args">
  ## 引数
</div>

<ResponseField name="service_api" type="ServiceApi">
  この run の W\&B API 呼び出しを実行する wandb-core サービスへのインターフェースです。
</ResponseField>

<ResponseField name="entity" type="str">
  run に関連付けられた entity です。
</ResponseField>

<ResponseField name="project" type="str">
  run に関連付けられた project です。
</ResponseField>

<ResponseField name="run_id" type="str">
  run の一意の ID です。
</ResponseField>

<ResponseField name="attrs" type="Mapping | None">
  run の属性です。
</ResponseField>

<ResponseField name="include_sweeps" type="bool">
  run に sweeps を含めるかどうかです。
</ResponseField>

<ResponseField name="lazy" type="bool">
  説明はありません。
</ResponseField>

<ResponseField name="api_key" type="str | None">
  説明はありません。
</ResponseField>

<div id="attributes">
  ## 属性
</div>

* `tags` (`[str]`): run に関連付けられているタグのリスト
* `url` (`str`): この run の URL
* `id` (`str`): run の一意の ID (デフォルトは 8 文字)
* `name` (`str`): run の名前
* `state` (`str`): 次のいずれか: running, finished, crashed, killed, preempting, preempted
* `config` (`dict`): run に関連付けられているハイパーパラメーターの dict
* `created_at` (`str`): run が開始された日時を示す ISO タイムスタンプ
* `system_metrics` (`dict`): run について記録された最新のシステムメトリクス
* `summary` (`dict`): 現在の summary を保持する、変更可能な dict 風のプロパティです。update を呼び出すと、変更内容が永続化されます。
* `project` (`str`): run に関連付けられている project
* `entity` (`str`): run に関連付けられている entity の名前
* `project_internal_id` (`int`): project の内部 ID
* `user` (`str`): run を作成したユーザーの名前
* `path` (`str`): 一意の ID `[entity]/[project]/[run_id]`
* `notes` (`str`): run に関するメモ
* `read_only` (`boolean`): run を編集可能かどうか
* `history_keys` (`str`): `wandb.Run.log({"key": "value"})` でログされた履歴メトリクスのキー
* `metadata` (`str`): wandb-metadata.json に含まれる run のメタデータ

<div id="properties">
  ## プロパティ
</div>

<ResponseField name="config" type="dict[str, Any]">
  run 設定を取得します。遅延モードの場合は、完全なデータを自動的に読み込みます。
</ResponseField>

<ResponseField name="entity" type="str">
  run に関連付けられている entity です。
</ResponseField>

<ResponseField name="id" type="str">
  run の一意の ID です。
</ResponseField>

<ResponseField name="lastHistoryStep" type="int">
  run の履歴 にログされた最後の step を返します。
</ResponseField>

<ResponseField name="metadata" type="dict[str, Any] | None">
  wandb-metadata.json に含まれる run のメタデータです。

  メタデータには、run の説明、タグ、開始時刻、メモリ
  使用量などが含まれます。
</ResponseField>

<ResponseField name="name" type="str | None">
  run の名前です。
</ResponseField>

<ResponseField name="path" type="list[str]">
  run のパスです。パスは entity、project、run\_id を含むリストです。
</ResponseField>

<ResponseField name="rawconfig" type="dict[str, Any]">
  内部キーを含む生の run 設定を取得します。遅延モードの場合は、完全なデータを自動的に読み込みます。
</ResponseField>

<ResponseField name="state" type="str">
  run の状態です。

  次の表は、run が取り得る状態を示しています。

  | 状態       | 説明                                                              |
  | -------- | --------------------------------------------------------------- |
  | Crashed  | マシンのクラッシュなどにより、内部プロセスからのハートビート送信が停止した状態です。                      |
  | Failed   | Run がゼロ以外の終了ステータスで終了した状態です。                                     |
  | Finished | Run が終了し、データの同期が完了した、または `wandb.Run.finish()` が呼び出された状態です。      |
  | Killed   | 完了前に Run が強制的に停止された状態です。                                        |
  | Running  | Run は現在も実行中で、直近でハートビートを送信しています。                                 |
  | Pending  | Run はスケジュールされていますが、まだ開始されていない状態です (sweep や Launch job で一般的です) 。 |
</ResponseField>

<ResponseField name="storage_id" type="str">
  run の一意のストレージ ID です。
</ResponseField>

<ResponseField name="summary" type="HTTPSummary">
  run のサマリー メトリクスを取得します。遅延モードの場合は、完全なデータを自動的に読み込みます。
</ResponseField>

<ResponseField name="summary_metrics" type="dict[str, Any]">
  run のサマリー メトリクスを取得します。遅延モードの場合は、完全なデータを自動的に読み込みます。
</ResponseField>

<ResponseField name="sweep" type="public.Sweep | None">
  この run に関連付けられている sweep です。include\_sweeps が False の場合、sweep データを読み込みます。
</ResponseField>

<ResponseField name="sweep_name" type="str | None">
  sweep 名を取得します。sweepName は軽量フラグメントに含まれているため、常に利用できます。
</ResponseField>

<ResponseField name="system_metrics" type="dict[str, Any]">
  run のシステムメトリクスを取得します。遅延モードの場合は、完全なデータを自動的に読み込みます。
</ResponseField>

<ResponseField name="url" type="str">
  run の URL です。

  run の URL は entity、project、run\_id から生成されます。
  SaaS ユーザーの場合、`https://wandb.ai/entity/project/run_id` 形式になります。
</ResponseField>

<ResponseField name="username" type="str">
  この API は非推奨です。代わりに `entity` を使用してください。
</ResponseField>

<div id="methods">
  ## メソッド
</div>

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.beta\_scan\_history()

```python theme={null}
self,
keys: 'list[str] | None' = None,
page_size: 'int' = 1000,
min_step: 'int' = 0,
max_step: 'int | None' = None,
use_cache: 'bool' = True
```

<div id="arguments">
  ##### 引数
</div>

<ResponseField name="keys" type="list[str] | None">
  説明はありません。
</ResponseField>

<ResponseField name="page_size" type="int">
  説明はありません。
</ResponseField>

<ResponseField name="min_step" type="int">
  説明はありません。
</ResponseField>

<ResponseField name="max_step" type="int | None">
  説明はありません。
</ResponseField>

<ResponseField name="use_cache" type="bool">
  説明はありません。
</ResponseField>

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.console\_logs()

```python theme={null}
self, *,
per_page: 'int' = 1000,
last: 'int | None' = None
```

run によって取得されたコンソール出力を返します。

run の実行中、W\&B はそのプロセスが stdout および stderr に書き込む内容を
取得し、run のコンソールログとして記録します。これは、W\&B App の
Run page の「Logs」タブに表示されるログと同じです。
finished の run と実行中の run のいずれについても、
このログを読み取れます。

<div id="arguments">
  ##### 引数
</div>

<ResponseField name="per_page" type="int">
  ログを先頭から読み取る際、リクエストごとに取得する行数。`last` が指定されている場合は無視されます。
</ResponseField>

<ResponseField name="last" type="int | None">
  指定した場合、1 回のリクエストでログの末尾 N 行のみを取得します。実行中の run の確認やクラッシュの診断に役立ちます。バックエンドでは 1 回のリクエストで返せる行数に上限があるため、より多くの行を指定すると、最新の行に切り詰められて返されます。
</ResponseField>

<div id="raises">
  ##### 送出される例外
</div>

* `CommError`: 反復処理中にリクエストが失敗した場合に発生します。ログを先頭から読み取るには、W\&B Server 0.77 以降が必要です。古いサーバーでは、代わりに末尾の N 行を読み取ってください。

<div id="examples">
  ##### 例
</div>

```python theme={null}
import wandb

run = wandb.Api().run("entity/project/run_id")

# ログ全体を古い行から順に読み取ります。
for line in run.console_logs():
    print(line.content)

# 末尾の 100 行のみを読み取ります。
for line in run.console_logs(last=100):
    print(line.timestamp, line.content)
```

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.create()

```python theme={null}
api: 'public.Api',
run_id: 'str | None' = None,
project: 'str | None' = None,
entity: 'str | None' = None,
state: "Literal['running', 'pending']" = 'running'
```

指定されたprojectに対して run を作成します。

ほとんどのユースケースでは、`wandb.init()` を使用してください。`wandb.init()` のほうが、run の作成と更新をより堅牢に処理できます。`wandb.apis.public.Run.create` は、スケジュールできない可能性があるジョブ (たとえば、GPU が不足している Kubernetes クラスター内のジョブや、競合が激しいジョブ) に対して "pending" 状態の run を作成する場合など、特定のシナリオ向けです。これらの pending run は、後で再開して W\&B でトラッキングできます。

この メソッド で作成された run には機能上の制限があります。この方法で作成した run に対して `update()` を呼び出しても、期待どおりに動作しない場合があります。

<div id="arguments">
  ##### 引数
</div>

<ResponseField name="api" type="public.Api">
  W\&B API のインスタンス。
</ResponseField>

<ResponseField name="run_id" type="str | None">
  省略可能な run ID。指定しない場合は、ランダムな ID が生成されます。
</ResponseField>

<ResponseField name="project" type="str | None">
  省略可能なプロジェクト名。デフォルトでは、API Settings の project または "uncategorized" が使用されます。
</ResponseField>

<ResponseField name="entity" type="str | None">
  省略可能な entity (ユーザーまたはチーム) 名。
</ResponseField>

<ResponseField name="state" type="Literal['running', 'pending']">
  run の初期状態。後で再開する run には "pending" を、すぐに実行する run には "running" を使用します。
</ResponseField>

<div id="examples">
  ##### 例
</div>

後で実行するための pending run を作成する

```python theme={null}
import wandb

api = wandb.Api()

run_name = "my-pending-run"

run = Run.create(
    api=api,
    project="project",
    entity="entity",
    state="pending",
    run_id=run_name,
)
```

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.delete()

```python theme={null}
self,
delete_artifacts: 'bool' = False
```

指定されたrunをwandbバックエンドから削除します。

<div id="arguments">
  ##### 引数
</div>

<ResponseField name="delete_artifacts" type="bool">
  runに関連付けられたartifactも削除するかどうか。
</ResponseField>

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.download\_history\_exports()

```python theme={null}
self,
download_dir: 'pathlib.Path | str',
require_complete_history: 'bool' = True
```

run の parquet 形式の履歴ファイルをすべて、指定したディレクトリにダウンロードします。

<div id="arguments">
  ##### 引数
</div>

<ResponseField name="download_dir" type="pathlib.Path | str">
  履歴ファイルのダウンロード先ディレクトリ。
</ResponseField>

<ResponseField name="require_complete_history" type="bool">
  完全な履歴のダウンロードを必須にするかどうか。true の場合、run にまだ parquet ファイルへエクスポートされていないデータが含まれていると、IncompleteRunHistoryError が発生します。
</ResponseField>

<div id="raises">
  ##### 送出される例外
</div>

* `IncompleteRunHistoryError`: require\_complete\_history が True で、run にまだ parquet ファイルへエクスポートされていないデータが含まれている場合。
* `WandbApiFailedError`: 履歴が不完全な場合以外の理由で API リクエストが失敗した場合。

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.file()

```python theme={null}
self,
name: 'str'
```

artifact 内で、指定した名前のファイルのパスを返します。

<div id="arguments">
  ##### 引数
</div>

<ResponseField name="name" type="str">
  取得するファイルの名前。
</ResponseField>

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.files()

```python theme={null}
self,
names: 'list[str] | None' = None,
pattern: 'str | None' = None,
per_page: 'int' = 50
```

指定した条件に一致する run 内のすべてのファイルに対応する `Files` オブジェクトを返します。

一致対象として、完全なファイル名のリストまたはパターンを指定できます。
両方を指定した場合、パターンは無視されます。

<div id="arguments">
  ##### 引数
</div>

<ResponseField name="names" type="list[str] | None">
  取得するファイル名のリスト。空の場合はすべてのファイルを返します
</ResponseField>

<ResponseField name="pattern" type="str | None">
  W\&B からファイルを返す際に使用するマッチングパターンです。このパターンには mySQL の LIKE 構文を使用します。たとえば、`.json` で終わるすべてのファイルに一致させるには `%.json` を指定します。`names` と `pattern` の両方を指定すると、ValueError が発生します。
</ResponseField>

<ResponseField name="per_page" type="int">
  1 ページあたりの結果数。
</ResponseField>

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.history()

```python theme={null}
self,
samples: 'int' = 500,
keys: 'list[str] | None' = None,
x_axis: 'str' = '_step',
pandas: 'bool' = True,
stream: "Literal['default', 'system']" = 'default'
```

run のサンプリングされた履歴メトリクスを返します。

履歴レコードがサンプリングされていても問題なければ、この方法のほうがシンプルで高速です。

<div id="arguments">
  ##### 引数
</div>

<ResponseField name="samples" type="int">
  (int, optional) 返すサンプルの数
</ResponseField>

<ResponseField name="keys" type="list[str] | None">
  (list, optional) 指定したキーのメトリクスのみを返します
</ResponseField>

<ResponseField name="x_axis" type="str">
  (str, optional) このメトリクスを xAxis として使用します。デフォルトは \_step です
</ResponseField>

<ResponseField name="pandas" type="bool">
  (bool, optional) pandas dataframe を返します
</ResponseField>

<ResponseField name="stream" type="Literal['default', 'system']">
  (str, optional) メトリクスには "default"、マシンメトリクスには "system" を指定します
</ResponseField>

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.load()

```python theme={null}
self,
force: 'bool' = False
```

遅延モードに応じた適切なフラグメントを使用して run データを読み込みます。

<div id="arguments">
  ##### 引数
</div>

<ResponseField name="force" type="bool">
  True の場合、すでに読み込み済みであっても、サーバーから run データを再取得します。
</ResponseField>

<div id="raises">
  ##### 送出される例外
</div>

* `RunNotFoundError`: run が見つからない場合、または run のデータを読み込めない場合。

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.load\_full\_data()

```python theme={null}
self,
force: 'bool' = False
```

設定、systemMetrics、summaryMetrics などの重いフィールドを含む run の完全なデータを読み込みます。

このメソッドは、Runs を一覧表示する際に最初に `lazy=True` を指定したものの、特定の run について完全なデータにアクセスする必要がある場合に便利です。

<div id="arguments">
  ##### 引数
</div>

<ResponseField name="force" type="bool">
  データがすでに読み込まれている場合でも強制的に再読み込みします
</ResponseField>

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.log\_artifact()

```python theme={null}
self,
artifact: 'wandb.Artifact',
aliases: 'Collection[str] | None' = None,
tags: 'Collection[str] | None' = None
```

artifact を run の出力として宣言します。

<div id="arguments">
  ##### 引数
</div>

<ResponseField name="artifact" type="wandb.Artifact">
  `wandb.Api().artifact(name)` から返されるArtifact。
</ResponseField>

<ResponseField name="aliases" type="Collection[str] | None">
  このArtifact に適用するエイリアス。
</ResponseField>

<ResponseField name="tags" type="Collection[str] | None">
  (リスト、省略可) このArtifact に適用するタグ。
</ResponseField>

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.logged\_artifacts()

```python theme={null}
self,
per_page: 'int' = 100
```

この run によってログされたすべての artifact を取得します。

run の実行中にログされたすべての出力 artifact を取得します。反復処理することも、1 つのリストにまとめることもできる、ページ分割された結果を返します。

<div id="arguments">
  ##### 引数
</div>

<ResponseField name="per_page" type="int">
  API リクエストごとに取得する artifact の数。
</ResponseField>

<div id="examples">
  ##### 例
</div>

```python theme={null}
import wandb
import tempfile

with tempfile.NamedTemporaryFile(mode="w", delete=False, suffix=".txt") as tmp:
    tmp.write("This is a test artifact")
    tmp_path = tmp.name
run = wandb.init(project="artifact-example")
artifact = wandb.Artifact("test_artifact", type="dataset")
artifact.add_file(tmp_path)
run.log_artifact(artifact)
run.finish()

api = wandb.Api()

finished_run = api.run(f"{run.entity}/{run.project}/{run.id}")

for logged_artifact in finished_run.logged_artifacts():
    print(logged_artifact.name)
```

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.save()

```python theme={null}
self
```

run オブジェクトへの変更を W\&B バックエンドに保存します。

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.scan\_history()

```python theme={null}
self,
keys: 'list[str] | None' = None,
page_size: 'int' = 1000,
min_step: 'int' = 0,
max_step: 'int | None' = None,
use_cache: 'bool' = True
```

run のすべての履歴レコードを反復処理できる iterable なコレクションを返します。

<div id="arguments">
  ##### 引数
</div>

<ResponseField name="keys" type="list[str] | None">
  run の履歴から読み取るメトリクスのリストです。scan は、要求されたすべての keys を含む行のみを返します。keys が異なる step でログされた場合は、key ごとに個別の Call を使用するか、この引数を省略してください。keys が指定されていない場合は、すべてのメトリクスを返します。
</ResponseField>

<ResponseField name="page_size" type="int">
  一度に読み取る履歴レコード数です。
</ResponseField>

<ResponseField name="min_step" type="int">
  履歴の読み取りを開始する最小の step (この値を含む) です。
</ResponseField>

<ResponseField name="max_step" type="int | None">
  履歴を読み取る最大の step (この値は含まない) です。
</ResponseField>

<ResponseField name="use_cache" type="bool">
  True に設定すると、`WANDB_CACHE_DIR` に run の履歴があるか確認します。キャッシュ内に run の履歴が見つからない場合は、サーバーからダウンロードされます。False に設定すると、run の履歴は毎回ダウンロードされます。
</ResponseField>

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.stop()

```python theme={null}
self
```

この run が正常に停止するようリクエストします。

これにより、W\&B バックエンドで run の停止フラグが設定されます。これは、W\&B App UI の "Stop run" ボタンによって送信されるシグナルと同じものです。run を実行しているプロセスは、通常のハートビートを通じてこのフラグを検知し、run を正常にシャットダウンします。そのため、リモートの run (たとえば Kubernetes pod 上の run) を終了する場合にも安全です。

停止は非同期です。このメソッドは、run が終了した時点ではなく、バックエンドで run にフラグが設定された時点で返ります。再度呼び出しても、またはすでに実行されていない run に対して呼び出しても、効果はありません。

<div id="raises">
  ##### 送出される例外
</div>

* `wandb.Error`: リクエストに失敗した場合。

<div id="examples">
  ##### 例
</div>

```python theme={null}
import wandb

run = wandb.Api().run("entity/project/run_id")
run.stop()
```

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.to\_html()

```python theme={null}
self,
height: 'int' = 420,
hidden: 'bool' = False
```

このrunを表示するiframeを含むHTMLを生成します。

<div id="arguments">
  ##### 引数
</div>

<ResponseField name="height" type="int">
  説明はありません。
</ResponseField>

<ResponseField name="hidden" type="bool">
  説明はありません。
</ResponseField>

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.update()

```python theme={null}
self
```

run オブジェクトへの変更を wandb バックエンドに保存します。

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.update\_state()

```python theme={null}
self,
state: 'str'
```

run の状態を更新します。

サポートされる遷移:

* `running`、`failed`、`crashed`、または `preempted` から `pending` へ
  (例: 終了した run または進行中の run をキューに入れ直す)
  * `pending` または `running` から `failed` へ
    (例: プリエンプトされた run または失われた run を failed としてマークする)

sweep の run の状態は更新できません。

可能な run の状態の一覧については `Run.state` を参照してください。

<div id="arguments">
  ##### 引数
</div>

<ResponseField name="state" type="str">
  遷移先の run の状態です。`"pending"` または `"failed"` のいずれかです。
</ResponseField>

<div id="raises">
  ##### 送出される例外
</div>

* `wandb.Error`: 要求された状態遷移が許可されていない場合、またはサーバーがこの操作をサポートしていない場合。

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.upload\_file()

```python theme={null}
self,
path: 'str',
root: 'str' = '.'
```

ローカルファイルを W\&B にアップロードし、この run に関連付けます。

<div id="arguments">
  ##### 引数
</div>

<ResponseField name="path" type="str">
  アップロードするファイルのパス。絶対パスまたは相対パスを指定できます。
</ResponseField>

<ResponseField name="root" type="str">
  ファイルの保存先の基準となるルートパス。たとえば、ファイルを run 内で "my\_dir/file.txt" として保存し、現在 "my\_dir" にいる場合は、root を "../" に設定します。デフォルトは現在のディレクトリ (".") です。
</ResponseField>

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.use\_artifact()

```python theme={null}
self,
artifact: 'wandb.Artifact',
use_as: 'str | None' = None
```

artifact を run の入力として宣言します。

<div id="arguments">
  ##### 引数
</div>

<ResponseField name="artifact" type="wandb.Artifact">
  `wandb.Api().artifact(name)` が返す artifact
</ResponseField>

<ResponseField name="use_as" type="str | None">
  スクリプト内で artifact の使用方法を識別する文字列。ベータ版の wandb Launch の artifact スワップ機能を使用する際に、run で使用される artifact を簡単に区別するために使われます。
</ResponseField>

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.used\_artifacts()

```python theme={null}
self,
per_page: 'int' = 100
```

この run で明示的に使用された artifact を取得します。

通常は `run.use_artifact()` を使用して、run 中に使用すると明示的に宣言された入力 artifact のみを取得します。イテレートすることも、1 つの list にまとめることもできる、ページ分割された結果を返します。

<div id="arguments">
  ##### 引数
</div>

<ResponseField name="per_page" type="int">
  API リクエストごとに取得する artifact の数。
</ResponseField>

<div id="examples">
  ##### 例
</div>

```python theme={null}
import wandb

run = wandb.init(project="artifact-example")
run.use_artifact("test_artifact:latest")
run.finish()

api = wandb.Api()
finished_run = api.run(f"{run.entity}/{run.project}/{run.id}")
for used_artifact in finished_run.used_artifacts():
    print(used_artifact.name)
test_artifact
```

### <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Run.wait\_until\_finished()

```python theme={null}
self
```

run が完了するまで、その状態を確認します。
