Skip to content

Commit b4242b3

Browse files
authored
Merge pull request #69 from MoseleyBioinformaticsLab/granular
Granular
2 parents 98933dd + bf0e106 commit b4242b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+7138
-573
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Install testing environment
2525
run: |
2626
python3 -m pip install --upgrade pip
27-
python3 -m pip install pytest pytest-mock pytest-cov
27+
python3 -m pip install pytest pytest-mock pytest-cov deepdiff
2828
- name: Install package
2929
uses: Wandalen/wretry.action@master
3030
with:

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Description
55
-----------
66
The ``gpu_tracker`` package provides a ``Tracker`` class and a commandline-interface that tracks (profiles) the usage of compute time, CPU utilization, maximum RAM, GPU utilization, and maximum GPU RAM.
77
The compute time is a measurement of the real time taken by the task as opposed to the CPU-utilization time.
8-
The GPU tracking is for Nvidia GPUs and uses the ``nvidia-smi`` command. If the Nvidia drivers have not been installed, then the max GPU RAM is not tracked and measurements are reported as 0.
8+
The GPU tracking is for both Nvidia and AMD GPUs and respectively uses the nvidia-smi and amd-smi command-line tools to pull GPU usage information. Also, if neither the appropriate Nvidia nor AMD driver is installed, then the GPU-related metrics are not tracked and are reported as 0.
99
Computational resources are tracked throughout the duration of a context manager or the duration of explicit calls to the ``start()`` and ``stop()`` methods of the ``Tracker`` class.
1010
The ``gpu-tracker`` command-line interface alternatively tracks the computational-resource-usage of an arbitrary shell command.
1111

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
1515

1616
project = 'gpu_tracker'
17-
copyright = '2024, Erik Huckvale, Hunter N. B. Moseley'
18-
author = 'Erik Huckvale, Hunter N. B. Moseley'
17+
copyright = '2024, Erik D. Huckvale, Hunter N. B. Moseley'
18+
author = 'Erik D. Huckvale, Hunter N. B. Moseley'
1919
version = __version__
2020
release = __version__
2121

docs/notebook/combined-file.csv

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
process_id,code_block_name,position,timestamp
2+
265016,my-code-block,0,1746129778.99568
3+
265016,my-code-block,1,1746129781.7855892
4+
265016,my-function,0,1746129781.7872624
5+
265016,my-function,1,1746129784.3252733
6+
265016,my-code-block,0,1746129784.3266726
7+
265016,my-code-block,1,1746129786.9071054
8+
265016,my-function,0,1746129786.9082048
9+
265016,my-function,1,1746129789.4858837
10+
265016,my-code-block,0,1746129789.486994
11+
265016,my-code-block,1,1746129792.0702057
12+
265016,my-function,0,1746129792.0713246
13+
265016,my-function,1,1746129794.6151624
14+
265016,my-code-block,0,1746129778.99568
15+
265016,my-code-block,1,1746129781.7855892
16+
265016,my-function,0,1746129781.7872624
17+
265016,my-function,1,1746129784.3252733
18+
265016,my-code-block,0,1746129784.3266726
19+
265016,my-code-block,1,1746129786.9071054
20+
265016,my-function,0,1746129786.9082048
21+
265016,my-function,1,1746129789.4858837
22+
265016,my-code-block,0,1746129789.486994
23+
265016,my-code-block,1,1746129792.0702057
24+
265016,my-function,0,1746129792.0713246
25+
265016,my-function,1,1746129794.6151624

docs/notebook/config.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"sleep_time": 0.5,
3+
"ram_unit": "megabytes",
4+
"gpu_ram_unit": "megabytes",
5+
"time_unit": "seconds"
6+
}

docs/notebook/correct_nbconvert.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
contents: str = contents.replace('python3\n\n !', 'none\n\n !')
66
contents: str = contents.replace('parsed-literal::', 'code:: none')
77
contents: str = contents.replace('!', '$ ')
8+
contents: str = contents.replace('os._exit(0)', '')
89
contents = '.. _tutorial-label:\n\n' + contents
910

1011
with open('tutorial.rst', 'w') as file:

docs/notebook/my-results.pkl

5.16 KB
Binary file not shown.

docs/notebook/results.pkl

5.16 KB
Binary file not shown.

docs/notebook/results2.pkl

5.16 KB
Binary file not shown.

docs/notebook/sub-tracking.csv

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
process_id,code_block_name,position,timestamp
2+
265016,my-code-block,0,1746129778.99568
3+
265016,my-code-block,1,1746129781.7855892
4+
265016,my-function,0,1746129781.7872624
5+
265016,my-function,1,1746129784.3252733
6+
265016,my-code-block,0,1746129784.3266726
7+
265016,my-code-block,1,1746129786.9071054
8+
265016,my-function,0,1746129786.9082048
9+
265016,my-function,1,1746129789.4858837
10+
265016,my-code-block,0,1746129789.486994
11+
265016,my-code-block,1,1746129792.0702055
12+
265016,my-function,0,1746129792.0713246
13+
265016,my-function,1,1746129794.6151624

0 commit comments

Comments
 (0)