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

Add sample code for GenAI model inferencing #1131

Merged
merged 1 commit into from
May 9, 2024
Merged

Conversation

shaahji
Copy link
Contributor

@shaahji shaahji commented May 1, 2024

Add sample code for GenAI model inferencing

Also, update the packaging logic to include sample code and required runtime binaries.

NOTE: Native (both CPP & CS) binaries are not yet being published by the GenAI team and needs revisit once those binaries are available for download.

Checklist before requesting a review

  • Add unit tests for this change.
  • Make sure all tests can pass.
  • Update documents if necessary.
  • Lint and apply fixes to your code by running lintrunner -a
  • Is this a user-facing change? If yes, give a description of this change to be included in the release notes.
  • Is this PR including examples changes? If yes, please remember to update example documentation in a follow-up PR.

(Optional) Issue link

@devang-ml devang-ml requested a review from xiaoyu-work May 2, 2024 18:26
@shaahji shaahji force-pushed the shaahji/Task29521 branch 2 times, most recently from f799ca4 to 84d842a Compare May 2, 2024 20:09
.lintrunner.toml Outdated Show resolved Hide resolved
@shaahji shaahji requested review from jambayk and xiaoyu-work and removed request for xiaoyu-work May 3, 2024 21:36
@xiaoyu-work
Copy link
Contributor

Can we also update unit tests for this?

olive/engine/packaging/packaging_generator.py Outdated Show resolved Hide resolved
installed_packages = [
pkg
for pkg in pkg_resources.working_set
if pkg.key.startswith("onnxruntime-genai") or pkg.project_name.startswith("onnxruntime-genai")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any difference between key and project_name?

Copy link
Contributor Author

@shaahji shaahji May 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some context here https://github.com/recipy/recipy/blob/d8f8fe8ace3659f1d700bb454e68a8db453e84f4/integration_test/environment.py#L125 which gives the impression that they could be different.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a big deal for now, we could be more consistent in our code.

olive/engine/packaging/packaging_generator.py Outdated Show resolved Hide resolved
Also, update the packaging logic to include sample code and
required runtime binaries.

NOTE: Native (both CPP & CS) binaries are not yet being published
by the GenAI team and needs revisit once those binaries are
available for download.
@shaahji
Copy link
Contributor Author

shaahji commented May 8, 2024

Can we also update unit tests for this?

I will revisit the unit test once the runtime headers/binaries are available from genai repo. There is also some cleanup work in the packaging unit test to make packaging and sample code testing possible in CI. There is an open task on Dashboard from grab.

installed_packages = [
pkg
for pkg in pkg_resources.working_set
if pkg.key.startswith("onnxruntime-genai") or pkg.project_name.startswith("onnxruntime-genai")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a big deal for now, we could be more consistent in our code.

@jambayk jambayk merged commit 3e5ce3f into main May 9, 2024
35 checks passed
@jambayk jambayk deleted the shaahji/Task29521 branch May 9, 2024 04:08
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

Successfully merging this pull request may close these issues.

None yet

4 participants