Repository navigation
Conversation
- the sync entrypoint called finetune.spawn() and exited, which leaves the task's pod running; use .remote(), which terminates the pod on return, and document spawn.aio() plus wait()/cancel() - finetune returned an undefined final_loss; give it a small real training loop that writes a checkpoint to the volume - chat returned vLLM RequestOutput objects, which are not JSON values; return the generated text - add the `rp secret add hf-token` step and volume cleanup - add tests that the example defines every name it uses, passes app discovery, and does not spawn tasks from a sync entrypoint
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The
## Examplesample in the top-level README is the first code most users copy. As written, it doesn't work, and it can leave a pod billing after the script exits:finetune.spawn(...)and returned. A spawned task keeps its pod until the job is awaited or cancelled, andTaskJob.wait()/cancel()are async, so the sync entrypoint could not clean up.finetune.remote(...), which terminates the pod when it returns. A short paragraph showsspawn.aio()withwait()/cancel()from an async entrypoint.finetunereturnedfinal_loss, which was never defined.chatreturned vLLMRequestOutputobjects. Remote results must be JSON values.Secret("hf-token")with no step to create it.rp secret add hf-token.modelsvolume was mounted onchatbut never used. Nothing said the volume persists.finetunecheckpoints, and note how to delete it.The task now runs on one H100 instead of two, since the sample loop doesn't need more.
Tests
New
tests/test_readme_example.pyextracts the README's first python block and checks that:final_lossbefore the fix)@local_entrypointdoesn't call.spawn()on a task (this failed onfinetunebefore the fix)Test plan
make quality-check(2776 passed)rp secret add,rp volume delete VOLUME_ID,Invoker.aio, andTaskJob.wait/cancelagainst the CLI and source