docs: sync four docstrings with their actual signatures#8264
Open
DaoyuanLi2816 wants to merge 2 commits into
Open
docs: sync four docstrings with their actual signatures#8264DaoyuanLi2816 wants to merge 2 commits into
DaoyuanLi2816 wants to merge 2 commits into
Conversation
- Dataset.train_test_split: the Args section documents train_cache_file_name / test_cache_file_name, which are not parameters — the real names are train_indices_cache_file_name / test_indices_cache_file_name (passing the documented names raises TypeError). Rename the entries; descriptions already describe the indices cache. - DatasetBuilder.as_dataset: drop the verification_mode entry — the parameter no longer exists (signature is (split, in_memory)). - table.cast_table_to_schema: the Args entry was carried over from cast_table_to_features; the parameter is schema (a pa.Schema), not features.
Contributor
Author
|
Added one more: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Audits docstring Args sections against actual signatures and fixes three drifts:
Dataset.train_test_splitThe Args section documents
train_cache_file_name/test_cache_file_name— neither is a parameter; the real names aretrain_indices_cache_file_name/test_indices_cache_file_name. Following the docs (ds.train_test_split(train_cache_file_name=...)) raisesTypeError. Renamed the two entries — their descriptions already describe the indices cache, so only the names change.DatasetBuilder.as_datasetDrops the
verification_modeentry: the parameter no longer exists (the signature is(split, in_memory)), so the entry documents an argument that can't be passed.table.cast_table_to_schemaThe Args entry documents
features ([Features])— carried over from the siblingcast_table_to_features; this function's parameter isschema(apa.Schema). Renamed and retyped the entry.Docstring-only; +4 / −6 across 3 files, no behavior change.