Skip to content

Commit

Permalink
deploy: 262f1c6
Browse files Browse the repository at this point in the history
  • Loading branch information
niksirbi committed Nov 14, 2023
1 parent db137be commit 61e1fd4
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 56 deletions.
Binary file modified .doctrees/data_analysis/HPC-module-SLEAP.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file modified .doctrees/programming/SLURM-arguments.doctree
Binary file not shown.
13 changes: 7 additions & 6 deletions _sources/data_analysis/HPC-module-SLEAP.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ An example is provided below, followed by explanations.
#SBATCH -n 4 # number of cores
#SBATCH -t 0-06:00 # time (D-HH:MM)
#SBATCH --gres gpu:1 # request 1 GPU (of any kind)
#SBATCH -o slurm.%N.%j.out # STDOUT
#SBATCH -e slurm.%N.%j.err # STDERR
#SBATCH -o slurm.%x.%N.%j.out # STDOUT
#SBATCH -e slurm.%x.%N.%j.err # STDERR
#SBATCH --mail-type=ALL
#SBATCH --mail-user=user@domain.com

Expand Down Expand Up @@ -370,7 +370,7 @@ training_log.csv
The SLEAP GUI on your local machine can be used to quickly evaluate the trained models.

- Select *Predict* -> *Evaluation Metrics for Trained Models...*
- Click on *Add Trained Models(s)* and select the subfolder(s) containing the model(s) you want to evaluate (e.g. `230509_141357.centered_instance`).
- Click on *Add Trained Models(s)* and select the folder containing the model(s) you want to evaluate.
- You can view the basic metrics on the shown table or you can also view a more detailed report (including plots) by clicking *View Metrics*.

## Model inference
Expand All @@ -392,8 +392,8 @@ Below is an example SLURM batch script that contains a `sleap-track` call.
#SBATCH -n 4 # number of cores
#SBATCH -t 0-02:00 # time (D-HH:MM)
#SBATCH --gres gpu:1 # request 1 GPU (of any kind)
#SBATCH -o slurm.%N.%j.out # write STDOUT
#SBATCH -e slurm.%N.%j.err # write STDERR
#SBATCH -o slurm.%x.%N.%j.out # write STDOUT
#SBATCH -e slurm.%x.%N.%j.err # write STDERR
#SBATCH --mail-type=ALL
#SBATCH --mail-user=user@domain.com

Expand All @@ -412,11 +412,12 @@ cd $SLP_JOB_DIR
mkdir -p predictions

