torchtitan icon indicating copy to clipboard operation
torchtitan copied to clipboard

Update requirements.txt

Open qiziAI opened this issue 9 months ago • 1 comments

conflict with the install.

qiziAI avatar May 11 '24 08:05 qiziAI

Hi @qiziAI!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

facebook-github-bot avatar May 11 '24 08:05 facebook-github-bot

@qiziAI Thanks for the PR! Could you provide some more details of the conflict for our understanding?

awgu avatar May 13 '24 13:05 awgu

@qiziAI Thanks for the PR! Could you provide some more details of the conflict for our understanding?

Yes. If I installed torch 2.3.0 by using pip, then run pip install -r requirements.txt. The torch version is still 2.3.0 not 2.2.0 dev or any other dev version that >= 2.2.0.

Requirement already satisfied: torch>=2.2.0.dev in ./venv2/lib/python3.10/site-packages (from -r requirements.txt (line 1)) (2.3.0)

This causes error occurs when execute run_llama_train.sh script :

ImportError: cannot import name '_copy_state_dict' from 'torch.distributed._state_dict_utils'

Hope this details can help.

qiziAI avatar May 14 '24 13:05 qiziAI

Shouldn't this be updated to torch==2.3.1 or the correct version which includes _copy_state_dict ?

LucasLLC avatar May 14 '24 14:05 LucasLLC

Shouldn't this be updated to torch==2.3.1 or the correct version which includes _copy_state_dict ?

Indeed, the purpose of this PR is to point out that the line 'torch >= 2.2.0 dev' in requirements.txt does not guarantee the installation of a torch version containing the '_copy_state_dict' function as you mentioned. That's the issue.

qiziAI avatar May 15 '24 00:05 qiziAI

@qiziAI Thanks for pointing this out! Since the newly added import "_copy_state_dict" is not used by default, we don't necessarily need to require the most recent pytorch. This is fixed in #333.

tianyu-l avatar May 15 '24 04:05 tianyu-l

@tianyu-l Great! Thanks!

qiziAI avatar May 15 '24 11:05 qiziAI