deepboard 0.1.0__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. deepboard-0.2.0/.gitignore +171 -0
  2. {deepboard-0.1.0 → deepboard-0.2.0}/PKG-INFO +29 -29
  3. {deepboard-0.1.0 → deepboard-0.2.0}/README.md +9 -0
  4. deepboard-0.2.0/deepboard/__version__.py +4 -0
  5. deepboard-0.2.0/deepboard/gui/assets/artefacts.css +108 -0
  6. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/assets/base.css +40 -0
  7. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/assets/right_panel.css +5 -4
  8. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/assets/theme.css +9 -0
  9. deepboard-0.2.0/deepboard/gui/components/__init__.py +8 -0
  10. deepboard-0.2.0/deepboard/gui/components/artefact_group.py +12 -0
  11. deepboard-0.2.0/deepboard/gui/components/log_selector.py +22 -0
  12. deepboard-0.2.0/deepboard/gui/components/modal.py +20 -0
  13. deepboard-0.2.0/deepboard/gui/components/split_selector.py +21 -0
  14. deepboard-0.2.0/deepboard/gui/components/stat_line.py +8 -0
  15. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/entry.py +7 -0
  16. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/main.py +9 -2
  17. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/compare_page/components/chart.py +5 -5
  18. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/compare_page/components/compare_setup.py +2 -1
  19. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/compare_page/components/split_card.py +2 -1
  20. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/compare_page/routes.py +11 -3
  21. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/main_page/right_panel/__init__.py +4 -0
  22. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/main_page/right_panel/config.py +19 -0
  23. deepboard-0.2.0/deepboard/gui/pages/main_page/right_panel/fragments.py +133 -0
  24. deepboard-0.2.0/deepboard/gui/pages/main_page/right_panel/images.py +358 -0
  25. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/main_page/right_panel/run_info.py +7 -9
  26. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/main_page/right_panel/scalars.py +32 -9
  27. deepboard-0.2.0/deepboard/gui/pages/main_page/right_panel/template.py +151 -0
  28. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/main_page/routes.py +5 -0
  29. deepboard-0.1.0/deepboard.egg-info/requires.txt → deepboard-0.2.0/deepboard/gui/requirements.txt +2 -1
  30. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/utils.py +23 -1
  31. deepboard-0.2.0/deepboard/resultTable/logwritter.py +667 -0
  32. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/resultTable/resultTable.py +122 -72
  33. deepboard-0.2.0/deepboard/resultTable/table_schema.py +135 -0
  34. deepboard-0.2.0/pyproject.toml +55 -0
  35. deepboard-0.1.0/MANIFEST.in +0 -1
  36. deepboard-0.1.0/deepboard/__version__.py +0 -1
  37. deepboard-0.1.0/deepboard/gui/components/__init__.py +0 -3
  38. deepboard-0.1.0/deepboard/gui/pages/main_page/right_panel/template.py +0 -87
  39. deepboard-0.1.0/deepboard/resultTable/logwritter.py +0 -321
  40. deepboard-0.1.0/deepboard/resultTable/results/configs/1.yml +0 -6
  41. deepboard-0.1.0/deepboard/resultTable/results/configs/2.yml +0 -6
  42. deepboard-0.1.0/deepboard/resultTable/results/configs/3.yml +0 -6
  43. deepboard-0.1.0/deepboard/resultTable/results/configs/4.yml +0 -6
  44. deepboard-0.1.0/deepboard/resultTable/results/configs/5.yml +0 -6
  45. deepboard-0.1.0/deepboard/resultTable/results/configs/6.yml +0 -6
  46. deepboard-0.1.0/deepboard/resultTable/results/myconfig.yml +0 -6
  47. deepboard-0.1.0/deepboard/resultTable/table_schema.py +0 -183
  48. deepboard-0.1.0/deepboard.egg-info/PKG-INFO +0 -164
  49. deepboard-0.1.0/deepboard.egg-info/SOURCES.txt +0 -72
  50. deepboard-0.1.0/deepboard.egg-info/dependency_links.txt +0 -1
  51. deepboard-0.1.0/deepboard.egg-info/entry_points.txt +0 -2
  52. deepboard-0.1.0/deepboard.egg-info/top_level.txt +0 -1
  53. deepboard-0.1.0/setup.cfg +0 -4
  54. deepboard-0.1.0/setup.py +0 -54
  55. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/__init__.py +0 -0
  56. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/THEME.yml +0 -0
  57. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/__init__.py +0 -0
  58. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/assets/base.js +0 -0
  59. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/assets/charts.css +0 -0
  60. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/assets/compare.css +0 -0
  61. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/assets/datagrid.css +0 -0
  62. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/assets/fileview.css +0 -0
  63. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/components/chart_type.py +0 -0
  64. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/components/legend.py +0 -0
  65. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/components/smoother.py +0 -0
  66. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/__init__.py +0 -0
  67. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/compare_page/__init__.py +0 -0
  68. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/compare_page/compare_page.py +0 -0
  69. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/compare_page/components/__init__.py +0 -0
  70. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/compare_page/components/card_list.py +0 -0
  71. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/compare_page/components/utils.py +0 -0
  72. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/main_page/__init__.py +0 -0
  73. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/main_page/datagrid/__init__.py +0 -0
  74. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/main_page/datagrid/compare_button.py +0 -0
  75. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/main_page/datagrid/datagrid.py +0 -0
  76. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/main_page/datagrid/handlers.py +0 -0
  77. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/main_page/datagrid/header.py +0 -0
  78. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/main_page/datagrid/routes.py +0 -0
  79. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/main_page/datagrid/row.py +0 -0
  80. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/main_page/datagrid/sortable_column_js.py +0 -0
  81. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/main_page/datagrid/utils.py +0 -0
  82. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/main_page/handlers.py +0 -0
  83. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/main_page/main_page.py +0 -0
  84. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/main_page/right_panel/hparams.py +0 -0
  85. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/gui/pages/not_found.py +0 -0
  86. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/resultTable/__init__.py +0 -0
  87. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/resultTable/cursor.py +0 -0
  88. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/resultTable/scalar.py +0 -0
  89. {deepboard-0.1.0 → deepboard-0.2.0}/deepboard/resultTable/utils.py +0 -0
