Let evaluations set the reference date of relative time ranges (MIND2WEB2_EVAL_DATE)
Eighteen evaluation scripts compute their time ranges ("last year", "within the next two months", "2018 to the current year") from the clock at the moment the evaluation runs. With this PR, whoever runs an evaluation can set that date with the environment variable MIND2WEB2_EVAL_DATE (YYYY-MM-DD), for example to the date the answers were collected. Without the variable, every script makes the same clock call as before, so results do not change.
Motivation
Mind2Web 2 tasks are time-varying by design, and the Oct 23, 2025 release moved several tasks to relative time ranges. The scripts compute those ranges from datetime.now() or datetime.utcnow() when they run. That matches the agent's situation when answers are evaluated right after they are collected. An evaluation that runs later, for example to re-score a submission or to reproduce a leaderboard number, applies a different range than the one the agent answered in:
nyc_sport_eventrequires events between the evaluation date and 60 days later. Re-evaluating an answer a month after it was written rejects events that were upcoming then and have taken place since.ad_patent,game_awards,openreview_papers, andsearch_summarize_arxivtake "last year" from the clock, so an answer written in December and evaluated in January is checked against the wrong year. Inad_patent, the year is also part of node ids.closet_pickshas# NOTE: use a hard date nowabove a commented-outCURRENT_DATE = datetime(2025, 5, 1, ...): fixing the date was considered, but the released code reads the clock.
Change
Each script gets the same helper after its imports:
def evaluation_now(clock=datetime.now):
"""Return the "now" from which this task's relative time ranges are computed.
This is midnight of MIND2WEB2_EVAL_DATE (YYYY-MM-DD) when that environment variable is set, for
example to the date the answers were collected, and ``clock()`` otherwise.
"""
pinned = os.environ.get("MIND2WEB2_EVAL_DATE")
return datetime.strptime(pinned, "%Y-%m-%d") if pinned else clock()
Each clock read calls it with the clock the script used before: datetime.utcnow() becomes evaluation_now(datetime.utcnow), datetime.now() becomes evaluation_now(), and date.today() becomes evaluation_now().date(). nyc_sport_event, which imports the datetime module, uses datetime.datetime in the helper. Every script also gains import os.
| Script | What the date sets |
|---|---|
ad_patent |
the publication year checked ("published in" last year), also in node ids |
artifact_repatriation |
the end of the repatriation-year range (2018 to the current year) |
broadway_plan |
the performance dates, the 10th to 12th of next month |
closet_picks |
the start of "within the past 2 years", and the reference date given to the judge |
county_AQI |
the ten-year range for the population and GDP data (two call sites) |
game_awards |
the award year (last year) |
goodreads_winner |
the end of the award-year range (2011 to the current year) |
largest_city_flights |
the three flight dates, from the 13th two months ahead |
london_edinburgh_travel |
the travel date, the 13th two months ahead |
mazda_production |
the latest year with official production figures |
nba_player_china_tour |
the ten-year range for the China tour |
nyc_sport_event |
the 60-day event window |
openreview_papers |
the ICLR year (last year) |
piano_concert |
the earliest concert date, two months ahead |
ra_vip_ticket |
the six-month event window |
review_articles_headphones |
the date given to the judge for "published within the last year" |
search_summarize_arxiv |
the submission window, January 1 to September 30 of last year |
telescopes_list |
the end of the operational-year range (2005 to the current year) |
Decisions
- A variable rather than hard-coded dates. Fixing each script to one date would undo the move to relative ranges and would judge every answer collected later against an old range. With the variable, the reference date becomes an input of the evaluation run, like the judge model and the cache, and it defaults to today.
- A helper in each script rather than in the framework. A framework function would make these scripts fail with any framework version that lacks it, including the released one, so the nine-line helper is repeated in each script.
- A date, not a time. The variable takes
YYYY-MM-DDand yields midnight as a naive datetime, likedatetime.now()anddatetime.utcnow(). A malformed value raisesValueErrorwhen the script is loaded, instead of evaluating with a wrong date. - Each call site keeps its clock. Without the variable, the scripts that read UTC still read UTC and those that read local time still read local time.
For the maintainers
- closet_picks. The note and the commented-out hard date are left as they are. Whether the hard date was meant to ship is a separate decision;
MIND2WEB2_EVAL_DATE=2025-05-01reproduces its ranges, whose claims use only the month and year. - In place. The change is applied in
2025_10_23, like #6 and #7. Results do not change unless the variable is set. - Changelog. A line such as: "Evaluation scripts with relative time ranges accept
MIND2WEB2_EVAL_DATE(YYYY-MM-DD) as their reference date; without it they use the current date as before." - Dev-set copies.
ad_patentandnyc_sport_eventare dev-set scripts, whose copies in the code repository get the same change in GitHub PR #22.
Merging with #6, #7, and #8
This PR also changes largest_city_flights.py (changed by #6), county_AQI.py (#7), and nyc_sport_event.py (#8), on other lines. For each of these files, a three-way merge with the other PR's version applies cleanly in either order and gives the same file.
Verification
- The offline harness of the code repository (a fake judge, a synthetic cache, the clock frozen at 2026-09-22 12:00 UTC) ran each of the 18 scripts before and after the change. Without the variable, the score and rubric tree are identical to the released script's, and with
MIND2WEB2_EVAL_DATE=2026-09-22they are identical as well, so the pinned date yields the same ranges as the clock on that day. The harness's count of judge calls varies between identical runs of the same script and was not compared. - With
MIND2WEB2_EVAL_DATE=2025-05-01, the rubric trees ofad_patent,artifact_repatriation,broadway_plan,london_edinburgh_travel, andmazda_productionchange in their dates and years. In the other scripts the date appears only in claims and judge instructions, which the harness's tree does not record; importing the scripts shows the values move, for examplenyc_sport_event's window becomes 2025-05-01 to 2025-06-30,largest_city_flights' flights July 13, 16, and 19, 2025, andsearch_summarize_arxiv's window January 1 to September 30, 2024. - A malformed value (
MIND2WEB2_EVAL_DATE=2025/05/01) stops the script withValueError: time data '2025/05/01' does not match format '%Y-%m-%d'. - All 18 scripts import with the released framework (
mainof the code repository), andevaluation_now()returns midnight of the configured date. - The versions of
largest_city_flights.py,county_AQI.py, andnyc_sport_event.pymerged with #6, #7, and #8 give the same score and tree as those PRs' versions without the variable and withMIND2WEB2_EVAL_DATE=2026-09-22. - The 18 originals are the blobs on this dataset's
main(54f5b25).
Not changed
- The rubrics, prompts, and the lengths of the time ranges.
- Other inputs that depend on when the evaluation runs, such as Google Maps distances and pages captured live because the cache lacks them.
- The framework. An option of the evaluation command could set the variable later.
🤖 Generated with Claude Code