-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix augmentations and matplotlib #1179
Fix augmentations and matplotlib #1179
Conversation
* replacye spurios __file__ in load_config with os.getcwd() * pin matplotlib versions to 3.8.* * fix log statement in training
@@ -153,7 +153,7 @@ def train(cfg: Config, tub_paths: str, model: str = None, | |||
assert val_size > 0, "Not enough validation data, decrease the batch " \ | |||
"size or add more data." | |||
logger.info(f'Train with image caching: ' | |||
f'{getattr(cfg, "CACHE_IMAGES", True)}') | |||
f'{getattr(cfg, "CACHE_IMAGES", "ARRAY")}') |
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.
@DocGarbanzo I don't know that this means. Does this limit the size of the cache?
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.
In the previous PR, we have upgraded the CACHE_IMAGES config parameter to allow for 3 values, i.e NOCACHE, ARRAY and BINARY, please see here: https://github.com/autorope/donkeycar/pull/1173/files#diff-8a130617f883f549bf089e3ab0c46cabd4c3e4a69b50568c3b27ef73414e7c28. ARRAY represents the original setting where the whole image is cached as a np.uint8
array (consuming about 58k of mem ~ 120 * 160 * 3). With BINARY we can now cache the image as binary jpeg encoded which uses only 4k of memory. This caching still provides significantly faster access to the image than re-reading it from disk, even with a fast M2 SSD. With that much smaller memory footprint we can now train >> 100k images with caching, speeding up the training on large datasets by a lot. In this line here, I just fixed a left-over from the previous PR and here, it only affects logging the caching status into the shell, because the default changed from the binary True
to the enum/string 'ARRAY'
.
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 have one question; see the comment.
…d not 'arm64' which is what Apple Silicon is now reporting.
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 recent compatibility issues with augmentations and matplotlib
pytest
, hence pinning this to version 8.1 (test failures with pytest 8.2: AttributeError: 'TestUtil' object has no attribute 'runTest'. Did you mean: 'subTest'? mtreinish/stestr#363)__main__.__file__
expression inload_config
which I found to be not working