@@ -0,0 +1,171 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/#use-with-ide
110
+ .pdm.toml
111
+
112
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
+ __pypackages__/
114
+
115
+ # Celery stuff
116
+ celerybeat-schedule
117
+ celerybeat.pid
118
+
119
+ # SageMath parsed files
120
+ *.sage.py
121
+
122
+ # Environments
123
+ .env
124
+ .venv
125
+ env/
126
+ venv/
127
+ ENV/
128
+ env.bak/
129
+ venv.bak/
130
+
131
+ # Spyder project settings
132
+ .spyderproject
133
+ .spyproject
134
+
135
+ # Rope project settings
136
+ .ropeproject
137
+
138
+ # mkdocs documentation
139
+ /site
140
+
141
+ # mypy
142
+ .mypy_cache/
143
+ .dmypy.json
144
+ dmypy.json
145
+
146
+ # Pyre type checker
147
+ .pyre/
148
+
149
+ # pytype static type analyzer
150
+ .pytype/
151
+
152
+ # Cython debug symbols
153
+ cython_debug/
154
+
155
+ # MacOS
156
+ .DS_Store
157
+
158
+ # PyCharm
159
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
160
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
161
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
162
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
163
+ .idea/
164
+
165
+ tmp.py
166
+
167
+ results/
168
+
169
+ .sesskey
170
+
171
+ tmp*
@@ -1,36 +1,27 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepboard
3
- Version: 0.1.0
4
- Summary: A tool to log you experiment results and explore them in a gui
5
- Home-page: https://github.com/anthol42/deepboard
6
- Author: Anthony Lavertu
7
- Author-email: alavertu2@gmail.com
3
+ Version: 0.2.0
4
+ Summary: Organize your research project like a pro with Deepboard
5
+ Project-URL: Homepage, https://github.com/anthol42/deepboard
8
6
  Project-URL: Issues, https://github.com/anthol42/deepboard/issues
