forked from mlcommons/algorithmic-efficiency
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4ce6efd
commit cd36e76
Showing
6 changed files
with
86 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import psutil | ||
|
||
def check_disk_io_counters_support(): | ||
try: | ||
disk_io = psutil.disk_io_counters() | ||
if disk_io is None: | ||
print("disk_io_counters() is not supported on this machine.") | ||
else: | ||
print("disk_io_counters() is supported on this machine.") | ||
print("Disk I/O stats:", disk_io) | ||
except Exception as e: | ||
print(f"An error occurred: {e}") | ||
|
||
check_disk_io_counters_support() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,34 @@ | ||
#!/bin/bash | ||
#!/bin/bash -l | ||
|
||
#SBATCH --job-name=mnist_01 | ||
#SBATCH --output=/ptmp/najroldi/logs/algoperf/job_%j.out | ||
#SBATCH --error=/ptmp/najroldi/logs/algoperf/job_%j.err | ||
|
||
#SBATCH --time=00:05:00 | ||
# | ||
#SBATCH --time=00:10:00 | ||
#SBATCH --ntasks 1 | ||
#SBATCH --requeue | ||
# | ||
# --- default case: use a single GPU on a shared node --- | ||
#SBATCH --gres=gpu:a100:1 | ||
#SBATCH --cpus-per-task=18 | ||
#SBATCH --mem=125000 | ||
# | ||
# --- uncomment to use 2 GPUs on a shared node --- | ||
# #SBATCH --gres=gpu:a100:2 | ||
# #SBATCH --cpus-per-task=36 | ||
# #SBATCH --mem=250000 | ||
# | ||
# --- uncomment to use 4 GPUs on a full node --- | ||
# #SBATCH --gres=gpu:a100:4 | ||
# #SBATCH --cpus-per-task=72 | ||
# #SBATCH --mem=500000 | ||
|
||
#SBATCH --cpus-per-task 2 | ||
#SBATCH --mem=1000M | ||
|
||
# Get node with GPUs | ||
#SBATCH --partition=gpu | ||
#SBATCH --gres=gpu:1 | ||
# the last constraint ensures that we are not reserving gpu-bw | ||
srun ~/algorithmic-efficiency/exp/slurm/mnist.sh | ||
|
||
srun ~/algorithmic-efficiency/exp/slurm/mnist.sh | ||
## FARLO MEGLIO!!!! | ||
# -l | ||
# cpus? | ||
# request a100 | ||
# nvidia mps | ||
# --- is this even useful????? --- | ||
# #SBATCH --partition=gpu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash -l | ||
|
||
|
||
# add conda TODO: make it more portable! | ||
source ~/miniconda3/etc/profile.d/conda.sh | ||
|
||
# Activate conda environment TODO: should I use source activate alpe instead? | ||
conda activate alpe | ||
|
||
echo "------ $CONDA_DEFAULT_ENV ------" | ||
|
||
# Env vars | ||
export CODE_DIR=~/algorithmic-efficiency | ||
export DATA_DIR=~/data | ||
export EXP_DIR=~/exp/algoperf | ||
# export EXP_DIR=/ptmp/najroldi/exp/algoperf | ||
export CUDA_VISIBLE_DEVICES=0 | ||
|
||
# Job specific vars | ||
workload=mnist | ||
dataset=MNIST | ||
submission='reference_algorithms/development_algorithms/mnist/mnist_pytorch/submission.py' | ||
search_space='reference_algorithms/development_algorithms/mnist/tuning_search_space.json' | ||
trials=1 | ||
name="mnist_01" | ||
|
||
# Print GPU infos | ||
# nvidia-smi | ||
|
||
# Execute python script | ||
python3 $CODE_DIR/submission_runner.py \ | ||
--workload=$workload \ | ||
--framework=pytorch \ | ||
--tuning_ruleset=external \ | ||
--data_dir=$DATA_DIR/$dataset \ | ||
--submission_path=$submission \ | ||
--tuning_search_space=$search_space \ | ||
--num_tuning_trials=$trials \ | ||
--experiment_dir=$EXP_DIR \ | ||
--experiment_name=$name \ | ||
--use_wandb \ | ||
--overwrite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters