Skip to content

Migration

Upgrade to 2.0

Mostly Right 2.0 is a hard naming break. It has no compatibility shims. Update each call, re-run your research, and treat changed columns as a model-input migration.

Terminal window
pip install --upgrade mostlyrightmd
pnpm add mostlyright@latest

The Python distribution is mostlyrightmd; the import remains mostlyright.

1.x2.0
weather.obs(...)weather.observations(...)
weather.pairs(...)weather.training_table(...)
research(...), dataset(...)the relevant domain’s training_table(...)
econeconomy
economy.history(...)economy.series(...)
root align / spinemostlyright.experimental.align / mostlyright.experimental.spine
TypeScript dataset(...), research(...), pairs(...)trainingTable(...)
from datetime import date
from mostlyright import weather
df = weather.training_table(
"KNYC",
date(2025, 1, 6),
date(2025, 1, 9),
)

Per-report weather history now uses weather.observations(). Economic data lives under from mostlyright import economy.

import { trainingTable } from "mostlyright";
const { rows } = await trainingTable(
"KNYC",
"2025-01-06",
"2025-01-09",
);

Use the domain namespaces for lower-level reads, including weather.observations() and weather.latest().

Version 2.0 renames the main training-table prefixes:

1.x2.0
datelocal_standard_date
cli_*daily_summary_*
obs_*observed_*

Python and TypeScript use the same snake_case vocabulary. Verify the exact fields returned by the package version you deploy before freezing a model contract.

The SDK no longer ships transforms, preprocessing, or the old feature flags. Apply lags, rolling windows, clipping, and other feature engineering after the training table is returned, using pandas, Polars, or your own TypeScript code.

  1. Pin both SDK versions in your lockfiles.
  2. Re-run representative historical windows.
  3. Compare row counts, dates, labels, and null handling.
  4. Confirm live calls raise or return exactly as your application expects.
  5. Retrain any model whose input columns changed.