Spot Instances/VMs work like any other execution environment in Valohai. From the drop down menu where you choose a machine type you'll be able to choose a spot type.
- Valohai will schedule the job and try to get a spot instance. If one is not immediately available it will keep trying until it gets one.
- Your job might end on time, or it might be interrupted by the cloud provider saying "this is instance isn't available any more for this price".
- In this case your execution will get a notification (you can react to that event in your code) and then you have a couple of mins to wrap up your process before the machine is terminated by the provider.
- In your code, you can expect a KeyboardInterrupt error as a signal that your job is stopping.
Spot instance pricing
AWS
Spot Instance pricing on AWS is dynamic and will adjust based on supply and demand for Spot Instance capacity. Each AWS environment in Valohai has a "max price" setting which is the max hourly rate you're willing to pay. By default we keep this as the on-demand instance price.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances.html
Google Cloud
Google Cloud Platform has a fixed price for Spot VMs with no more than once-a-month pricing changes.
https://cloud.google.com/spot-vms
Microsoft Azure
Pricing on Azure Spot Virtual Machines is variable, based on the region and machine type. Microsoft has made pricing available on their website.
https://docs.microsoft.com/en-us/azure/virtual-machines/spot-vms
Comments
0 comments
Please sign in to leave a comment.