MaD generator: use --threads=0 and 2GB per thread for --ram by default#19744
Merged
MaD generator: use --threads=0 and 2GB per thread for --ram by default#19744
--threads=0 and 2GB per thread for --ram by default#19744Conversation
* 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`.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the MaD generator scripts by adding configurable resource flags, fixing model-generation ordering, and improving DCA experiment support.
- Replace manual argument parsing in
generate_mad.pywithargparse, introducing--threadsand--ram(default 0 threads and 2 GB per thread). - Update
bulk_generate_mad.pyto propagate these new flags into the generator, support multiple--dcaruns, and remove the stale git-status precheck. - Fix bug where model-generation order followed
download.jsonrather than the user’s config.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| misc/scripts/models-as-data/generate_mad.py | Switched to argparse, added threads/ram handling, and updated default RAM |
| misc/scripts/models-as-data/bulk_generate_mad.py | Changed generate_models signature to accept CLI args, wired new flags, updated DCA download loop |
Comments suppressed due to low confidence (2)
misc/scripts/models-as-data/bulk_generate_mad.py:228
- Update this function’s docstring to document the new
argsparameter (its type, purpose, and which CLI flags it carries).
def generate_models(config, args, project: Project, database_dir: str) -> None:
misc/scripts/models-as-data/generate_mad.py:143
- Add tests (unit or integration) to verify the behavior of the new CLI flags (
--threads,--ram,--with-*) and defaulting logic ingenerate_mad.py.
generator = p.parse_args(namespace=Generator())
redsun82
added a commit
that referenced
this pull request
Jun 13, 2025
Models are regenerated with the fix from #19744 which corrects the order of generation.
This was referenced Jun 13, 2025
Contributor
Author
|
aw, the apache/dubbo problem has striked again, that means this doesn't fully solve it as I thought it would (but it does seem to make it rarer) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--threads=0and 2GB per thread for--ramby defaultdownload.jsonfile of the experiment rather than the order in the config file--ramand--threadsin the MaD generator scriptsThe review should ignore ae3bbb0 and 5df292c in order to not look at
blackformatting changes.