Skip to content

Commit

Permalink
Merge pull request #700 from mv1388/upgrade_pytorch_version_to_1_12
Browse files Browse the repository at this point in the history
Upgrade PyTorch version to 1.12
  • Loading branch information
mv1388 committed Jul 16, 2022
2 parents 12406bc + cf03bc1 commit 478534f
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions bin/AWS/create_instance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ if [ "$key_path" == "" ] ; then
fi

if [ "$DL_framework" == "TF" ]; then
py_env="tensorflow_p36"
py_env="tensorflow"
elif [ "$DL_framework" == "pytorch" ]; then
py_env="pytorch_latest_p36"
py_env="pytorch"
else
py_env="pytorch_latest_p36"
py_env="pytorch"
fi

if [[ "$instance_type" != "" ]]; then
Expand Down
6 changes: 3 additions & 3 deletions bin/AWS/prepare_instance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ fi


if [ "$DL_framework" == "TF" ]; then
py_env="tensorflow_p36"
py_env="tensorflow"
elif [ "$DL_framework" == "pytorch" ]; then
py_env="pytorch_latest_p36"
py_env="pytorch"
else
py_env="pytorch_latest_p36"
py_env="pytorch"
fi

if [ "$aws_region" == "eu-central-1" ]; then
Expand Down
6 changes: 3 additions & 3 deletions bin/AWS/submit_job.sh
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ if [ "$key_path" == "" ] || [ "$local_project_path" == "" ]; then
fi

if [ "$DL_framework" == "TF" ]; then
py_env="tensorflow_p36"
py_env="tensorflow"
elif [ "$DL_framework" == "pytorch" ]; then
py_env="pytorch_latest_p36"
py_env="pytorch"
else
py_env="pytorch_latest_p36"
py_env="pytorch"
fi

terminate_setting=""
Expand Down
4 changes: 2 additions & 2 deletions bin/AWS/test_core_pytorch_compare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ key_path=$(jq -r '.key_path' configs/my_config.json)
instance_config="default_config.json"
instance_type=
username="ubuntu"
py_env="pytorch_latest_p36"
py_env="pytorch"
ssh_at_start=true
spot_instance=true
aws_region="eu-west-1"
Expand Down Expand Up @@ -160,7 +160,7 @@ scp -i $key_path ../../requirements.txt $username@$ec2_instance_address:~/packag
#########################################################
echo "Running the comparison tests"
ssh -i $key_path $username@$ec2_instance_address \
"source activate $py_env ; tmux new-session -d -s 'training' 'export AWS_DEFAULT_REGION=$aws_region ; cd package_test ; pip install pytest seaborn==0.9.0 ; pip install -r requirements.txt ; pip install torchtext==0.7 torchvision>=0.9.1 ; pytest $pytest_dir -s ; aws s3 cp $logging_path s3://aitoolbox-testing/core_pytorch_comparisson_testing/$logging_filename ; aws ec2 terminate-instances --instance-ids $instance_id' \; pipe-pane 'cat > $logging_path'"
"source activate $py_env ; tmux new-session -d -s 'training' 'export AWS_DEFAULT_REGION=$aws_region ; cd package_test ; pip install pytest seaborn==0.9.0 ; pip install -r requirements.txt ; python -m pytest $pytest_dir -s ; aws s3 cp $logging_path s3://aitoolbox-testing/core_pytorch_comparisson_testing/$logging_filename ; aws ec2 terminate-instances --instance-ids $instance_id' \; pipe-pane 'cat > $logging_path'"

echo "Instance IP: $ec2_instance_address"

Expand Down
2 changes: 1 addition & 1 deletion bin/AWS/update_experiments_on_AWS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ experiment_script_file="aws_run_experiments_project.sh"
aws_project_root_path=~/project

username="ubuntu"
py_env="pytorch_latest_p36"
py_env="pytorch"


while [[ $# -gt 0 ]]; do
Expand Down
6 changes: 3 additions & 3 deletions bin/AWS/update_package_on_AWS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ fi


if [ $DL_framework == "TF" ]; then
py_env="tensorflow_p36"
py_env="tensorflow"
elif [ $DL_framework == "pytorch" ]; then
py_env="pytorch_latest_p36"
py_env="pytorch"
else
py_env="pytorch_latest_p36"
py_env="pytorch"
fi


Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
torch
torch>=1.12.0
torchvision
torchtext
pytorch-nlp
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
packages=find_packages(exclude=['tests', 'tests_gpu', 'examples', 'deprecated']),

install_requires=[
'torch',
'torch>=1.12.0',
'torchvision',
'torchtext',
'pytorch-nlp',
Expand Down

0 comments on commit 478534f

Please sign in to comment.