Skip to content

Instantly share code, notes, and snippets.

@thigm85
Created July 15, 2022 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thigm85/c7a5ed5bcc48bfccad6bd212ac759f42 to your computer and use it in GitHub Desktop.
Save thigm85/c7a5ed5bcc48bfccad6bd212ac759f42 to your computer and use it in GitHub Desktop.
from vespa.package import ApplicationPackage, Field, RankProfile, Function
app_package = ApplicationPackage(name="lightgbm")
app_package.schema.add_fields(
Field(name="id", type="string", indexing=["summary", "attribute"]),
Field(name="numeric", type="double", indexing=["summary", "attribute"]),
Field(name="categorical", type="string", indexing=["summary", "attribute"])
)
app_package.schema.add_rank_profile(
RankProfile(
name="classify",
first_phase="lightgbm('lightgbm_model.json')"
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment