-
Notifications
You must be signed in to change notification settings - Fork 11
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
download-mnist script does not pick up on custom MNIST_DATA_DIR #74
Comments
I think your configured $(call exec,sh $(if $V,,-x) $^,$(MNIST_DATA_DIR),$^) somehow passes it to the script. But then it needs to be $(call exec,sh $(if $V,,-x) $^ $(MNIST_DATA_DIR),$(MNIST_DATA_DIR),$^) it seems. Note, the comma is replaced with a space. |
If the latter change is good the script can be simplified. download_dir=${1-"${HOME}/.cache/mnist"} But it seems hard to get output of |
The intention to the script was that it should allow the data dir to be passed as the first script argument, or pick it up from the environment. So I don't think we need change the script. |
Then |
Yea, I think it's possible I was misremembering the expected usage of the make target; that the first-argument choice is for manual use of the script, whereas make is expected to use the environment-var approach. I'll verify. |
Incidentally, trying this out shows that there's a bug in |
Example case: if I manually write:
... then we get correct behaviour. But if I use My guess would be that this is related to the order of expansion of makefile elements, meaning that when the |
It might be related to step 4 for the implicit rule search. Because when you add commands to the rule it works. But then the already provided commands are overwritten I'll guess. |
It seems make is working as designed (see Stackoverflow on So maybe just adding the lines # extra runtime dependencies for unittests
$O/fastunittests.stamp: download-mnist
$O/allunittests.stamp: download-mnist is fine to make sure that the data set is present when running the unittests. Alternatively, one might exclude the |
Well, I do question why the unittests are attempting to load the data and verify its properties. The verification looks like something the integration tests should do themselves! I think this is probably the correct solution to the short-term problem -- remove a dependency that shouldn't exist -- but we may still want to consider the more general problem for other use-cases. |
I'll guess this can be closed if the problem was a missing |
Yea, let's close. We can always revisit another time. |
My
Config.local.mak
defines a customMNIST_DATA_DIR
:However, it seems this is not being picked up by the
download-mnist
script, which uses the default download directory as set according to:download_dir=${1-${MNIST_DATA_DIR-"${HOME}/.cache/mnist"}}
The
download-mnist
target should work by passing the parameter as the first argument to the script:... but this appears to not be happening:
The text was updated successfully, but these errors were encountered: