Skip to content

ready event not exposed on ProgressInfo type #1064

@pelikhan

Description

@pelikhan

System Info

transformers.js 3.1.0
typescript 5.7.2

Environment/Platform

  • Website/web-app
  • Browser extension
  • Server-side (e.g., Node.js, Deno, Bun)
  • Desktop app (e.g., Electron)
  • Other (e.g., VSCode extension)

Description

The type definition of ProgressInfo does not expose the "ready" event that gets sent when the model is fully loaded.

Reproduction

const generator = await pipeline('text-generation', 'Xenova/distilgpt2'. {
  progress_callback: ev => console.log(ev.status) // this will print "ready" when the model is loaded
});
const text = 'I enjoy walking with my cute dog,';
const output = await generator(text);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions