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 support for exporting models to Carton #3797

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

VivekPanyam
Copy link
Contributor

As previously discussed with @tgaddair, this PR adds support for exporting Ludwig models to Carton.

VivekPanyam/carton#162

Background

Carton is a library with the goal of allowing users to run any ML model from any programming language.

It currently supports C, C++, Rust, and Python with support for other languages in progress (NodeJS, OCaml, C#). See the link above or the repo at https://github.com/VivekPanyam/carton for more details.

Implementation

This PR is heavily based on the export_neuropod functionality already implemented in Ludwig. It mirrors the implementation and integration tests.

Test plan

Added an integration test and verified that it passes locally.

TODO

  • Add export_carton to the documentation
  • Confirm that the integration test is fairly comprehensive. The Neuropod test had several input and output feature types commented out so we should see if we can add any types back.

# set_feature(vocab_size=3),
# vector_feature()
]
backend = LocalTestBackend()
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have several definitions of the LocalTestbackend() including the fixture in tests/integration_tests/test_llm.py -- note to self: Unify them, if possible (e.g., in a conftest.py type of a file).

@arnavgarg1
Copy link
Contributor

Hi @VivekPanyam! Thanks for creating this PR - let us know when it's ready for review.

@VivekPanyam
Copy link
Contributor Author

VivekPanyam commented Dec 7, 2023

Hi @VivekPanyam! Thanks for creating this PR - let us know when it's ready for review.

Hi! I was going to add export_carton to the docs before marking the PR as ready for review, but it's probably a good idea to get a review on the implementation first :)

Copy link
Collaborator

@alexsherstinsky alexsherstinsky left a comment

Choose a reason for hiding this comment

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

LGTM -- thank you very much, @VivekPanyam !

@tgaddair tgaddair merged commit 2b52be6 into ludwig-ai:master Jan 4, 2024
16 of 17 checks passed
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.

4 participants