Hello,
I am experiencing significant and persistent dependency conflicts when attempting to install and use ProteomeLM from the Bitbol-Lab/ProteomeLM.git repository in a Google Colab environment running Python 3.12. Despite numerous attempts with various version pinning strategies and installation orders, I have been unable to successfully set up the environment.
Environment Details:
- Environment: Google Colab
- Python Version: 3.12.x (default in current Colab runtimes)
- Target Library:
ProteomeLM (installed from git+https://github.com/Bitbol-Lab/ProteomeLM.git)
- Key Dependencies Involved:
transformers, peft, tokenizers, fair-esm, huggingface_hub, accelerate
Observed Errors & Behavior:
The primary issues encountered during installation and import checks are:
-
tokenizers Build Failures: When transformers versions compatible with ProteomeLM's older API requirements (e.g., 4.28.1, 4.34.0) are targeted, the tokenizers package (a core dependency) consistently fails to build from source, resulting in subprocess-exited-with-error or ERROR: Failed building wheel for tokenizers. This suggests an incompatibility between older tokenizers versions and the Python 3.12 build environment.
-
transformers Import Errors: Even when transformers manages to install, ProteomeLM's internal imports fail with RuntimeError and ImportError. Specific examples include:
cannot import name 'set_rng_state_for_device' from 'transformers.trainer_pt_utils'
ModuleNotFoundError: No module named 'transformers.modeling_layers'
cannot import name 'is_fairscale_available' from 'transformers.integrations'
These errors indicate that ProteomeLM's codebase (or its direct dependency peft) relies on specific API structures within transformers that are no longer present or have been refactored in versions of transformers that are typically installed in a Python 3.12 environment (e.g., versions >= 4.29.0 for modeling_layers or >= 4.30.0 for set_rng_state_for_device).
-
peft Import Errors: Related to the transformers issue, peft imports also fail, such as cannot import name 'MODEL_TYPE_TO_PEFT_MODEL_MAPPING' from 'peft.mapping'. This suggests peft versions compatible with ProteomeLM are not compatible with transformers versions required by Python 3.12.
-
Implicit Dependency Upgrades: Despite using !pip uninstall -y ... to clear packages, explicitly pinning versions (e.g., transformers==4.28.1, peft==0.5.0), and even employing --force-reinstall --no-dependencies, the pip dependency resolver frequently leads to the installation of newer, incompatible transformers versions (e.g., 4.57.3), overriding the specified ones. This complicates maintaining the necessary older versions required by ProteomeLM.
Attempts to Resolve:
I have tried various installation sequences and version combinations, including:
- Targeting
transformers==4.28.1 and peft==0.5.0 (as suggested by ProteomeLM's requirements.txt range).
- Attempting newer
transformers (4.48.1) and peft (0.8.2, 0.11.1) versions, based on a user's successful local Python 3.10 setup.
- Installing
tokenizers, huggingface_hub, and accelerate in specific orders and versions to meet minimum ProteomeLM requirements and avoid build failures.
- Using
--no-deps for ProteomeLM and --force-reinstall --no-dependencies for transformers and peft.
All attempts in the Python 3.12 Colab environment have resulted in unresolvable dependency conflicts or build errors, preventing a successful proteomelm import.
Conclusion:
It appears there is a fundamental incompatibility between the dependency requirements of ProteomeLM (especially its reliance on older transformers API) and the Python 3.12 environment. The necessary older versions of transformers and its dependencies (like tokenizers) either cannot be built on Python 3.12 or create API conflicts with ProteomeLM's codebase.
Request:
Could the maintainers provide guidance on:
- Recommended
transformers / peft versions that are compatible with ProteomeLM and a more modern Python environment (e.g., Python 3.12)?
- Any known workarounds or patches for these dependency issues?
- Plans to update
ProteomeLM to support newer transformers / peft APIs and Python versions?
Thank you for your time and assistance.
Hello,
I am experiencing significant and persistent dependency conflicts when attempting to install and use
ProteomeLMfrom theBitbol-Lab/ProteomeLM.gitrepository in a Google Colab environment running Python 3.12. Despite numerous attempts with various version pinning strategies and installation orders, I have been unable to successfully set up the environment.Environment Details:
ProteomeLM(installed fromgit+https://github.com/Bitbol-Lab/ProteomeLM.git)transformers,peft,tokenizers,fair-esm,huggingface_hub,accelerateObserved Errors & Behavior:
The primary issues encountered during installation and import checks are:
tokenizersBuild Failures: Whentransformersversions compatible withProteomeLM's older API requirements (e.g.,4.28.1,4.34.0) are targeted, thetokenizerspackage (a core dependency) consistently fails to build from source, resulting insubprocess-exited-with-errororERROR: Failed building wheel for tokenizers. This suggests an incompatibility between oldertokenizersversions and the Python 3.12 build environment.transformersImport Errors: Even whentransformersmanages to install,ProteomeLM's internal imports fail withRuntimeErrorandImportError. Specific examples include:cannot import name 'set_rng_state_for_device' from 'transformers.trainer_pt_utils'ModuleNotFoundError: No module named 'transformers.modeling_layers'cannot import name 'is_fairscale_available' from 'transformers.integrations'These errors indicate that
ProteomeLM's codebase (or its direct dependencypeft) relies on specific API structures withintransformersthat are no longer present or have been refactored in versions oftransformersthat are typically installed in a Python 3.12 environment (e.g., versions >= 4.29.0 formodeling_layersor >= 4.30.0 forset_rng_state_for_device).peftImport Errors: Related to thetransformersissue,peftimports also fail, such ascannot import name 'MODEL_TYPE_TO_PEFT_MODEL_MAPPING' from 'peft.mapping'. This suggestspeftversions compatible withProteomeLMare not compatible withtransformersversions required by Python 3.12.Implicit Dependency Upgrades: Despite using
!pip uninstall -y ...to clear packages, explicitly pinning versions (e.g.,transformers==4.28.1,peft==0.5.0), and even employing--force-reinstall --no-dependencies, thepipdependency resolver frequently leads to the installation of newer, incompatibletransformersversions (e.g.,4.57.3), overriding the specified ones. This complicates maintaining the necessary older versions required byProteomeLM.Attempts to Resolve:
I have tried various installation sequences and version combinations, including:
transformers==4.28.1andpeft==0.5.0(as suggested byProteomeLM'srequirements.txtrange).transformers(4.48.1) andpeft(0.8.2,0.11.1) versions, based on a user's successful local Python 3.10 setup.tokenizers,huggingface_hub, andacceleratein specific orders and versions to meet minimumProteomeLMrequirements and avoid build failures.--no-depsforProteomeLMand--force-reinstall --no-dependenciesfortransformersandpeft.All attempts in the Python 3.12 Colab environment have resulted in unresolvable dependency conflicts or build errors, preventing a successful
proteomelmimport.Conclusion:
It appears there is a fundamental incompatibility between the dependency requirements of
ProteomeLM(especially its reliance on oldertransformersAPI) and the Python 3.12 environment. The necessary older versions oftransformersand its dependencies (liketokenizers) either cannot be built on Python 3.12 or create API conflicts withProteomeLM's codebase.Request:
Could the maintainers provide guidance on:
transformers/peftversions that are compatible withProteomeLMand a more modern Python environment (e.g., Python 3.12)?ProteomeLMto support newertransformers/peftAPIs and Python versions?Thank you for your time and assistance.