Since a "cold" pool can take almost a minute to start, it may be preferable to launch (or spin up) the Gurobi Instant Cloud pool early from an application. The pool can then start up while some other code is executing.
For example, an application might prepare data before creating a Gurobi environment. Starting the pool while preprocessing the data will help assure that the pool is ready once the other code finishes.
Starting the pool early is done by using the REST API. You can learn about the REST API -- and even try it out interactively by using your own cloud account here: https://cloud.gurobi.com/swagger.html
The attached program illustrates waiting for the cloud pool to be ready before submitting the job. This waiting is not necessary, but the example demonstrates how to check the status of a cloud pool.
To use the attached sample, download the file, enter the correct license information for your cloud account into the three fields at the top of the Python file, then run it.
Please sign in to leave a comment.