Skip to content

BPE: replace solution code, fix Solution button opening the question - #30

Merged
Exorust merged 1 commit into
Exorust:mainfrom
Tar-ive:bpe-solution-and-site-fix
Sep 15, 2026
Merged

Exorust merged 1 commit into
Exorust:mainfrom
Tar-ive:bpe-solution-and-site-fix

Conversation

@Tar-ive

@Tar-ive Tar-ive commented Sep 14, 2026

Copy link
Copy Markdown

What changed

1. llm/Byte-Pair-Encoder/BPE-q3-SOLN.ipynb
Swapped the two code cells (implementation + tests).

  • This version uses "" as the end-of-word marker. merge_vocab adds it back after split() so words don't lose it.
  • It also replaces the old test cell, which was cut off at test_get_ and threw a NameError.

2. website/src/data/questions.ts
For v2-3 (Byte Pair Encoding), solutionPath pointed at BPE-q3.ipynb, the question notebook. Because of that, Open Solution in Colab and Download Solution both opened the question. It now points at BPE-q3-SOLN.ipynb. problems.generated.ts already had the right path.

Verification

  • python3 scripts/validate_specs.py byte-pair-encoder → PASS
  • python3 scripts/generate.py check → 68 manifests checked, 0 problems
  • Running the notebook's code cells: all 4 tests pass

- BPE-q3-SOLN.ipynb: swap in the implementation and tests from
  Tar-ive/dl_basics Byte_Pair_Encoding_Scratch.ipynb. The markdown problem
  cell is unchanged. This also replaces the old test cell, which was cut off
  mid-call (`test_get_`).
- website/src/data/questions.ts: v2-3 solutionPath pointed at the question
  notebook, so "Open Solution in Colab" / "Download Solution" opened the
  question.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QpBMRkd6QHXSsjd6bvPjUc
@Tar-ive
Tar-ive requested a review from Exorust as a code owner September 14, 2026 06:17
@vercel

vercel Bot commented Sep 14, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the exorust's projects Team on Vercel.

A member of the Team first needs to authorize it.

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@Exorust
Exorust merged commit ecc4c63 into Exorust:main Sep 15, 2026
1 check failed
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.

2 participants