Add note about TF_PLUGIN_CACHE_DIR #972
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I noticed that tests on my laptop worked very slow, especially compared to GitHub workflows or my workstation.
For example, on my laptop (connected through medium bandwidth, high latency 3G connection) speedup is 26x :
pytest tests/blueprints =============================== 41 passed, 1 warning in 4182.25s (1:09:42) ===============================
vs:
TF_PLUGIN_CACHE_DIR=/tmp/tfcache pytest tests/blueprints =============================== 41 passed, 1 warning in 159.37s (0:02:39) ===============================
On my workstation, the speed up is not so drastic, but stil significant (1.58x faster):
/usr/bin/time pytest tests/blueprints =============================== 41 passed, 1 warning in 315.45s (0:05:15) =============================== 324.84user 75.50system 5:15.75elapsed 126%CPU (0avgtext+0avgdata 153676maxresident)k 0inputs+15606560outputs (17major+1854428minor)pagefaults 0swaps
vs:
TF_PLUGIN_CACHE_DIR=/tmp/tfcache /usr/bin/time pytest tests/blueprints/ =============================== 41 passed, 1 warning in 199.81s (0:03:19) =============================== 270.63user 37.29system 3:20.12elapsed 153%CPU (0avgtext+0avgdata 153336maxresident)k 0inputs+493496outputs (5major+1822243minor)pagefaults 0swaps
I think it is at least worth mentioning in the documentation or implementation in
conftest.py
. Any ideas which directory would be the best to use for this purpose?