Skip to content

update notebooks#174

Merged
Yunnglin merged 3 commits intomainfrom
update_notebook_0420
Apr 20, 2026
Merged

update notebooks#174
Yunnglin merged 3 commits intomainfrom
update_notebook_0420

Conversation

@Yunnglin
Copy link
Copy Markdown
Collaborator

PR type

  • Bug Fix
  • New Feature
  • Document Updates
  • More Models or Datasets Support

PR information

Write the detail information belongs to this PR.

Experiment results

Paste your experiment result here(if needed).

Copilot AI review requested due to automatic review settings April 20, 2026 08:34
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the project’s example notebooks to make ModelScope authentication and checkpoint publishing workflows clearer and safer for interactive use, aligning them with the current Twinkle client APIs.

Changes:

  • Prompt for ModelScope token via getpass() and wire it into Twinkle/Tinker clients (instead of os.environ.get(...)).
  • Add “upload checkpoint to ModelScope Hub” example snippets using MultiLoraTransformersModel.upload_to_hub(...).
  • Refresh notebook hygiene/UX (clear some outputs, set execution counts to null, add MoE compatibility notes, update notebook metadata).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
notebook/short_math_grpo.ipynb Switches auth to interactive token input; adds an upload-to-hub example cell; clears outputs/execution counts.
notebook/self_cognition.ipynb Adds interactive token input, MoE note, upload-to-hub snippet, and metadata updates.
notebook/sample.ipynb Switches auth to interactive token input for sampling example.
notebook/multi_modal.ipynb Switches auth to interactive token input; adds upload-to-hub snippet; adds MoE note and metadata updates.
notebook/dpo.ipynb Switches auth to interactive token input; adds explicit save + upload-to-hub snippet; adds MoE note and metadata updates.

Comment thread notebook/multi_modal.ipynb
Comment thread notebook/dpo.ipynb
Comment thread notebook/self_cognition.ipynb Outdated
Comment thread notebook/self_cognition.ipynb
Comment thread notebook/self_cognition.ipynb Outdated
Comment thread notebook/self_cognition.ipynb Outdated
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates several Jupyter notebooks to improve security and usability by replacing environment-based API key retrieval with interactive getpass prompts and adding explicit logic for saving and uploading LoRA checkpoints to the ModelScope Hub. It also introduces warnings regarding MoE model compatibility and updates notebook metadata. The review feedback identifies opportunities to improve code cleanliness by removing redundant client and model initializations in the upload sections and suggests using generic placeholders for repository IDs instead of hardcoded user strings to ensure consistency across the examples.

Comment thread notebook/self_cognition.ipynb Outdated
Comment thread notebook/multi_modal.ipynb
Comment thread notebook/short_math_grpo.ipynb
@Yunnglin Yunnglin merged commit 7e3b00b into main Apr 20, 2026
2 of 4 checks passed
tastelikefeet pushed a commit that referenced this pull request Apr 21, 2026
* update

* update

* update

(cherry picked from commit 7e3b00b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants