build_all() in mosaic/benchmarks/core/runner.py hardcodes max_workers=2 for Docker image builds. On machines with many cores and fast I/O, this is unnecessarily slow.
Goal: Expose a --build-workers N flag on mosaic run (and mosaic build if it exists) so users can tune build parallelism to their hardware.
Where to look:
mosaic/benchmarks/core/runner.py — build_all() function
mosaic/benchmarks/cli.py — CLI flag definitions (typer-based)
A reasonable default would be min(cpu_count(), 4) or similar, with the flag as an override.
build_all()inmosaic/benchmarks/core/runner.pyhardcodesmax_workers=2for Docker image builds. On machines with many cores and fast I/O, this is unnecessarily slow.Goal: Expose a
--build-workers Nflag onmosaic run(andmosaic buildif it exists) so users can tune build parallelism to their hardware.Where to look:
mosaic/benchmarks/core/runner.py—build_all()functionmosaic/benchmarks/cli.py— CLI flag definitions (typer-based)A reasonable default would be
min(cpu_count(), 4)or similar, with the flag as an override.