Extracted PyTorch URL from command output and printed it.

This commit is contained in:
Paul Gauthier (aider) 2024-07-09 15:30:38 +01:00
parent c71d98f1b2
commit a376f91de6

View file

@ -33,7 +33,12 @@ cmd = [
result = subprocess.check_output(cmd, text=True)
print(result)
url_match = re.search(r'(https://download\.pytorch\.org/[^\s]+)', result)
if url_match:
pytorch_url = url_match.group(1)
print(f"PyTorch URL: {pytorch_url}")
else:
print("PyTorch URL not found in the output")
import sys
sys.exit()