Skip to content

docs: use JSONL for nested dataset examples - #3072

Open
manjast wants to merge 1 commit into
vibrantlabsai:mainfrom
manjast:docs/jsonl-dataset-examples
Open

manjast wants to merge 1 commit into
vibrantlabsai:mainfrom
manjast:docs/jsonl-dataset-examples

Conversation

@manjast

@manjast manjast commented Oct 27, 2026 •

Copy link
Copy Markdown

Issue Link / Problem Description

Related to #3069. This is the separate docs change discussed in the issue; metric validation remains in #3070.

The dataset guide uses local/csv for a nested metadata dictionary, but CSV reloads that value as a string. The example also loads the dataset without first showing save().

Changes Made

  • Use local/jsonl for the nested-metadata example and the later workflow's dataset load.
  • Add save() and show accessing a field in the reloaded metadata.
  • Explain CSV's string-valued reloads while keeping the flat-data CSV examples.
  • Note the existing JSONL date/datetime string conversion limitation in fix(backends): LocalJSONLBackend coerces user strings into date / datetime on load #2865; this is not a backend fix.
  • Preserve current upstream code-block formatting.

Only docs/concepts/datasets.md changes. No metric, backend, workflow or dependency changes.

Testing

How to Test

  1. Run the guide's creation and loading blocks in order in an empty working directory. The metadata access should print simple.
  2. Save and reload a row containing retrieved_contexts=["alpha", "beta"], nested metadata and a numeric field with each local backend: JSONL should preserve the list/dict/integer, while CSV returns strings.
  3. Build the docs and inspect the Datasets page, including the code blocks and Local Storage guidance.

Current observed results — 2026-11-19

Updated against upstream main at 8c63f10d500c44efbf24fdb9e2920de2104c321c and checked on Python 3.12.13 with fresh dependency resolution, including langchain-community==0.4.2.

Check Result
Exact creation/save/load blocks Passed through the public Dataset API; stdout exactly simple\n, the entire expected row matched and the JSONL file existed.
Later workflow's Dataset.load statement Passed; the placeholder application and experiment were not executed.
JSONL/CSV controls Passed against literal list, dictionary and integer expectations for JSONL and string expectations for CSV.
JSONL date limitation Confirmed that nested ISO date/datetime strings reload as date/datetime objects.
make build-docs and Firefox inspection Exited 0; the changed guide's rendered examples and storage guidance were inspected. The helper also reported ten notebook-conversion errors because jupyter-nbconvert was unavailable; the build reported 76 warnings and two non-fatal Griffe MLflow alias errors. This is not a clean, strict or warning-free documentation build.
make run-ci Formatting passed for 521 files and lint passed. The pipeline stopped at four type errors in unchanged Langfuse/MLflow integrations, with two warnings.
make run-ci-tests Initial source-only verification copy: 921 passed, 105 skipped, 8 failed and 3 errors. Five failures came from missing Git metadata in that copy; those exact five passed after restoring the pinned Git context. The remaining three failures and three errors involve missing llama_index, rapidfuzz and sacrebleu.

This is not a clean full-CI or full-suite claim. No checks were weakened or unrelated code repaired. The dataset example checks made no metric/judge calls and did not execute the application workflow.

Historical validation

The original 2026-10-27 check used base 298b682 and langchain-community==0.3.31 because of the separate import issue discussed in #3017. It reported successful examples/docs, baseline-comparable formatting/type failures and missing optional test dependencies. That compatibility pin was not needed for the current validation above; historical results are not checks on the updated head.

- Save nested-metadata examples before loading them from JSONL.
- Preserve upstream formatting and retain flat-data CSV examples.
- Document the existing date/datetime string conversion limitation.
@manjast
manjast force-pushed the docs/jsonl-dataset-examples branch from d4e45bc to 5285e67 Compare November 19, 2026 13:01
@manjast

manjast commented Nov 19, 2026

Copy link
Copy Markdown
Author

Updated against current main to resolve the conflicts. The JSONL save/load examples and backend controls pass, and the docs build succeeds. This remains docs-only; the proposed runtime validation is separate in #3070. Current full-project check limitations are recorded in the PR description.

Ready for maintainer review.

This branch has not been deployed

No deployments
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.

1 participant