DEV Community

Cover image for Touch Grass: the best hours to be outside, forecast on your own laptop with TabPFN
Yvoo
Yvoo

Posted on

Touch Grass: the best hours to be outside, forecast on your own laptop with TabPFN

Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass Submission 🌿

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass

What I Built

A one-file forecaster that answers one question: which two hours tomorrow are worth going outside for?

It pulls 70 days of hourly weather for your city from Open-Meteo, hands that table to TabPFN, Prior Labs' open tabular foundation model, and gets back tomorrow's temperature, rain, wind and cloud hour by hour, with an uncertainty band. A transparent score turns that into three ranked windows. The output is a single offline HTML page: open it on your phone, read the top line, put the phone away.

No account, no API key, no GPU, no cloud. The model runs on a laptop CPU in about five minutes, honesty check included.

Who it is for: anyone who plans a run, a walk with a kid, or a lunch outside around the weather, and would rather own the thing that tells them when than refresh an app with ads.

Demo

Live page for Paris, built on the night of 8 October for 9 October:
https://yvoolab.github.io/touch-grass-tabpfn/

Touch Grass page for Paris: best windows, temperature band, rain bars, holdout table

Run it yourself for any coordinates:

pip install tabpfn==9.1.0 numpy
python touch_grass.py --lat 45.76 --lon 4.84 --name Lyon --tz Europe/Paris
Enter fullscreen mode Exit fullscreen mode

Code

https://github.com/yvoolab/touch-grass-tabpfn

GitHub logo yvoolab / touch-grass-tabpfn

Best hours to be outside today, forecast locally from your own weather CSV with TabPFN (open weights, CPU, offline HTML)

Touch Grass

Which hours tomorrow are worth being outside, forecast on your own laptop from a plain CSV of past weather. No account, no API key, no GPU, no cloud. One Python file, one offline HTML page.

Built for the DEV Hacktoberfest Open-Source AI Challenge, Week 1: Touch Grass. The open-source AI at the core is TabPFN, Prior Labs' tabular foundation model.

Touch Grass page for Paris

Live page: https://yvoolab.github.io/touch-grass-tabpfn/ (regenerated by hand, not on a schedule; the date in the header is the day it was built for).

What it does

  1. Pulls about 70 days of hourly weather for one place from Open-Meteo (free, no key). Saved to data/<place>_hourly.csv so the next run can be fully offline.
  2. Turns it into a flat table: hour of day, weekday, and what temperature, rain, wind and cloud were 1, 2, 3 and 7 days earlier.
  3. Fits one TabPFN regressor per variable on the last 41…




One Python file, 300 lines, MIT. touch_grass.py is the whole thing: fetch, features, four TabPFN fits, holdout, score, HTML. The saved CSV lets you rerun it fully offline.

How I Built It

The open-source AI at the core is TabPFN v2, used as a plain regressor, no agent wrapper. Four models, one per variable, each fit on 984 rows and asked for 24 predictions.

The data shape is deliberately boring. Each row is one hour of one day: hour of day, weekday, and what each variable was 2, 3, 4 and 7 days earlier. That is the whole feature set. TabPFN is pretrained on millions of synthetic tables, so it does not need me to hand-craft seasonality; it needs me to give it an honest table and stay out of the way.

The part I care most about is the honesty check. Before forecasting tomorrow, the pipeline re-predicts the last three fully observed days, each from only the days before it, and prints mean absolute error next to the dumbest baseline there is: the same hour two days earlier. Paris, this week:

Variable TabPFN Same hour 2 days earlier Model better?
Temperature (°C) 2.83 1.67 no
Rain (mm/h) 0.10 0.11 yes
Wind (km/h) 2.38 3.43 yes
Cloud (%) 51.5 63.8 yes

The model wins on wind and cloud, ties on rain, and loses on temperature. In a stable October week, "same as two days ago" is a hard baseline for temperature with 41 days of lags and no numerical forecast as input. The page says so in a table, not in a footnote. If a tool is going to tell you when to leave the house, it should show you when it was wrong.

Three choices worth stating:

  • Why lags of 2+ days instead of 1. When you run this at night for tomorrow, "yesterday" is the last day whose 24 hours are all behind you. Using today's values would mean feeding the model Open-Meteo's own forecast for the hours that have not happened yet. The lag structure shifts with the target day so nothing leaks.
  • Why the score is a formula on the page, not a learned label. If I trained the model to predict a "comfort score" I computed from the same columns, it would learn my rule back and the holdout table would be meaningless. The model predicts weather; the rule is applied afterwards and is yours to edit.
  • Why 41 days and 4 ensemble members. TabPFN v2 caps CPU fits at 1,000 rows, so 41 × 24. Four ensemble members instead of eight halves the CPU time with the same story. Both are constants at the top of the file.

Built with Claude Code at the keyboard and me deciding what the thing is for, which baseline counts, and what goes on the page. Every number above comes from a run on my laptop, not from a notebook I cleaned up afterwards.

Why Does Open Innovation Matter?

Here is the specific thing open weights made possible: this project is a single file anyone can run in five minutes without creating an account anywhere.

That was not automatic. tabpfn 9.1.0 defaults to the newest TabPFN-3.5 checkpoint, which is gated behind a Prior Labs login and a non-commercial license. The v2 weights are ungated on Hugging Face under the Prior Labs License v1.1, Apache-2.0 plus attribution, and they run on CPU. Selecting them is one line:

TabPFNRegressor.create_default_for_version(ModelVersion.V2, device="cpu")
Enter fullscreen mode Exit fullscreen mode

With a closed API, three things in this project would not exist. The offline rerun from a saved CSV. The honesty table, because you cannot audit a model you cannot run twice on your own data. And the "put the phone away" ending, because a page that needs a server to refresh is a page that pulls you back to the screen. Open weights are what let a weather tool be something you own rather than something you visit.

Attribution: TabPFN-v2 weights by Prior Labs. Hollmann et al., Accurate predictions on small data with a tabular foundation model, Nature 637 (2025). Weather data by Open-Meteo, CC BY 4.0.

Prize Categories

Best Use of TabPFN

Top comments (1)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.