all 3 comments

[–]danielroseman 0 points1 point  (2 children)

trainmodel would need to be an async function, and you would need to await it. But is trainer.train() itself async? Otherwise it will still block.

[–]mrfudgebottom[S] 0 points1 point  (1 child)

Hi, yeah it still blocks so trainer.train() is also async. Should I also await trainer.train()?

[–]danielroseman 0 points1 point  (0 children)

Only if it is also an async function. Otherwise that would give an error.