-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Golden spike" PR #488
Draft
knighton
wants to merge
47
commits into
main
Choose a base branch
from
james/proto
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
"Golden spike" PR #488
Conversation
This file contains 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
Into: - importing - merging, - pretty - retrying - shared - storage.
Was: - bytes_to_int - number_abbrev_to_int Now: - normalize_dec_bytes - normalize_bin_bytes - normalize_bytes - normalize_count - normalize_duration
…storage/. Let's properly integrate these later. - walk_dir() - Very Fancy list_dataset_files() - smart_download_file()
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
``` ─ ──────── ─ ────── ─ ──────────── ─ ──────── ─ ────────────── ─ ────── ─ ──────────── ─ ────────────── ─ │ format │ sec │ samples │ usec/sp │ bytes │ files │ bytes/file │ max bytes/file │ ─ ──────── ─ ────── ─ ──────────── ─ ──────── ─ ────────────── ─ ────── ─ ──────────── ─ ────────────── ─ │ csv │ 5.131 │ 2,097,152 │ 2.446 │ 171,899,840 │ 41 │ 4,192,679 │ 8,388,616 │ │ jsonl │ 12.535 │ 2,097,152 │ 5.977 │ 211,747,148 │ 51 │ 4,151,904 │ 8,388,607 │ │ lance │ 1.074 │ 2,097,152 │ 0.512 │ 176,961,928 │ 19 │ 9,313,785 │ 11,067,536 │ │ mds │ 8.649 │ 2,097,152 │ 4.124 │ 176,880,177 │ 23 │ 7,690,442 │ 8,388,604 │ │ parquet │ 1.323 │ 2,097,152 │ 0.631 │ 63,528,364 │ 16 │ 3,970,522 │ 3,973,860 │ │ delta │ 16.881 │ 2,097,152 │ 8.050 │ 55,106,514 │ 66 │ 834,947 │ 1,710,970 │ ─ ──────── ─ ────── ─ ──────────── ─ ──────── ─ ────────────── ─ ────── ─ ──────────── ─ ────────────── ─ ```
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.
This big PR (having abandoned all pretenses, from a gentler time perhaps, that it be right and just, to dither over a warp sequence of little PRs, not that we have ever done that, but insofar as that could be avoided, because we should think bigly, and not split ourselves into little incremental pieces, which would be difficult to follow, and I daresay, might become big and complex in its own right for reasons downright specious, and silly) is laid out as follows:
Preparations:
Borg-style assimilation of other people's projects:
1. Reorienting the codebase around where and how we focus
Some say it's the most beautiful code reorg they've ever seen.
1.1. Moved benchmark dirs together out of
scripts/
into a new top-levelbenchmarks/
.1.2.
examples/
, which entirely consisted of python notebooks, is nownotebooks/
.This is to rectify patterns of confused people that I have been seeing in the github trafffic since the time of the dinosaurs, and also to make way for item 3 below.
1.3. The modality-specific sceond-level directories under
streaming/
and theirconvert/
bastard stepchildren subdirs are now grouped into a reborn top-levelexamples/
directory, asexamples/(modality)/(dataset)/
.streaming/
tree, nobody is importing that stuff, they are referencing it if anything, everybody rolls their own usage in practice.scripts/
like the webvid demos, now in their proper place (examples/multimodal/webvid/
).vision/
'sbase.py
, which is rolled into the mainstreaming/base/
asvision.py
next to StreamingDataset, etc. (i.e., VisionStreamingDataset sub-base-class).1.4. And now for what we've all been waiting for:
base/
has been sublimedbase/
ofstreaming/base/
is merged upward intostreaming/
.streaming/
half-assed collections of example datasets that nobody apparently uses, and we never work on.base/
instreaming/base/format/base/(reader/writer base classes)
is merged upward as well, as an example to others.from streaming import MDSWriter, StreamingDataset
) as although our imports lived understreaming/base/...
in the old setup, thestreaming/__init__.py
mirrored them all at the top level (another missed sign that they were in the wrong place?).1.5 Summary
Moves:
examples/
->notebooks/
streaming/{multimodal, vision, text}/
->examples/
scripts/
-> mostlybenchmarks/
, except for some toexamples/
streaming/base/format/base/
->streaming/format/
streaming/base/
->streaming/
Comparison of dir trees to get a feel;
data/
on rhs is gitignored, kept because it seemed mildy interesting (cur | this PR):Saving code used for "cat(zip(*jagged text blocks))" here in case of my future reference, by the way is there any interest in rewriting streaming with algebraic variable names? Could be big...
2. Plugging various gaps
2.1. Old
streaming/base/util.py
had gotten excessive and incoherent and was divided five waysstreaming/storage/
.importing.py
merging.py
How did dataset merges become so goddamned complicated? Is this what it would look like if our storage API was just not up to the task...
migration.py
(module added toutil/
afterward)pretty.py
retrying.py
shared.py
2.2. Needed more than
number_abbev_to_int
andbytes_to_int
for purposes later in this PR, now we havestreaming/util/pretty.py
return _normalize_float(duration, _duration_units)
.normalize_(type)
<->prettify_(type)
) still to be done, hopefully someone else will rewrite this module again for that lol.2.3. My god our storage API sucks and this is too much for one humble PR, so let's partly bypass and mostly wrap it with more functionality
zip(*download_upload_py)
any day now...