# Run the inference command
sleap-track $VIDEO_DIR/videos/M708149_EPM_20200317_165049331-converted.mp4 \
sleap-track $VIDEO_DIR/M708149_EPM_20200317_165049331-converted.mp4 \
-m $SLP_JOB_DIR/models/231010_164307.centroid/training_config.json \
-m $SLP_JOB_DIR/models/231010_164307.centered_instance/training_config.json \
--gpu auto \
--tracking.tracker simple \
--tracking.similarity centroid \
--tracking.post_connect_single_breaks 1 \
-o predictions/labels.v001.slp.predictions.slp \
--verbosity json \
Expand Down
10 changes: 5 additions & 5 deletions _sources/programming/SLURM-arguments.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ e.g. the lines that start with `#SBATCH` in the following example:
#SBATCH -n 4 # number of cores
#SBATCH -t 0-06:00 # time (D-HH:MM)
#SBATCH --gres gpu:1 # request 1 GPU (of any kind)
#SBATCH -o slurm.%N.%j.out # STDOUT
#SBATCH -e slurm.%N.%j.err # STDERR
#SBATCH -o slurm.%x.%N.%j.out # STDOUT
#SBATCH -e slurm.%x.%N.%j.err # STDERR
#SBATCH --mail-type=ALL
#SBATCH --mail-user=user@domain.com
#SBATCH --array=1-12%4 # job array index values
Expand Down Expand Up @@ -110,8 +110,8 @@ You can view the available GPU types on the [SWC internal wiki](https://wiki.ucl
### Standard Output File
- *Name:* `--output`
- *Alias:* `-o`
- *Description:* Defines the file where the standard output (STDOUT) will be written. In the examples scripts, it's set to slurm.%N.%j.out, where %N is the node name and %j is the job ID.
- *Example values:* `slurm.%N.%j.out`, `slurm.MyAwesomeJob.out`
- *Description:* Defines the file where the standard output (STDOUT) will be written. In the example script above, it's set to slurm.%x.%N.%j.out, where %x is the job name, %N is the node name and %j is the job ID.
- *Example values:* `slurm.%x.%N.%j.out`, `slurm.MyAwesomeJob.out`

:::{note}
This file contains the output of the commands executed by the job (i.e. the messages that normally gets printed on the terminal).
Expand All @@ -120,7 +120,7 @@ This file contains the output of the commands executed by the job (i.e. the mess
### Standard Error File
- *Name:* `--error`
- *Alias:* `-e`
- *Description:* Specifies the file where the standard error (STDERR) will be written. In the examples, it's set to slurm.%N.%j.err, where %N is the node name and %j is the job ID.
- *Description:* Specifies the file where the standard error (STDERR) will be written. In the example script above, it's set to slurm.%x.%N.%j.out, where %x is the job name, %N is the node name and %j is the job ID.
- *Example values:* `slurm.%N.%j.err`, `slurm.MyAwesomeJob.err`

:::{note}
Expand Down
21 changes: 11 additions & 10 deletions data_analysis/HPC-module-SLEAP.html
Original file line number Diff line number Diff line change
Expand Up @@ -639,8 +639,8 @@ <h3>Run the training job<a class="headerlink" href="#run-the-training-job" title
<span class="linenos"> 7</span><span class="c1">#SBATCH -n 4 # number of cores</span>
<span class="linenos"> 8</span><span class="c1">#SBATCH -t 0-06:00 # time (D-HH:MM)</span>
<span class="linenos"> 9</span><span class="c1">#SBATCH --gres gpu:1 # request 1 GPU (of any kind)</span>
<span class="linenos">10</span><span class="c1">#SBATCH -o slurm.%N.%j.out # STDOUT</span>
<span class="linenos">11</span><span class="c1">#SBATCH -e slurm.%N.%j.err # STDERR</span>
<span class="linenos">10</span><span class="c1">#SBATCH -o slurm.%x.%N.%j.out # STDOUT</span>
<span class="linenos">11</span><span class="c1">#SBATCH -e slurm.%x.%N.%j.err # STDERR</span>
<span class="linenos">12</span><span class="c1">#SBATCH --mail-type=ALL</span>
<span class="linenos">13</span><span class="c1">#SBATCH --mail-user=user@domain.com</span>
<span class="linenos">14</span>
Expand Down Expand Up @@ -789,7 +789,7 @@ <h3>Evaluate the trained models<a class="headerlink" href="#evaluate-the-trained
<p>The SLEAP GUI on your local machine can be used to quickly evaluate the trained models.</p>
<ul class="simple">
<li><p>Select <em>Predict</em> -&gt; <em>Evaluation Metrics for Trained Models…</em></p></li>
<li><p>Click on <em>Add Trained Models(s)</em> and select the subfolder(s) containing the model(s) you want to evaluate (e.g. <code class="docutils literal notranslate"><span class="pre">230509_141357.centered_instance</span></code>).</p></li>
<li><p>Click on <em>Add Trained Models(s)</em> and select the folder containing the model(s) you want to evaluate.</p></li>
<li><p>You can view the basic metrics on the shown table or you can also view a more detailed report (including plots) by clicking <em>View Metrics</em>.</p></li>
</ul>
</section>
Expand All @@ -811,8 +811,8 @@ <h2>Model inference<a class="headerlink" href="#model-inference" title="Link to
<span class="linenos"> 7</span><span class="c1">#SBATCH -n 4 # number of cores</span>
<span class="linenos"> 8</span><span class="c1">#SBATCH -t 0-02:00 # time (D-HH:MM)</span>
<span class="linenos"> 9</span><span class="c1">#SBATCH --gres gpu:1 # request 1 GPU (of any kind)</span>
<span class="linenos">10</span><span class="c1">#SBATCH -o slurm.%N.%j.out # write STDOUT</span>
<span class="linenos">11</span><span class="c1">#SBATCH -e slurm.%N.%j.err # write STDERR</span>
<span class="linenos">10</span><span class="c1">#SBATCH -o slurm.%x.%N.%j.out # write STDOUT</span>
<span class="linenos">11</span><span class="c1">#SBATCH -e slurm.%x.%N.%j.err # write STDERR</span>
<span class="linenos">12</span><span class="c1">#SBATCH --mail-type=ALL</span>
<span class="linenos">13</span><span class="c1">#SBATCH --mail-user=user@domain.com</span>
<span class="linenos">14</span>
Expand All @@ -831,15 +831,16 @@ <h2>Model inference<a class="headerlink" href="#model-inference" title="Link to
<span class="linenos">27</span>mkdir<span class="w"> </span>-p<span class="w"> </span>predictions
<span class="linenos">28</span>
<span class="linenos">29</span><span class="c1"># Run the inference command</span>
<span class="linenos">30</span>sleap-track<span class="w"> </span><span class="nv">$VIDEO_DIR</span>/videos/M708149_EPM_20200317_165049331-converted.mp4<span class="w"> </span><span class="se">\</span>
<span class="linenos">30</span>sleap-track<span class="w"> </span><span class="nv">$VIDEO_DIR</span>/M708149_EPM_20200317_165049331-converted.mp4<span class="w"> </span><span class="se">\</span>
<span class="linenos">31</span><span class="w"> </span>-m<span class="w"> </span><span class="nv">$SLP_JOB_DIR</span>/models/231010_164307.centroid/training_config.json<span class="w"> </span><span class="se">\</span>
<span class="linenos">32</span><span class="w"> </span>-m<span class="w"> </span><span class="nv">$SLP_JOB_DIR</span>/models/231010_164307.centered_instance/training_config.json<span class="w"> </span><span class="se">\</span>
<span class="linenos">33</span><span class="w"> </span>--gpu<span class="w"> </span>auto<span class="w"> </span><span class="se">\</span>
<span class="linenos">34</span><span class="w"> </span>--tracking.tracker<span class="w"> </span>simple<span class="w"> </span><span class="se">\</span>
<span class="linenos">35</span><span class="w"> </span>--tracking.post_connect_single_breaks<span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="se">\</span>
<span class="linenos">36</span><span class="w"> </span>-o<span class="w"> </span>predictions/labels.v001.slp.predictions.slp<span class="w"> </span><span class="se">\</span>
<span class="linenos">37</span><span class="w"> </span>--verbosity<span class="w"> </span>json<span class="w"> </span><span class="se">\</span>
<span class="linenos">38</span><span class="w"> </span>--no-empty-frames
<span class="linenos">35</span><span class="w"> </span>--tracking.similarity<span class="w"> </span>centroid<span class="w"> </span><span class="se">\</span>
<span class="linenos">36</span><span class="w"> </span>--tracking.post_connect_single_breaks<span class="w"> </span><span class="m">1</span><span class="w"> </span><span class="se">\</span>
<span class="linenos">37</span><span class="w"> </span>-o<span class="w"> </span>predictions/labels.v001.slp.predictions.slp<span class="w"> </span><span class="se">\</span>
<span class="linenos">38</span><span class="w"> </span>--verbosity<span class="w"> </span>json<span class="w"> </span><span class="se">\</span>
<span class="linenos">39</span><span class="w"> </span>--no-empty-frames
</pre></div>
</div>
</div>
Expand Down
Loading

0 comments on commit 61e1fd4

Please sign in to comment.