Repository navigation
fix: address issues #4155, #6469, #6489, #5125 - #1
Merged
Merged
Conversation
…nslothai#5125 Issue unslothai#4155 — DPO: add UnslothDPOConfig and update PatchDPOTrainer - unsloth/trainer.py: import trl.DPOConfig, expose UnslothDPOConfig subclass (falls back to TrainingArguments when trl<0.7); export via __all__ - unsloth/models/dpo.py: replace no-op PatchDPOTrainer with a patch that monkey-patches DPOTrainer.__init__ to emit a DeprecationWarning when legacy TrainingArguments is passed instead of DPOConfig; includes docstring example Issue unslothai#6469 — Code block readability in Unsloth Studio UI - studio/frontend/src/index.css: add #f3f4f6 background + subtle border for fenced code blocks in light mode (dark mode keeps #181818); add padding-right to code-block-header so the language label is never obscured by the absolute-positioned copy/download action buttons; add matching inline code surface for <code> spans Issue unslothai#6489 — UnicodeEncodeError (charmap codec) on Windows - studio/backend/main.py: reconfigure sys.stdout/stderr to utf-8 with errors=replace at process start, before any print (Windows only) - studio/backend/startup_banner.py: introduce _safe_print() that falls back to encode/replace on UnicodeEncodeError; use it for all banner output - studio/backend/core/training/trainer.py: add encoding='utf-8' to both open() calls on adapter_config.json - unsloth_cli/commands/chat.py: add encoding='utf-8' to adapter_config open - unsloth_cli/commands/studio.py: pass PYTHONIOENCODING=utf-8:replace in the child-process environment when spawning the backend on Windows; also add encoding='utf-8' to the auth-secret fdopen call Issue unslothai#5125 — Request permission before downloading model on first run - studio/backend/hub/schemas/downloads.py: add confirmed:bool=False field to DownloadModelRequest; add needs_confirmation:bool=False to DownloadStartResponse - studio/backend/hub/services/models/downloads.py: add _is_model_in_local_cache() helper that checks the HF cache; when confirmed=False and model is absent from cache, return state='confirmation_required' / needs_confirmation=True before spawning any download worker — the frontend can then show a dialog and re-POST with confirmed=True Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Claude-Session: https://claude.ai/code/session_016EuHUXBUpgszgrjtjL7ghp
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.
Issue unslothai#4155 — DPO: add UnslothDPOConfig and update PatchDPOTrainer
subclass (falls back to TrainingArguments when trl<0.7); export via all
monkey-patches DPOTrainer.init to emit a DeprecationWarning when legacy
TrainingArguments is passed instead of DPOConfig; includes docstring example
Issue unslothai#6469 — Code block readability in Unsloth Studio UI
fenced code blocks in light mode (dark mode keeps #181818); add
padding-right to code-block-header so the language label is never obscured
by the absolute-positioned copy/download action buttons; add matching inline
code surface for
spansIssue #6489 — UnicodeEncodeError (charmap codec) on Windows
errors=replace at process start, before any print (Windows only)
to encode/replace on UnicodeEncodeError; use it for all banner output
open() calls on adapter_config.json
child-process environment when spawning the backend on Windows; also add
encoding='utf-8' to the auth-secret fdopen call
Issue #5125 — Request permission before downloading model on first run
DownloadModelRequest; add needs_confirmation:bool=False to DownloadStartResponse
helper that checks the HF cache; when confirmed=False and model is absent from
cache, return state='confirmation_required' / needs_confirmation=True before
spawning any download worker — the frontend can then show a dialog and
re-POST with confirmed=True
Co-Authored-By: Claude Sonnet 4.6 [email protected]
Claude-Session: https://claude.ai/code/session_016EuHUXBUpgszgrjtjL7ghp