You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Spot instances- Runner must be able to restart workflow #174
While in GH the lost of the runner can be recovered ending with a failed job in GL the job without a valid runner can run forever. I opened a ticket here
The biggest drawback would be restarting the workflow in a loop. Having the runner the ability to listen for the spot instance eviction will be a better warranty of acting properly
This implies that we have to provide the cleanup scripts when deploying the spot instances, this scrips just only need to run the runner cleanup and restart. of the workflow.
When an ECS Container Instance is interrupted, and the instance is marked as DRAINING, running tasks are stopped on the instance. When these tasks are stopped, a SIGTERM signal is sent to the running task, and ECS waits up to 2 minutes before forcefully stopping the task, resulting in a SIGKILL signal sent to the running container. This 2 minute window is configurable through a stopTimeout container timeout option, or through ECS Agent Configuration, as shown in the prior code, giving you flexibility within your container to handle the interruption. If you set this value to be greater than 120 seconds, it will not prevent your instance from being interrupted after the 2 minute warning. So, I recommend setting to be less than or equal to 120 seconds.
You can capture the SIGTERM signal within your containerized applications.
Hi @btjones-me we are preparing a release that allow you t deploy spot instances using our terraform provider. But restarting the workflow to continue training is something that we are still develping.
Hi @DavidGOrtega ! Can you share the progress on this please? I'm looking into using CML with DVC for a product and being able to use spot instances to train and evaluate models is pretty crucial to keep costs reasonable. Thanks!
👋 @SebastianCallh you can use spot instances with CML, the feature that we are solving here is the ability to transparently move to another spot instance if the spot instance is depleted.
Said that you could use DVC to cache the intermediate weights and restart the workflow manually.
Thank you for the rapid response! I see. Sorry to say that's probably a deal breaker for my team. It would be impossible to babysit all training/evaluation jobs. Can you share some rough estimate on when this might be solved?
@SebastianCallh We have been two days discussing this and we made a small prototype. I can tell you an exact day but its close. The trick resides in our runner.
Activity
DavidGOrtega commentedon Jul 23, 2020
https://aws.amazon.com/blogs/compute/best-practices-for-handling-ec2-spot-instance-interruptions/
DavidGOrtega commentedon Jul 23, 2020
https://cloud.google.com/compute/docs/shutdownscript
This would imply add that ability in our docker container fork
DavidGOrtega commentedon Jul 23, 2020
https://stackoverflow.com/questions/62248891/microsoft-azure-spot-instance-shutdown-script
btjones-me commentedon Feb 8, 2021
Hi @DavidGOrtega - was there any progress made on these? Would love to be able to use CML with spot instances
DavidGOrtega commentedon Feb 12, 2021
Hi @btjones-me we are preparing a release that allow you t deploy spot instances using our terraform provider. But restarting the workflow to continue training is something that we are still develping.
SebastianCallh commentedon Apr 30, 2021
Hi @DavidGOrtega ! Can you share the progress on this please? I'm looking into using CML with DVC for a product and being able to use spot instances to train and evaluate models is pretty crucial to keep costs reasonable. Thanks!
DavidGOrtega commentedon Apr 30, 2021
👋 @SebastianCallh you can use spot instances with CML, the feature that we are solving here is the ability to transparently move to another spot instance if the spot instance is depleted.
Said that you could use DVC to cache the intermediate weights and restart the workflow manually.
SebastianCallh commentedon Apr 30, 2021
Thank you for the rapid response! I see. Sorry to say that's probably a deal breaker for my team. It would be impossible to babysit all training/evaluation jobs. Can you share some rough estimate on when this might be solved?
DavidGOrtega commentedon Apr 30, 2021
Sure, let me check with the team what are the estimations of this
SebastianCallh commentedon Apr 30, 2021
That's great! Thank you so much for your assistance and your work on this project!
DavidGOrtega commentedon Apr 30, 2021
@SebastianCallh In the meantime, My I ask whats the solution that your team use right now to renew the spot instances? spot.io maybe?
SebastianCallh commentedon Apr 30, 2021
Sure! Currently we are using SageMaker to provision all cloud compute
SebastianCallh commentedon May 4, 2021
@DavidGOrtega any news?
DavidGOrtega commentedon May 5, 2021
@SebastianCallh We have been two days discussing this and we made a small prototype. I can tell you an exact day but its close. The trick resides in our runner.