-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add ImageNet example #555
base: main
Are you sure you want to change the base?
Add ImageNet example #555
Conversation
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
874f0b8
to
6b8c88f
Compare
6b8c88f
to
864ac56
Compare
@marcenacp Thoughts on the structure so far? I'm not sure if there is a better way to read a local directory---I essentially emulate a zip/tar by creating a no-op "extract" function. I plan to simplify this further to avoid the symbolic links. I am also wondering if you have any thoughts on how to add shuffling/sharding of rows in |
return source.exists() and source.is_dir() | ||
|
||
|
||
def _soft_link(source: epath.Path, target: epath.Path) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need this function if _soft_link == os.symlink
?
@@ -0,0 +1,771 @@ | |||
"""ImageNet training in PyTorch. | |||
|
|||
From: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to copy this from pytorch into mlcroissant? Could you alternatively refer the user to https://github.com/pytorch/examples/blob/2d725b6ab255e05c55e0b08925f06f171aaedc0c/imagenet/main.py?
@@ -161,6 +161,7 @@ class EncodingFormat: | |||
""" | |||
|
|||
CSV = "text/csv" | |||
DIR = "application/x-dir" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference with
croissant/datasets/1.0/recipes/read_from_directory.json
Lines 51 to 59 in e532c4c
"distribution": [ | |
{ | |
"@type": "cr:FileSet", | |
"@id": "files", | |
"name": "files", | |
"encodingFormat": "text/plain", | |
"includes": "data/file*.txt" | |
} | |
], |
@mkuchnik Sorry for the late review... I think it's super interesting and I left a few comments:
|
ImageNet is a common workload for benchmarking. This PR adds a recipe for running ImageNet in PyTorch with a Croissant loader, which can be useful for both system and ML characterization.
Current WIP status is:
TODO: