Decouple Filter MP Rules function from cuda imports #117
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.
Unwittingly due to the recent PR #106 we had introduced a
filter_mp_rules
function and placed it intomodels.utils
. Unfortunately, that file does cuda kernel imports, and will causepip install
failures in machines with no GPU. This is is critical because it precludes building images in CI machines that typically do not have GPUs.Failure
#33 15.79 File "/usr/lib64/python3.11/ctypes/__init__.py", line 394, in __getitem__ #33 15.79 func = self._FuncPtr((name_or_ordinal, self)) #33 15.79 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ #33 15.79 AttributeError: /home/tuning/.local/lib/python3.11/site-packages/bitsandbytes/libbitsandbytes_cpu.so: undefined symbol: cdequantize_blockwise_fp32 ..#33 ERROR: process "/bin/sh -c if [[ \"${ENABLE_FMS_ACCELERATION}\" == \"true\" ]]; then python -m pip install --user \"$(head bdist_name)[fms-accel]\"; python -m fms_acceleration.cli install fms_acceleration_peft; python -m fms_acceleration.cli install fms_acceleration_foak; python -m fms_acceleration.cli install fms_acceleration_aadp; fi" did not complete successfully: exit code: 1 ------ > importing cache manifest from docker-na-private.artifactory.swg-devops.com/wcp-ai-foundation-team-docker-virtual/sft-trainer-aim:release_ubi9_py311: ------ ------ > importing cache manifest from sft-trainer-aim:release_ubi9_py311: ------ ------To fix this we move
filter_mp_rules
out in a different function. We seem to observe that this will solve the problem