Install requirements updated to Apr 2023, CLIP model compatibility fix for Ampere GPUs #29
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.
Hi! First of all, thank you so much for making your research open! CLIPort is a really cool project :)
This is a pull request which fixes installation issues as of April 2023, and adds compatibility with PyTorch 2.0.0 (possibly later versions). This fix allows us to train, validate and test using an Ampere architecture A100 GPU (tested as well on A6000s).
Requirement updates to solve installation issues as of April 2023
numpy 1.20.*
To solve [numpy] ModuleNotFoundError: No module named
'
numpy.core._multiarray_umath
'protobuf 3.20.*
To solve [wanb] TypeError: Descriptors cannot not be created
directly.
Pillow 9.4.0
To solve [PIL] ImportError: cannot import name '
_imaging
' from'PIL'
packaging 21.3
To solve [transformers] packaging.version.InvalidVersion: Invalid
version: '0.10.1,<0.11'
CLIP model update for compatibility with NVIDIA Ampere and later (>sm_75) GPU architectures
load_clip
Attempting to train CLIPort with PyTorch > 1.7 (necessary to support GPU architectures >
sm_75
) will cause the following error:The solution is to set
jit=False
in the signature ofload_clip
. This change follows from discussions (issues 79 and 49) in the OpenAI CLIP issue tracker and the solution implemented by the authors.build_model
The following
state_dict
keys are deleted in line 491 ofclip.py
: "input_resolution", "context_length" and "vocab_size". This would cause a missing key error due to the "input_resolution" not being astate_dict
key when initializing the second CLIPort stream.With our version the three keys are deleted from the
state_dict
only if they are present in the first place.