Avsecz / gin-train

Tracking ML experiments using gin-config, wandb, comet.ml and S3.
MIT License
5 stars 3 forks source link

Add gputil gpu scheduling and memory fraction #2

Open Avsecz opened 6 years ago

Avsecz commented 6 years ago

Add https://github.com/anderskm/gputil to auto-schedule model training

import GPUtil

if args.gpu == -1:
    gpu = GPUtil.getFirstAvailable(attempts=3, includeNan=True)[0]
else:
    gpu = args.gpu

add also the GPU memory fraction to use.