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.
Install 2.0
Section titled “Install 2.0”pip install --upgrade mostlyrightmdpnpm add mostlyright@latestThe Python distribution is mostlyrightmd; the import remains mostlyright.
Replace removed calls
Section titled “Replace removed calls”| 1.x | 2.0 |
|---|---|
weather.obs(...) | weather.observations(...) |
weather.pairs(...) | weather.training_table(...) |
research(...), dataset(...) | the relevant domain’s training_table(...) |
econ | economy |
economy.history(...) | economy.series(...) |
root align / spine | mostlyright.experimental.align / mostlyright.experimental.spine |
TypeScript dataset(...), research(...), pairs(...) | trainingTable(...) |
Python
Section titled “Python”from datetime import datefrom 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.
TypeScript
Section titled “TypeScript”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().
Update column names
Section titled “Update column names”Version 2.0 renames the main training-table prefixes:
| 1.x | 2.0 |
|---|---|
date | local_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.
Rebuild feature engineering
Section titled “Rebuild feature engineering”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.
Verify the migration
Section titled “Verify the migration”- Pin both SDK versions in your lockfiles.
- Re-run representative historical windows.
- Compare row counts, dates, labels, and null handling.
- Confirm live calls raise or return exactly as your application expects.
- Retrain any model whose input columns changed.