9
- Keywords: deepboard,deep,board,pytorch,torch,tensorflow,jax,tensorboard
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Operating System :: POSIX :: Linux
12
- Classifier: Operating System :: MacOS
7
+ Author-email: Anthony Lavertu <alavertu2@gmail.com>
8
+ Keywords: board,deep,deepboard,jax,pytorch,tensorboard,tensorflow,torch
13
9
  Classifier: Development Status :: 4 - Beta
14
- Classifier: Intended Audience :: Science/Research
15
10
  Classifier: Intended Audience :: Education
11
+ Classifier: Intended Audience :: Science/Research
12
+ Classifier: Operating System :: MacOS
13
+ Classifier: Operating System :: POSIX :: Linux
14
+ Classifier: Programming Language :: Python :: 3
16
15
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
17
- Requires-Python: >=3.9
18
- Description-Content-Type: text/markdown
19
- Requires-Dist: python-fasthtml
20
- Requires-Dist: fh-plotly
21
- Requires-Dist: MarkupSafe
16
+ Requires-Python: >=3.10
17
+ Requires-Dist: matplotlib
22
18
  Requires-Dist: pandas
23
- Dynamic: author
24
- Dynamic: author-email
25
- Dynamic: classifier
26
- Dynamic: description
27
- Dynamic: description-content-type
28
- Dynamic: home-page
29
- Dynamic: keywords
30
- Dynamic: project-url
31
- Dynamic: requires-dist
32
- Dynamic: requires-python
33
- Dynamic: summary
19
+ Requires-Dist: pillow
20
+ Provides-Extra: full
21
+ Requires-Dist: fh-plotly; extra == 'full'
22
+ Requires-Dist: markupsafe; extra == 'full'
23
+ Requires-Dist: python-fasthtml; extra == 'full'
24
+ Description-Content-Type: text/markdown
34
25
 
35
26
  # Deepboard
36
27
  This package include two modules that are work together:
@@ -41,10 +32,13 @@ implement a webUI to visualize the training details and training
41
32
  curves of any runs. In addition, it lets you commpare training curves
42
33
  between runs. You can even download the charts that you have generated:)
43
34
  ## 🔥 Screenshots 🔥
