Skip to content

build!: publish the distribution as usersim - #37

Merged
3mei merged 15 commits into
mainfrom
yev/build/publish-as-usersim
Oct 12, 2026
Merged

3mei merged 15 commits into
mainfrom
yev/build/publish-as-usersim

Conversation

@3mei

@3mei 3mei commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

What changed and why

Publishes the distribution as usersim and readies the package for PyPI, after five fixes.

Fixes

  • The evaluator and simulated-user models get 300-second timeouts in the bundled configs (they used Data Designer's 60-second default).
  • usersim eval exits 1 when no row got a judge verdict and otherwise reports how many rows lack one; a re-run judges such rows again.
  • The concealment scorer no longer reports its preview caveat, or a row without move/Guard ground truth, as a scorer error.
  • code_sha comes from User Sim's own checkout or git install, never from the working directory's repository.
  • The asset pre-flight accepts India variants for the locale-scoped probes, which run on the en_IN bank.

Packaging and docs

  • The distribution is usersim. Breaking: install specs naming nemo-usersim resolve only against earlier commits.
  • Builds need setuptools 77; the version lives only in pyproject.toml (now 0.2.0.dev0); tests stay out of the sdist.
  • make dist builds the sdist and the wheel from it. make check-dist replaces make check-wheel, adding twine check --strict and a check that every wheel file came from the sdist.
  • README: absolute links (the link check resolves them against the checkout), a PyPI install path with an offline first run, and refreshed PyPI metadata.
  • The README, docs/methodology.md and the CLI help describe the population as sampled from persona datasets, with census-grounded ones as an example.

After pulling: make clean && make install-dev. Removing the old distribution also removes the usersim command it shared with the new one; install-dev now reinstalls it.

How it was verified

  • make check-all, make test and make smoke pass after every commit, and the pre-commit hooks pass on each commit's files. Each fix has a test that fails without it.
  • Full suite (3,876 tests) on Python 3.10.19 (pandas 2.3.3), 3.13.5 and 3.14.0.
  • make check-dist (twine --strict PASSED for both archives), make check-extensions, make check-dependency-licenses, make check-license-headers, make check-doc-links, make check-notebooks-clean.
  • Live, against a custom provider config: make health-check passed (simulate, eval and report, with the judge returning a verdict), and a health_disclosure run with --scorers health_disclosure_concealment scored its row with no scorer error.

Results impact

  • Concealment scores (health_disclosure probes): a row whose audit fell back to committed intent for some topics was recorded as a scorer error, so its scores dropped out; it now counts, still marked preview-only. A row without move/Guard ground truth reads as not applicable instead of as an error.
  • Judge axes with the bundled configs: calls that hit the 60-second default now get 300 seconds, so fewer rows lack a verdict, and a re-run judges the rows that have none instead of skipping them.
  • Manifests: an install from a package index records no code_sha; it used to record the commit of whatever git repository it was run from.

3mei added 15 commits October 12, 2026 10:23
…call

The bundled configs set no timeout on either alias, so their calls used the 60-second Data Designer default, which slow endpoints exceed. Both now get 300 seconds, like the model under test, in all three bundled configs.

Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
…again

A row whose judge calls all failed, or returned output that did not parse, had no verdict, and `usersim eval` still exited 0. It now exits 1 when no row got a verdict and otherwise reports how many rows lack one. A re-run judges such rows again instead of skipping them as done.

Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
…errors

The preview caveat went into `error`, which consumers read as a failed scorer, so a scored row lost its scores; the caveat already lives in `preview_only`, `preview_topics` and `ground_truth_source`. A row without move/Guard ground truth now uses the `no ... scorer skipped` form, so it reads as not applicable.

Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
git ran in the working directory, so running inside another repository recorded that commit. The sha now comes from the checkout the package was loaded from, when git tracks the package there, or from the commit a git install recorded (PEP 610 direct_url.json). An install from a package index records none; USERSIM_CODE_SHA still overrides.

Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
The pre-flight required a bank directory named after each run locale, so simulate refused every India variant for the locale-scoped probes, which run on the en_IN bank. It now resolves each locale as the probes and scorers do.

Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
The distribution now has the name of the import package and the command. Install specs that name nemo-usersim resolve only against earlier commits. After pulling, run `make clean && make install-dev`: `make clean` also removes egg-info metadata, which can still carry the old name, and `make install-dev` reinstalls the project, restoring the `usersim` command that uninstalling nemo-usersim removes.

Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
license is a PEP 639 expression, which setuptools reads from 77 on; older releases fail to build the sdist.

Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
`usersim.__version__`, `usersim --version` and run manifests read the version of the installed usersim distribution, so pyproject.toml is the only place it is written. The distribution named usersim wins over stale metadata from another name.

Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
setuptools shipped part of the test suite without its conftest.py files; MANIFEST.in prunes tests/.

Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
`make dist` builds the sdist, then the wheel from it, into a fresh dist/. `make check-dist` replaces `make check-wheel`: it runs twine check --strict, fails if the wheel holds a file the sdist does not, keeps the asset and embeddings.parquet checks, and runs the installed wheel from an empty directory. `make clean` also removes build/ and dist/.

Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
Relative links break in the PyPI project description. The link check resolves links into the main branch against the checkout, so they stay checked.

Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
Setup installs from PyPI into a virtual environment with a version floor and verifies the install offline with smoke and a dry run. Working from a clone points to CONTRIBUTING.md.

Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
The population is sampled from persona datasets, of which census-grounded ones are an example; the README, docs/methodology.md and the CLI help now say so.

Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
@3mei
3mei requested review from a team as code owners October 12, 2026 16:09
@3mei
3mei merged commit 4a5d0de into main Oct 12, 2026
10 checks passed
@3mei
3mei deleted the yev/build/publish-as-usersim branch October 12, 2026 18:40
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.

1 participant