summaryrefslogtreecommitdiff
path: root/python-overboard.spec
blob: 6dfd1b06373d0617aa1b48a9e6fac1f42863410a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
%global _empty_manifest_terminate_build 0
Name:		python-overboard
Version:	1.0.1
Release:	1
Summary:	Pure Python dashboard for monitoring deep learning experiments
License:	GNU General Public License v3 (GPLv3)
URL:		https://github.com/jotaf98/overboard
Source0:	https://mirrors.nju.edu.cn/pypi/web/packages/63/ff/c19cdc360225b537d4ea3f74685ad646b2f902f8146946b334f7d5245db2/overboard-1.0.1.tar.gz
BuildArch:	noarch

Requires:	python3-pyqt5
Requires:	python3-pyqtgraph
Requires:	python3-pyopengl
Requires:	python3-fs
Requires:	python3-overboard-logger

%description
# OverBoard
OverBoard is a lightweight yet powerful dashboard to monitor your experiments.

<br>
<p align="center">
Load <b>remote experiments in real-time</b> through <b>SSH/FTP</b> and <a href="https://www.pyfilesystem.org/page/index-of-filesystems/">others</a>.
</p>
<img align="center" src="https://raw.githubusercontent.com/jotaf98/overboard/master/images/screen1.png" /><br><br>

<p align="center">
Custom visualisations (tensors and any custom plot with familiar <b>MatPlotLib</b> syntax).</p>
<img align="center" src="https://raw.githubusercontent.com/jotaf98/overboard/master/images/screen2.png" /><br><br>

<p align="center">
A sortable table of <b>hyper-parameters</b> with Python-syntax filtering.
</p>
<img align="center" src="https://raw.githubusercontent.com/jotaf98/overboard/master/images/screen8.png" /><br><br>

<p align="center">
<b>Plot percentile intervals (<b>shaded plots</b>), custom X/Y axes</b>, and hyper-parameters (<b>bubble plots</b>).
</p>
<img align="center" src="https://raw.githubusercontent.com/jotaf98/overboard/master/images/screen7.png" /><br>



# Installation

You can install the dependencies with:

- With Conda: `conda install pyqt=5.12 pyqtgraph=0.11 -c conda-forge`

- With pip: `pip install pyqt5==5.12 pyqtgraph==0.11`

