Conversation
There was a problem hiding this comment.
Code Review
This pull request improves the Megatron server startup script by pre-creating log files and tailing them for real-time monitoring. It also updates the set_template method to include a default model_id and adds support for Qwen3.6 in the template mapping. Feedback was provided to ensure the tail command terminates if the server process crashes and to allow model_id overrides by using setdefault.
I am having trouble creating individual review comments. Click here to see my feedback.
cookbook/client/server/megatron/run.sh (394)
The tail -f command blocks the script indefinitely. If the server process crashes or exits, tail will continue to run, which can be misleading to the user. Using the --pid flag ensures that tail terminates automatically when the monitored server process ends.
tail --pid=$SERVER_PID -f "$LOG_FILE"
src/twinkle/model/megatron/megatron.py (1330)
Hard-coding model_id in kwargs prevents users from explicitly providing a custom model or tokenizer ID when calling set_template. Using setdefault ensures that self.tokenizer_id is used as the default while still allowing for manual overrides if necessary.
kwargs.setdefault('model_id', self.tokenizer_id)
There was a problem hiding this comment.
Pull request overview
This PR aims to fix model/template identification issues when running Qwen3.6 models in the Twinkle server stack (template selection and template construction), and improves the Megatron cookbook run script’s log handling.
Changes:
- Add Qwen3.6 →
Qwen3_5Templatemapping for server-side template selection. - Ensure Megatron
set_template()passesmodel_id(viatokenizer_id) when constructingTemplateinstances. - Pre-create the server log file and follow logs after starting the server in the Megatron cookbook
run.sh.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/twinkle/server/utils/template_utils.py |
Extends template auto-selection to include Qwen3.6 model names. |
src/twinkle/model/megatron/megatron.py |
Injects model_id for template construction to prevent Template init failures / wrong model id usage. |
cookbook/client/server/megatron/run.sh |
Avoids tail -f failing on missing log file; adds blocking log-follow behavior. |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request implements an asynchronous upload mechanism for the ModelScope Hub by introducing a task-based system with client-side polling. Key changes include updating the server to return a request_id and run uploads in background threads, adding a status polling endpoint, and updating the client generator and library to handle the new polling logic. Additionally, the PR includes new example scripts, updates to the Dockerfile, and manual additions to the LazyDataset class. Feedback focuses on maintaining the integrity of auto-generated files, improving error handling when task IDs are missing or results are malformed, and ensuring robust dictionary access in validators.
PR type
PR information
Write the detail information belongs to this PR.
Experiment results
Paste your experiment result here(if needed).