mirror of
https://github.com/NohamR/Stage-2024.git
synced 2025-05-24 00:49:06 +00:00
update instructions + slurm
This commit is contained in:
parent
15b4fecdd0
commit
db075fb427
2
.gitignore
vendored
2
.gitignore
vendored
@ -156,3 +156,5 @@ node_modules/
|
||||
/test/yolov7-tracker/wandb
|
||||
VoTT-v2-none.zip
|
||||
VoTT-v2-done.zip
|
||||
VoTT-v2/output/vott-json-export.zip
|
||||
/OpenCV/opencv
|
||||
|
@ -16,12 +16,28 @@ mv Yolov7-tracker yolov7-tracker
|
||||
cd yolov7-tracker
|
||||
git checkout v2 # change to v2 branch !!
|
||||
```
|
||||
|
||||
Change np.int to np.int64 in :
|
||||
utils/datasets.py
|
||||
utils/general.py
|
||||
|
||||
Fix for GPU in [utils/loss.py](../yolov7-tracker-example/utils/loss.py.bak):
|
||||
```python
|
||||
from_which_layer.append((torch.ones(size=(len(b),)) * i).to('cuda')) ### SF #### (lines 686)
|
||||
fg_mask_inboxes = fg_mask_inboxes.to(torch.device('cuda')) ### SF #### (lines 758 & 5164 & 1568)
|
||||
```
|
||||
|
||||
Set up env :
|
||||
```bash
|
||||
conda create -n yolov7 python=3.9 pytorch=1.12
|
||||
conda activate yolov7
|
||||
pip3 install numpy scipy matplotlib cython pandas cuda-python
|
||||
```
|
||||
|
||||
```
|
||||
conda env : /home/noham.rivoirard/.conda/envs/yolov7
|
||||
```
|
||||
|
||||
<!-- ## ERROR: Could not find a version that satisfies the requirement cuda-python (from versions: none) Requires-Python >=3.10 -->
|
||||
```bash
|
||||
pip3 install -r requirements.txt
|
||||
|
43
yolov7-setup/sq.sh
Normal file
43
yolov7-setup/sq.sh
Normal file
@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
## <------------------ pour le cluster de calcul
|
||||
####SBATCH -N 1 ## 1 noeud
|
||||
#SBATCH --nodelist=node20
|
||||
### #SBATCH --exclusive ## le noeud sera entierement dedié à notre job.
|
||||
######SBATCH -t 12:00:00 ## job tué au bout de 12h
|
||||
#SBATCH --gres=gpu:1 ## 4 GPU par noeud
|
||||
### #SBATCH --constraint=gpudp ## noeuds GPU double précision
|
||||
#SBATCH --job-name=GPU_yolov7_noham
|
||||
#SBATCH --chdir=/home/noham.rivoirard/yolov7-tracker
|
||||
# -- Optionnel, pour être notifié par email :
|
||||
#SBATCH --mail-type=FAIL
|
||||
#SBATCH --mail-user=noham@noh.am
|
||||
# -- Sortie standard et d'erreur dans le fichier .output :
|
||||
#SBATCH --output=./%j.stdout
|
||||
#SBATCH --error=./%j.stderr
|
||||
# -- Contexte matériel
|
||||
#SBATCH --nodes=1
|
||||
#SBATCH --cpus-per-task=1
|
||||
|
||||
echo "SLURM_STEP_GPUS : "${SLURM_STEP_GPUS}
|
||||
echo "SLURM_JOB_GPUS : "$SLURM_JOB_GPUS
|
||||
echo "SLURM_STEP/JOB_GPUS "${SLURM_STEP_GPUS:-$SLURM_JOB_GPUS}
|
||||
echo "CUDA_VISIBLE_DEVICES : "${CUDA_VISIBLE_DEVICES}
|
||||
|
||||
source /usr/local/anaconda3/etc/profile.d/conda.sh
|
||||
|
||||
conda activate yolov7
|
||||
which python
|
||||
|
||||
#export OMP_NUM_THREADS=8
|
||||
#echo $OMP_NUM_THREADS
|
||||
#
|
||||
## doc
|
||||
# squeue permet de voir les jobs en attente ou en train de tourner. S'ils tournent, il y aura un R dans la colonne ST.
|
||||
# sattach permet d'attacher sur le terminal les E/S d'un job en train de tourner. Ça permet de surveiller l'avancée d'un job, ou par exemple d'interagir avec un debugger. ctrl-c permet de détacher de nouveau le job et de le laisser de nouveau tourner en fond (de manière non bloquante).
|
||||
# scancel permet permet de supprimer une soumission ou d’arrêter le job s'il est en cours d’exécution.
|
||||
# sstat donne des infos sur les ressources utilisées par un job
|
||||
|
||||
# python3 train.py --dataset datasetv2_20240722_ --epochs 600 --workers 1 --device 0 --batch-size 4 --data data/datasetv2/dataset.yaml --img 1280 720 --cfg cfg/training/yolov7x_datasetv2.yaml --weights '' --name yolov7x-datasetv2_20240722 --hyp data/hyp.scratch.custom.yamlclear
|
||||
# srun python3 train.py --dataset dataset1_2024_06_19__ --workers 1 --device ${CUDA_VISIBLE_DEVICES} --batch-size 4 --epochs 600 --data data/dataset1_2024_06_19/dataset.yaml --img 1280 720 --cfg cfg/training/yolov7x_dataset1_2024_06_19.yaml --weights '' --name yolov7x-dataset1_2024_06_19 --hyp data/hyp.scratch.custom.yaml
|
||||
srun python3 train.py --dataset datasetv2_20240722_ --epochs 600 --workers 1 --device ${CUDA_VISIBLE_DEVICES} --batch-size 4 --data data/datasetv2/dataset.yaml --img 1280 720 --cfg cfg/training/yolov7x_datasetv2.yaml --weights '' --name yolov7x-datasetv2_20240722 --hyp data/hyp.scratch.custom.yaml
|
41
yolov7-setup/sq_example.sh
Normal file
41
yolov7-setup/sq_example.sh
Normal file
@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
## <------------------ pour le cluster de calcul
|
||||
####SBATCH -N 1 ## 1 noeud
|
||||
#SBATCH --nodelist=node15
|
||||
### #SBATCH --exclusive ## le noeud sera entierement dedié à notre job.
|
||||
######SBATCH -t 12:00:00 ## job tué au bout de 12h
|
||||
#SBATCH --gres=gpu:1 ## 4 GPU par noeud
|
||||
### #SBATCH --constraint=gpudp ## noeuds GPU double précision
|
||||
#SBATCH --job-name=GPU_yolov7
|
||||
#SBATCH --chdir=/home/sylvain.faure/RN/athle/yolov7-tracker/
|
||||
# -- Optionnel, pour être notifié par email :
|
||||
#SBATCH --mail-type=FAIL
|
||||
#SBATCH --mail-user=sylvain.faure@universite-paris-saclay.fr
|
||||
# -- Sortie standard et d'erreur dans le fichier .output :
|
||||
#SBATCH --output=./%j.stdout
|
||||
#SBATCH --error=./%j.stderr
|
||||
# -- Contexte matériel
|
||||
#SBATCH --nodes=1
|
||||
#SBATCH --cpus-per-task=1
|
||||
|
||||
echo "SLURM_STEP_GPUS : "${SLURM_STEP_GPUS}
|
||||
echo "SLURM_JOB_GPUS : "$SLURM_JOB_GPUS
|
||||
echo "SLURM_STEP/JOB_GPUS "${SLURM_STEP_GPUS:-$SLURM_JOB_GPUS}
|
||||
echo "CUDA_VISIBLE_DEVICES : "${CUDA_VISIBLE_DEVICES}
|
||||
|
||||
source /usr/local/anaconda3/etc/profile.d/conda.sh
|
||||
|
||||
conda activate yolov7
|
||||
which python
|
||||
|
||||
#export OMP_NUM_THREADS=8
|
||||
#echo $OMP_NUM_THREADS
|
||||
#
|
||||
## doc
|
||||
# squeue permet de voir les jobs en attente ou en train de tourner. S'ils tournent, il y aura un R dans la colonne ST.
|
||||
# sattach permet d'attacher sur le terminal les E/S d'un job en train de tourner. Ça permet de surveiller l'avancée d'un job, ou par exemple d'interagir avec un debugger. ctrl-c permet de détacher de nouveau le job et de le laisser de nouveau tourner en fond (de manière non bloquante).
|
||||
# scancel permet permet de supprimer une soumission ou d’arrêter le job s'il est en cours d’exécution.
|
||||
# sstat donne des infos sur les ressources utilisées par un job
|
||||
|
||||
srun python3 train.py --dataset dataset1_2024_06_19__ --workers 1 --device ${CUDA_VISIBLE_DEVICES} --batch-size 4 --epochs 600 --data data/dataset1_2024_06_19/dataset.yaml --img 1280 720 --cfg cfg/training/yolov7x_dataset1_2024_06_19.yaml --weights '' --name yolov7x-dataset1_2024_06_19 --hyp data/hyp.scratch.custom.yaml
|
1709
yolov7-tracker-example/utils/loss.py.bak
Normal file
1709
yolov7-tracker-example/utils/loss.py.bak
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user