Finally, OverBoard itself can be installed with: `pip install fs==2.4 overboard`
(Conda seems to be too strict when installing [PyFileSystem/fs](https://www.pyfilesystem.org), so pip should be preferred.)

Optional:
- `pip install fs.sshfs` to support remote files through SSH.

- PyOpenGL 3.1 (either through conda or pip) if you intend to use custom 3D plots with [PyQtGraph](https://pyqtgraph.readthedocs.io/en/latest/3dgraphics.html).

- MatPlotLib if you intend to use it for custom plots.



## Installation - logger only

Your scripts can log data without installing the full GUI and its dependencies (so your remote GPU cluster does not need PyQt at all).

Just use: `pip install overboard_logger`

And remember to import `overboard_logger` instead of `overboard` in your scripts.


# Usage

- Main interface: `python3 -m overboard <logs-directory>`

- Logging experiments is simple:
```python
from overboard import Logger

with Logger('./logs') as logger:
  for iteration in range(100):
    logger.append({'loss': 0, 'error': 0})
```

You can also pass in a `meta` keyword argument, which can be a `dict` with hyper-parameters names and values (or other meta-data), to help organize your experiments. These will be displayed in a handy table, which supports sorting and filtering. The `meta` data can also be an `argparse.Namespace`, which is useful if your hyper-parameters are command-line arguments parsed with `argparse`.

By default a unique folder (using the current timestamp) is created for the logs. For full documentation on initialization arguments and other methods, type `pydoc overboard` on the command-line (Python built-in doc viewer).

You can also check the `examples` directory:

- [`examples/basic.py`](examples/basic.py): A minimal example. Generates some test logs.
- [`examples/mnist.py`](examples/mnist.py): The mandatory MNIST example. Also shows a custom MatPlotLib plot (a confusion matrix).
- [`examples/example_2d.py`](examples/example_2d.py): Example custom 2D plot, with PyQtGraph (faster than MatPlotLib).
- [`examples/example_3d.py`](examples/example_3d.py): Example custom 3D plot, with PyQtGraph. Requires PyOpenGL.

A note about importing: You can either import the `Logger` class from `overboard` or from `overboard_logger`. If you installed the "logger only" version as described above (no dependencies), then you can only import from `overboard_logger`.


## Remote experiments

It's as simple as:

```
python -m overboard ssh://username:password@hostname/path-to-experiments
```

...replacing your SSH user name, password, host name/server, and the directory where OverBoard should look for experiments. The default port is 22, which you can override with :23 or another port number after the host name.

There are a [number of other settings](https://github.com/althonos/fs.sshfs#constructor), which you can append after the path. For example, append `?keepalive=60&config_path=~/.ssh/config` to set the keepalive packets interval to 60 seconds, and specify an OpenSSH configuration file path.

[Other remote file systems](https://www.pyfilesystem.org/page/index-of-filesystems/) are available by using [appropriate prefixes](https://docs.pyfilesystem.org/en/latest/openers.html) (e.g. `ftp://`).


## Interface tips & tricks

- Click a plot title to hide it (moving it to the bottom) or to show it again.

- Click a plot line to select that experiment in the table, and vice-versa.

- Use the mouse wheel to zoom and drag to pan in a plot or custom visualization.

- Click the "A" button in the bottom-left of a plot to reset the zoom/pan.

- Choose an hyper-parameter as the "X axis" in the sidebar to compare different hyper-parameters graphically (*bubble plot*). Click a bubble to highlight that experiment. If the hyper-parameter is numerical but has wildly different orders of magnitude, check "Treat X as categorical". By default, each bubble's Y coordinate (e.g. accuracy) is taken from the last iteration; in "Scalar display" you can choose the maximum or minimum across iterations.

- If you have multiple runs with different random seeds (stored as hyper-parameter "seed" for example), select "Merge: seed" in the sidebar to merge them into *shaded plots* (you can then select whether to show the mean, median, range or standard deviations).

- You can *split* all experiments into different plots by selected "Panels: One per run" in the sidebar, and selecting a metric to plot in "Y axis". Similarly, they can be split by a hyper-parameter value (e.g. a different algorithm in each panel, but each has multiple plots/runs).


## Author

[João Henriques](http://www.robots.ox.ac.uk/~joao/), [Visual Geometry Group (VGG)](http://www.robots.ox.ac.uk/~vgg/), University of Oxford





%package -n python3-overboard
Summary:	Pure Python dashboard for monitoring deep learning experiments
Provides:	python-overboard
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-overboard
# OverBoard
OverBoard is a lightweight yet powerful dashboard to monitor your experiments.

<br>
<p align="center">
Load <b>remote experiments in real-time</b> through <b>SSH/FTP</b> and <a href="https://www.pyfilesystem.org/page/index-of-filesystems/">others</a>.
</p>
<img align="center" src="https://raw.githubusercontent.com/jotaf98/overboard/master/images/screen1.png" /><br><br>

<p align="center">
Custom visualisations (tensors and any custom plot with familiar <b>MatPlotLib</b> syntax).</p>
<img align="center" src="https://raw.githubusercontent.com/jotaf98/overboard/master/images/screen2.png" /><br><br>

<p align="center">
A sortable table of <b>hyper-parameters</b> with Python-syntax filtering.
</p>
<img align="center" src="https://raw.githubusercontent.com/jotaf98/overboard/master/images/screen8.png" /><br><br>

<p align="center">
<b>Plot percentile intervals (<b>shaded plots</b>), custom X/Y axes</b>, and hyper-parameters (<b>bubble plots</b>).
</p>
<img align="center" src="https://raw.githubusercontent.com/jotaf98/overboard/master/images/screen7.png" /><br>



# Installation

You can install the dependencies with:

- With Conda: `conda install pyqt=5.12 pyqtgraph=0.11 -c conda-forge`

- With pip: `pip install pyqt5==5.12 pyqtgraph==0.11`

Finally, OverBoard itself can be installed with: `pip install fs==2.4 overboard`
(Conda seems to be too strict when installing [PyFileSystem/fs](https://www.pyfilesystem.org), so pip should be preferred.)

Optional:
- `pip install fs.sshfs` to support remote files through SSH.

- PyOpenGL 3.1 (either through conda or pip) if you intend to use custom 3D plots with [PyQtGraph](https://pyqtgraph.readthedocs.io/en/latest/3dgraphics.html).

- MatPlotLib if you intend to use it for custom plots.



## Installation - logger only

Your scripts can log data without installing the full GUI and its dependencies (so your remote GPU cluster does not need PyQt at all).

Just use: `pip install overboard_logger`

And remember to import `overboard_logger` instead of `overboard` in your scripts.


# Usage

- Main interface: `python3 -m overboard <logs-directory>`

- Logging experiments is simple:
```python
from overboard import Logger

with Logger('./logs') as logger:
  for iteration in range(100):
    logger.append({'loss': 0, 'error': 0})
```

You can also pass in a `meta` keyword argument, which can be a `dict` with hyper-parameters names and values (or other meta-data), to help organize your experiments. These will be displayed in a handy table, which supports sorting and filtering. The `meta` data can also be an `argparse.Namespace`, which is useful if your hyper-parameters are command-line arguments parsed with `argparse`.

By default a unique folder (using the current timestamp) is created for the logs. For full documentation on initialization arguments and other methods, type `pydoc overboard` on the command-line (Python built-in doc viewer).

You can also check the `examples` directory:

- [`examples/basic.py`](examples/basic.py): A minimal example. Generates some test logs.
- [`examples/mnist.py`](examples/mnist.py): The mandatory MNIST example. Also shows a custom MatPlotLib plot (a confusion matrix).
- [`examples/example_2d.py`](examples/example_2d.py): Example custom 2D plot, with PyQtGraph (faster than MatPlotLib).
- [`examples/example_3d.py`](examples/example_3d.py): Example custom 3D plot, with PyQtGraph. Requires PyOpenGL.

A note about importing: You can either import the `Logger` class from `overboard` or from `overboard_logger`. If you installed the "logger only" version as described above (no dependencies), then you can only import from `overboard_logger`.


## Remote experiments

It's as simple as:

```
python -m overboard ssh://username:password@hostname/path-to-experiments
```

...replacing your SSH user name, password, host name/server, and the directory where OverBoard should look for experiments. The default port is 22, which you can override with :23 or another port number after the host name.

There are a [number of other settings](https://github.com/althonos/fs.sshfs#constructor), which you can append after the path. For example, append `?keepalive=60&config_path=~/.ssh/config` to set the keepalive packets interval to 60 seconds, and specify an OpenSSH configuration file path.

[Other remote file systems](https://www.pyfilesystem.org/page/index-of-filesystems/) are available by using [appropriate prefixes](https://docs.pyfilesystem.org/en/latest/openers.html) (e.g. `ftp://`).


## Interface tips & tricks

- Click a plot title to hide it (moving it to the bottom) or to show it again.

- Click a plot line to select that experiment in the table, and vice-versa.

- Use the mouse wheel to zoom and drag to pan in a plot or custom visualization.

- Click the "A" button in the bottom-left of a plot to reset the zoom/pan.

- Choose an hyper-parameter as the "X axis" in the sidebar to compare different hyper-parameters graphically (*bubble plot*). Click a bubble to highlight that experiment. If the hyper-parameter is numerical but has wildly different orders of magnitude, check "Treat X as categorical". By default, each bubble's Y coordinate (e.g. accuracy) is taken from the last iteration; in "Scalar display" you can choose the maximum or minimum across iterations.

- If you have multiple runs with different random seeds (stored as hyper-parameter "seed" for example), select "Merge: seed" in the sidebar to merge them into *shaded plots* (you can then select whether to show the mean, median, range or standard deviations).

- You can *split* all experiments into different plots by selected "Panels: One per run" in the sidebar, and selecting a metric to plot in "Y axis". Similarly, they can be split by a hyper-parameter value (e.g. a different algorithm in each panel, but each has multiple plots/runs).


## Author

[João Henriques](http://www.robots.ox.ac.uk/~joao/), [Visual Geometry Group (VGG)](http://www.robots.ox.ac.uk/~vgg/), University of Oxford





%package help
Summary:	Development documents and examples for overboard
Provides:	python3-overboard-doc
%description help
# OverBoard
OverBoard is a lightweight yet powerful dashboard to monitor your experiments.

<br>
<p align="center">
Load <b>remote experiments in real-time</b> through <b>SSH/FTP</b> and <a href="https://www.pyfilesystem.org/page/index-of-filesystems/">others</a>.
</p>
<img align="center" src="https://raw.githubusercontent.com/jotaf98/overboard/master/images/screen1.png" /><br><br>

<p align="center">
Custom visualisations (tensors and any custom plot with familiar <b>MatPlotLib</b> syntax).</p>
<img align="center" src="https://raw.githubusercontent.com/jotaf98/overboard/master/images/screen2.png" /><br><br>

<p align="center">
A sortable table of <b>hyper-parameters</b> with Python-syntax filtering.
</p>
<img align="center" src="https://raw.githubusercontent.com/jotaf98/overboard/master/images/screen8.png" /><br><br>

<p align="center">
<b>Plot percentile intervals (<b>shaded plots</b>), custom X/Y axes</b>, and hyper-parameters (<b>bubble plots</b>).
</p>
<img align="center" src="https://raw.githubusercontent.com/jotaf98/overboard/master/images/screen7.png" /><br>



# Installation

You can install the dependencies with:

- With Conda: `conda install pyqt=5.12 pyqtgraph=0.11 -c conda-forge`

- With pip: `pip install pyqt5==5.12 pyqtgraph==0.11`

Finally, OverBoard itself can be installed with: `pip install fs==2.4 overboard`
(Conda seems to be too strict when installing [PyFileSystem/fs](https://www.pyfilesystem.org), so pip should be preferred.)

Optional:
- `pip install fs.sshfs` to support remote files through SSH.

- PyOpenGL 3.1 (either through conda or pip) if you intend to use custom 3D plots with [PyQtGraph](https://pyqtgraph.readthedocs.io/en/latest/3dgraphics.html).

- MatPlotLib if you intend to use it for custom plots.



## Installation - logger only

Your scripts can log data without installing the full GUI and its dependencies (so your remote GPU cluster does not need PyQt at all).

Just use: `pip install overboard_logger`

And remember to import `overboard_logger` instead of `overboard` in your scripts.


# Usage

- Main interface: `python3 -m overboard <logs-directory>`

- Logging experiments is simple:
```python
from overboard import Logger

with Logger('./logs') as logger:
  for iteration in range(100):
    logger.append({'loss': 0, 'error': 0})
```

You can also pass in a `meta` keyword argument, which can be a `dict` with hyper-parameters names and values (or other meta-data), to help organize your experiments. These will be displayed in a handy table, which supports sorting and filtering. The `meta` data can also be an `argparse.Namespace`, which is useful if your hyper-parameters are command-line arguments parsed with `argparse`.

By default a unique folder (using the current timestamp) is created for the logs. For full documentation on initialization arguments and other methods, type `pydoc overboard` on the command-line (Python built-in doc viewer).

You can also check the `examples` directory:

- [`examples/basic.py`](examples/basic.py): A minimal example. Generates some test logs.
- [`examples/mnist.py`](examples/mnist.py): The mandatory MNIST example. Also shows a custom MatPlotLib plot (a confusion matrix).
- [`examples/example_2d.py`](examples/example_2d.py): Example custom 2D plot, with PyQtGraph (faster than MatPlotLib).
- [`examples/example_3d.py`](examples/example_3d.py): Example custom 3D plot, with PyQtGraph. Requires PyOpenGL.

A note about importing: You can either import the `Logger` class from `overboard` or from `overboard_logger`. If you installed the "logger only" version as described above (no dependencies), then you can only import from `overboard_logger`.


## Remote experiments

It's as simple as:

```
python -m overboard ssh://username:password@hostname/path-to-experiments
```

...replacing your SSH user name, password, host name/server, and the directory where OverBoard should look for experiments. The default port is 22, which you can override with :23 or another port number after the host name.

There are a [number of other settings](https://github.com/althonos/fs.sshfs#constructor), which you can append after the path. For example, append `?keepalive=60&config_path=~/.ssh/config` to set the keepalive packets interval to 60 seconds, and specify an OpenSSH configuration file path.

[Other remote file systems](https://www.pyfilesystem.org/page/index-of-filesystems/) are available by using [appropriate prefixes](https://docs.pyfilesystem.org/en/latest/openers.html) (e.g. `ftp://`).


## Interface tips & tricks

- Click a plot title to hide it (moving it to the bottom) or to show it again.

- Click a plot line to select that experiment in the table, and vice-versa.

- Use the mouse wheel to zoom and drag to pan in a plot or custom visualization.

- Click the "A" button in the bottom-left of a plot to reset the zoom/pan.

- Choose an hyper-parameter as the "X axis" in the sidebar to compare different hyper-parameters graphically (*bubble plot*). Click a bubble to highlight that experiment. If the hyper-parameter is numerical but has wildly different orders of magnitude, check "Treat X as categorical". By default, each bubble's Y coordinate (e.g. accuracy) is taken from the last iteration; in "Scalar display" you can choose the maximum or minimum across iterations.

- If you have multiple runs with different random seeds (stored as hyper-parameter "seed" for example), select "Merge: seed" in the sidebar to merge them into *shaded plots* (you can then select whether to show the mean, median, range or standard deviations).

- You can *split* all experiments into different plots by selected "Panels: One per run" in the sidebar, and selecting a metric to plot in "Y axis". Similarly, they can be split by a hyper-parameter value (e.g. a different algorithm in each panel, but each has multiple plots/runs).


## Author

[João Henriques](http://www.robots.ox.ac.uk/~joao/), [Visual Geometry Group (VGG)](http://www.robots.ox.ac.uk/~vgg/), University of Oxford





%prep
%autosetup -n overboard-1.0.1

%build
%py3_build

%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
	find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
	find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
	find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
	find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
	find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .

%files -n python3-overboard -f filelist.lst
%dir %{python3_sitelib}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Mon May 29 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.1-1
- Package Spec generated