Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to let the user cancel loading the model and stop it from fetching params #499

Open
JohnReginaldShutler opened this issue Jul 11, 2024 · 3 comments
Assignees

Comments

@JohnReginaldShutler
Copy link

Hello quick question! I was wondering, after you create the engine (in the step below) and the cache starts getting populated, how do you code a cancel button for a user to cancel downloading the model/quit the task. Is there a method that can be called? In this example to stop the response llm.abort(); but I would like to understand what abort() is being called on and how can I get there from the simple implementation found below.

const engine = await CreateMLCEngine(
selectedModel,
{ initProgressCallback: initProgressCallback }, // engineConfig
);

Thank you!

@customautosys

@CharlieFRuan
Copy link
Contributor

CharlieFRuan commented Jul 15, 2024

@Neet-Nestor
Copy link
Contributor

Neet-Nestor commented Jul 15, 2024

#484 is talking about avoiding having multiple loadings concurrently, but not about an API for cancelling like abort(). I will add this to our tracking list and have a look of whether we can provide this easily.

@Neet-Nestor Neet-Nestor self-assigned this Jul 15, 2024
@JohnReginaldShutler
Copy link
Author

JohnReginaldShutler commented Jul 26, 2024

Thank you so much for looking into it! Do drop me a ping when an API like this has been created. Really appreciate the work you guys are doing <3 (@customautosys)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants