tensorflow / tensorflow/datasets

Slightly more powerful split syntax.

Open
#3,528 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

contributions welcome enhancement
Dominant language
Python
Stars
4.6k
Forks
1.6k
Avg merge
3h 54m
Merged PRs (30d)
1

Description

There's two additions to the split syntax that would make my life easier:

  1. Allow python integer format like 50_000. This helps with readability and catch off-by-an-order-of-magnitude mistakes more easily. Currently train[:50_000] gives an error.
  2. If this is not insanely difficult: Allow for a sequence of slicing, like train[:50_000][:10] that reduces to train[:10]. This would allow simplifying logic in my configuration files a lot, where I often define a minival split like train[:50_000], but have an additional "quickrun" flag that appends [:16] to all split names. Now it requires extra logic, but if the above syntax was allowed, it would be much simpler.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by locating the split-syntax parser and its existing tests, then verify the requested integer-literal and chained-slice forms; done means both forms are accepted with the described resulting split behavior and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
data, machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.