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

matminer.datasets.utils._validate_dataset() flaky on Windows? #840

Open
janosh opened this issue Jul 5, 2022 · 5 comments
Open

matminer.datasets.utils._validate_dataset() flaky on Windows? #840

janosh opened this issue Jul 5, 2022 · 5 comments

Comments

@janosh
Copy link
Member

janosh commented Jul 5, 2022

load_dataset has been inconsistent in pymatviz CI occasionally raising

UserWarning: Error, hash of downloaded file does not match that included in metadata, the data may be corrupt or altered

I think it's only happening on Windows which I don't have access to locally. Was wondering if @sgbaird who uses Windows has also experienced this? Here's minimal code that (sometimes) causes the error:

from matminer.datasets import load_dataset

load_dataset("matbench_glass")
@sgbaird
Copy link

sgbaird commented Jul 5, 2022

I've been getting the same error on some of my CI, although I've been seeing it on Linux CI, too. I think it's also "sometimes" for me too.

materialsproject/matbench#155

@janosh
Copy link
Member Author

janosh commented Jul 5, 2022

Good to know it's not Windows specific. I've never seen the error locally but then I guess that's due to Ci re-downloading the files on every run whereas locally they're cached.

@ardunn Any clues where the intermittency comes from? Maybe Figshare load balancers that point at servers with slightly different files?

@ardunn
Copy link
Contributor

ardunn commented Aug 12, 2022

This is weird, though I'm not sure its a windows issue. I think it is something having to do with downloading from the same IP from figshare and the file gets corrupted agnostic of OS. At least, this is what it seems like to be because CI for matbench will randomly fail with that error and then pass on re-runs.

@sgbaird
Copy link

sgbaird commented Aug 13, 2022

Since it seems to be an issue with FigShare, one option might be to implement a "retry" option, i.e. if the first attempt to download fails, wait 10 s and then try downloading again. Not sure if it will fix it, and obviously not ideal, but if it's something weird on the FigShare side of things might be better to notify FigShare and then implement some kind of workaround in the meantime.

@ardunn
Copy link
Contributor

ardunn commented Aug 13, 2022 via email

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