Skip to content

Rust: adapt model generation to new format #19819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

redsun82
Copy link
Contributor

@redsun82 redsun82 commented Jun 19, 2025

This includes #19744 which should be either merged before this one, or closed.

  • because in rust we don't use a namespace element as the first element of a MaD row, I had to tweak the model generator scripts to allow to dump all models into a single file per project, ruther than one file per namespace. This is exposed as a --single-file=<name> parameter to the model generator and a single-file: true flag in the bulk model generator configuration.
  • Rust can have multiple canonical paths for a given function (if the function ends up in different crates): I used an algebraic type pairing up a Function with any of its getCanonicalPath (QualifiedCallable), which means the model generator will output repeated rows with the different canonical paths a Function may have.

redsun82 added 11 commits June 12, 2025 16:23
* fix a bug where the order of model generation was determined by the
  order in the `download.json` file of the experiment rather than the
  order in the config file
* allow configuring `--ram` and `--threads` in the MaD generator scripts
* use no `--ram` and `--threads=0` by default in the bulk generator
  (single generator defaults are left unchanged)
* allow to pass `--dca` multiple times, taking DBs from experiments
  listed last. This allows to run a subset of the sources in a "fixup"
  experiment and use it to "patch" a previous run without rerunning
  everything.
The standalone MaD generator now uses `0` for threads and throttles the
RAM to use 2GB per thread by default.

Also, replaced the hand-written argument parsing with `argparse`.
@github-actions github-actions bot added the Rust Pull requests that update Rust code label Jun 19, 2025
@redsun82 redsun82 force-pushed the redsun82/rust-regenerate-models branch from 5bfda7a to 170dd6c Compare June 19, 2025 13:20
Copy link
Contributor

@hvitved hvitved left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QL and test changes LGTM.

@redsun82 redsun82 marked this pull request as ready for review June 20, 2025 13:29
@redsun82 redsun82 requested a review from a team as a code owner June 20, 2025 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants