microsoft / onnxruntime

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
https://onnxruntime.ai
MIT License
14.59k stars 2.92k forks source link

[Documentation] run_async missing documention for user_data parameter #20367

Open HadiSDev opened 6 months ago

HadiSDev commented 6 months ago

Describe the documentation issue

The run_async function takes a user_data parameter but there is nothing in the docs saying what that is:

        Compute the predictions asynchronously in a separate cxx thread from ort intra-op threadpool.

        :param output_names: name of the outputs
        :param input_feed: dictionary ``{ input_name: input_value }``
        :param callback: python function that accept array of results, and a status string on error.
            The callback will be invoked by a cxx thread from ort intra-op threadpool.
        :param run_options: See :class:`onnxruntime.RunOptions`.

Page / URL

No response

sophies927 commented 6 months ago

@justinchuby can you update the run_async function in https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/python/onnxruntime_inference_collection.py with a comment explaining the user_data parameter? Looks like there's info about all the other parameters, but this one is missing.

justinchuby commented 6 months ago

Hi @sophies927 happy to help but I am not familiar with this part of the codebase. I would suggest checking with other contributors.

sophies927 commented 6 months ago

@pranavsharma @xadupre I see that you both reviewed the PR that added run_async: https://github.com/microsoft/onnxruntime/pull/16760. Are either of you familiar with this part of the codebase / can you add a comment to https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/python/onnxruntime_inference_collection.py about the user_data parameter?

nickscip commented 1 month ago

any updates? @justinchuby @pranavsharma @xadupre @sophies927