From 1922e78cd418e310b9d801b6d584544ebb212c15 Mon Sep 17 00:00:00 2001 From: Felix Nahrstedt Date: Tue, 16 Apr 2024 16:50:01 -0400 Subject: [PATCH] Revert "Experiment a100" --- .gitignore | 5 +- Slurm_A100/climax | 76 ------ Slurm_A100/climax_36 | 79 ------ Slurm_A100/climax_frozen | 76 ------ Slurm_A100/climax_frozen_36 | 78 ------ Slurm_A100/convlstm | 75 ------ Slurm_A100/convlstm_36 | 78 ------ Slurm_A100/run.sh | 22 -- Slurm_A100/unet | 75 ------ Slurm_A100/unet_36 | 78 ------ ...remulator_climax_frozen_tas+pr_run-02.yaml | 8 +- .../superemulator_climax_tas+pr_run-02.yaml | 8 +- .../superemulator_convlstm_tas+pr_run-02.yaml | 8 +- .../superemulator_unet_tas+pr_run-02.yaml | 8 +- ...remulator_climax_frozen_tas+pr_run-02.yaml | 8 +- .../superemulator_climax_tas+pr_run-02.yaml | 8 +- .../superemulator_convlstm_tas+pr_run-02.yaml | 8 +- .../superemulator_unet_tas+pr_run-02.yaml | 8 +- emulator/configs/logger/wandb.yaml | 2 +- emulator/train.py | 4 +- env_new_emulator/bin/Activate.ps1 | 247 ------------------ env_new_emulator/bin/activate | 69 ----- env_new_emulator/bin/activate.csh | 26 -- env_new_emulator/bin/activate.fish | 69 ----- env_new_emulator/bin/carbonboard | 8 - env_new_emulator/bin/codecarbon | 8 - env_new_emulator/bin/convert-caffe2-to-onnx | 8 - env_new_emulator/bin/convert-onnx-to-caffe2 | 8 - env_new_emulator/bin/cpuinfo | 8 - env_new_emulator/bin/dask | 8 - env_new_emulator/bin/f2py | 8 - env_new_emulator/bin/huggingface-cli | 8 - env_new_emulator/bin/isympy | 8 - env_new_emulator/bin/markdown_py | 8 - env_new_emulator/bin/nc3tonc4 | 8 - env_new_emulator/bin/nc4tonc3 | 8 - env_new_emulator/bin/ncinfo | 8 - env_new_emulator/bin/normalizer | 8 - env_new_emulator/bin/pip | 8 - env_new_emulator/bin/pip3 | 8 - env_new_emulator/bin/pip3.10 | 8 - env_new_emulator/bin/pygrun | 164 ------------ env_new_emulator/bin/python | 1 - env_new_emulator/bin/python3 | 1 - env_new_emulator/bin/python3.10 | 1 - env_new_emulator/bin/tensorboard | 8 - env_new_emulator/bin/torchrun | 8 - env_new_emulator/bin/tqdm | 8 - env_new_emulator/bin/wandb | 8 - env_new_emulator/bin/wb | 8 - env_new_emulator/lib64 | 1 - env_new_emulator/pyvenv.cfg | 3 - env_new_emulator/share/man/man1/isympy.1 | 188 ------------- env_old_emulator/bin/Activate.ps1 | 247 ------------------ env_old_emulator/bin/activate | 69 ----- env_old_emulator/bin/activate.csh | 26 -- env_old_emulator/bin/activate.fish | 69 ----- env_old_emulator/bin/carbonboard | 8 - env_old_emulator/bin/codecarbon | 8 - env_old_emulator/bin/convert-caffe2-to-onnx | 8 - env_old_emulator/bin/convert-onnx-to-caffe2 | 8 - env_old_emulator/bin/cpuinfo | 8 - env_old_emulator/bin/dask | 8 - env_old_emulator/bin/f2py | 8 - env_old_emulator/bin/huggingface-cli | 8 - env_old_emulator/bin/isympy | 8 - env_old_emulator/bin/markdown_py | 8 - env_old_emulator/bin/nc3tonc4 | 8 - env_old_emulator/bin/nc4tonc3 | 8 - env_old_emulator/bin/ncinfo | 8 - env_old_emulator/bin/normalizer | 8 - env_old_emulator/bin/pip | 8 - env_old_emulator/bin/pip3 | 8 - env_old_emulator/bin/pip3.10 | 8 - env_old_emulator/bin/pygrun | 164 ------------ env_old_emulator/bin/python | 1 - env_old_emulator/bin/python3 | 1 - env_old_emulator/bin/python3.10 | 1 - env_old_emulator/bin/tensorboard | 8 - env_old_emulator/bin/torchrun | 8 - env_old_emulator/bin/tqdm | 8 - env_old_emulator/bin/wandb | 8 - env_old_emulator/bin/wb | 8 - env_old_emulator/lib64 | 1 - env_old_emulator/pyvenv.cfg | 3 - env_old_emulator/share/man/man1/isympy.1 | 188 ------------- requirements.txt | 5 +- 87 files changed, 40 insertions(+), 2569 deletions(-) delete mode 100644 Slurm_A100/climax delete mode 100644 Slurm_A100/climax_36 delete mode 100644 Slurm_A100/climax_frozen delete mode 100644 Slurm_A100/climax_frozen_36 delete mode 100644 Slurm_A100/convlstm delete mode 100644 Slurm_A100/convlstm_36 delete mode 100644 Slurm_A100/run.sh delete mode 100644 Slurm_A100/unet delete mode 100644 Slurm_A100/unet_36 delete mode 100644 env_new_emulator/bin/Activate.ps1 delete mode 100644 env_new_emulator/bin/activate delete mode 100644 env_new_emulator/bin/activate.csh delete mode 100644 env_new_emulator/bin/activate.fish delete mode 100755 env_new_emulator/bin/carbonboard delete mode 100755 env_new_emulator/bin/codecarbon delete mode 100755 env_new_emulator/bin/convert-caffe2-to-onnx delete mode 100755 env_new_emulator/bin/convert-onnx-to-caffe2 delete mode 100755 env_new_emulator/bin/cpuinfo delete mode 100755 env_new_emulator/bin/dask delete mode 100755 env_new_emulator/bin/f2py delete mode 100755 env_new_emulator/bin/huggingface-cli delete mode 100755 env_new_emulator/bin/isympy delete mode 100755 env_new_emulator/bin/markdown_py delete mode 100755 env_new_emulator/bin/nc3tonc4 delete mode 100755 env_new_emulator/bin/nc4tonc3 delete mode 100755 env_new_emulator/bin/ncinfo delete mode 100755 env_new_emulator/bin/normalizer delete mode 100755 env_new_emulator/bin/pip delete mode 100755 env_new_emulator/bin/pip3 delete mode 100755 env_new_emulator/bin/pip3.10 delete mode 100755 env_new_emulator/bin/pygrun delete mode 120000 env_new_emulator/bin/python delete mode 120000 env_new_emulator/bin/python3 delete mode 120000 env_new_emulator/bin/python3.10 delete mode 100755 env_new_emulator/bin/tensorboard delete mode 100755 env_new_emulator/bin/torchrun delete mode 100755 env_new_emulator/bin/tqdm delete mode 100755 env_new_emulator/bin/wandb delete mode 100755 env_new_emulator/bin/wb delete mode 120000 env_new_emulator/lib64 delete mode 100644 env_new_emulator/pyvenv.cfg delete mode 100644 env_new_emulator/share/man/man1/isympy.1 delete mode 100644 env_old_emulator/bin/Activate.ps1 delete mode 100644 env_old_emulator/bin/activate delete mode 100644 env_old_emulator/bin/activate.csh delete mode 100644 env_old_emulator/bin/activate.fish delete mode 100755 env_old_emulator/bin/carbonboard delete mode 100755 env_old_emulator/bin/codecarbon delete mode 100755 env_old_emulator/bin/convert-caffe2-to-onnx delete mode 100755 env_old_emulator/bin/convert-onnx-to-caffe2 delete mode 100755 env_old_emulator/bin/cpuinfo delete mode 100755 env_old_emulator/bin/dask delete mode 100755 env_old_emulator/bin/f2py delete mode 100755 env_old_emulator/bin/huggingface-cli delete mode 100755 env_old_emulator/bin/isympy delete mode 100755 env_old_emulator/bin/markdown_py delete mode 100755 env_old_emulator/bin/nc3tonc4 delete mode 100755 env_old_emulator/bin/nc4tonc3 delete mode 100755 env_old_emulator/bin/ncinfo delete mode 100755 env_old_emulator/bin/normalizer delete mode 100755 env_old_emulator/bin/pip delete mode 100755 env_old_emulator/bin/pip3 delete mode 100755 env_old_emulator/bin/pip3.10 delete mode 100755 env_old_emulator/bin/pygrun delete mode 120000 env_old_emulator/bin/python delete mode 120000 env_old_emulator/bin/python3 delete mode 120000 env_old_emulator/bin/python3.10 delete mode 100755 env_old_emulator/bin/tensorboard delete mode 100755 env_old_emulator/bin/torchrun delete mode 100755 env_old_emulator/bin/tqdm delete mode 100755 env_old_emulator/bin/wandb delete mode 100755 env_old_emulator/bin/wb delete mode 120000 env_old_emulator/lib64 delete mode 100644 env_old_emulator/pyvenv.cfg delete mode 100644 env_old_emulator/share/man/man1/isympy.1 diff --git a/.gitignore b/.gitignore index 7218391..fcbbfe5 100755 --- a/.gitignore +++ b/.gitignore @@ -50,6 +50,7 @@ MANIFEST emulator/logs emulator/wandb wandb/ +Slurm_Scripts/ # PyInstaller # Usually these files are written by a python script from a template @@ -153,7 +154,3 @@ dmypy.json # Pyre type checker .pyre/ - -# Checkpoints -emulator/*/checkpoints/ -emulator/src/core/models/climax/pretrained_checkpoints/ diff --git a/Slurm_A100/climax b/Slurm_A100/climax deleted file mode 100644 index a4b1e1c..0000000 --- a/Slurm_A100/climax +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - -#SBATCH --job-name="SC6-A100-basetest-climax" - -#SBATCH --nodes=1 - -#SBATCH --gpus-per-node=a100:1 --constraint="dgx&ere" # specify gpu - -#SBATCH --ntasks-per-node=1 - -#SBATCH --cpus-per-task=4 # cpu-cores per task (>1 if multi-threaded tasks) - -#SBATCH --mem-per-cpu=16G # memory per node (4G per cpu-core is default) - -#SBATCH --time=48:00:00 # set runtime - -#SBATCH -o /home/mila/f/felix-andreas.nahrstedt/Slurm/SC6-A100-basetest-climax.out # set log dir to home - - -EXP_NAME=$1 -DL_FRAMEWORK="torch" - -echo "Beginning experiment $EXP_NAME." - -# 1. Load Python - -module load python/3.10 -export PYTHONPATH=$(pwd) - -# 2. Load DL Framework - -if [[ $DL_FRAMEWORK == "torch" ]]; then - - module load cuda/10.0/cudnn/7.6 - #module load python/3.7/cuda/11.1/cudnn/8.0/pytorch/1.8.1 - -fi - - -# 3. Create or Set Up Environment -deactivate - -if [ -a env_old_emulator/bin/activate ]; then - - source env_old_emulator/bin/activate - echo "activated" - -else - python -m venv env_old_emulator - source env_old_emulator/bin/activate - #bash download_climateset.sh || { echo "Failed to run download_climateset.sh"; exit 1; } - bash download_climax_checkpoints.sh || { echo "Failed to run download_climax_checkpoints.sh"; exit 1; } - pip install -r requirements.txt || { echo "Failed to install requirements."; exit 1; } - pip install pytorch-lightning==1.8.3 || { echo "Failed to install pytorch-lightning old version"; exit 1; } -fi - -echo $PYTHONPATH -dir -cd $(pwd) - - -export NCCL_BLOCKING_WAIT=1 #Pytorch Lightning uses the NCCL backend for inter-GPU communication by default. Set this variable to avoid timeout errors. - - -# 8. Run Python -export HYDRA_FULL_ERROR=1 -echo "Running python test.py ..." -srun python emulator/run.py experiment=superemulator/superemulator_climax_tas+pr_run-02.yaml seed=3423 - - -# 9. Copy output to scratch -#cp /home/mila/f/felix-andreas.nahrstedt/Slurm/SC6-A100-basetest-climax_out.out - -# 10. Experiment is finished - -echo "Experiment $EXP_NAME is concluded." \ No newline at end of file diff --git a/Slurm_A100/climax_36 b/Slurm_A100/climax_36 deleted file mode 100644 index de4ef5a..0000000 --- a/Slurm_A100/climax_36 +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash - -#SBATCH --job-name="SC36-A100-basetest-climax" - -#SBATCH --nodes=1 - -#SBATCH --gpus-per-node=a100:1 --constraint="dgx&ere" # specify gpu - -#SBATCH --ntasks-per-node=1 - -#SBATCH --cpus-per-task=4 # cpu-cores per task (>1 if multi-threaded tasks) - -#SBATCH --mem-per-cpu=40G # memory per node (4G per cpu-core is default) - -#SBATCH --time=48:00:00 # set runtime - -#SBATCH -o /home/mila/f/felix-andreas.nahrstedt/Slurm/SC36-A100-basetest-climax.out # set log dir to home - - -EXP_NAME=$1 -DL_FRAMEWORK="torch" - -echo "Beginning experiment $EXP_NAME." - -# 1. Load Python - -module load python/3.10 -export PYTHONPATH=$(pwd) - -# 2. Load DL Framework - -if [[ $DL_FRAMEWORK == "torch" ]]; then - - module load cuda/10.0/cudnn/7.6 - #module load python/3.7/cuda/11.1/cudnn/8.0/pytorch/1.8.1 - -fi - - -# 3. Create or Set Up Environment -deactivate - -if [ -a env_old_emulator/bin/activate ]; then - - source env_old_emulator/bin/activate - echo "activated" - -else - python -m venv env_old_emulator - source env_old_emulator/bin/activate - #bash download_climateset.sh || { echo "Failed to run download_climateset.sh"; exit 1; } - #bash download_climax_checkpoints.sh || { echo "Failed to run download_climax_checkpoints.sh"; exit 1; } - pip install -r requirements.txt || { echo "Failed to install requirements."; exit 1; } - pip install pytorch-lightning==1.8.3 || { echo "Failed to install pytorch-lightning old version"; exit 1; } -fi - - -echo $PYTHONPATH -dir -cd $(pwd) - -export NCCL_BLOCKING_WAIT=1 #Pytorch Lightning uses the NCCL backend for inter-GPU communication by default. Set this variable to avoid timeout errors. -# 6. Set Flags - - - - -# 8. Run Python - -echo "Running python test.py ..." -srun python emulator/run.py experiment=superemulator_36/superemulator_climax_tas+pr_run-02.yaml seed=3423 - - -# 9. Copy output to scratch - - -# 10. Experiment is finished - -echo "Experiment $EXP_NAME is concluded." \ No newline at end of file diff --git a/Slurm_A100/climax_frozen b/Slurm_A100/climax_frozen deleted file mode 100644 index 1648261..0000000 --- a/Slurm_A100/climax_frozen +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - -#SBATCH --job-name="SC6-A100-basetest-climax_frozen" - -#SBATCH --nodes=1 - -#SBATCH --gpus-per-node=a100:1 --constraint="dgx&ere" # specify gpu - -#SBATCH --ntasks-per-node=1 - -#SBATCH --cpus-per-task=4 # cpu-cores per task (>1 if multi-threaded tasks) - -#SBATCH --mem-per-cpu=16G # memory per node (4G per cpu-core is default) - -#SBATCH --time=48:00:00 # set runtime - -#SBATCH -o /home/mila/f/felix-andreas.nahrstedt/Slurm/SC6-A100-basetest-climax_frozen.out # set log dir to home - - -EXP_NAME=$1 -DL_FRAMEWORK="torch" - -echo "Beginning experiment $EXP_NAME." - -# 1. Load Python - -module load python/3.10 -export PYTHONPATH=$(pwd) - -# 2. Load DL Framework - -if [[ $DL_FRAMEWORK == "torch" ]]; then - - module load cuda/10.0/cudnn/7.6 - #module load python/3.7/cuda/11.1/cudnn/8.0/pytorch/1.8.1 - -fi - - -# 3. Create or Set Up Environment -deactivate - -if [ -a env_old_emulator/bin/activate ]; then - - source env_old_emulator/bin/activate - echo "activated" - -else - python -m venv env_old_emulator - source env_old_emulator/bin/activate - #bash download_climateset.sh || { echo "Failed to run download_climateset.sh"; exit 1; } - #bash download_climax_frozen_checkpoints.sh || { echo "Failed to run download_climax_frozen_checkpoints.sh"; exit 1; } - pip install -r requirements.txt || { echo "Failed to install requirements."; exit 1; } - pip install pytorch-lightning==1.8.3 || { echo "Failed to install pytorch-lightning old version"; exit 1; } -fi - -echo $PYTHONPATH -dir -cd $(pwd) - - -export NCCL_BLOCKING_WAIT=1 #Pytorch Lightning uses the NCCL backend for inter-GPU communication by default. Set this variable to avoid timeout errors. - - -# 8. Run Python -export HYDRA_FULL_ERROR=1 -echo "Running python test.py ..." -srun python emulator/run.py experiment=superemulator/superemulator_climax_frozen_tas+pr_run-02.yaml seed=3423 - - -# 9. Copy output to scratch -#cp /home/mila/f/felix-andreas.nahrstedt/Slurm/SC6-A100-basetest-climax_frozen_out.out - -# 10. Experiment is finished - -echo "Experiment $EXP_NAME is concluded." \ No newline at end of file diff --git a/Slurm_A100/climax_frozen_36 b/Slurm_A100/climax_frozen_36 deleted file mode 100644 index f8984fa..0000000 --- a/Slurm_A100/climax_frozen_36 +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash - -#SBATCH --job-name="SC36-A100-basetest-climax_frozen" - -#SBATCH --nodes=1 - -#SBATCH --gpus-per-node=a100:1 --constraint="dgx&ere" # specify gpu - -#SBATCH --ntasks-per-node=1 - -#SBATCH --cpus-per-task=4 # cpu-cores per task (>1 if multi-threaded tasks) - -#SBATCH --mem-per-cpu=40G # memory per node (4G per cpu-core is default) - -#SBATCH --time=48:00:00 # set runtime - -#SBATCH -o /home/mila/f/felix-andreas.nahrstedt/Slurm/SC36-A100-basetest-climax_frozen.out # set log dir to home - - -EXP_NAME=$1 -DL_FRAMEWORK="torch" - -echo "Beginning experiment $EXP_NAME." - -# 1. Load Python - -module load python/3.10 -export PYTHONPATH=$(pwd) - -# 2. Load DL Framework - -if [[ $DL_FRAMEWORK == "torch" ]]; then - - module load cuda/10.0/cudnn/7.6 - #module load python/3.7/cuda/11.1/cudnn/8.0/pytorch/1.8.1 - -fi - - -# 3. Create or Set Up Environment -deactivate - -if [ -a env_old_emulator/bin/activate ]; then - - source env_old_emulator/bin/activate - echo "activated" - -else - python -m venv env_old_emulator - source env_old_emulator/bin/activate - #bash download_climateset.sh || { echo "Failed to run download_climateset.sh"; exit 1; } - pip install -r requirements.txt || { echo "Failed to install requirements."; exit 1; } - pip install pytorch-lightning==1.8.3 || { echo "Failed to install pytorch-lightning old version"; exit 1; } -fi - - -echo $PYTHONPATH -dir -cd $(pwd) - -export NCCL_BLOCKING_WAIT=1 #Pytorch Lightning uses the NCCL backend for inter-GPU communication by default. Set this variable to avoid timeout errors. -# 6. Set Flags - - - - -# 8. Run Python - -echo "Running python test.py ..." -srun python emulator/run.py experiment=superemulator_36/superemulator_climax_frozen_tas+pr_run-02.yaml seed=3423 - - -# 9. Copy output to scratch - - -# 10. Experiment is finished - -echo "Experiment $EXP_NAME is concluded." \ No newline at end of file diff --git a/Slurm_A100/convlstm b/Slurm_A100/convlstm deleted file mode 100644 index bd9da15..0000000 --- a/Slurm_A100/convlstm +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash - -#SBATCH --job-name="SC6-A100-basetest-convlstm" - -#SBATCH --nodes=1 - -#SBATCH --gpus-per-node=a100:1 --constraint="dgx&ere" # specify gpu - -#SBATCH --ntasks-per-node=1 - -#SBATCH --cpus-per-task=4 # cpu-cores per task (>1 if multi-threaded tasks) - -#SBATCH --mem-per-cpu=16G # memory per node (4G per cpu-core is default) - -#SBATCH --time=48:00:00 # set runtime - -#SBATCH -o /home/mila/f/felix-andreas.nahrstedt/Slurm/SC6-A100-basetest-convlstm.out # set log dir to home - - -EXP_NAME=$1 -DL_FRAMEWORK="torch" - -echo "Beginning experiment $EXP_NAME." - -# 1. Load Python - -module load python/3.10 -export PYTHONPATH=$(pwd) - -# 2. Load DL Framework - -if [[ $DL_FRAMEWORK == "torch" ]]; then - - module load cuda/10.0/cudnn/7.6 - #module load python/3.7/cuda/11.1/cudnn/8.0/pytorch/1.8.1 - -fi - - -# 3. Create or Set Up Environment -deactivate - -if [ -a env_new_emulator/bin/activate ]; then - - source env_new_emulator/bin/activate - echo "activated" - -else - python -m venv env_new_emulator - source env_new_emulator/bin/activate - #bash download_climateset.sh || { echo "Failed to run download_climateset.sh"; exit 1; } - pip install -r requirements.txt || { echo "Failed to install requirements."; exit 1; } - pip install pytorch-lightning==2.2.2 || { echo "Failed to install pytorch-lightning old version"; exit 1; } -fi - -echo $PYTHONPATH -dir -cd $(pwd) - - -export NCCL_BLOCKING_WAIT=1 #Pytorch Lightning uses the NCCL backend for inter-GPU communication by default. Set this variable to avoid timeout errors. - - -# 8. Run Python -export HYDRA_FULL_ERROR=1 -echo "Running python test.py ..." -srun python emulator/run.py experiment=superemulator/superemulator_convlstm_tas+pr_run-02.yaml seed=3423 - - -# 9. Copy output to scratch -#cp /home/mila/f/felix-andreas.nahrstedt/Slurm/SC6-A100-basetest-convlstm_out.out - -# 10. Experiment is finished - -echo "Experiment $EXP_NAME is concluded." \ No newline at end of file diff --git a/Slurm_A100/convlstm_36 b/Slurm_A100/convlstm_36 deleted file mode 100644 index 7da5f8e..0000000 --- a/Slurm_A100/convlstm_36 +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash - -#SBATCH --job-name="SC36-A100-basetest-convlstm" - -#SBATCH --nodes=1 - -#SBATCH --gpus-per-node=a100:1 --constraint="dgx&ere" # specify gpu - -#SBATCH --ntasks-per-node=1 - -#SBATCH --cpus-per-task=4 # cpu-cores per task (>1 if multi-threaded tasks) - -#SBATCH --mem-per-cpu=40G # memory per node (4G per cpu-core is default) - -#SBATCH --time=48:00:00 # set runtime - -#SBATCH -o /home/mila/f/felix-andreas.nahrstedt/Slurm/SC36-A100-basetest-convlstm.out # set log dir to home - - -EXP_NAME=$1 -DL_FRAMEWORK="torch" - -echo "Beginning experiment $EXP_NAME." - -# 1. Load Python - -module load python/3.10 -export PYTHONPATH=$(pwd) - -# 2. Load DL Framework - -if [[ $DL_FRAMEWORK == "torch" ]]; then - - module load cuda/10.0/cudnn/7.6 - #module load python/3.7/cuda/11.1/cudnn/8.0/pytorch/1.8.1 - -fi - - -# 3. Create or Set Up Environment -deactivate - -if [ -a env_new_emulator/bin/activate ]; then - - source env_new_emulator/bin/activate - echo "activated" - -else - python -m venv env_new_emulator - source env_new_emulator/bin/activate - #bash download_climateset.sh || { echo "Failed to run download_climateset.sh"; exit 1; } - pip install -r requirements.txt || { echo "Failed to install requirements."; exit 1; } - pip install pytorch-lightning==2.2.2 || { echo "Failed to install pytorch-lightning old version"; exit 1; } -fi - - -echo $PYTHONPATH -dir -cd $(pwd) - -export NCCL_BLOCKING_WAIT=1 #Pytorch Lightning uses the NCCL backend for inter-GPU communication by default. Set this variable to avoid timeout errors. -# 6. Set Flags - - - - -# 8. Run Python - -echo "Running python test.py ..." -srun python emulator/run.py experiment=superemulator_36/superemulator_convlstm_tas+pr_run-02.yaml seed=3423 - - -# 9. Copy output to scratch - - -# 10. Experiment is finished - -echo "Experiment $EXP_NAME is concluded." \ No newline at end of file diff --git a/Slurm_A100/run.sh b/Slurm_A100/run.sh deleted file mode 100644 index cb71314..0000000 --- a/Slurm_A100/run.sh +++ /dev/null @@ -1,22 +0,0 @@ -pwd - -while true; do - read -p "Do you wish to remove old files? " yn - case $yn in - [Yy]* ) rm -f ../Slurm/{*,.*}; break;; - [Nn]* ) break;; - * ) echo "Please answer yes or no.";; - esac -done - - -sbatch Slurm_A100/climax -sbatch Slurm_A100/climax_36 -sbatch Slurm_A100/climax_frozen -sbatch Slurm_A100/climax_frozen_36 -sbatch Slurm_A100/convlstm -sbatch Slurm_A100/convlstm_36 -sbatch Slurm_A100/unet -sbatch Slurm_A100/unet_36 - -echo "Success - Go sleep and see your results in the morning!" \ No newline at end of file diff --git a/Slurm_A100/unet b/Slurm_A100/unet deleted file mode 100644 index 9690e3d..0000000 --- a/Slurm_A100/unet +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash - -#SBATCH --job-name="SC6-A100-basetest-unet" - -#SBATCH --nodes=1 - -#SBATCH --gpus-per-node=a100:1 --constraint="dgx&ere" # specify gpu - -#SBATCH --ntasks-per-node=1 - -#SBATCH --cpus-per-task=4 # cpu-cores per task (>1 if multi-threaded tasks) - -#SBATCH --mem-per-cpu=16G # memory per node (4G per cpu-core is default) - -#SBATCH --time=48:00:00 # set runtime - -#SBATCH -o /home/mila/f/felix-andreas.nahrstedt/Slurm/SC6-A100-basetest-unet.out # set log dir to home - - -EXP_NAME=$1 -DL_FRAMEWORK="torch" - -echo "Beginning experiment $EXP_NAME." - -# 1. Load Python - -module load python/3.10 -export PYTHONPATH=$(pwd) - -# 2. Load DL Framework - -if [[ $DL_FRAMEWORK == "torch" ]]; then - - module load cuda/10.0/cudnn/7.6 - #module load python/3.7/cuda/11.1/cudnn/8.0/pytorch/1.8.1 - -fi - - -# 3. Create or Set Up Environment -deactivate - -if [ -a env_new_emulator/bin/activate ]; then - - source env_new_emulator/bin/activate - echo "activated" - -else - python -m venv env_new_emulator - source env_new_emulator/bin/activate - #bash download_climateset.sh || { echo "Failed to run download_climateset.sh"; exit 1; } - pip install -r requirements.txt || { echo "Failed to install requirements."; exit 1; } - pip install pytorch-lightning==2.2.2 || { echo "Failed to install pytorch-lightning old version"; exit 1; } -fi - -echo $PYTHONPATH -dir -cd $(pwd) - - -export NCCL_BLOCKING_WAIT=1 #Pytorch Lightning uses the NCCL backend for inter-GPU communication by default. Set this variable to avoid timeout errors. - - -# 8. Run Python -export HYDRA_FULL_ERROR=1 -echo "Running python test.py ..." -srun python emulator/run.py experiment=superemulator/superemulator_unet_tas+pr_run-02.yaml seed=3423 - - -# 9. Copy output to scratch -#cp /home/mila/f/felix-andreas.nahrstedt/Slurm/SC6-A100-basetest-unet_out.out - -# 10. Experiment is finished - -echo "Experiment $EXP_NAME is concluded." \ No newline at end of file diff --git a/Slurm_A100/unet_36 b/Slurm_A100/unet_36 deleted file mode 100644 index 4cdf6f8..0000000 --- a/Slurm_A100/unet_36 +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash - -#SBATCH --job-name="SC36-A100-basetest-unet" - -#SBATCH --nodes=1 - -#SBATCH --gpus-per-node=a100:1 --constraint="dgx&ere" # specify gpu - -#SBATCH --ntasks-per-node=1 - -#SBATCH --cpus-per-task=4 # cpu-cores per task (>1 if multi-threaded tasks) - -#SBATCH --mem-per-cpu=40G # memory per node (4G per cpu-core is default) - -#SBATCH --time=48:00:00 # set runtime - -#SBATCH -o /home/mila/f/felix-andreas.nahrstedt/Slurm/SC36-A100-basetest-unet.out # set log dir to home - - -EXP_NAME=$1 -DL_FRAMEWORK="torch" - -echo "Beginning experiment $EXP_NAME." - -# 1. Load Python - -module load python/3.10 -export PYTHONPATH=$(pwd) - -# 2. Load DL Framework - -if [[ $DL_FRAMEWORK == "torch" ]]; then - - module load cuda/10.0/cudnn/7.6 - #module load python/3.7/cuda/11.1/cudnn/8.0/pytorch/1.8.1 - -fi - - -# 3. Create or Set Up Environment -deactivate - -if [ -a env_new_emulator/bin/activate ]; then - - source env_new_emulator/bin/activate - echo "activated" - -else - python -m venv env_new_emulator - source env_new_emulator/bin/activate - #bash download_climateset.sh || { echo "Failed to run download_climateset.sh"; exit 1; } - pip install -r requirements.txt || { echo "Failed to install requirements."; exit 1; } - pip install pytorch-lightning==2.2.2 || { echo "Failed to install pytorch-lightning old version"; exit 1; } -fi - - -echo $PYTHONPATH -dir -cd $(pwd) - -export NCCL_BLOCKING_WAIT=1 #Pytorch Lightning uses the NCCL backend for inter-GPU communication by default. Set this variable to avoid timeout errors. -# 6. Set Flags - - - - -# 8. Run Python - -echo "Running python test.py ..." -srun python emulator/run.py experiment=superemulator_36/superemulator_unet_tas+pr_run-02.yaml seed=3423 - - -# 9. Copy output to scratch - - -# 10. Experiment is finished - -echo "Experiment $EXP_NAME is concluded." \ No newline at end of file diff --git a/emulator/configs/experiment/superemulator/superemulator_climax_frozen_tas+pr_run-02.yaml b/emulator/configs/experiment/superemulator/superemulator_climax_frozen_tas+pr_run-02.yaml index 006c74b..888988d 100755 --- a/emulator/configs/experiment/superemulator/superemulator_climax_frozen_tas+pr_run-02.yaml +++ b/emulator/configs/experiment/superemulator/superemulator_climax_frozen_tas+pr_run-02.yaml @@ -17,9 +17,9 @@ defaults: # name of the run determines folder name in logs # can also be accessed by loggers run: - exp_num: "01" # serial number of experiment - name: BASELINE # a short 1-2 word description of the experiment - comment: "BASELINE" + exp_num: "04" # serial number of experiment + name: baseline # a short 1-2 word description of the experiment + comment: "baseline" name: ${run.exp_num}_${model.model_name}_${run.name}_ @@ -60,4 +60,4 @@ datamodule: # overwrite what stuff to train on logger: wandb: - tags: ["climax_frozen", "super_emulation", "larger_decoder", "6_models", "run2","A100"] # set your tags here + tags: ["climax_frozen", "super_emulation", "larger_decoder", "6_models", "run2","baseline"] # set your tags here diff --git a/emulator/configs/experiment/superemulator/superemulator_climax_tas+pr_run-02.yaml b/emulator/configs/experiment/superemulator/superemulator_climax_tas+pr_run-02.yaml index c3224bc..0d5a4cc 100755 --- a/emulator/configs/experiment/superemulator/superemulator_climax_tas+pr_run-02.yaml +++ b/emulator/configs/experiment/superemulator/superemulator_climax_tas+pr_run-02.yaml @@ -17,9 +17,9 @@ defaults: # name of the run determines folder name in logs # can also be accessed by loggers run: - exp_num: "01" # serial number of experiment - name: BASELINE # a short 1-2 word description of the experiment - comment: "BASELINE" + exp_num: "04" # serial number of experiment + name: baseline # a short 1-2 word description of the experiment + comment: "baseline" name: ${run.exp_num}_${model.model_name}_${run.name}_ @@ -59,4 +59,4 @@ datamodule: # overwrite what stuff to train on logger: wandb: - tags: ["climax", "super_emulation", "larger_decoder", "6_models", "run2","A100"] # set your tags here + tags: ["climax", "super_emulation", "larger_decoder", "6_models", "run2","baseline"] # set your tags here diff --git a/emulator/configs/experiment/superemulator/superemulator_convlstm_tas+pr_run-02.yaml b/emulator/configs/experiment/superemulator/superemulator_convlstm_tas+pr_run-02.yaml index 087ec9e..3a57ad9 100755 --- a/emulator/configs/experiment/superemulator/superemulator_convlstm_tas+pr_run-02.yaml +++ b/emulator/configs/experiment/superemulator/superemulator_convlstm_tas+pr_run-02.yaml @@ -17,9 +17,9 @@ defaults: # name of the run determines folder name in logs # can also be accessed by loggers run: - exp_num: "01" # serial number of experiment - name: BASELINE # a short 1-2 word description of the experiment - comment: "BASELINE" + exp_num: "04" # serial number of experiment + name: baseline # a short 1-2 word description of the experiment + comment: "baseline" name: ${run.exp_num}_${model.model_name}_${run.name}_ @@ -61,4 +61,4 @@ datamodule: # overwrite what stuff to train on logger: wandb: - tags: ["conv_lstm", "super_emulation", "decoder", "6_models", "run2","A100"] # set your tags here + tags: ["conv_lstm", "super_emulation", "decoder", "6_models", "run2","baseline"] # set your tags here diff --git a/emulator/configs/experiment/superemulator/superemulator_unet_tas+pr_run-02.yaml b/emulator/configs/experiment/superemulator/superemulator_unet_tas+pr_run-02.yaml index 8ece1c3..808349d 100755 --- a/emulator/configs/experiment/superemulator/superemulator_unet_tas+pr_run-02.yaml +++ b/emulator/configs/experiment/superemulator/superemulator_unet_tas+pr_run-02.yaml @@ -17,9 +17,9 @@ defaults: # name of the run determines folder name in logs # can also be accessed by loggers run: - exp_num: "01" # serial number of experiment - name: BASELINE # a short 1-2 word description of the experiment - comment: "BASELINE" + exp_num: "04" # serial number of experiment + name: baseline # a short 1-2 word description of the experiment + comment: "baseline" name: ${run.exp_num}_${model.model_name}_${run.name}_ @@ -65,5 +65,5 @@ datamodule: # overwrite what stuff to train on logger: wandb: - tags: ["unet", "super_emulation", "decoder", "6_models", "run2","A100"] # set your tags here + tags: ["unet", "super_emulation", "decoder", "6_models", "run2","baseline"] # set your tags here # tags: ["unet", "super_emulation", "decoder", "6_models", "run2"] # set your tags here diff --git a/emulator/configs/experiment/superemulator_36/superemulator_climax_frozen_tas+pr_run-02.yaml b/emulator/configs/experiment/superemulator_36/superemulator_climax_frozen_tas+pr_run-02.yaml index 4676687..70712e7 100755 --- a/emulator/configs/experiment/superemulator_36/superemulator_climax_frozen_tas+pr_run-02.yaml +++ b/emulator/configs/experiment/superemulator_36/superemulator_climax_frozen_tas+pr_run-02.yaml @@ -17,9 +17,9 @@ defaults: # name of the run determines folder name in logs # can also be accessed by loggers run: - exp_num: "01" # serial number of experiment - name: BASELINE # a short 1-2 word description of the experiment - comment: "BASELINE" + exp_num: "04" # serial number of experiment + name: baseline # a short 1-2 word description of the experiment + comment: "baseline" name: ${run.exp_num}_${model.model_name}_${run.name}_ @@ -61,4 +61,4 @@ datamodule: # overwrite what stuff to train on logger: wandb: - tags: ["climax_frozen", "super_emulation", "larger_decoder", "36_models", "run2","A100"] # set your tags here + tags: ["climax_frozen", "super_emulation", "larger_decoder", "36_models", "run2","baseline"] # set your tags here diff --git a/emulator/configs/experiment/superemulator_36/superemulator_climax_tas+pr_run-02.yaml b/emulator/configs/experiment/superemulator_36/superemulator_climax_tas+pr_run-02.yaml index 74b5447..8b021e2 100755 --- a/emulator/configs/experiment/superemulator_36/superemulator_climax_tas+pr_run-02.yaml +++ b/emulator/configs/experiment/superemulator_36/superemulator_climax_tas+pr_run-02.yaml @@ -17,9 +17,9 @@ defaults: # name of the run determines folder name in logs # can also be accessed by loggers run: - exp_num: "01" # serial number of experiment - name: BASELINE # a short 1-2 word description of the experiment - comment: "BASELINE" + exp_num: "04" # serial number of experiment + name: baseline # a short 1-2 word description of the experiment + comment: "baseline" name: ${run.exp_num}_${model.model_name}_${run.name}_ @@ -60,4 +60,4 @@ datamodule: # overwrite what stuff to train on logger: wandb: - tags: ["climax", "super_emulation", "larger_decoder", "36_models", "run2","A100"] # set your tags here + tags: ["climax", "super_emulation", "larger_decoder", "36_models", "run2","baseline"] # set your tags here diff --git a/emulator/configs/experiment/superemulator_36/superemulator_convlstm_tas+pr_run-02.yaml b/emulator/configs/experiment/superemulator_36/superemulator_convlstm_tas+pr_run-02.yaml index 7d147ac..5e02060 100755 --- a/emulator/configs/experiment/superemulator_36/superemulator_convlstm_tas+pr_run-02.yaml +++ b/emulator/configs/experiment/superemulator_36/superemulator_convlstm_tas+pr_run-02.yaml @@ -17,9 +17,9 @@ defaults: # name of the run determines folder name in logs # can also be accessed by loggers run: - exp_num: "01" # serial number of experiment - name: BASELINE # a short 1-2 word description of the experiment - comment: "BASELINE" + exp_num: "04" # serial number of experiment + name: baseline # a short 1-2 word description of the experiment + comment: "baseline" name: ${run.exp_num}_${model.model_name}_${run.name}_ @@ -62,4 +62,4 @@ datamodule: # overwrite what stuff to train on logger: wandb: - tags: ["conv_lstm", "super_emulation", "decoder", "36_models", "run2","A100"] # set your tags here + tags: ["conv_lstm", "super_emulation", "decoder", "36_models", "run2","baseline"] # set your tags here diff --git a/emulator/configs/experiment/superemulator_36/superemulator_unet_tas+pr_run-02.yaml b/emulator/configs/experiment/superemulator_36/superemulator_unet_tas+pr_run-02.yaml index 249fba1..784ec56 100755 --- a/emulator/configs/experiment/superemulator_36/superemulator_unet_tas+pr_run-02.yaml +++ b/emulator/configs/experiment/superemulator_36/superemulator_unet_tas+pr_run-02.yaml @@ -17,9 +17,9 @@ defaults: # name of the run determines folder name in logs # can also be accessed by loggers run: - exp_num: "01" # serial number of experiment - name: BASELINE # a short 1-2 word description of the experiment - comment: "BASELINE" + exp_num: "04" # serial number of experiment + name: baseline # a short 1-2 word description of the experiment + comment: "baseline" name: ${run.exp_num}_${model.model_name}_${run.name}_ @@ -65,5 +65,5 @@ datamodule: # overwrite what stuff to train on logger: wandb: - tags: ["unet", "super_emulation", "decoder", "36_models", "run2","A100"] # set your tags here + tags: ["unet", "super_emulation", "decoder", "36_models", "run2","baseline"] # set your tags here # tags: ["unet", "super_emulation", "decoder", "6_models", "run2"] # set your tags here diff --git a/emulator/configs/logger/wandb.yaml b/emulator/configs/logger/wandb.yaml index 89c2f28..47d5e88 100644 --- a/emulator/configs/logger/wandb.yaml +++ b/emulator/configs/logger/wandb.yaml @@ -7,7 +7,7 @@ wandb: tags: [] notes: "..." project: "emulator" - group: "A100" + group: "causalpaca" resume: "allow" reinit: True mode: online # disabled # disabled for no wandb logging diff --git a/emulator/train.py b/emulator/train.py index dabc0fb..e75083e 100644 --- a/emulator/train.py +++ b/emulator/train.py @@ -67,10 +67,10 @@ def run_model(config: DictConfig): emissionTracker = EmissionsTracker() if emissions_tracker_enabled else None if emissionTracker: emissionTracker.start() - + trainer.fit(model=emulator_model, datamodule=data_module) - emissions:float = emissionTracker.stop() if emissions_tracker_enabled else 0 + emissions = emissionTracker.stop() if emissions_tracker_enabled else 0 cfg_utils.save_emissions_to_wandb(config, emissions) diff --git a/env_new_emulator/bin/Activate.ps1 b/env_new_emulator/bin/Activate.ps1 deleted file mode 100644 index b49d77b..0000000 --- a/env_new_emulator/bin/Activate.ps1 +++ /dev/null @@ -1,247 +0,0 @@ -<# -.Synopsis -Activate a Python virtual environment for the current PowerShell session. - -.Description -Pushes the python executable for a virtual environment to the front of the -$Env:PATH environment variable and sets the prompt to signify that you are -in a Python virtual environment. Makes use of the command line switches as -well as the `pyvenv.cfg` file values present in the virtual environment. - -.Parameter VenvDir -Path to the directory that contains the virtual environment to activate. The -default value for this is the parent of the directory that the Activate.ps1 -script is located within. - -.Parameter Prompt -The prompt prefix to display when this virtual environment is activated. By -default, this prompt is the name of the virtual environment folder (VenvDir) -surrounded by parentheses and followed by a single space (ie. '(.venv) '). - -.Example -Activate.ps1 -Activates the Python virtual environment that contains the Activate.ps1 script. - -.Example -Activate.ps1 -Verbose -Activates the Python virtual environment that contains the Activate.ps1 script, -and shows extra information about the activation as it executes. - -.Example -Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv -Activates the Python virtual environment located in the specified location. - -.Example -Activate.ps1 -Prompt "MyPython" -Activates the Python virtual environment that contains the Activate.ps1 script, -and prefixes the current prompt with the specified string (surrounded in -parentheses) while the virtual environment is active. - -.Notes -On Windows, it may be required to enable this Activate.ps1 script by setting the -execution policy for the user. You can do this by issuing the following PowerShell -command: - -PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser - -For more information on Execution Policies: -https://go.microsoft.com/fwlink/?LinkID=135170 - -#> -Param( - [Parameter(Mandatory = $false)] - [String] - $VenvDir, - [Parameter(Mandatory = $false)] - [String] - $Prompt -) - -<# Function declarations --------------------------------------------------- #> - -<# -.Synopsis -Remove all shell session elements added by the Activate script, including the -addition of the virtual environment's Python executable from the beginning of -the PATH variable. - -.Parameter NonDestructive -If present, do not remove this function from the global namespace for the -session. - -#> -function global:deactivate ([switch]$NonDestructive) { - # Revert to original values - - # The prior prompt: - if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) { - Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt - Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT - } - - # The prior PYTHONHOME: - if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) { - Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME - Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME - } - - # The prior PATH: - if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) { - Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH - Remove-Item -Path Env:_OLD_VIRTUAL_PATH - } - - # Just remove the VIRTUAL_ENV altogether: - if (Test-Path -Path Env:VIRTUAL_ENV) { - Remove-Item -Path env:VIRTUAL_ENV - } - - # Just remove VIRTUAL_ENV_PROMPT altogether. - if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) { - Remove-Item -Path env:VIRTUAL_ENV_PROMPT - } - - # Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether: - if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) { - Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force - } - - # Leave deactivate function in the global namespace if requested: - if (-not $NonDestructive) { - Remove-Item -Path function:deactivate - } -} - -<# -.Description -Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the -given folder, and returns them in a map. - -For each line in the pyvenv.cfg file, if that line can be parsed into exactly -two strings separated by `=` (with any amount of whitespace surrounding the =) -then it is considered a `key = value` line. The left hand string is the key, -the right hand is the value. - -If the value starts with a `'` or a `"` then the first and last character is -stripped from the value before being captured. - -.Parameter ConfigDir -Path to the directory that contains the `pyvenv.cfg` file. -#> -function Get-PyVenvConfig( - [String] - $ConfigDir -) { - Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg" - - # Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue). - $pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue - - # An empty map will be returned if no config file is found. - $pyvenvConfig = @{ } - - if ($pyvenvConfigPath) { - - Write-Verbose "File exists, parse `key = value` lines" - $pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath - - $pyvenvConfigContent | ForEach-Object { - $keyval = $PSItem -split "\s*=\s*", 2 - if ($keyval[0] -and $keyval[1]) { - $val = $keyval[1] - - # Remove extraneous quotations around a string value. - if ("'""".Contains($val.Substring(0, 1))) { - $val = $val.Substring(1, $val.Length - 2) - } - - $pyvenvConfig[$keyval[0]] = $val - Write-Verbose "Adding Key: '$($keyval[0])'='$val'" - } - } - } - return $pyvenvConfig -} - - -<# Begin Activate script --------------------------------------------------- #> - -# Determine the containing directory of this script -$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition -$VenvExecDir = Get-Item -Path $VenvExecPath - -Write-Verbose "Activation script is located in path: '$VenvExecPath'" -Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)" -Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)" - -# Set values required in priority: CmdLine, ConfigFile, Default -# First, get the location of the virtual environment, it might not be -# VenvExecDir if specified on the command line. -if ($VenvDir) { - Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values" -} -else { - Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir." - $VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/") - Write-Verbose "VenvDir=$VenvDir" -} - -# Next, read the `pyvenv.cfg` file to determine any required value such -# as `prompt`. -$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir - -# Next, set the prompt from the command line, or the config file, or -# just use the name of the virtual environment folder. -if ($Prompt) { - Write-Verbose "Prompt specified as argument, using '$Prompt'" -} -else { - Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value" - if ($pyvenvCfg -and $pyvenvCfg['prompt']) { - Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'" - $Prompt = $pyvenvCfg['prompt']; - } - else { - Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)" - Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'" - $Prompt = Split-Path -Path $venvDir -Leaf - } -} - -Write-Verbose "Prompt = '$Prompt'" -Write-Verbose "VenvDir='$VenvDir'" - -# Deactivate any currently active virtual environment, but leave the -# deactivate function in place. -deactivate -nondestructive - -# Now set the environment variable VIRTUAL_ENV, used by many tools to determine -# that there is an activated venv. -$env:VIRTUAL_ENV = $VenvDir - -if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) { - - Write-Verbose "Setting prompt to '$Prompt'" - - # Set the prompt to include the env name - # Make sure _OLD_VIRTUAL_PROMPT is global - function global:_OLD_VIRTUAL_PROMPT { "" } - Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT - New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt - - function global:prompt { - Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) " - _OLD_VIRTUAL_PROMPT - } - $env:VIRTUAL_ENV_PROMPT = $Prompt -} - -# Clear PYTHONHOME -if (Test-Path -Path Env:PYTHONHOME) { - Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME - Remove-Item -Path Env:PYTHONHOME -} - -# Add the venv to the PATH -Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH -$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH" diff --git a/env_new_emulator/bin/activate b/env_new_emulator/bin/activate deleted file mode 100644 index fda80c6..0000000 --- a/env_new_emulator/bin/activate +++ /dev/null @@ -1,69 +0,0 @@ -# This file must be used with "source bin/activate" *from bash* -# you cannot run it directly - -deactivate () { - # reset old environment variables - if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then - PATH="${_OLD_VIRTUAL_PATH:-}" - export PATH - unset _OLD_VIRTUAL_PATH - fi - if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then - PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}" - export PYTHONHOME - unset _OLD_VIRTUAL_PYTHONHOME - fi - - # This should detect bash and zsh, which have a hash command that must - # be called to get it to forget past commands. Without forgetting - # past commands the $PATH changes we made may not be respected - if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then - hash -r 2> /dev/null - fi - - if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then - PS1="${_OLD_VIRTUAL_PS1:-}" - export PS1 - unset _OLD_VIRTUAL_PS1 - fi - - unset VIRTUAL_ENV - unset VIRTUAL_ENV_PROMPT - if [ ! "${1:-}" = "nondestructive" ] ; then - # Self destruct! - unset -f deactivate - fi -} - -# unset irrelevant variables -deactivate nondestructive - -VIRTUAL_ENV="/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator" -export VIRTUAL_ENV - -_OLD_VIRTUAL_PATH="$PATH" -PATH="$VIRTUAL_ENV/bin:$PATH" -export PATH - -# unset PYTHONHOME if set -# this will fail if PYTHONHOME is set to the empty string (which is bad anyway) -# could use `if (set -u; : $PYTHONHOME) ;` in bash -if [ -n "${PYTHONHOME:-}" ] ; then - _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}" - unset PYTHONHOME -fi - -if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then - _OLD_VIRTUAL_PS1="${PS1:-}" - PS1="(env_new_emulator) ${PS1:-}" - export PS1 - VIRTUAL_ENV_PROMPT="(env_new_emulator) " - export VIRTUAL_ENV_PROMPT -fi - -# This should detect bash and zsh, which have a hash command that must -# be called to get it to forget past commands. Without forgetting -# past commands the $PATH changes we made may not be respected -if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then - hash -r 2> /dev/null -fi diff --git a/env_new_emulator/bin/activate.csh b/env_new_emulator/bin/activate.csh deleted file mode 100644 index 3a23ef4..0000000 --- a/env_new_emulator/bin/activate.csh +++ /dev/null @@ -1,26 +0,0 @@ -# This file must be used with "source bin/activate.csh" *from csh*. -# You cannot run it directly. -# Created by Davide Di Blasi . -# Ported to Python 3.3 venv by Andrew Svetlov - -alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate' - -# Unset irrelevant variables. -deactivate nondestructive - -setenv VIRTUAL_ENV "/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator" - -set _OLD_VIRTUAL_PATH="$PATH" -setenv PATH "$VIRTUAL_ENV/bin:$PATH" - - -set _OLD_VIRTUAL_PROMPT="$prompt" - -if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then - set prompt = "(env_new_emulator) $prompt" - setenv VIRTUAL_ENV_PROMPT "(env_new_emulator) " -endif - -alias pydoc python -m pydoc - -rehash diff --git a/env_new_emulator/bin/activate.fish b/env_new_emulator/bin/activate.fish deleted file mode 100644 index 7fc07c0..0000000 --- a/env_new_emulator/bin/activate.fish +++ /dev/null @@ -1,69 +0,0 @@ -# This file must be used with "source /bin/activate.fish" *from fish* -# (https://fishshell.com/); you cannot run it directly. - -function deactivate -d "Exit virtual environment and return to normal shell environment" - # reset old environment variables - if test -n "$_OLD_VIRTUAL_PATH" - set -gx PATH $_OLD_VIRTUAL_PATH - set -e _OLD_VIRTUAL_PATH - end - if test -n "$_OLD_VIRTUAL_PYTHONHOME" - set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME - set -e _OLD_VIRTUAL_PYTHONHOME - end - - if test -n "$_OLD_FISH_PROMPT_OVERRIDE" - set -e _OLD_FISH_PROMPT_OVERRIDE - # prevents error when using nested fish instances (Issue #93858) - if functions -q _old_fish_prompt - functions -e fish_prompt - functions -c _old_fish_prompt fish_prompt - functions -e _old_fish_prompt - end - end - - set -e VIRTUAL_ENV - set -e VIRTUAL_ENV_PROMPT - if test "$argv[1]" != "nondestructive" - # Self-destruct! - functions -e deactivate - end -end - -# Unset irrelevant variables. -deactivate nondestructive - -set -gx VIRTUAL_ENV "/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator" - -set -gx _OLD_VIRTUAL_PATH $PATH -set -gx PATH "$VIRTUAL_ENV/bin" $PATH - -# Unset PYTHONHOME if set. -if set -q PYTHONHOME - set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME - set -e PYTHONHOME -end - -if test -z "$VIRTUAL_ENV_DISABLE_PROMPT" - # fish uses a function instead of an env var to generate the prompt. - - # Save the current fish_prompt function as the function _old_fish_prompt. - functions -c fish_prompt _old_fish_prompt - - # With the original prompt function renamed, we can override with our own. - function fish_prompt - # Save the return status of the last command. - set -l old_status $status - - # Output the venv prompt; color taken from the blue of the Python logo. - printf "%s%s%s" (set_color 4B8BBE) "(env_new_emulator) " (set_color normal) - - # Restore the return status of the previous command. - echo "exit $old_status" | . - # Output the original/"old" prompt. - _old_fish_prompt - end - - set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV" - set -gx VIRTUAL_ENV_PROMPT "(env_new_emulator) " -end diff --git a/env_new_emulator/bin/carbonboard b/env_new_emulator/bin/carbonboard deleted file mode 100755 index 0a7859e..0000000 --- a/env_new_emulator/bin/carbonboard +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from codecarbon.viz.carbonboard import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_new_emulator/bin/codecarbon b/env_new_emulator/bin/codecarbon deleted file mode 100755 index ff8d1fc..0000000 --- a/env_new_emulator/bin/codecarbon +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from codecarbon.cli.main import codecarbon -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(codecarbon()) diff --git a/env_new_emulator/bin/convert-caffe2-to-onnx b/env_new_emulator/bin/convert-caffe2-to-onnx deleted file mode 100755 index 3f0a611..0000000 --- a/env_new_emulator/bin/convert-caffe2-to-onnx +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from caffe2.python.onnx.bin.conversion import caffe2_to_onnx -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(caffe2_to_onnx()) diff --git a/env_new_emulator/bin/convert-onnx-to-caffe2 b/env_new_emulator/bin/convert-onnx-to-caffe2 deleted file mode 100755 index c44873f..0000000 --- a/env_new_emulator/bin/convert-onnx-to-caffe2 +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from caffe2.python.onnx.bin.conversion import onnx_to_caffe2 -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(onnx_to_caffe2()) diff --git a/env_new_emulator/bin/cpuinfo b/env_new_emulator/bin/cpuinfo deleted file mode 100755 index 26b8f46..0000000 --- a/env_new_emulator/bin/cpuinfo +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from cpuinfo import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_new_emulator/bin/dask b/env_new_emulator/bin/dask deleted file mode 100755 index 68012c6..0000000 --- a/env_new_emulator/bin/dask +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from dask.__main__ import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_new_emulator/bin/f2py b/env_new_emulator/bin/f2py deleted file mode 100755 index 06a0314..0000000 --- a/env_new_emulator/bin/f2py +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from numpy.f2py.f2py2e import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_new_emulator/bin/huggingface-cli b/env_new_emulator/bin/huggingface-cli deleted file mode 100755 index 7c3dd41..0000000 --- a/env_new_emulator/bin/huggingface-cli +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from huggingface_hub.commands.huggingface_cli import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_new_emulator/bin/isympy b/env_new_emulator/bin/isympy deleted file mode 100755 index ffb8bd1..0000000 --- a/env_new_emulator/bin/isympy +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from isympy import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_new_emulator/bin/markdown_py b/env_new_emulator/bin/markdown_py deleted file mode 100755 index 878cb80..0000000 --- a/env_new_emulator/bin/markdown_py +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from markdown.__main__ import run -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(run()) diff --git a/env_new_emulator/bin/nc3tonc4 b/env_new_emulator/bin/nc3tonc4 deleted file mode 100755 index d6d9a58..0000000 --- a/env_new_emulator/bin/nc3tonc4 +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from netCDF4.utils import nc3tonc4 -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(nc3tonc4()) diff --git a/env_new_emulator/bin/nc4tonc3 b/env_new_emulator/bin/nc4tonc3 deleted file mode 100755 index 6fb2c9b..0000000 --- a/env_new_emulator/bin/nc4tonc3 +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from netCDF4.utils import nc4tonc3 -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(nc4tonc3()) diff --git a/env_new_emulator/bin/ncinfo b/env_new_emulator/bin/ncinfo deleted file mode 100755 index 92049ca..0000000 --- a/env_new_emulator/bin/ncinfo +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from netCDF4.utils import ncinfo -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(ncinfo()) diff --git a/env_new_emulator/bin/normalizer b/env_new_emulator/bin/normalizer deleted file mode 100755 index 0ca906c..0000000 --- a/env_new_emulator/bin/normalizer +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from charset_normalizer.cli import cli_detect -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(cli_detect()) diff --git a/env_new_emulator/bin/pip b/env_new_emulator/bin/pip deleted file mode 100755 index 2b8a772..0000000 --- a/env_new_emulator/bin/pip +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from pip._internal.cli.main import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_new_emulator/bin/pip3 b/env_new_emulator/bin/pip3 deleted file mode 100755 index 2b8a772..0000000 --- a/env_new_emulator/bin/pip3 +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from pip._internal.cli.main import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_new_emulator/bin/pip3.10 b/env_new_emulator/bin/pip3.10 deleted file mode 100755 index 2b8a772..0000000 --- a/env_new_emulator/bin/pip3.10 +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from pip._internal.cli.main import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_new_emulator/bin/pygrun b/env_new_emulator/bin/pygrun deleted file mode 100755 index fcff691..0000000 --- a/env_new_emulator/bin/pygrun +++ /dev/null @@ -1,164 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -__author__ = 'jszheng' -import optparse -import sys -import os -import importlib -from antlr4 import * - - -# this is a python version of TestRig -def beautify_lisp_string(in_string): - indent_size = 3 - add_indent = ' '*indent_size - out_string = in_string[0] # no indent for 1st ( - indent = '' - for i in range(1, len(in_string)): - if in_string[i] == '(' and in_string[i+1] != ' ': - indent += add_indent - out_string += "\n" + indent + '(' - elif in_string[i] == ')': - out_string += ')' - if len(indent) > 0: - indent = indent.replace(add_indent, '', 1) - else: - out_string += in_string[i] - return out_string - - -if __name__ == '__main__': - - ############################################################# - # parse options - # not support -gui -encoding -ps - ############################################################# - usage = "Usage: %prog [options] Grammar_Name Start_Rule" - parser = optparse.OptionParser(usage=usage) - # parser.add_option('-t', '--tree', - # dest="out_file", - # default="default.out", - # help='set output file name', - # ) - parser.add_option('-t', '--tree', - default=False, - action='store_true', - help='Print AST tree' - ) - parser.add_option('-k', '--tokens', - dest="token", - default=False, - action='store_true', - help='Show Tokens' - ) - parser.add_option('-s', '--sll', - dest="sll", - default=False, - action='store_true', - help='Show SLL' - ) - parser.add_option('-d', '--diagnostics', - dest="diagnostics", - default=False, - action='store_true', - help='Enable diagnostics error listener' - ) - parser.add_option('-a', '--trace', - dest="trace", - default=False, - action='store_true', - help='Enable Trace' - ) - - options, remainder = parser.parse_args() - if len(remainder) < 2: - print('ERROR: You have to provide at least 2 arguments!') - parser.print_help() - exit(1) - else: - grammar = remainder.pop(0) - start_rule = remainder.pop(0) - file_list = remainder - - ############################################################# - # check and load antlr generated files - ############################################################# - # dynamic load the module and class - lexerName = grammar + 'Lexer' - parserName = grammar + 'Parser' - # check if the generate file exist - lexer_file = lexerName + '.py' - parser_file = parserName + '.py' - if not os.path.exists(lexer_file): - print("[ERROR] Can't find lexer file {}!".format(lexer_file)) - print(os.path.realpath('.')) - exit(1) - if not os.path.exists(parser_file): - print("[ERROR] Can't find parser file {}!".format(lexer_file)) - print(os.path.realpath('.')) - exit(1) - - # current directory is where the generated file loaded - # the script might be in different place. - sys.path.append('.') - # print(sys.path) - - # print("Load Lexer {}".format(lexerName)) - module_lexer = __import__(lexerName, globals(), locals(), lexerName) - class_lexer = getattr(module_lexer, lexerName) - # print(class_lexer) - - # print("Load Parser {}".format(parserName)) - module_parser = __import__(parserName, globals(), locals(), parserName) - class_parser = getattr(module_parser, parserName) - # print(class_parser) - - ############################################################# - # main process steps. - ############################################################# - def process(input_stream, class_lexer, class_parser): - lexer = class_lexer(input_stream) - token_stream = CommonTokenStream(lexer) - token_stream.fill() - if options.token: # need to show token - for tok in token_stream.tokens: - print(tok) - if start_rule == 'tokens': - return - - parser = class_parser(token_stream) - - if options.diagnostics: - parser.addErrorListener(DiagnosticErrorListener()) - parser._interp.predictionMode = PredictionMode.LL_EXACT_AMBIG_DETECTION - if options.tree: - parser.buildParseTrees = True - if options.sll: - parser._interp.predictionMode = PredictionMode.SLL - #parser.setTokenStream(token_stream) - parser.setTrace(options.trace) - if hasattr(parser, start_rule): - func_start_rule = getattr(parser, start_rule) - parser_ret = func_start_rule() - if options.tree: - lisp_tree_str = parser_ret.toStringTree(recog=parser) - print(beautify_lisp_string(lisp_tree_str)) - else: - print("[ERROR] Can't find start rule '{}' in parser '{}'".format(start_rule, parserName)) - - ############################################################# - # use stdin if not provide file as input stream - ############################################################# - if len(file_list) == 0: - input_stream = InputStream(sys.stdin.read()) - process(input_stream, class_lexer, class_parser) - exit(0) - - ############################################################# - # iterate all input file - ############################################################# - for file_name in file_list: - if os.path.exists(file_name) and os.path.isfile(file_name): - input_stream = FileStream(file_name) - process(input_stream, class_lexer, class_parser) - else: - print("[ERROR] file {} not exist".format(os.path.normpath(file_name))) diff --git a/env_new_emulator/bin/python b/env_new_emulator/bin/python deleted file mode 120000 index 075b65e..0000000 --- a/env_new_emulator/bin/python +++ /dev/null @@ -1 +0,0 @@ -/cvmfs/ai.mila.quebec/apps/arch/distro/python/3.10/bin/python \ No newline at end of file diff --git a/env_new_emulator/bin/python3 b/env_new_emulator/bin/python3 deleted file mode 120000 index d8654aa..0000000 --- a/env_new_emulator/bin/python3 +++ /dev/null @@ -1 +0,0 @@ -python \ No newline at end of file diff --git a/env_new_emulator/bin/python3.10 b/env_new_emulator/bin/python3.10 deleted file mode 120000 index d8654aa..0000000 --- a/env_new_emulator/bin/python3.10 +++ /dev/null @@ -1 +0,0 @@ -python \ No newline at end of file diff --git a/env_new_emulator/bin/tensorboard b/env_new_emulator/bin/tensorboard deleted file mode 100755 index 963d1af..0000000 --- a/env_new_emulator/bin/tensorboard +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from tensorboard.main import run_main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(run_main()) diff --git a/env_new_emulator/bin/torchrun b/env_new_emulator/bin/torchrun deleted file mode 100755 index 31a7fec..0000000 --- a/env_new_emulator/bin/torchrun +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from torch.distributed.run import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_new_emulator/bin/tqdm b/env_new_emulator/bin/tqdm deleted file mode 100755 index eb4bc53..0000000 --- a/env_new_emulator/bin/tqdm +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from tqdm.cli import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_new_emulator/bin/wandb b/env_new_emulator/bin/wandb deleted file mode 100755 index f218caf..0000000 --- a/env_new_emulator/bin/wandb +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from wandb.cli.cli import cli -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(cli()) diff --git a/env_new_emulator/bin/wb b/env_new_emulator/bin/wb deleted file mode 100755 index f218caf..0000000 --- a/env_new_emulator/bin/wb +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from wandb.cli.cli import cli -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(cli()) diff --git a/env_new_emulator/lib64 b/env_new_emulator/lib64 deleted file mode 120000 index 7951405..0000000 --- a/env_new_emulator/lib64 +++ /dev/null @@ -1 +0,0 @@ -lib \ No newline at end of file diff --git a/env_new_emulator/pyvenv.cfg b/env_new_emulator/pyvenv.cfg deleted file mode 100644 index 14f2b3e..0000000 --- a/env_new_emulator/pyvenv.cfg +++ /dev/null @@ -1,3 +0,0 @@ -home = /home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin -include-system-site-packages = false -version = 3.10.11 diff --git a/env_new_emulator/share/man/man1/isympy.1 b/env_new_emulator/share/man/man1/isympy.1 deleted file mode 100644 index 0ff9661..0000000 --- a/env_new_emulator/share/man/man1/isympy.1 +++ /dev/null @@ -1,188 +0,0 @@ -'\" -*- coding: us-ascii -*- -.if \n(.g .ds T< \\FC -.if \n(.g .ds T> \\F[\n[.fam]] -.de URL -\\$2 \(la\\$1\(ra\\$3 -.. -.if \n(.g .mso www.tmac -.TH isympy 1 2007-10-8 "" "" -.SH NAME -isympy \- interactive shell for SymPy -.SH SYNOPSIS -'nh -.fi -.ad l -\fBisympy\fR \kx -.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) -'in \n(.iu+\nxu -[\fB-c\fR | \fB--console\fR] [\fB-p\fR ENCODING | \fB--pretty\fR ENCODING] [\fB-t\fR TYPE | \fB--types\fR TYPE] [\fB-o\fR ORDER | \fB--order\fR ORDER] [\fB-q\fR | \fB--quiet\fR] [\fB-d\fR | \fB--doctest\fR] [\fB-C\fR | \fB--no-cache\fR] [\fB-a\fR | \fB--auto\fR] [\fB-D\fR | \fB--debug\fR] [ --- | PYTHONOPTIONS] -'in \n(.iu-\nxu -.ad b -'hy -'nh -.fi -.ad l -\fBisympy\fR \kx -.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) -'in \n(.iu+\nxu -[ -{\fB-h\fR | \fB--help\fR} -| -{\fB-v\fR | \fB--version\fR} -] -'in \n(.iu-\nxu -.ad b -'hy -.SH DESCRIPTION -isympy is a Python shell for SymPy. It is just a normal python shell -(ipython shell if you have the ipython package installed) that executes -the following commands so that you don't have to: -.PP -.nf -\*(T< ->>> from __future__ import division ->>> from sympy import * ->>> x, y, z = symbols("x,y,z") ->>> k, m, n = symbols("k,m,n", integer=True) - \*(T> -.fi -.PP -So starting isympy is equivalent to starting python (or ipython) and -executing the above commands by hand. It is intended for easy and quick -experimentation with SymPy. For more complicated programs, it is recommended -to write a script and import things explicitly (using the "from sympy -import sin, log, Symbol, ..." idiom). -.SH OPTIONS -.TP -\*(T<\fB\-c \fR\*(T>\fISHELL\fR, \*(T<\fB\-\-console=\fR\*(T>\fISHELL\fR -Use the specified shell (python or ipython) as -console backend instead of the default one (ipython -if present or python otherwise). - -Example: isympy -c python - -\fISHELL\fR could be either -\&'ipython' or 'python' -.TP -\*(T<\fB\-p \fR\*(T>\fIENCODING\fR, \*(T<\fB\-\-pretty=\fR\*(T>\fIENCODING\fR -Setup pretty printing in SymPy. By default, the most pretty, unicode -printing is enabled (if the terminal supports it). You can use less -pretty ASCII printing instead or no pretty printing at all. - -Example: isympy -p no - -\fIENCODING\fR must be one of 'unicode', -\&'ascii' or 'no'. -.TP -\*(T<\fB\-t \fR\*(T>\fITYPE\fR, \*(T<\fB\-\-types=\fR\*(T>\fITYPE\fR -Setup the ground types for the polys. By default, gmpy ground types -are used if gmpy2 or gmpy is installed, otherwise it falls back to python -ground types, which are a little bit slower. You can manually -choose python ground types even if gmpy is installed (e.g., for testing purposes). - -Note that sympy ground types are not supported, and should be used -only for experimental purposes. - -Note that the gmpy1 ground type is primarily intended for testing; it the -use of gmpy even if gmpy2 is available. - -This is the same as setting the environment variable -SYMPY_GROUND_TYPES to the given ground type (e.g., -SYMPY_GROUND_TYPES='gmpy') - -The ground types can be determined interactively from the variable -sympy.polys.domains.GROUND_TYPES inside the isympy shell itself. - -Example: isympy -t python - -\fITYPE\fR must be one of 'gmpy', -\&'gmpy1' or 'python'. -.TP -\*(T<\fB\-o \fR\*(T>\fIORDER\fR, \*(T<\fB\-\-order=\fR\*(T>\fIORDER\fR -Setup the ordering of terms for printing. The default is lex, which -orders terms lexicographically (e.g., x**2 + x + 1). You can choose -other orderings, such as rev-lex, which will use reverse -lexicographic ordering (e.g., 1 + x + x**2). - -Note that for very large expressions, ORDER='none' may speed up -printing considerably, with the tradeoff that the order of the terms -in the printed expression will have no canonical order - -Example: isympy -o rev-lax - -\fIORDER\fR must be one of 'lex', 'rev-lex', 'grlex', -\&'rev-grlex', 'grevlex', 'rev-grevlex', 'old', or 'none'. -.TP -\*(T<\fB\-q\fR\*(T>, \*(T<\fB\-\-quiet\fR\*(T> -Print only Python's and SymPy's versions to stdout at startup, and nothing else. -.TP -\*(T<\fB\-d\fR\*(T>, \*(T<\fB\-\-doctest\fR\*(T> -Use the same format that should be used for doctests. This is -equivalent to '\fIisympy -c python -p no\fR'. -.TP -\*(T<\fB\-C\fR\*(T>, \*(T<\fB\-\-no\-cache\fR\*(T> -Disable the caching mechanism. Disabling the cache may slow certain -operations down considerably. This is useful for testing the cache, -or for benchmarking, as the cache can result in deceptive benchmark timings. - -This is the same as setting the environment variable SYMPY_USE_CACHE -to 'no'. -.TP -\*(T<\fB\-a\fR\*(T>, \*(T<\fB\-\-auto\fR\*(T> -Automatically create missing symbols. Normally, typing a name of a -Symbol that has not been instantiated first would raise NameError, -but with this option enabled, any undefined name will be -automatically created as a Symbol. This only works in IPython 0.11. - -Note that this is intended only for interactive, calculator style -usage. In a script that uses SymPy, Symbols should be instantiated -at the top, so that it's clear what they are. - -This will not override any names that are already defined, which -includes the single character letters represented by the mnemonic -QCOSINE (see the "Gotchas and Pitfalls" document in the -documentation). You can delete existing names by executing "del -name" in the shell itself. You can see if a name is defined by typing -"'name' in globals()". - -The Symbols that are created using this have default assumptions. -If you want to place assumptions on symbols, you should create them -using symbols() or var(). - -Finally, this only works in the top level namespace. So, for -example, if you define a function in isympy with an undefined -Symbol, it will not work. -.TP -\*(T<\fB\-D\fR\*(T>, \*(T<\fB\-\-debug\fR\*(T> -Enable debugging output. This is the same as setting the -environment variable SYMPY_DEBUG to 'True'. The debug status is set -in the variable SYMPY_DEBUG within isympy. -.TP --- \fIPYTHONOPTIONS\fR -These options will be passed on to \fIipython (1)\fR shell. -Only supported when ipython is being used (standard python shell not supported). - -Two dashes (--) are required to separate \fIPYTHONOPTIONS\fR -from the other isympy options. - -For example, to run iSymPy without startup banner and colors: - -isympy -q -c ipython -- --colors=NoColor -.TP -\*(T<\fB\-h\fR\*(T>, \*(T<\fB\-\-help\fR\*(T> -Print help output and exit. -.TP -\*(T<\fB\-v\fR\*(T>, \*(T<\fB\-\-version\fR\*(T> -Print isympy version information and exit. -.SH FILES -.TP -\*(T<\fI${HOME}/.sympy\-history\fR\*(T> -Saves the history of commands when using the python -shell as backend. -.SH BUGS -The upstreams BTS can be found at \(lahttps://github.com/sympy/sympy/issues\(ra -Please report all bugs that you find in there, this will help improve -the overall quality of SymPy. -.SH "SEE ALSO" -\fBipython\fR(1), \fBpython\fR(1) diff --git a/env_old_emulator/bin/Activate.ps1 b/env_old_emulator/bin/Activate.ps1 deleted file mode 100644 index b49d77b..0000000 --- a/env_old_emulator/bin/Activate.ps1 +++ /dev/null @@ -1,247 +0,0 @@ -<# -.Synopsis -Activate a Python virtual environment for the current PowerShell session. - -.Description -Pushes the python executable for a virtual environment to the front of the -$Env:PATH environment variable and sets the prompt to signify that you are -in a Python virtual environment. Makes use of the command line switches as -well as the `pyvenv.cfg` file values present in the virtual environment. - -.Parameter VenvDir -Path to the directory that contains the virtual environment to activate. The -default value for this is the parent of the directory that the Activate.ps1 -script is located within. - -.Parameter Prompt -The prompt prefix to display when this virtual environment is activated. By -default, this prompt is the name of the virtual environment folder (VenvDir) -surrounded by parentheses and followed by a single space (ie. '(.venv) '). - -.Example -Activate.ps1 -Activates the Python virtual environment that contains the Activate.ps1 script. - -.Example -Activate.ps1 -Verbose -Activates the Python virtual environment that contains the Activate.ps1 script, -and shows extra information about the activation as it executes. - -.Example -Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv -Activates the Python virtual environment located in the specified location. - -.Example -Activate.ps1 -Prompt "MyPython" -Activates the Python virtual environment that contains the Activate.ps1 script, -and prefixes the current prompt with the specified string (surrounded in -parentheses) while the virtual environment is active. - -.Notes -On Windows, it may be required to enable this Activate.ps1 script by setting the -execution policy for the user. You can do this by issuing the following PowerShell -command: - -PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser - -For more information on Execution Policies: -https://go.microsoft.com/fwlink/?LinkID=135170 - -#> -Param( - [Parameter(Mandatory = $false)] - [String] - $VenvDir, - [Parameter(Mandatory = $false)] - [String] - $Prompt -) - -<# Function declarations --------------------------------------------------- #> - -<# -.Synopsis -Remove all shell session elements added by the Activate script, including the -addition of the virtual environment's Python executable from the beginning of -the PATH variable. - -.Parameter NonDestructive -If present, do not remove this function from the global namespace for the -session. - -#> -function global:deactivate ([switch]$NonDestructive) { - # Revert to original values - - # The prior prompt: - if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) { - Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt - Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT - } - - # The prior PYTHONHOME: - if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) { - Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME - Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME - } - - # The prior PATH: - if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) { - Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH - Remove-Item -Path Env:_OLD_VIRTUAL_PATH - } - - # Just remove the VIRTUAL_ENV altogether: - if (Test-Path -Path Env:VIRTUAL_ENV) { - Remove-Item -Path env:VIRTUAL_ENV - } - - # Just remove VIRTUAL_ENV_PROMPT altogether. - if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) { - Remove-Item -Path env:VIRTUAL_ENV_PROMPT - } - - # Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether: - if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) { - Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force - } - - # Leave deactivate function in the global namespace if requested: - if (-not $NonDestructive) { - Remove-Item -Path function:deactivate - } -} - -<# -.Description -Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the -given folder, and returns them in a map. - -For each line in the pyvenv.cfg file, if that line can be parsed into exactly -two strings separated by `=` (with any amount of whitespace surrounding the =) -then it is considered a `key = value` line. The left hand string is the key, -the right hand is the value. - -If the value starts with a `'` or a `"` then the first and last character is -stripped from the value before being captured. - -.Parameter ConfigDir -Path to the directory that contains the `pyvenv.cfg` file. -#> -function Get-PyVenvConfig( - [String] - $ConfigDir -) { - Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg" - - # Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue). - $pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue - - # An empty map will be returned if no config file is found. - $pyvenvConfig = @{ } - - if ($pyvenvConfigPath) { - - Write-Verbose "File exists, parse `key = value` lines" - $pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath - - $pyvenvConfigContent | ForEach-Object { - $keyval = $PSItem -split "\s*=\s*", 2 - if ($keyval[0] -and $keyval[1]) { - $val = $keyval[1] - - # Remove extraneous quotations around a string value. - if ("'""".Contains($val.Substring(0, 1))) { - $val = $val.Substring(1, $val.Length - 2) - } - - $pyvenvConfig[$keyval[0]] = $val - Write-Verbose "Adding Key: '$($keyval[0])'='$val'" - } - } - } - return $pyvenvConfig -} - - -<# Begin Activate script --------------------------------------------------- #> - -# Determine the containing directory of this script -$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition -$VenvExecDir = Get-Item -Path $VenvExecPath - -Write-Verbose "Activation script is located in path: '$VenvExecPath'" -Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)" -Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)" - -# Set values required in priority: CmdLine, ConfigFile, Default -# First, get the location of the virtual environment, it might not be -# VenvExecDir if specified on the command line. -if ($VenvDir) { - Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values" -} -else { - Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir." - $VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/") - Write-Verbose "VenvDir=$VenvDir" -} - -# Next, read the `pyvenv.cfg` file to determine any required value such -# as `prompt`. -$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir - -# Next, set the prompt from the command line, or the config file, or -# just use the name of the virtual environment folder. -if ($Prompt) { - Write-Verbose "Prompt specified as argument, using '$Prompt'" -} -else { - Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value" - if ($pyvenvCfg -and $pyvenvCfg['prompt']) { - Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'" - $Prompt = $pyvenvCfg['prompt']; - } - else { - Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)" - Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'" - $Prompt = Split-Path -Path $venvDir -Leaf - } -} - -Write-Verbose "Prompt = '$Prompt'" -Write-Verbose "VenvDir='$VenvDir'" - -# Deactivate any currently active virtual environment, but leave the -# deactivate function in place. -deactivate -nondestructive - -# Now set the environment variable VIRTUAL_ENV, used by many tools to determine -# that there is an activated venv. -$env:VIRTUAL_ENV = $VenvDir - -if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) { - - Write-Verbose "Setting prompt to '$Prompt'" - - # Set the prompt to include the env name - # Make sure _OLD_VIRTUAL_PROMPT is global - function global:_OLD_VIRTUAL_PROMPT { "" } - Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT - New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt - - function global:prompt { - Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) " - _OLD_VIRTUAL_PROMPT - } - $env:VIRTUAL_ENV_PROMPT = $Prompt -} - -# Clear PYTHONHOME -if (Test-Path -Path Env:PYTHONHOME) { - Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME - Remove-Item -Path Env:PYTHONHOME -} - -# Add the venv to the PATH -Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH -$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH" diff --git a/env_old_emulator/bin/activate b/env_old_emulator/bin/activate deleted file mode 100644 index 88c1d74..0000000 --- a/env_old_emulator/bin/activate +++ /dev/null @@ -1,69 +0,0 @@ -# This file must be used with "source bin/activate" *from bash* -# you cannot run it directly - -deactivate () { - # reset old environment variables - if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then - PATH="${_OLD_VIRTUAL_PATH:-}" - export PATH - unset _OLD_VIRTUAL_PATH - fi - if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then - PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}" - export PYTHONHOME - unset _OLD_VIRTUAL_PYTHONHOME - fi - - # This should detect bash and zsh, which have a hash command that must - # be called to get it to forget past commands. Without forgetting - # past commands the $PATH changes we made may not be respected - if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then - hash -r 2> /dev/null - fi - - if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then - PS1="${_OLD_VIRTUAL_PS1:-}" - export PS1 - unset _OLD_VIRTUAL_PS1 - fi - - unset VIRTUAL_ENV - unset VIRTUAL_ENV_PROMPT - if [ ! "${1:-}" = "nondestructive" ] ; then - # Self destruct! - unset -f deactivate - fi -} - -# unset irrelevant variables -deactivate nondestructive - -VIRTUAL_ENV="/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator" -export VIRTUAL_ENV - -_OLD_VIRTUAL_PATH="$PATH" -PATH="$VIRTUAL_ENV/bin:$PATH" -export PATH - -# unset PYTHONHOME if set -# this will fail if PYTHONHOME is set to the empty string (which is bad anyway) -# could use `if (set -u; : $PYTHONHOME) ;` in bash -if [ -n "${PYTHONHOME:-}" ] ; then - _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}" - unset PYTHONHOME -fi - -if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then - _OLD_VIRTUAL_PS1="${PS1:-}" - PS1="(env_old_emulator) ${PS1:-}" - export PS1 - VIRTUAL_ENV_PROMPT="(env_old_emulator) " - export VIRTUAL_ENV_PROMPT -fi - -# This should detect bash and zsh, which have a hash command that must -# be called to get it to forget past commands. Without forgetting -# past commands the $PATH changes we made may not be respected -if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then - hash -r 2> /dev/null -fi diff --git a/env_old_emulator/bin/activate.csh b/env_old_emulator/bin/activate.csh deleted file mode 100644 index 836e5a4..0000000 --- a/env_old_emulator/bin/activate.csh +++ /dev/null @@ -1,26 +0,0 @@ -# This file must be used with "source bin/activate.csh" *from csh*. -# You cannot run it directly. -# Created by Davide Di Blasi . -# Ported to Python 3.3 venv by Andrew Svetlov - -alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate' - -# Unset irrelevant variables. -deactivate nondestructive - -setenv VIRTUAL_ENV "/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator" - -set _OLD_VIRTUAL_PATH="$PATH" -setenv PATH "$VIRTUAL_ENV/bin:$PATH" - - -set _OLD_VIRTUAL_PROMPT="$prompt" - -if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then - set prompt = "(env_old_emulator) $prompt" - setenv VIRTUAL_ENV_PROMPT "(env_old_emulator) " -endif - -alias pydoc python -m pydoc - -rehash diff --git a/env_old_emulator/bin/activate.fish b/env_old_emulator/bin/activate.fish deleted file mode 100644 index 0f5be4e..0000000 --- a/env_old_emulator/bin/activate.fish +++ /dev/null @@ -1,69 +0,0 @@ -# This file must be used with "source /bin/activate.fish" *from fish* -# (https://fishshell.com/); you cannot run it directly. - -function deactivate -d "Exit virtual environment and return to normal shell environment" - # reset old environment variables - if test -n "$_OLD_VIRTUAL_PATH" - set -gx PATH $_OLD_VIRTUAL_PATH - set -e _OLD_VIRTUAL_PATH - end - if test -n "$_OLD_VIRTUAL_PYTHONHOME" - set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME - set -e _OLD_VIRTUAL_PYTHONHOME - end - - if test -n "$_OLD_FISH_PROMPT_OVERRIDE" - set -e _OLD_FISH_PROMPT_OVERRIDE - # prevents error when using nested fish instances (Issue #93858) - if functions -q _old_fish_prompt - functions -e fish_prompt - functions -c _old_fish_prompt fish_prompt - functions -e _old_fish_prompt - end - end - - set -e VIRTUAL_ENV - set -e VIRTUAL_ENV_PROMPT - if test "$argv[1]" != "nondestructive" - # Self-destruct! - functions -e deactivate - end -end - -# Unset irrelevant variables. -deactivate nondestructive - -set -gx VIRTUAL_ENV "/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator" - -set -gx _OLD_VIRTUAL_PATH $PATH -set -gx PATH "$VIRTUAL_ENV/bin" $PATH - -# Unset PYTHONHOME if set. -if set -q PYTHONHOME - set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME - set -e PYTHONHOME -end - -if test -z "$VIRTUAL_ENV_DISABLE_PROMPT" - # fish uses a function instead of an env var to generate the prompt. - - # Save the current fish_prompt function as the function _old_fish_prompt. - functions -c fish_prompt _old_fish_prompt - - # With the original prompt function renamed, we can override with our own. - function fish_prompt - # Save the return status of the last command. - set -l old_status $status - - # Output the venv prompt; color taken from the blue of the Python logo. - printf "%s%s%s" (set_color 4B8BBE) "(env_old_emulator) " (set_color normal) - - # Restore the return status of the previous command. - echo "exit $old_status" | . - # Output the original/"old" prompt. - _old_fish_prompt - end - - set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV" - set -gx VIRTUAL_ENV_PROMPT "(env_old_emulator) " -end diff --git a/env_old_emulator/bin/carbonboard b/env_old_emulator/bin/carbonboard deleted file mode 100755 index 060510a..0000000 --- a/env_old_emulator/bin/carbonboard +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from codecarbon.viz.carbonboard import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_old_emulator/bin/codecarbon b/env_old_emulator/bin/codecarbon deleted file mode 100755 index 0103972..0000000 --- a/env_old_emulator/bin/codecarbon +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from codecarbon.cli.main import codecarbon -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(codecarbon()) diff --git a/env_old_emulator/bin/convert-caffe2-to-onnx b/env_old_emulator/bin/convert-caffe2-to-onnx deleted file mode 100755 index a3db2e5..0000000 --- a/env_old_emulator/bin/convert-caffe2-to-onnx +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from caffe2.python.onnx.bin.conversion import caffe2_to_onnx -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(caffe2_to_onnx()) diff --git a/env_old_emulator/bin/convert-onnx-to-caffe2 b/env_old_emulator/bin/convert-onnx-to-caffe2 deleted file mode 100755 index 48090e6..0000000 --- a/env_old_emulator/bin/convert-onnx-to-caffe2 +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from caffe2.python.onnx.bin.conversion import onnx_to_caffe2 -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(onnx_to_caffe2()) diff --git a/env_old_emulator/bin/cpuinfo b/env_old_emulator/bin/cpuinfo deleted file mode 100755 index dde1d58..0000000 --- a/env_old_emulator/bin/cpuinfo +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from cpuinfo import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_old_emulator/bin/dask b/env_old_emulator/bin/dask deleted file mode 100755 index da98ba6..0000000 --- a/env_old_emulator/bin/dask +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from dask.__main__ import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_old_emulator/bin/f2py b/env_old_emulator/bin/f2py deleted file mode 100755 index 3f22352..0000000 --- a/env_old_emulator/bin/f2py +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from numpy.f2py.f2py2e import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_old_emulator/bin/huggingface-cli b/env_old_emulator/bin/huggingface-cli deleted file mode 100755 index f9d9695..0000000 --- a/env_old_emulator/bin/huggingface-cli +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from huggingface_hub.commands.huggingface_cli import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_old_emulator/bin/isympy b/env_old_emulator/bin/isympy deleted file mode 100755 index fa40cd7..0000000 --- a/env_old_emulator/bin/isympy +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from isympy import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_old_emulator/bin/markdown_py b/env_old_emulator/bin/markdown_py deleted file mode 100755 index 5bd0244..0000000 --- a/env_old_emulator/bin/markdown_py +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from markdown.__main__ import run -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(run()) diff --git a/env_old_emulator/bin/nc3tonc4 b/env_old_emulator/bin/nc3tonc4 deleted file mode 100755 index 7571886..0000000 --- a/env_old_emulator/bin/nc3tonc4 +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from netCDF4.utils import nc3tonc4 -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(nc3tonc4()) diff --git a/env_old_emulator/bin/nc4tonc3 b/env_old_emulator/bin/nc4tonc3 deleted file mode 100755 index 31f3589..0000000 --- a/env_old_emulator/bin/nc4tonc3 +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from netCDF4.utils import nc4tonc3 -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(nc4tonc3()) diff --git a/env_old_emulator/bin/ncinfo b/env_old_emulator/bin/ncinfo deleted file mode 100755 index dbefb32..0000000 --- a/env_old_emulator/bin/ncinfo +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from netCDF4.utils import ncinfo -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(ncinfo()) diff --git a/env_old_emulator/bin/normalizer b/env_old_emulator/bin/normalizer deleted file mode 100755 index a4170ce..0000000 --- a/env_old_emulator/bin/normalizer +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from charset_normalizer.cli import cli_detect -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(cli_detect()) diff --git a/env_old_emulator/bin/pip b/env_old_emulator/bin/pip deleted file mode 100755 index d64b7f4..0000000 --- a/env_old_emulator/bin/pip +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from pip._internal.cli.main import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_old_emulator/bin/pip3 b/env_old_emulator/bin/pip3 deleted file mode 100755 index d64b7f4..0000000 --- a/env_old_emulator/bin/pip3 +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from pip._internal.cli.main import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_old_emulator/bin/pip3.10 b/env_old_emulator/bin/pip3.10 deleted file mode 100755 index d64b7f4..0000000 --- a/env_old_emulator/bin/pip3.10 +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from pip._internal.cli.main import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_old_emulator/bin/pygrun b/env_old_emulator/bin/pygrun deleted file mode 100755 index f443143..0000000 --- a/env_old_emulator/bin/pygrun +++ /dev/null @@ -1,164 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -__author__ = 'jszheng' -import optparse -import sys -import os -import importlib -from antlr4 import * - - -# this is a python version of TestRig -def beautify_lisp_string(in_string): - indent_size = 3 - add_indent = ' '*indent_size - out_string = in_string[0] # no indent for 1st ( - indent = '' - for i in range(1, len(in_string)): - if in_string[i] == '(' and in_string[i+1] != ' ': - indent += add_indent - out_string += "\n" + indent + '(' - elif in_string[i] == ')': - out_string += ')' - if len(indent) > 0: - indent = indent.replace(add_indent, '', 1) - else: - out_string += in_string[i] - return out_string - - -if __name__ == '__main__': - - ############################################################# - # parse options - # not support -gui -encoding -ps - ############################################################# - usage = "Usage: %prog [options] Grammar_Name Start_Rule" - parser = optparse.OptionParser(usage=usage) - # parser.add_option('-t', '--tree', - # dest="out_file", - # default="default.out", - # help='set output file name', - # ) - parser.add_option('-t', '--tree', - default=False, - action='store_true', - help='Print AST tree' - ) - parser.add_option('-k', '--tokens', - dest="token", - default=False, - action='store_true', - help='Show Tokens' - ) - parser.add_option('-s', '--sll', - dest="sll", - default=False, - action='store_true', - help='Show SLL' - ) - parser.add_option('-d', '--diagnostics', - dest="diagnostics", - default=False, - action='store_true', - help='Enable diagnostics error listener' - ) - parser.add_option('-a', '--trace', - dest="trace", - default=False, - action='store_true', - help='Enable Trace' - ) - - options, remainder = parser.parse_args() - if len(remainder) < 2: - print('ERROR: You have to provide at least 2 arguments!') - parser.print_help() - exit(1) - else: - grammar = remainder.pop(0) - start_rule = remainder.pop(0) - file_list = remainder - - ############################################################# - # check and load antlr generated files - ############################################################# - # dynamic load the module and class - lexerName = grammar + 'Lexer' - parserName = grammar + 'Parser' - # check if the generate file exist - lexer_file = lexerName + '.py' - parser_file = parserName + '.py' - if not os.path.exists(lexer_file): - print("[ERROR] Can't find lexer file {}!".format(lexer_file)) - print(os.path.realpath('.')) - exit(1) - if not os.path.exists(parser_file): - print("[ERROR] Can't find parser file {}!".format(lexer_file)) - print(os.path.realpath('.')) - exit(1) - - # current directory is where the generated file loaded - # the script might be in different place. - sys.path.append('.') - # print(sys.path) - - # print("Load Lexer {}".format(lexerName)) - module_lexer = __import__(lexerName, globals(), locals(), lexerName) - class_lexer = getattr(module_lexer, lexerName) - # print(class_lexer) - - # print("Load Parser {}".format(parserName)) - module_parser = __import__(parserName, globals(), locals(), parserName) - class_parser = getattr(module_parser, parserName) - # print(class_parser) - - ############################################################# - # main process steps. - ############################################################# - def process(input_stream, class_lexer, class_parser): - lexer = class_lexer(input_stream) - token_stream = CommonTokenStream(lexer) - token_stream.fill() - if options.token: # need to show token - for tok in token_stream.tokens: - print(tok) - if start_rule == 'tokens': - return - - parser = class_parser(token_stream) - - if options.diagnostics: - parser.addErrorListener(DiagnosticErrorListener()) - parser._interp.predictionMode = PredictionMode.LL_EXACT_AMBIG_DETECTION - if options.tree: - parser.buildParseTrees = True - if options.sll: - parser._interp.predictionMode = PredictionMode.SLL - #parser.setTokenStream(token_stream) - parser.setTrace(options.trace) - if hasattr(parser, start_rule): - func_start_rule = getattr(parser, start_rule) - parser_ret = func_start_rule() - if options.tree: - lisp_tree_str = parser_ret.toStringTree(recog=parser) - print(beautify_lisp_string(lisp_tree_str)) - else: - print("[ERROR] Can't find start rule '{}' in parser '{}'".format(start_rule, parserName)) - - ############################################################# - # use stdin if not provide file as input stream - ############################################################# - if len(file_list) == 0: - input_stream = InputStream(sys.stdin.read()) - process(input_stream, class_lexer, class_parser) - exit(0) - - ############################################################# - # iterate all input file - ############################################################# - for file_name in file_list: - if os.path.exists(file_name) and os.path.isfile(file_name): - input_stream = FileStream(file_name) - process(input_stream, class_lexer, class_parser) - else: - print("[ERROR] file {} not exist".format(os.path.normpath(file_name))) diff --git a/env_old_emulator/bin/python b/env_old_emulator/bin/python deleted file mode 120000 index 075b65e..0000000 --- a/env_old_emulator/bin/python +++ /dev/null @@ -1 +0,0 @@ -/cvmfs/ai.mila.quebec/apps/arch/distro/python/3.10/bin/python \ No newline at end of file diff --git a/env_old_emulator/bin/python3 b/env_old_emulator/bin/python3 deleted file mode 120000 index d8654aa..0000000 --- a/env_old_emulator/bin/python3 +++ /dev/null @@ -1 +0,0 @@ -python \ No newline at end of file diff --git a/env_old_emulator/bin/python3.10 b/env_old_emulator/bin/python3.10 deleted file mode 120000 index d8654aa..0000000 --- a/env_old_emulator/bin/python3.10 +++ /dev/null @@ -1 +0,0 @@ -python \ No newline at end of file diff --git a/env_old_emulator/bin/tensorboard b/env_old_emulator/bin/tensorboard deleted file mode 100755 index 4e11529..0000000 --- a/env_old_emulator/bin/tensorboard +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from tensorboard.main import run_main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(run_main()) diff --git a/env_old_emulator/bin/torchrun b/env_old_emulator/bin/torchrun deleted file mode 100755 index 4a41bfd..0000000 --- a/env_old_emulator/bin/torchrun +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from torch.distributed.run import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_old_emulator/bin/tqdm b/env_old_emulator/bin/tqdm deleted file mode 100755 index fe4f90d..0000000 --- a/env_old_emulator/bin/tqdm +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from tqdm.cli import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/env_old_emulator/bin/wandb b/env_old_emulator/bin/wandb deleted file mode 100755 index ccd0745..0000000 --- a/env_old_emulator/bin/wandb +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from wandb.cli.cli import cli -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(cli()) diff --git a/env_old_emulator/bin/wb b/env_old_emulator/bin/wb deleted file mode 100755 index ccd0745..0000000 --- a/env_old_emulator/bin/wb +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_old_emulator/bin/python -# -*- coding: utf-8 -*- -import re -import sys -from wandb.cli.cli import cli -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(cli()) diff --git a/env_old_emulator/lib64 b/env_old_emulator/lib64 deleted file mode 120000 index 7951405..0000000 --- a/env_old_emulator/lib64 +++ /dev/null @@ -1 +0,0 @@ -lib \ No newline at end of file diff --git a/env_old_emulator/pyvenv.cfg b/env_old_emulator/pyvenv.cfg deleted file mode 100644 index 14f2b3e..0000000 --- a/env_old_emulator/pyvenv.cfg +++ /dev/null @@ -1,3 +0,0 @@ -home = /home/mila/f/felix-andreas.nahrstedt/ClimateSet_Fork/env_new_emulator/bin -include-system-site-packages = false -version = 3.10.11 diff --git a/env_old_emulator/share/man/man1/isympy.1 b/env_old_emulator/share/man/man1/isympy.1 deleted file mode 100644 index 0ff9661..0000000 --- a/env_old_emulator/share/man/man1/isympy.1 +++ /dev/null @@ -1,188 +0,0 @@ -'\" -*- coding: us-ascii -*- -.if \n(.g .ds T< \\FC -.if \n(.g .ds T> \\F[\n[.fam]] -.de URL -\\$2 \(la\\$1\(ra\\$3 -.. -.if \n(.g .mso www.tmac -.TH isympy 1 2007-10-8 "" "" -.SH NAME -isympy \- interactive shell for SymPy -.SH SYNOPSIS -'nh -.fi -.ad l -\fBisympy\fR \kx -.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) -'in \n(.iu+\nxu -[\fB-c\fR | \fB--console\fR] [\fB-p\fR ENCODING | \fB--pretty\fR ENCODING] [\fB-t\fR TYPE | \fB--types\fR TYPE] [\fB-o\fR ORDER | \fB--order\fR ORDER] [\fB-q\fR | \fB--quiet\fR] [\fB-d\fR | \fB--doctest\fR] [\fB-C\fR | \fB--no-cache\fR] [\fB-a\fR | \fB--auto\fR] [\fB-D\fR | \fB--debug\fR] [ --- | PYTHONOPTIONS] -'in \n(.iu-\nxu -.ad b -'hy -'nh -.fi -.ad l -\fBisympy\fR \kx -.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) -'in \n(.iu+\nxu -[ -{\fB-h\fR | \fB--help\fR} -| -{\fB-v\fR | \fB--version\fR} -] -'in \n(.iu-\nxu -.ad b -'hy -.SH DESCRIPTION -isympy is a Python shell for SymPy. It is just a normal python shell -(ipython shell if you have the ipython package installed) that executes -the following commands so that you don't have to: -.PP -.nf -\*(T< ->>> from __future__ import division ->>> from sympy import * ->>> x, y, z = symbols("x,y,z") ->>> k, m, n = symbols("k,m,n", integer=True) - \*(T> -.fi -.PP -So starting isympy is equivalent to starting python (or ipython) and -executing the above commands by hand. It is intended for easy and quick -experimentation with SymPy. For more complicated programs, it is recommended -to write a script and import things explicitly (using the "from sympy -import sin, log, Symbol, ..." idiom). -.SH OPTIONS -.TP -\*(T<\fB\-c \fR\*(T>\fISHELL\fR, \*(T<\fB\-\-console=\fR\*(T>\fISHELL\fR -Use the specified shell (python or ipython) as -console backend instead of the default one (ipython -if present or python otherwise). - -Example: isympy -c python - -\fISHELL\fR could be either -\&'ipython' or 'python' -.TP -\*(T<\fB\-p \fR\*(T>\fIENCODING\fR, \*(T<\fB\-\-pretty=\fR\*(T>\fIENCODING\fR -Setup pretty printing in SymPy. By default, the most pretty, unicode -printing is enabled (if the terminal supports it). You can use less -pretty ASCII printing instead or no pretty printing at all. - -Example: isympy -p no - -\fIENCODING\fR must be one of 'unicode', -\&'ascii' or 'no'. -.TP -\*(T<\fB\-t \fR\*(T>\fITYPE\fR, \*(T<\fB\-\-types=\fR\*(T>\fITYPE\fR -Setup the ground types for the polys. By default, gmpy ground types -are used if gmpy2 or gmpy is installed, otherwise it falls back to python -ground types, which are a little bit slower. You can manually -choose python ground types even if gmpy is installed (e.g., for testing purposes). - -Note that sympy ground types are not supported, and should be used -only for experimental purposes. - -Note that the gmpy1 ground type is primarily intended for testing; it the -use of gmpy even if gmpy2 is available. - -This is the same as setting the environment variable -SYMPY_GROUND_TYPES to the given ground type (e.g., -SYMPY_GROUND_TYPES='gmpy') - -The ground types can be determined interactively from the variable -sympy.polys.domains.GROUND_TYPES inside the isympy shell itself. - -Example: isympy -t python - -\fITYPE\fR must be one of 'gmpy', -\&'gmpy1' or 'python'. -.TP -\*(T<\fB\-o \fR\*(T>\fIORDER\fR, \*(T<\fB\-\-order=\fR\*(T>\fIORDER\fR -Setup the ordering of terms for printing. The default is lex, which -orders terms lexicographically (e.g., x**2 + x + 1). You can choose -other orderings, such as rev-lex, which will use reverse -lexicographic ordering (e.g., 1 + x + x**2). - -Note that for very large expressions, ORDER='none' may speed up -printing considerably, with the tradeoff that the order of the terms -in the printed expression will have no canonical order - -Example: isympy -o rev-lax - -\fIORDER\fR must be one of 'lex', 'rev-lex', 'grlex', -\&'rev-grlex', 'grevlex', 'rev-grevlex', 'old', or 'none'. -.TP -\*(T<\fB\-q\fR\*(T>, \*(T<\fB\-\-quiet\fR\*(T> -Print only Python's and SymPy's versions to stdout at startup, and nothing else. -.TP -\*(T<\fB\-d\fR\*(T>, \*(T<\fB\-\-doctest\fR\*(T> -Use the same format that should be used for doctests. This is -equivalent to '\fIisympy -c python -p no\fR'. -.TP -\*(T<\fB\-C\fR\*(T>, \*(T<\fB\-\-no\-cache\fR\*(T> -Disable the caching mechanism. Disabling the cache may slow certain -operations down considerably. This is useful for testing the cache, -or for benchmarking, as the cache can result in deceptive benchmark timings. - -This is the same as setting the environment variable SYMPY_USE_CACHE -to 'no'. -.TP -\*(T<\fB\-a\fR\*(T>, \*(T<\fB\-\-auto\fR\*(T> -Automatically create missing symbols. Normally, typing a name of a -Symbol that has not been instantiated first would raise NameError, -but with this option enabled, any undefined name will be -automatically created as a Symbol. This only works in IPython 0.11. - -Note that this is intended only for interactive, calculator style -usage. In a script that uses SymPy, Symbols should be instantiated -at the top, so that it's clear what they are. - -This will not override any names that are already defined, which -includes the single character letters represented by the mnemonic -QCOSINE (see the "Gotchas and Pitfalls" document in the -documentation). You can delete existing names by executing "del -name" in the shell itself. You can see if a name is defined by typing -"'name' in globals()". - -The Symbols that are created using this have default assumptions. -If you want to place assumptions on symbols, you should create them -using symbols() or var(). - -Finally, this only works in the top level namespace. So, for -example, if you define a function in isympy with an undefined -Symbol, it will not work. -.TP -\*(T<\fB\-D\fR\*(T>, \*(T<\fB\-\-debug\fR\*(T> -Enable debugging output. This is the same as setting the -environment variable SYMPY_DEBUG to 'True'. The debug status is set -in the variable SYMPY_DEBUG within isympy. -.TP --- \fIPYTHONOPTIONS\fR -These options will be passed on to \fIipython (1)\fR shell. -Only supported when ipython is being used (standard python shell not supported). - -Two dashes (--) are required to separate \fIPYTHONOPTIONS\fR -from the other isympy options. - -For example, to run iSymPy without startup banner and colors: - -isympy -q -c ipython -- --colors=NoColor -.TP -\*(T<\fB\-h\fR\*(T>, \*(T<\fB\-\-help\fR\*(T> -Print help output and exit. -.TP -\*(T<\fB\-v\fR\*(T>, \*(T<\fB\-\-version\fR\*(T> -Print isympy version information and exit. -.SH FILES -.TP -\*(T<\fI${HOME}/.sympy\-history\fR\*(T> -Saves the history of commands when using the python -shell as backend. -.SH BUGS -The upstreams BTS can be found at \(lahttps://github.com/sympy/sympy/issues\(ra -Please report all bugs that you find in there, this will help improve -the overall quality of SymPy. -.SH "SEE ALSO" -\fBipython\fR(1), \fBpython\fR(1) diff --git a/requirements.txt b/requirements.txt index eeb0a09..b723a07 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,6 +7,9 @@ segmentation-models-pytorch netCDF4 pytorch-lightning==2.2.1 gpytorch +<<<<<<< HEAD codecarbon torch_tb_profiler -torchvision \ No newline at end of file +======= +torchvision +>>>>>>> upstream/main