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
haskellPackages.tensorflow-mnist-input-data: fetch #46103
Conversation
Prefetch data so that the package doesn't try to connect to the internet.
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: haskellPackages.tensorflow-mnist-input-data Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: haskellPackages.tensorflow-mnist-input-data Partial log (click to expand)
|
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.
Thanks for this fix. I should have tested building in a sandbox before committing the tensorflow packages.
urlPrefix = "http://yann.lecun.com/exdb/mnist/"; | ||
|
||
# File names relative to 'urlPrefix' and their sha256. | ||
fileInfos = [ |
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.
I think using an attribute set here which maps file names to their hashes is a bit clearer and safer to use.
Note I do something similar in the opencv package.
@@ -71,6 +95,9 @@ in | |||
base bytestring Cabal cryptonite directory filepath HTTP | |||
network-uri | |||
]; | |||
preConfigure = pkgs.lib.strings.concatStringsSep "\n" ( | |||
map (x: "cp ${x} data/$(stripHash ${x})") downloads |
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.
Maybe use symbolic links instead of copying the files to prevent duplication.
I've no idea where the
are coming from. |
After reading the source I understand that packages are marked The best solution is to have an override for We should also report an issue at https://github.com/tensorflow/haskell/issues to publish |
I've now made these changes in this PR. I also reverted my I also removed the tensorflow packages from @GrahamcOfBorg build haskellPackages.tensorflow-mnist |
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: haskellPackages.tensorflow-mnist Partial log (click to expand)
|
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: haskellPackages.tensorflow-mnist-input-data Partial log (click to expand)
|
…specify the data files This is more understandable and safer than using a nested list.
…of copying This prevents duplication in the nix store.
…w-mnist-input-data
This reverts commit 93ed13f. libtensorflow is only used by the Haskell tensorflow packages and they don't work with tensorflow-1.10 yet. So the easiest solution is to just revert this commit and add it back when they do gain support.
This reverts commit 7139911. libtensorflow is only used by the Haskell tensorflow packages and they don't work with tensorflow-1.10 yet. So the easiest solution is to just revert this commit and add it back when they do gain support.
e1abbb1
to
1fc5a6d
Compare
Success on x86_64-linux (full log) Attempted: haskellPackages.tensorflow-mnist-input-data Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: haskellPackages.tensorflow-mnist Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: haskellPackages.tensorflow-mnist Partial log (click to expand)
|
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: haskellPackages.tensorflow-mnist-input-data Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: haskellPackages.tensorflow-mnist-input-data Partial log (click to expand)
|
wow that's super cool !! thanks. |
Motivation for this change
Prefetch data so that the package doesn't try to connect to the internet.
See #46029
nix-build -A haskellPackages.tensorflow-mnist ~/nixpkgs
still fails though because ofdefinition of the package tensorflow-mnist seems
@peti git blame says that code is generated. Anyway to not set tensorflow-mnist-input-data to null ?
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)