Machinelearning: image classification needs cancel

Created on 6 Jan 2020  路  7Comments  路  Source: dotnet/machinelearning

Hi, is there any plan to add cancel support for image classification API so that we can cancel an image classification training by passing in a cancellation token?

related issue

P2 enhancement

Most helpful comment

Ok, so I will work on this. Thanks for your suggestions, @codemzs !

All 7 comments

Hi @LittleLittleCloud , so it's still not clear to me what is being asked, and so if it would be a quick fix or a major feature request.

Can you please share code (and perhaps a dataset) where you "cancel and switch to another scenario" (as mentioned in the issue you've linked to)? I would like to know how you're currently cancelling the training.

Particularly, it's strange that you mention that there's a lot of memory being used and that's not released after cancelling. Perhaps you are pointing to a memory leak?

Thanks.

It's not a memory leak, the thing is our program allows user to cancel training after it start, But we can't stop an image training after it starts because current Image Classification API doesn't support cancellation token.

The way we use Image Classification is through AutoML, there's a trainer in MulticlassificationExperiment , and that's how it be called

This should be an easy fix. Please refer to the below PRs where we have added cancellation mechanism in other trainers. You can invoke cancellation via mlcontext cancel function that is exposed in experimental nuget. First, someone needs go add cancellation checkpoints, test, verify with model builder, commit, ship.

https://github.com/dotnet/machinelearning/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aclosed+cancellation++

Would doing what @codemzs has just said (to expose cancelation via mlContext.CancelExecution()) be enough for you, @LittleLittleCloud ?

If we can cancel using CancelExecution() that also works. ( As long as there's a way to cancel training)

Yep, we will need to add a check point in the training loop, it鈥檚 just few lines of change plus testing.

Ok, so I will work on this. Thanks for your suggestions, @codemzs !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sfilipi picture sfilipi  路  4Comments

daholste picture daholste  路  3Comments

rebecca-burwei picture rebecca-burwei  路  3Comments

ddobric picture ddobric  路  4Comments

JakeRadMSFT picture JakeRadMSFT  路  3Comments