Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Environment variable for configuring the default downloading location #93

Closed
sxjscience opened this issue Apr 30, 2018 · 6 comments
Closed
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@sxjscience
Copy link
Member

Currently all models/datasets will be downloaded to ~/.mxnet/... by default. We should add an environment variable to configure the constant. Sometimes the user may not have enough space under ~ and will need to download the dataset to another location.

@lixin4ever
Copy link
Member

lixin4ever commented May 11, 2018

@sxjscience Have you solved this problem?

@leezu
Copy link
Contributor

leezu commented May 11, 2018

@lixin4ever you can usually pass the root='/some/path/ parameter to functions that download files (ie datasets/models). The change proposed by @sxjscience needs some (trivial) changes in the code, but no-one has done them yet. If you would like to contribute it, please let us know and we can provide guidance.

@szha szha added enhancement New feature or request good first issue Good for newcomers labels May 11, 2018
@lixin4ever
Copy link
Member

@leezu I am happy to contribute to this project. How to start? Is there any guidance or documentation online?

@leezu
Copy link
Contributor

leezu commented May 11, 2018

@sxjscience @szha I suggest this change should also be applied to mxnet gluon, not only the gluon nlp package. In particular instead of choosing a environment variable such as GLUONNLP_HOME we could introduce MXNET_HOME.

@lixin4ever Great! We have some how to contribute documentation available.

For this issue I guess you could add a helper function _get_path(*args) to utils.py which would check if MXNET_HOME is defined and respectively join the looked up MXNET_HOME or default ~/.mxnet with the *args specified, returning the composed path. Then the functions that specify os.path.join('~', '.mxnet', ...) and their documentation need to be changed to make use of _get_path. But feel free to take a different route. What do you think?

@szha
Copy link
Member

szha commented May 11, 2018

@leezu We can start using MXNET_HOME with this package first and propagate the change back to mxnet later on.

@sxjscience
Copy link
Member Author

Thanks @lixin4ever for contributing. This has been solved by #106 .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants