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

IO reading problem when trying to import MNIST datasets. #2582

Closed
hungpham3112 opened this issue Jun 11, 2023 · 2 comments
Closed

IO reading problem when trying to import MNIST datasets. #2582

hungpham3112 opened this issue Jun 11, 2023 · 2 comments

Comments

@hungpham3112
Copy link

Step to reproduce:

  • using Pluto; Pluto.run()
  • Run this code in Pluto:
using LinearAlgebra, MLDatasets, Plots
MNIST()
  • See the error.

Environment:

OS: PopOS 22.0.4
Terminal: Alacritty v0.11.0
Julia version: 1.9.1
Pluto version: 0.19.26

Videos:

Screencast.from.06-11-2023.06.03.22.PM.webm

Expectation:

Can download and import MNIST dataset normally.

@oxinabox
Copy link

I believe this is because Pluto (unlike jupyter) doesn't redirect reads to stdin into text-input fields.
Last time we talked about this, the response was that "won'tfix: People should use specal Pluto IO methods"
which to me is unsatisfying, since stdio is the lowest common demominator that works with the REPL, and it seems a bit much to expect a library author to be aware of the front-end IDE being used.

The short term fix is to disable the prompt in DataDeps via ENV["DATADEPS_ALWAYS_ACCEPT"] = "true"

@Pangoraw
Copy link
Collaborator

Thanks for the report! Interactive use of stdin is not supported (see #765 (comment) for context).
To complement the great DataDeps specific answer from above, you can also replace stdin with a user controlled buffer locally if you wish to do so (maybe there is a Base function to do that already?):

image

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

No branches or pull requests

3 participants