Skip to content

[CI][AMD] Persist the openai-harmony tiktoken vocab cache across jobs - #51666

Merged
AndreasKaratzas merged 6 commits into
vllm-project:mainfrom
stefankoncarevic:amd-ci-persist-harmony-vocab-cache
Aug 11, 2026
Merged

AndreasKaratzas merged 6 commits into
vllm-project:mainfrom
stefankoncarevic:amd-ci-persist-harmony-vocab-cache

Conversation

@stefankoncarevic

@stefankoncarevic stefankoncarevic commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Purpose

gpt-oss entrypoints tests can fail with a 500 in the middle of a run:

openai_harmony.HarmonyError: error downloading or loading vocab file: failed to download or load vocab file

Seen in amd-ci #11876 (mi355_1: Entrypoints Integration (API Server OpenAI - Part 2), commit 243c63b), where 4 of the 8 TestGPTOSSChat cases failed. The server started fine; the very first POST /v1/chat/completions failed while rendering the harmony prompt.

openai_harmony does not ship the tiktoken vocab. It downloads it on first use and caches it under $TMPDIR/tiktoken-rs-cache. Native AMD CI sets a job-local TMPDIR, so the cache is discarded after every job and each job re-downloads the file from openaipublic.blob.core.windows.net at request time, with no retry. Any blip there surfaces as a 500 mid-test.

This points the cache at HF_HOME instead, which the script already requires to be a persistent volume, matching how the Hub cache is handled. Only the first job ever downloads the file (3.6 MB); every later job reads it from disk and never touches the network.

This is not a regression from a specific PR, the lazy download has been there since #22340. It is a long-standing dependency that the move to native execution now lets us cache.

Test Plan

  1. bash -n .buildkite/scripts/hardware_ci/run-amd-test.sh
  2. Confirm the cache location actually follows TMPDIR (i.e. that a job-local TMPDIR really does throw the cache away):

Test Result

  1. Passes.
  2. Loads with no download, so the cache is keyed off TMPDIR as expected.
  3. Prints fb374d419588a4632f3f557e76b4b70aebbca790, which is exactly the cached filename. A different vocab file means a different URL and therefore a different cache entry, so a version bump downloads fresh on its own and needs no manual cleanup.

The original failure is a transient network error and is not reproducible on demand, so there is no before/after CI run for it. What the change removes is the per-job dependency on that download.


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

openai-harmony downloads its tiktoken vocab on first use and caches it under $TMPDIR, which native AMD CI sets per job. Every job therefore re-downloads the file at request time with no retry, and a transient failure surfaces as a 500 in the middle of gpt-oss entrypoints tests.

Point the cache at HF_HOME, which the script already requires to be a persistent volume, so only the first job downloads it.

Signed-off-by: Stefan Koncarevic <stefan.koncarevic@amd.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@AndreasKaratzas

Copy link
Copy Markdown
Member

/ci run

@AndreasKaratzas AndreasKaratzas added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 10, 2026
@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #83177 for commit f0ae934bbfec.

@github-actions

Copy link
Copy Markdown

@stefankoncarevic, CI is now available for this PR.

  • /ci run starts a CI build.
  • /ci retry retries failed jobs in the CI build for the current PR head. If the current head has no CI build, it starts a new CI build for the current head containing only jobs that failed in the latest earlier CI build for this PR.

@AndreasKaratzas

Copy link
Copy Markdown
Member

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #83190 for commit 5b9eab22944b.

@AndreasKaratzas

Copy link
Copy Markdown
Member

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #83203 for commit 42b9bba3f343.

@AndreasKaratzas

Copy link
Copy Markdown
Member

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #83263 for commit 83d889db35ec.

@AndreasKaratzas

Copy link
Copy Markdown
Member

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #83278 for commit 7f389d4673b7.

Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Andreas Karatzas <akaratza@amd.com>
@AndreasKaratzas
AndreasKaratzas force-pushed the amd-ci-persist-harmony-vocab-cache branch from 549c571 to 2c46e92 Compare August 11, 2026 04:23
@AndreasKaratzas

Copy link
Copy Markdown
Member

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #83288 for commit 2c46e92baebc.

@AndreasKaratzas AndreasKaratzas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-project-automation github-project-automation Bot moved this from To Triage to Ready in gpt-oss Issues & Enhancements Aug 11, 2026
@AndreasKaratzas
AndreasKaratzas enabled auto-merge (squash) August 11, 2026 04:46
@AndreasKaratzas
AndreasKaratzas merged commit 75903e5 into vllm-project:main Aug 11, 2026
71 of 72 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in AMD Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build gpt-oss Related to GPT-OSS models ready ONLY add when PR is ready to merge/full CI is needed rocm Related to AMD ROCm

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants