Repository navigation
Studio: OpenFinetuner rebrand, console design system, embeddable view; Apple Silicon install fix - #15
Merged
Conversation
Two bugs, found while wiring an evaluator's scored traces into training. `pip install shadowlm` could not resolve on an arm64 Mac at all. mlx-lm-lora was a base dependency, every published version requires mlx_lm>=0.30.6, and mlx-lm 0.30+ pins transformers==5.0.0rc — which the torch trainer's <4.57 ceiling cannot admit. pip reported it as an unsolvable base install rather than as the version clash it is. mlx-lm-lora moves to the `preference` extra, which is where the code already said it lived: both call sites import it lazily and the ImportError already told people to run `pip install shadowlm[preference]`. mlx-lm is capped below 0.30 so the base install stays inside the transformers window — 0.29.x is the last line taking transformers>=4.39.3 unbounded. The extra still cannot share an environment with the torch path, because that conflict is upstream and real. Rather than leave that as a puzzle, the ImportError now says so and gives the two commands that work. A base install resolves clean on Apple Silicon: mlx-lm 0.29.1, transformers 4.56.2, torch 2.14.0, trl 0.24.0. Second: `from_spans` read `reward_key` only from spans that parsed as a model call, because the read sat below the `if call is None: continue`. A reward describes the episode, not one call, so an evaluator that scores a whole trace writes it on the root — and the root is not a model call. The reward was dropped and the trajectory came back at 0.0, which is indistinguishable from a genuinely bad episode. Silent, and it poisons anything downstream that filters on min_reward or ranks a preference pair. The read moves above the filter, and both the reward reader and the call builder now derive the episode id through one `_trace_of` — they key the same dict, so a second copy would break on the first span carrying gen_ai.conversation.id. Four tests cover it, including that conversation id and that an unparseable reward is ignored rather than fatal. Two of them fail on the previous commit. 218 tests pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017t48BoeNVguFPXaARs8SHP
Every response sends frame-ancestors for the built-in origins (opencontroller on studio-dev, localhost on any port) plus SHADOWLM_FRAME_ANCESTORS, and the studio page carries the same list in a meta tag for the oc-embed/1 bridge.
lib/embed.ts is the frame side of the bridge Rekori's console speaks: on only when framed by a listed origin, it waits for the host's pass, follows the host's theme and navigation, and reports route and title back. api.ts sends calls to the host's proxy with the pass when embedded, renewing it once on a 401; standalone it behaves as before.
Rename the studio to openfinetuner (formerly ShadowLM) and adopt the console's look: its Paper & Ink tokens with light and dark themes, shadcn primitives in components/ui, the floating side panel that folds to a rail, plain page mastheads, hairline stat strips, tables and tinted actions. All seven pages are ported with their behavior unchanged; embedded, the shell drops away and the host's theme wins. The red brain stays (white on dark), the footer actions are labelled rows, and Docs/GitHub link to the repo.
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
d5a1a4d): fixes the arm64 macOS install and reads trace rewards from any span.shadowlmpackage, CLI and imports are untouched.frontend/src/components/ui/), the floating side panel that folds to a rail, plain page headers, stat strips, tables. All seven pages ported with behavior unchanged. The red brain stays (white in dark mode); sidebar actions (HF token, Clean VRAM, Docs, GitHub) are labelled rows.oc-embed/1postMessage bridge — the same one Rekori's console speaks (frontend/src/lib/embed.ts). Framed by a listed origin it drops its shell, follows the host's theme and navigation, and sends every API call to the host's proxy with a short-lived pass.serve.pysendsframe-ancestorson every response (built-ins:https://dev.opencontroller.sh,localhost:*; more viaSHADOWLM_FRAME_ANCESTORS). Standalone, nothing changes.Testing
make test: 222 passed (incl. 4 new intests/test_serve_embed.py);make checkclean;make build+twine checkpass./../etcpath is rejected.Notes
frontend/pnpm-lock.yamlwas not regenerated (the Makefile uses npm).