中断された移行を再開します。移行ツールはすでに移行済みのノートブック(メモリとクラスタ上)をキャッシュするため、以降の実行ではそれらをスキップします。 次のような場合に使用: - 前回のaidp-migrate-jobの実行が途中で停止された場合(Ctrl-C、クラスタの再起動、ネットワーク接続の喪失など) - 特定の依存するノートブックへの手動修正を行った後に処理を再開する場合
Resume an interrupted migration. The migrator caches already-migrated notebooks (in-memory + on-cluster) so subsequent runs skip them. Use when a prior aidp-migrate-job run was killed mid-flight (Ctrl-C, cluster restart, network drop) or when resuming after a manual fix to a specific dep notebook.
aidp-resume-migration — 中断した移行作業の再開このマイグレーターは再開可能な設計になっています。Pass-1 の dep 移行が成功するたびに、結果が2箇所にキャッシュされます:
job_migrate.py 内のモジュールレベル _migration_cache dict(インメモリ、実行単位)os.path.exists() プローブ(実行をまたいで永続)Pass-2 のタスク Notebook も同様に、最終的な .ipynb が <output-base>/<job>/notebooks/... に既に存在する場合はスキップされます。
aidp-migrate-job 実行が強制終了された場合(Ctrl-C、クラスター再起動、ネットワーク切断、タイムアウト)python3 ${CLAUDE_PLUGIN_ROOT}/engine/scripts/job_migrate.py \
--manifest reports/<MyJob>_manifest.json \
--cluster <CLUSTER_ID> \
--aidp-base <AIDP_BASE> \
--datalake-ocid <DATALAKE_OCID> \
--workspace-id <WORKSPACE_UUID> \
--output-base <output-workspace-path> \
--oci-profile <profile>
デフォルトフラグは --skip-migrated(ON)です。出力パスに既に存在する Notebook はすべて自動的にスキップされます。
そのため、クラッシュ後に単純に再実行するだけで再開となります — 特別なフラグは不要です。
失敗がタスク固有のものであり、そのタスクから開始したい場合(それ以前のタスクをすべてスキップ):
python3 ${CLAUDE_PLUGIN_ROOT}/engine/scripts/job_migrate.py \
--manifest reports/<MyJob>_manifest.json \
--start-task <substring_of_task_key>
# + その他の標準引数
--start-task は task_key に対する部分文字列マッチです。マッチしたタスクよりもソート順が前になるタスクをすべてスキップします。
python3 ${CLAUDE_PLUGIN_ROOT}/engine/scripts/job_migrate.py \
--manifest reports/<MyJob>_manifest.json \
--only-tasks "<task_key_1>,<task_key_2>"
# + その他
特定の dep を手動修正した後、その dep を使用するタスクだけを再実行したい場合に便利です。
通常は 推奨しません — Claude のトークンを消費します。それでも必要な場合:
python3 ${CLAUDE_PLUGIN_ROOT}/engine/scripts/job_migrate.py \
--manifest reports/<MyJob>_manifest.json \
--no-skip-migrated
# + その他
警告: このフラグは、出力パスにある移行済み .ipynb に対してユーザーが加えた手動編集を上書きします。
ユーザーが手動修正を行っている場合は、「はい、編集内容を上書きしてください」という明示的な確認なしに このフラグの使用を拒否してください。
以下のシナリオではキャッシュが不正確になることがあります — 該当する場合は手動でクリアしてください:
| シナリオ | 対処方法 |
|---|---|
| ユーザーが前回の移行後にソースの Databricks Notebook を編集した。マイグレーターは出力が既に存在するためスキップしてしまう。 | AIDP ワークスペースから対応する出力 .ipynb を削除し、再実行する。 |
| ユーザーがマニフェストを変更して新しい dep を追加したが、以前に移行済みのタスクが古い dep パスを参照したままになっている。 | そのタスクの出力 .ipynb を削除し、再実行する。 |
出力 .ipynb が作成されたが、空または破損している(クラスターが書き込み中に停止した場合)。 |
破損したファイルを削除し、再実行する。 |
--clear-cache フラグは存在しません — キャッシュとは <output-base> のファイルシステム状態そのものです。
実行前に、クラスターがまだ Active 状態であることを確認してください(アイドル自動停止している可能性があります):
# (bootstrap スキルのチェックを使用)
Stopped 状態の場合は、AIDP コンソールから起動してください。
再開後の最初のセルは接続セットアップのコスト(約 10〜30 秒)がかかりますが、その後は通常の処理速度に戻ります。
# このジョブの移行済み Notebook を一覧表示
oci os object list ... (または AIDP ワークスペースの一覧機能を使用)
ls reports/<job-name>/notebooks/ # 正常実行後のローカルミラー
または、ログをリアルタイムで確認し、再開時に表示される [SKIP] already migrated: の行を探してください。
aidp-migrate-job と同様です — JOB_REPORT.md を確認し、失敗したセルを aidp-fixup-cell にルーティングするなど、通常の後処理を行ってください。aidp-resume-migration — pick up where you left offThe migrator is designed to be resumable. Each successful Pass-1 dep migration is cached in two places:
_migration_cache dict in job_migrate.py (in-memory, per-run).os.path.exists() probe against the output path (persistent across runs).Pass-2 task notebooks are similarly skipped if their final .ipynb already exists at <output-base>/<job>/notebooks/....
aidp-migrate-job run was killed (Ctrl-C, cluster restart, network drop, timeout).python3 ${CLAUDE_PLUGIN_ROOT}/engine/scripts/job_migrate.py \
--manifest reports/<MyJob>_manifest.json \
--cluster <CLUSTER_ID> \
--aidp-base <AIDP_BASE> \
--datalake-ocid <DATALAKE_OCID> \
--workspace-id <WORKSPACE_UUID> \
--output-base <output-workspace-path> \
--oci-profile <profile>
The default flag is --skip-migrated (ON). Every notebook already at the output path is silently skipped. So a plain re-invoke after a crash IS the resume — no special flag needed.
If the failure was task-specific and you want to start there (skipping all earlier tasks):
python3 ${CLAUDE_PLUGIN_ROOT}/engine/scripts/job_migrate.py \
--manifest reports/<MyJob>_manifest.json \
--start-task <substring_of_task_key>
# + the rest of the standard args
--start-task is a substring match on task_key. Skip every task whose key sorts before the matched task.
python3 ${CLAUDE_PLUGIN_ROOT}/engine/scripts/job_migrate.py \
--manifest reports/<MyJob>_manifest.json \
--only-tasks "<task_key_1>,<task_key_2>"
# + the rest
Useful when you've manually fixed one dep and want to re-run only the tasks that consume it.
You typically DON'T want this — it burns Claude tokens. But if you must:
python3 ${CLAUDE_PLUGIN_ROOT}/engine/scripts/job_migrate.py \
--manifest reports/<MyJob>_manifest.json \
--no-skip-migrated
# + the rest
Warning: this overwrites any manual edits the user applied to the previously-migrated .ipynb at the output path. If the user has made manual fixes, REFUSE to use this flag without explicit "yes, overwrite my edits".
The cache can be wrong in these scenarios — clear it manually if you see them:
| Scenario | Fix |
|---|---|
| User edited the SOURCE Databricks notebook after the prior migration. The migrator still skips it (output already exists). | Delete the corresponding output .ipynb from AIDP workspace + re-run. |
| User modified the manifest to add a new dep, but a previously-migrated task still uses the OLD dep path. | Delete the output .ipynb for that task + re-run. |
The output .ipynb was created but is empty / corrupt (cluster died mid-write). |
Delete the bad file + re-run. |
There's no --clear-cache flag — the cache IS the filesystem state of <output-base>.
Before invoking, verify the cluster is still Active (might have been auto-stopped for idle):
# (use the bootstrap skill's check)
If Stopped, start it via AIDP console. The first cell after resume will pay a connection-setup cost (~10-30s), then steady-state resumes.
# List all migrated notebooks for this job
oci os object list ... (or use AIDP workspace listing)
ls reports/<job-name>/notebooks/ # local mirror after a successful run
Or just tail the log and look for [SKIP] already migrated: lines on resume.
aidp-migrate-job — read JOB_REPORT.md, route failed cells to aidp-fixup-cell, etc.原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。