44
- ![](https://raw.githubusercontent.com/anthol42/deepboard/main/assets/main_view.png)
35
+ ![](./assets/main_view.png)
36
+
37
+
38
+ ![](./assets/compare_view.png)
45
39
 
46
40
 
47
- ![](https://raw.githubusercontent.com/anthol42/deepboard/main/assets/compare_view.png)
41
+ ![](./assets/full_table_view.png)
48
42
  ## 🌟 Project Philosophy
49
43
  Before diving in, it’s important to understand the philosophy behind this project. In deep learning, it’s easy to get
50
44
  swept up in the excitement — experimenting with countless configurations in search of the perfect setup. 🔬✨
@@ -100,10 +94,16 @@ If you're feeling a bit overwhelmed or would like a project example, the
100
94
  default template implements this philosophy, including the resultTable, making it a great starting point! 🚀
101
95
 
102
96
  ## 🛠️ Installation
97
+ To install only the `resultTable` module, which allows you to log your results inside a single file, you can run:
103
98
  ```shell
104
99
  pip install deepboard
105
100
  ```
106
101
 
102
+ To also install the `GUI` module, which allows you to visualize your results in a web UI, you can run:
103
+ ```shell
104
+ pip install deepboard[full]
105
+ ```
106
+
107
107
  ## 🚀 How to Use
108
108
  For your project, you will only need the `resultTable` module, as the `deepboard` module is primarily for the UI.
109
109
 
@@ -161,4 +161,4 @@ resultSocket.write_result(accuracy=accuracies.mean(), crossEntropy=losses.mean()
161
161
  To launch deepboard Web UI, simply run the command `deepboard` in your terminal with the path to your resultTable db:
162
162
  ```shell
163
163
  deepboard /path/to/resultTable.db
164
- ```
164
+ ```
@@ -11,6 +11,9 @@ between runs. You can even download the charts that you have generated:)
11
11
 
12
12
 
13
13
  ![](./assets/compare_view.png)
14
+
15
+
16
+ ![](./assets/full_table_view.png)
14
17
  ## 🌟 Project Philosophy
15
18
  Before diving in, it’s important to understand the philosophy behind this project. In deep learning, it’s easy to get
16
19
  swept up in the excitement — experimenting with countless configurations in search of the perfect setup. 🔬✨
@@ -66,10 +69,16 @@ If you're feeling a bit overwhelmed or would like a project example, the
66
69
  default template implements this philosophy, including the resultTable, making it a great starting point! 🚀
67
70
 
68
71
  ## 🛠️ Installation
72
+ To install only the `resultTable` module, which allows you to log your results inside a single file, you can run:
69
73
  ```shell
70
74
  pip install deepboard
71
75
  ```
72
76
 
77
+ To also install the `GUI` module, which allows you to visualize your results in a web UI, you can run:
78
+ ```shell
79
+ pip install deepboard[full]
80
+ ```
81
+
73
82
  ## 🚀 How to Use
74
83
  For your project, you will only need the `resultTable` module, as the `deepboard` module is primarily for the UI.
75
84
 
@@ -0,0 +1,4 @@
1
+ # This file is auto-generated by Hatchling. As such, do not:
2
+ # - modify
3
+ # - track in version control e.g. be sure to add to .gitignore
4
+ __version__ = VERSION = '0.2.0'
@@ -0,0 +1,108 @@
1
+ /*
2
+ This css file contains classes for all artefacts tabs:
3
+ - Images
4
+ - Figures
5
+ - Text
6
+ - Html fragments
7
+ */
8
+
9
+ .artefact-split-select{
10
+ appearance: none;
11
+ background-color: inherit;
12
+ color: var(--sp-color);
13
+ border: none;
14
+ /*border-bottom: var(--artefacts-split-option-border);*/
15
+ padding-left: 36px;
16
+ padding-right: 24px;
17
+ margin-bottom: 0;
18
+ font-size: 1.75em;
19
+ font-weight: bold;
20
+ outline: none;
21
+ transition: border 0.1s ease, box-shadow 0.1s ease;
22
+ cursor: pointer;
23
+
24
+ background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath fill='%23ccc' d='M7 10L0 0h14z'/%3E%3C/svg%3E");
25
+ background-repeat: no-repeat;
26
+ background-position: left 10px center;
27
+ background-size: 12px;
28
+ }
29
+ .artefact-split-option{
30
+ /* Empty for now */
31
+ }
32
+
33
+ .artefact-stats-column{
34
+ /* Nothing here yet */
35
+ }
36
+
37
+ .artefact-card-header{
38
+ display: flex;
39
+ flex-direction: row;
40
+ width: 100%;
41
+ justify-content: space-between;
42
+ padding-bottom: 1em;
43
+ border-bottom: var(--artefacts-header-line)
44
+ }
45
+
46
+ .artefact-card{
47
+ background-color: var(--artefacts-card-bg);
48
+ box-shadow: var(--artefacts-card-shadow);
49
+ padding: 1em;
50
+ border-radius: var(--artefacts-card-radius);
51
+ display: flex;
52
+ flex-direction: column;
53
+ /*Margin top: 1em and bottom: 1em. 0 otherwise*/
54
+ margin-bottom: 2em;
55
+ }
56
+
57
+ .artefact-group-container{
58
+ margin-top: 1em;
59
+ display: flex;
60
+ flex-direction: row;
61
+ flex-wrap: wrap;
62
+ gap: 1em;
63
+ justify-content: space-evenly;
64
+ }
65
+
66
+
67
+ .image{
68
+ width: var(--artefacts-image_size);
69
+ height: var(--artefacts-image_size);
70
+ display: inline-block;
71
+ overflow: hidden;
72
+ }
73
+
74
+ .interactive-image-container{
75
+ width: 92vw;
76
+ height: 100vh;
77
+ overflow: hidden;
78
+ margin: 20px auto;
79
+ background: inherit;
80
+ }
81
+ .interactive-image{
82
+ width: 100%;
83
+ height: 100%;
84
+ /*transition: transform 0.1s ease;*/
85
+ transform-origin: center center;
86
+ }
87
+
88
+ .interactive-image img {
89
+ object-fit: contain;
90
+ display: block;
91
+ }
92
+
93
+ .fragment-text-container {
94
+ background-color: var(--fv-bg);
95
+ padding: 1em;
96
+ border-radius: 0.25em;
97
+ overflow: auto;
98
+ width: 100%;
99
+ }
100
+
101
+ .fragment-text{
102
+ margin: 0;
103
+ padding: 0.5em;
104
+ font-size: 0.8rem;
105
+ color: var(--artefacts-text-color);
106
+ font-family: var(--artefacts-text-font), monospace;
107
+ white-space: pre-wrap;
108
+ }
@@ -82,9 +82,11 @@ body {
82
82
 
83
83
 
84
84
  .copy-container {
85
+ width: 100%;
85
86
  position: relative;
86
87
  display: inline-flex;
87
88
  align-items: center;
89
+ justify-content: space-between;
88
90
  gap: 8px;
89
91
  cursor: pointer;
90
92
  padding: 0;
@@ -165,4 +167,42 @@ body {
165
167
  display: flex;
166
168
  justify-content: center; /* Horizontal centering */
167
169
  align-items: center; /* Vertical centering */
170
+ }
171
+
172
+ .expand {
173
+ display: flex;
174
+ width: 100%;
175
+ justify-content: space-between;
176
+ }
177
+
178
+ img {
179
+ object-fit: contain;
180
+ width: 100%;
181
+ height: 100%;
182
+ /* Scale without interpolation */
183
+ image-rendering: pixelated; /* Modern browsers */
184
+ image-rendering: -moz-crisp-edges; /* Firefox fallback */
185
+ image-rendering: crisp-edges; /* Webkit fallback */
186
+ }
187
+
188
+ .modal-overlay{
189
+ position: fixed;
190
+ top: 0;
191
+ left: 0;
192
+ width: 100vw;
193
+ height: 100vh;
194
+ background-color: rgba(0, 0, 0, 0.75);
195
+ z-index: 999; /* Ensure it covers other content */
196
+ }
197
+ .modal-overlay.hidden{
198
+ display: none;
199
+ }
200
+ .modal{
201
+ width: 100%;
202
+ height: 100%;
203
+ display: flex;
204
+ flex-direction: column;
205
+ justify-content: center;
206
+ /* Center content vertically */
207
+ align-items: center;
168
208
  }
@@ -36,8 +36,8 @@
36
36
  display: flex;
37
37
  height: 100%;
38
38
  width: 100%;
39
- justify-content: left;
40
- padding-left: 4rem;
39
+ max-width: 49vw;
40
+ justify-content: right;
41
41
  padding-top: 2rem;
42
42
  }
43
43
 
@@ -52,6 +52,8 @@ margin: 0;
52
52
  display: flex;
53
53
  margin-bottom: 0;
54
54
  margin-top: 1rem;
55
+ max-width: 98%;
56
+ overflow-x: auto;
55
57
  }
56
58
 
57
59
  .tab {
@@ -61,7 +63,6 @@ margin: 0;
61
63
  color: var(--sp-color);
62
64
  border-top-left-radius: 10px;
63
65
  border-top-right-radius: 10px;
64
- margin-right: 4px;
65
66
  transition: background-color 0.2s ease;
66
67
  }
67
68
 
@@ -79,9 +80,9 @@ margin: 0;
79
80
  border-top: none;
80
81
  border-radius: 0 10px 10px 10px;
81
82
  color: var(--sp-color);
82
- width: 100%;
83
83
  height: 100%;
84
84
  overflow-y: auto;
85
+ overflow-x: hidden;
85
86
  }
86
87
 
87
88
  .right-panel-content{
@@ -66,6 +66,15 @@
66
66
  --chart-disabled-color: #555;
67
67
  --chart-typebox-shadow: 0 0 6px rgba(30, 144, 255, 0.5);
68
68
 
69
+ /*Artefacts (i.e. images, plots, text, etx)*/
70
+ --artefacts-card-bg: #1a1a1a;
71
+ --artefacts-card-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.05);
72
+ --artefacts-card-radius: 8px;
73
+ --artefacts-header-line: 2px solid #333;
74
+ --artefacts-image_size: 10em;
75
+ --artefacts-text-color: var(--secondary-text-color);
76
+ --artefacts-text-font: monospace;
77
+
69
78
  /*Compare page*/
70
79
  --cmp-card-bg: #2a2a2a;
71
80
  --cmp-card-shadow: 0 1px 7px 0.5px rgba(255, 255, 255, 0.2);
@@ -0,0 +1,8 @@
1
+ from .chart_type import ChartType
2
+ from .legend import Legend
3
+ from .smoother import Smoother
4
+ from .log_selector import LogSelector
5
+ from .modal import Modal
6
+ from .split_selector import SplitSelector
7
+ from .stat_line import StatLine
8
+ from .artefact_group import ArtefactGroup
@@ -0,0 +1,12 @@
1
+ from fasthtml.common import *
2
+
3
+ def ArtefactGroup(*artefacts):
4
+ """
5
+ Create a group of images in a flex container that adapts to the number of images.
6
+ :param images: List of PIL Image objects.
7
+ :return: Div containing the images.
8
+ """
9
+ return Div(
10
+ *artefacts,
11
+ cls="artefact-group-container",
12
+ )
@@ -0,0 +1,22 @@
1
+ from fasthtml.common import *
2
+
3
+ def LogSelector(session, path: str, selected_rows_key: str, session_path: str):
4
+ if selected_rows_key in session and "selected-rows" in session[selected_rows_key] and len(session[selected_rows_key]["selected-rows"]) > 0:
5
+ runIDs = session[selected_rows_key]["selected-rows"]
6
+ runIDs = ','.join([str(i) for i in runIDs])
7
+ else:
8
+ print("Warning: no selected lines")
9
+ runIDs = ""
10
+ print(session)
11
+
12
+ if "chart_scale" not in session[session_path]:
13
+ session[session_path]["chart_scale"] = "default"
14
+ type = session[session_path]["chart_scale"]
15
+ return Div(
16
+ H2("Log Scale", cls="setup-title"),
17
+ Input(type="checkbox", name="log scale", id=f"chart-scale-{runIDs}", value="scale", cls="chart-type-checkbox",
18
+ checked=type == "log", hx_get=f"{path}/change_scale?runIDs={runIDs}&log={type == 'log'}",
19
+ hx_swap="outerHTML", hx_target="#chart-scale-selector"),
20
+ style="display: flex; flex-direction: row; align-items: center; justify-content: space-between; width: 100%;",
21
+ id="chart-scale-selector"
22
+ )
@@ -0,0 +1,20 @@
1
+ from fasthtml.common import *
2
+
3
+
4
+ def Modal(*content, active: bool = False):
5
+ return Div(
6
+ Button(
7
+ I(cls="fas fa-times"),
8
+ hx_get="/close_modal",
9
+ hx_target="#modal",
10
+ hx_swap="outerHTML",
11
+ cls="close-button",
12
+ ) if active else None,
13
+ Div(
14
+ *content,
15
+ cls="modal",
16
+ onclick="event.stopPropagation();",
17
+ ),
18
+ cls="modal-overlay" if active else "modal-overlay hidden",
19
+ id="modal"
20
+ )
@@ -0,0 +1,21 @@
1
+ from fasthtml.common import *
2
+ from typing import Literal
3
+
4
+ def SplitSelector(runID, available_splits: List[str], selected: str, step: int, epoch: int, run_rep: int,
5
+ type: str, path: str, swap: bool = False):
6
+
7
+ swap_oob = dict(swap_oob="true") if swap else {}
8
+ return Select(
9
+ *[
10
+ Option(split.capitalize() if split else "", value=split, selected=selected == split, cls="artefact-split-option")
11
+ for split in available_splits
12
+ ],
13
+ name="split_select",
14
+ hx_get=f"{path}?runID={runID}&step={step}&epoch={epoch}&run_rep={run_rep}&type={type}",
15
+ hx_target=f"#artefact-card-{step}-{epoch}-{run_rep}",
16
+ hx_trigger="change",
17
+ hx_swap="outerHTML",
18
+ hx_params="*",
19
+ **swap_oob,
20
+ cls="artefact-split-select",
21
+ )
@@ -0,0 +1,8 @@
1
+ from fasthtml.common import *
2
+
3
+ def StatLine(label: str, value: str):
4
+ return Span(
5
+ H3(f"{label}: ", style="font-size: 1em; margin: 0.1em; margin-right: 0.5em; font-weight: bold;"),
6
+ H3(value, style="font-size: 1em; margin: 0.1em; font-weight: normal;"),
7
+ cls="expand"
8
+ )
@@ -4,6 +4,13 @@ import sys
4
4
 
5
5
 
6
6
  def main():
7
+ try:
8
+ import fasthtml # or whatever dependency is required
9
+ except ImportError:
10
+ raise ImportError(
11
+ "The GUI feature requires additional dependencies. Please install with:\n"
12
+ " pip install deepboard[full]"
13
+ )
7
14
  if os.path.dirname(__file__) not in sys.path:
8
15
  sys.path.insert(0, os.path.dirname(__file__))
9
16
  script_path = os.path.join(os.path.dirname(__file__), "main.py")
@@ -4,9 +4,10 @@ sys.path.append(os.getcwd())
4
4
  from fasthtml.common import *
5
5
  from deepboard.gui.pages.main_page.datagrid import SortableColumnsJs, right_click_handler_row, right_click_handler
6
6
  from deepboard.gui.pages.main_page import MainPage, build_main_page_endpoints
7
- from deepboard.gui.utils import prepare_db, Config, initiate_files, get_table_path_from_cli
7
+ from deepboard.gui.utils import prepare_db, Config, initiate_files, get_table_path_from_cli, verify_runids
8
8
  from deepboard.gui.pages.compare_page import build_compare_routes, ComparePage
9
9
  from deepboard.gui.pages import _not_found
10
+ from deepboard.gui.components import Modal
10
11
  from deepboard.resultTable import ResultTable
11
12
  from fh_plotly import plotly_headers
12
13
 
@@ -34,6 +35,7 @@ app = cls(
34
35
  Link(rel='stylesheet', href='assets/charts.css', type='text/css'),
35
36
  Link(rel='stylesheet', href='assets/fileview.css', type='text/css'),
36
37
  Link(rel='stylesheet', href='assets/compare.css', type='text/css'),
38
+ Link(rel='stylesheet', href='assets/artefacts.css', type='text/css'),
37
39
  Link(href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css", rel="stylesheet"),
38
40
  plotly_headers,
39
41
  Script(src="assets/base.js"),
@@ -45,7 +47,7 @@ app = cls(
45
47
  rt = app.route
46
48
  @rt("/assets/{fname:path}.{ext:static}")
47
49
  async def get(fname:str, ext:str):
48
- if fname == "theme" and ext == "css":
50
+ if fname == "theme" and ext == "css" and not DEBUG:
49
51
  if os.path.exists(os.path.expanduser('~/.config/deepboard/theme.css')):
50
52
  return FileResponse(os.path.expanduser('~/.config/deepboard/THEME.css'))
51
53
  root = os.path.dirname(os.path.abspath(__file__))
@@ -56,8 +58,13 @@ async def get(fname:str, ext:str):
56
58
  def get(session):
57
59
  if "show_hidden" not in session:
58
60
  session["show_hidden"] = False
61
+
62
+ # Check if row_selected exists.
63
+ verify_runids(session, rTable)
64
+
59
65
  return (Title("Table"),
60
66
  Div(id="custom-menu"),
67
+ Modal(P("Hellp world"), active=False),
61
68
  MainPage(session),
62
69
  )
63
70