Skip to content
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

modified mnist image link in the Hugging face #2134

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

tiruka
Copy link
Contributor

@tiruka tiruka commented Aug 8, 2024

Pull Request Template

Checklist

  • Confirmed that run-checks all script has been executed.
  • Made sure the book is up to date with changes in this PR.

Related Issues/PRs

#2133

Changes

  • I made search for the similar link which shows the corresponding image. Instead of https://datasets-server.huggingface.co/assets/mnist, https://huggingface.co/datasets/ylecun/mnist/viewer/mnist/test will be matched for the purpose to show the image.
  • https://huggingface.co/datasets/ylecun/mnist/viewer/mnist/test can be used with row parameter so I replaced it with the old one.
  • https://huggingface.co/datasets/ylecun/mnist/viewer/mnist/test can show you 0-9999 indexed image, so I remove the limit of under-100 indexed image condition.
  • The same bug are found in pytorch-import/README.md, so I did the same thing for them.

Testing

I executed the codes and check out the link as screenshots.

index 15

% cargo run -- 15  
    Finished `dev` profile [optimized] target(s) in 0.36s
     Running `/Users/toru/Desktop/oss-fork/burn/target/debug/mnist_inference 15`
Image index: 15
Success!
Predicted: 5
Actual: 5
See the image online, click the link below:
https://huggingface.co/datasets/ylecun/mnist/viewer/mnist/test?row=15
image

index 9999

(assert!(image_index < 10000, "Image index must be less than 10000"); condition is already included in the code, so 9999 is enough.)

% cargo run -- 9999                                   
   Compiling onnx-inference v0.14.0 (/Users/toru/Desktop/oss-fork/burn/examples/onnx-inference)
    Finished `dev` profile [optimized] target(s) in 2.36s
     Running `/Users/toru/Desktop/oss-fork/burn/target/debug/mnist_inference 9999`
Image index: 9999
Success!
Predicted: 6
Actual: 6
See the image online, click the link below:
https://huggingface.co/datasets/ylecun/mnist/viewer/mnist/test?row=9999
image

@tiruka
Copy link
Contributor Author

tiruka commented Aug 8, 2024

Also run ./run-check examples and got success.
If other better links, I will follow it and correct, so let me know.
Thanks.

Copy link
Member

@laggui laggui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't realize the URL was outdated 😅 thanks!

@antimora I think you originally wrote that, can you double check? I couldn't find the related datasets viewer API documentation to get the datasets from the datasets-server.

@laggui laggui requested a review from antimora August 8, 2024 13:30
Copy link

codecov bot commented Aug 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.29%. Comparing base (d770b1f) to head (15ab535).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2134   +/-   ##
=======================================
  Coverage   86.29%   86.29%           
=======================================
  Files         694      694           
  Lines       89005    89005           
=======================================
  Hits        76806    76806           
  Misses      12199    12199           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@antimora antimora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks for fixing the links and keeping the docs/examples up to date.

@antimora antimora merged commit 64b5779 into tracel-ai:main Aug 8, 2024
14 checks passed
@tiruka tiruka deleted the modify-mnist-img-link branch August 9, 2024 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants