Skip to content

Dependency installation failure #6

@YiboZhao624

Description

@YiboZhao624

Dear authors,

Thank you for your excellent work. While reproducing your code, I encountered the following issues:

  1. The trust_align folder under the main branch appears to be missing the environment.yml file, which makes it impossible to set up the environment following the README in that directory. After referring to issue conda env create -f environment.yaml #1 and retrieving the corresponding file from the release branch, I added it manually. However, even after configuring the huggingface/alignhandbook environment as described in the README, there are still version conflicts:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torchaudio 2.3.0 requires torch==2.3.0, but you have torch 2.9.0 which is incompatible.
torchvision 0.18.0 requires torch==2.3.0, but you have torch 2.9.0 which is incompatible.
vllm 0.5.1 requires torch==2.3.0, but you have torch 2.9.0 which is incompatible.
vllm-flash-attn 2.5.9 requires torch==2.3.0, but you have torch 2.9.0 which is incompatible.
xformers 0.0.26.post1 requires torch==2.3.0, but you have torch 2.9.0 which is incompatible.
  1. When running the code, I encountered the following error:
    ModuleNotFoundError: Could not import module 'PreTrainedModel'. Are this object's requirements defined correctly?
    This module has been removed since transformers==4.36. I therefore downgraded transformers to 4.35.2, but then encountered another error:
    cannot import name 'is_rich_available' from 'transformers.utils'.
    I suspect this might be caused by an incompatibility between transformers and alignmenthandbook.

I would greatly appreciate any guidance or clarification you could provide to help resolve these issues.

Best regards,
Yibo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions