docs: add Google-style docstrings to dspy/datasets/dataloader.py#9458
docs: add Google-style docstrings to dspy/datasets/dataloader.py#9458saivedant169 wants to merge 3 commits intostanfordnlp:mainfrom
Conversation
Add comprehensive docstrings with Args, Returns, Raises, and Example sections to all 9 public APIs in DataLoader: - DataLoader class - from_huggingface, from_csv, from_pandas, from_json, from_parquet - from_rm, sample, train_test_split Resolves stanfordnlp#9457
|
before reviewing docstrings pr we now ask that you please add screenshots of you pr's changes as we would see them on dspy.ai after the pr is merged. See #8926 (comment) |
|
@MaximeRivest I tried building the docs locally with I verified that all 9 docstrings parse correctly through griffe (the handler mkdocstrings uses). Here's the output from DataLoader class: Methods documented (all 9/9):
Every docstring follows Google style and includes runnable |
|
@MaximeRivest Here are the rendered docs screenshots from local mkdocs build: |
|
Hey @MaximeRivest, just checking in on this one. Let me know if anything needs changing or if you'd rather handle it differently. |
|
hello @saivedant169, do you mind providing a proof that all your examples run? |
|
yes for sure |
|
is this good @MaximeRivest ? |
|
thank you! good job on running all those checks and tests. I will now review the text in the coming days. |











Resolves #9457
Part of #8926
Description
Adds comprehensive Google-style docstrings with
Args,Returns,Raises, andExamplesections to all 9 public APIs inDataLoader:DataLoaderclass docstringfrom_huggingface()— includes split behavior (dict vs flat list)from_csv()from_pandas()from_json()from_parquet()from_rm()sample()train_test_split()— documents float vs int size semanticsEach docstring includes a runnable code example showing typical usage.
ruff checkandruff formatpass clean.