Skip to content
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

Even more robust sweeping #302

Open
kylebgorman opened this issue Feb 6, 2025 · 0 comments · May be fixed by #308
Open

Even more robust sweeping #302

kylebgorman opened this issue Feb 6, 2025 · 0 comments · May be fixed by #308
Labels
enhancement New feature or request

Comments

@kylebgorman
Copy link
Contributor

kylebgorman commented Feb 6, 2025

In UDTube the sweep script this loads an input YAML configuration file specified by --config and connects to W&B using the normal flags, then for each run, it inserts the W&B hyperparameter suggestions (overwriting if necessary) into the config and shells out to udtube fit. Its sweep.py parses just four flags: 3 specifying details for W&B, and one for the config file; the other ones are passed directly to udtube fit with the help of argparse.ArgumentParser.parse_known_args.

This design could easily be adapted for Yoyodyne and is more or less independent of LightningCLI migration. One advantage of this design is that when the shell call returns, the OS frees up all the associated memory. Right now, we try to empty the CUDA cache, but it's not completely obvious to me if this works as expected or not. Using a shell call instead ought to have a tiny bit additional overhead, but given that we're just running a single process at a time anyways, it's pretty minimal and should be more robust in terms of freeing memory.

@kylebgorman kylebgorman added the enhancement New feature or request label Feb 6, 2025
kylebgorman added a commit to kylebgorman/yoyodyne that referenced this issue Feb 14, 2025
As described in CUNY-CL#302 this moves to a model where each sweep run is a
subprocess, which seems likely to ensure the OS returns memory at the
end of each.
@kylebgorman kylebgorman linked a pull request Feb 14, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant