Skip to content

Add Kaggle mirror site#54

Open
KaKituken wants to merge 1 commit into
aiming-lab:mainfrom
KaKituken:add-kaggle-mirror
Open

Add Kaggle mirror site#54
KaKituken wants to merge 1 commit into
aiming-lab:mainfrom
KaKituken:add-kaggle-mirror

Conversation

@KaKituken

@KaKituken KaKituken commented Jun 25, 2026

Copy link
Copy Markdown

Mirrored site

Kagglehttps://www.kaggle.com/
Added as the 16th WebHarbor site, served on port 40015.

What's included

  • sites/kaggle/ — Flask + SQLAlchemy app: competitions, datasets, code/notebooks, models, learn/courses, discussions, rankings, accounts. 27 Jinja2 templates. Scored token-overlap search on every listing route plus a global /search.
  • Idempotent seeding (function-level gates) with benchmark users (alice.j@test.com et al.).
  • 20 WebVoyager tasks in sites/kaggle/tasks.jsonl.
  • Registered in the three required places: websyn_start.sh, control_server.py, Dockerfile (EXPOSE … 40015).
  • Fixes a pre-existing .gitignore bug: the scraped_data/ and instance/ patterns carried inline # comments, which gitignore treats as part of the pattern, so they never matched. Comments moved to their own lines.

Seeded rows per major model

model rows model rows
users 13 submissions 16
competitions 17 competition_entries 2
datasets 16 bookmarks 4
notebooks 12 comments 4
models 10 discussions 8
courses 10 follows 2

Tasks

20 tasks in sites/kaggle/tasks.jsonl (WebVoyager schema), covering search, browse, competition join, dataset upvote, notebook/model lookup, account management, and multi-step authenticated flows.

Byte-identical reset

$ curl -X POST http://localhost:8201/reset/kaggle
{"pid":625,"ready":true,"site":"kaggle"}

After reset, md5sum of instance/kaggle.db matches instance_seed/kaggle.db (131cdab6ed840e4e74324ab5bd24dda4) — the strict reset invariant holds.

Visual fidelity vs. the real site

Mirror rendered at localhost:40015 (compare against https://www.kaggle.com/).

Home Competitions
home competitions
Datasets Models
datasets models
More (competition detail, rankings)

competition detail
rankings

Paired HuggingFace assets PR

https://huggingface.co/datasets/ChilleD/WebHarbor/discussions/37 — uploads kaggle.tar.gz (instance_seed/kaggle.db + static/images) to the ChilleD/WebHarbor dataset.

.assets-revision already pins revision: main, so no bump is needed; once the dataset PR merges, scripts/fetch_assets.sh pulls the kaggle assets automatically. Merge the HF dataset PR before this one so a clean-clone build can fetch the assets.

Cover-image fidelity (fixed)

The original scrape mis-bound cover images: kaggle's ListCompetitions API returns thumbnailImageUrls / headerImageUrls as dicts keyed by competition id, but the scraper paired them to competitions positionally — scrambling every cover (Titanic showed handwritten digits, the LLM competition showed pill packaging, Home Credit showed a Mercedes logo, etc.). Fixed by re-binding each image via …ImageUrls[str(comp["id"])], re-fetching the correctly-bound real kaggle images, and mapping each seeded slug to the most topical real entity (Titanic → the ship, Digit Recognizer → digits, leaf-disease → foliage, medical → medical, …). Covers are downscaled to ≤600px. The scraper bug itself is also patched in scraped_data/scrape_api.py.

🤖 Generated with Claude Code

New WebHarbor mirror of kaggle.com on port 40015 (16th site).

- sites/kaggle/: Flask + SQLAlchemy app (competitions, datasets, code/
  notebooks, models, learn/courses, discussions, rankings, accounts),
  27 Jinja2 templates, scored token-overlap search across all listings.
- Idempotent seeding (function-level gates) with benchmark users
  (alice.j@test.com et al.); byte-identical reset verified.
- 20 WebVoyager tasks in sites/kaggle/tasks.jsonl.
- Registered in websyn_start.sh, control_server.py, Dockerfile (EXPOSE
  ...40015).
- Fix .gitignore: scraped_data/ and instance/ patterns had inline
  comments, which gitignore treats as part of the pattern, so they never
  matched. Comments moved to their own lines.

Heavy assets (instance_seed/kaggle.db, static/images/) ship via the
ChilleD/WebHarbor HF dataset, not this repo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@MufanQiu

MufanQiu commented Jul 1, 2026

Copy link
Copy Markdown

Review — kaggle (PR #54)

Verdict: REQUEST CHANGES.

We deployed the environment locally and ran the full review checklist; every finding below was independently reproduced, and fidelity was checked against the real upstream site.

Issues (summary)

  • MAJOR: .assets-revision downgraded from pinned SHA to floating 'main' -> CI fail-closed for a NEW site
  • MAJOR: Site-slot / port-40015 collision with released merriam_webster; PR deletes merriam_webster
  • MINOR: Answer leak: 3 list/filter tasks solvable by reading result card Add TED mirror site #1 (T19, T2, T16)
  • MINOR: T5 'PyTorch' qualifier is redundant (only one chest-X-ray model exists)
  • NIT: AppleDouble + .DS_Store junk ships in the asset tarball
  • NIT: Stale site-count comments in websyn_start.sh

Mechanical checks: FAIL

Boot and reset are clean: HTTP 200 on / and /_health; byte-identical reset PASSES (instance/kaggle.db md5 == instance_seed/kaggle.db across two boots; all seed_*() early-return on a populated DB; counts stable at users=13, competitions=17, datasets=16, notebooks=12, models=10, courses=10, discussions=8, submissions=16).

Visual fidelity: PASS

Faithful Kaggle look: teal #20beff logo, global search, blue hero, Featured Competitions, Popular Datasets grid with real imagery (Netflix, MNIST), Trending Notebooks, Learn section, footer.

Functional depth: PASS

All deep drives pass through authentic UI. Login (alice.j@test.com / TestPass123!) → /account; register rejects mismatched confirm (0 users created); vote (2987→2988, persists), bookmark (shown on /account), follow, and join-competition (CompetitionEntry accepted_rules=1, team count incremented) all DB-backed; anonymous interactions redirect to /login (@login_required).

Task quality: PASS (with nits)

All 20 tasks are solvable against the seeded DB with confirmed ground truth; the catalog is healthy with good distractor density.

Required fixes before approval

  1. (F1, BLOCKER) Pin .assets-revision to the merged HF dataset commit SHA that actually contains kaggle.tar.gz (not main, not an unmerged PR ref).
  2. (F2, BLOCKER) Rebase onto current origin/main and append kaggle as the 17th site (index 16 → port 40016) in both websyn_start.sh and control_server.py; raise Dockerfile EXPOSE to 8101 40000-40016.
  3. (F3, MAJOR) Eliminate the result-Add TED mirror site #1 leaks on T19/T2/T16.
  4. (F4, MINOR) Add a non-PyTorch chest-X-ray model.
  5. (F5, MINOR) Delete sites/kaggle/static/images/.DS_Store and ._.DS_Store and re-pack kaggle.tar.gz so the macOS junk stops shipping. (.gitignore already excludes these patterns; consider also adding .DS_Store/._* to .dockerignore even though static/images is intentionally shipped.).

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