Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
Update version.txt file path (pytorch#61177)
Browse files Browse the repository at this point in the history
Summary:
The file version.txt is located one directory above generate_torch_version,
some platforms are unable to find this file unless given an explicit
path.

Pull Request resolved: pytorch#61177

Reviewed By: pbelevich

Differential Revision: D29660334

Pulled By: ezyang

fbshipit-source-id: f66105f782aaff031e373f96a69baabb13c89337
  • Loading branch information
mdmn07C5 authored and facebook-github-bot committed Jul 12, 2021
1 parent 09679af commit ac086ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/generate_torch_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def get_sha(pytorch_root: Union[str, Path]) -> str:

def get_torch_version(sha: Optional[str] = None) -> str:
pytorch_root = Path(__file__).parent.parent
version = open('version.txt', 'r').read().strip()
version = open(pytorch_root / 'version.txt', 'r').read().strip()

if os.getenv('PYTORCH_BUILD_VERSION'):
assert os.getenv('PYTORCH_BUILD_NUMBER') is not None
Expand Down

0 comments on commit ac086ca

Please sign in to comment.