project update_download_files#

Description#

ダウンロード用ファイルをAnnofab上で並列に更新し、すべての更新完了を待ちます。 ローカルへのダウンロードは行いません。

--project_id にプロジェクトIDを最大4個指定できます。

--target に更新対象を1個以上指定してください。

  • task: タスク全件JSON

  • annotation: アノテーションZIP

  • input_data: 入力データ全件JSON

待機間隔と上限は job wait と同じです。

Examples#

タスク全件JSONとアノテーションZIPを並列に更新する#

$ annofabcli project update_download_files -p PROJECT_ID --target task annotation

更新に成功した後、後続のコマンドでは --latest を付けずに更新済みのファイルを取得できます。 以下の例では、更新に成功した場合のみ次のコマンドを実行します。

annofabcli project update_download_files -p PROJECT_ID --target task annotation && \
  annofabcli task list_all -p PROJECT_ID --output tasks.csv && \
  annofabcli annotation_zip list_bounding_box_annotation -p PROJECT_ID --output annotations.csv

複数プロジェクトのアノテーションZIPを並列に更新する#

$ annofabcli project update_download_files -p PROJECT_A PROJECT_B --target annotation

Usage Details#

指定したダウンロード用ファイルをAnnofab上で並列に更新します。ローカルへのダウンロードは行いません。60秒間隔で完了を確認し、各更新を最大6時間待ちます。一部の更新に失敗してもほかの更新の完了を待ち、いずれかが失敗またはタイムアウトした場合は非0の終了コードで終了します。

usage: annofabcli project update_download_files [-h] [--yes]
                                                [--endpoint_url ENDPOINT_URL]
                                                [--annofab_user_id ANNOFAB_USER_ID]
                                                [--annofab_password ANNOFAB_PASSWORD]
                                                [--annofab_pat ANNOFAB_PAT]
                                                [--logdir LOGDIR]
                                                [--disable_log] [--debug]
                                                -p PROJECT_ID [PROJECT_ID ...]
                                                --target {task,annotation,input_data} [{task,annotation,input_data} ...]

Named Arguments#

-p, --project_id

対象のプロジェクトIDを最大4個指定します。

--target

Possible choices: task, annotation, input_data

更新対象を1個以上指定します。task: タスク全件JSON、annotation: アノテーションZIP、input_data: 入力データ全件JSON。

common options (after the subcommand)#

--yes

処理中に現れる問い合わせに対して、常に yes と回答します。

--endpoint_url

Annofab WebAPIのエンドポイントを指定します。

--annofab_user_id

Annofabにログインする際のユーザーID

--annofab_password

Annofabにログインする際のパスワード

--annofab_pat

Annofabにログインする際のパーソナルアクセストークン

--logdir

ログファイルを保存するディレクトリを指定します。

Default: .log

--disable_log

ログを無効にします。

--debug

HTTPリクエストの内容やレスポンスのステータスコードなど、デバッグ用のログが出力されます。

オーナロールまたはアノテーションユーザロールを持つユーザで実行してください。