lmnr-ai / lmnr

Laminar - open-source all-in-one platform for engineering AI products. Crate data flywheel for you AI app. Traces, Evals, Datasets, Labels. YC S24.
https://www.lmnr.ai
Apache License 2.0
1.2k stars 60 forks source link

lift the restriction on data and target to be json objects #142

Closed dinmukhamedm closed 1 month ago

dinmukhamedm commented 1 month ago

[!IMPORTANT] Make target field in Datapoint optional, update database schema, and adjust frontend components accordingly.

  • Behavior:
    • target field in Datapoint struct in datapoints.rs changed from Value to Option<Value>, allowing it to be optional.
    • Updated try_from_raw_value() to handle target as optional.
    • Updated insert_datapoints() and insert_raw_data() in datapoints.rs to accommodate optional target.
    • API route in route.ts updated to accept any JSON value for data and target.
  • Database:
    • Altered dataset_datapoints table to make target column nullable in 0002_next_tusk.sql.
    • Added labeling_queue_data table in 0002_next_tusk.sql.
    • Updated schema.ts and relations.ts to reflect new table and nullable target.
  • Frontend:
    • Updated manual-add-datapoint-dialog.tsx and export-spans-dialog.tsx to handle optional target and validate JSON inputs.
    • Removed toJsonObject function from export-spans-dialog.tsx as it's no longer needed.

This description was created by Ellipsis for e5ccd3f106aa7a1d947628efa8bc298bb52e3cec. It will automatically update as commits are pushed.