hiplot-mm 0.0.3rc0__tar.gz → 0.0.3rc2__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.
- {hiplot_mm-0.0.3rc0/hiplot_mm.egg-info → hiplot_mm-0.0.3rc2}/PKG-INFO +78 -23
- hiplot_mm-0.0.3rc2/README.md +127 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/__init__.py +1 -1
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/fetchers.py +1 -1
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/fetchers_demo.py +2 -2
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/ipython.py +2 -2
- hiplot_mm-0.0.3rc2/hiplot/pkginfo.py +15 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/render.py +2 -2
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/server.py +1 -1
- hiplot_mm-0.0.3rc2/hiplot/static/built/hiplot.bundle.js +3 -0
- hiplot_mm-0.0.3rc2/hiplot/static/built/streamlit_component/hiplot_streamlit.bundle.js +3 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/test_render.py +2 -2
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2/hiplot_mm.egg-info}/PKG-INFO +78 -23
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot_mm.egg-info/SOURCES.txt +0 -1
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot_mm.egg-info/entry_points.txt +1 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot_mm.egg-info/requires.txt +2 -3
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/pyproject.toml +13 -6
- hiplot_mm-0.0.3rc0/README.md +0 -71
- hiplot_mm-0.0.3rc0/hiplot/pkginfo.py +0 -22
- hiplot_mm-0.0.3rc0/hiplot/static/built/hiplot.bundle.js +0 -3
- hiplot_mm-0.0.3rc0/hiplot/static/built/streamlit_component/hiplot_streamlit.bundle.js +0 -3
- hiplot_mm-0.0.3rc0/setup.py +0 -12
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/LICENSE +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/MANIFEST.in +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/NOTICE +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/__main__.py +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/compress.py +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/experiment.py +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/py.typed +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/static/built/streamlit_component/index.html +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/static/icon-w.svg +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/static/icon.png +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/static/icon.svg +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/static/logo-w.svg +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/static/logo.png +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/static/logo.svg +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/static/thumbnail.png +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/streamlit_helpers.py +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/templates/index.html +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/test_experiment.py +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot/test_fetchers.py +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot_mm.egg-info/dependency_links.txt +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/hiplot_mm.egg-info/top_level.txt +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/requirements/dev.txt +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/requirements/main.txt +0 -0
- {hiplot_mm-0.0.3rc0 → hiplot_mm-0.0.3rc2}/setup.cfg +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hiplot-mm
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3rc2
|
|
4
4
|
Summary: High dimensional Interactive Plotting tool
|
|
5
5
|
Author: Facebook AI Research, mathematicalmichael @ Mind the Math, LLC
|
|
6
6
|
License-Expression: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/
|
|
7
|
+
Project-URL: Homepage, https://github.com/mindthemath/hiplot
|
|
8
8
|
Project-URL: Documentation, https://facebookresearch.github.io/hiplot/
|
|
9
|
-
Project-URL: Repository, https://github.com/
|
|
9
|
+
Project-URL: Repository, https://github.com/mindthemath/hiplot
|
|
10
10
|
Classifier: Development Status :: 4 - Beta
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: Intended Audience :: Science/Research
|
|
@@ -38,10 +38,9 @@ Provides-Extra: all
|
|
|
38
38
|
Requires-Dist: hiplot-mm[notebook,server,streamlit]; extra == "all"
|
|
39
39
|
Provides-Extra: dev
|
|
40
40
|
Requires-Dist: pytest; extra == "dev"
|
|
41
|
-
Requires-Dist:
|
|
41
|
+
Requires-Dist: ty; extra == "dev"
|
|
42
42
|
Requires-Dist: ipykernel; extra == "dev"
|
|
43
43
|
Requires-Dist: wheel; extra == "dev"
|
|
44
|
-
Requires-Dist: selenium; extra == "dev"
|
|
45
44
|
Requires-Dist: mistune==0.8.4; extra == "dev"
|
|
46
45
|
Requires-Dist: twine; extra == "dev"
|
|
47
46
|
Requires-Dist: pre-commit; extra == "dev"
|
|
@@ -51,37 +50,64 @@ Requires-Dist: beautifulsoup4; extra == "dev"
|
|
|
51
50
|
Requires-Dist: optuna; extra == "dev"
|
|
52
51
|
Requires-Dist: sphinx==5.2.0; extra == "dev"
|
|
53
52
|
Requires-Dist: guzzle_sphinx_theme==0.7.11; extra == "dev"
|
|
54
|
-
Requires-Dist: m2r2
|
|
53
|
+
Requires-Dist: m2r2>=0.3.4; extra == "dev"
|
|
55
54
|
Requires-Dist: flask; extra == "dev"
|
|
56
55
|
Requires-Dist: flask-compress; extra == "dev"
|
|
57
56
|
Requires-Dist: ipython>=7.0.1; extra == "dev"
|
|
58
57
|
Dynamic: license-file
|
|
59
58
|
|
|
60
|
-
# HiPlot - High dimensional Interactive Plotting
|
|
59
|
+
# HiPlot - High dimensional Interactive Plotting
|
|
61
60
|
|
|
61
|
+

|
|
62
62
|
|
|
63
|
-
](https://opensource.fb.com/support-ukraine)
|
|
63
|
+
[](https://github.com/mindthemath/hiplot/actions/workflows/ci.yml)
|
|
64
|
+
[](https://github.com/mindthemath/hiplot/actions/workflows/release.yml)
|
|
66
65
|
[](https://opensource.org/licenses/MIT)
|
|
67
|
-
[](https://pypi.python.org/pypi/hiplot-mm/)
|
|
67
|
+
[](https://pypi.python.org/pypi/hiplot-mm/)
|
|
68
|
+
[](https://colab.research.google.com/github/mindthemath/hiplot/blob/main/examples/HiPlotColabExample.ipynb)
|
|
68
69
|
|
|
70
|
+
> **Community-maintained fork**: This is a community-maintained fork of [Facebook Research's HiPlot](https://github.com/facebookresearch/hiplot), which has been archived. We aim to keep the project alive with bug fixes, security updates, and new features.
|
|
69
71
|
|
|
70
72
|
HiPlot is a lightweight interactive visualization tool to help AI researchers discover correlations and patterns in high-dimensional data using parallel plots and other graphical ways to represent information.
|
|
71
73
|
|
|
72
|
-
### [Try a demo now with sweep data](https://
|
|
74
|
+
### [Try a demo now with sweep data](https://mindthemath.github.io/hiplot/_static/demo/ml1.csv.html) or [upload your CSV](https://mindthemath.github.io/hiplot/_static/hiplot_upload.html) or [](https://colab.research.google.com/github/mindthemath/hiplot/blob/main/examples/HiPlotColabExample.ipynb)
|
|
73
75
|
|
|
74
76
|
There are several modes to HiPlot:
|
|
75
77
|
- As a web-server (if your data is a CSV for instance)
|
|
76
|
-
- In a jupyter notebook (to visualize python data), or in [Streamlit apps](https://
|
|
78
|
+
- In a jupyter notebook (to visualize python data), or in [Streamlit apps](https://mindthemath.github.io/hiplot/tuto_streamlit.html)
|
|
77
79
|
- In CLI to render standalone HTML
|
|
78
80
|
|
|
81
|
+
## Quick Start
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Render a CSV to interactive HTML (no install needed)
|
|
85
|
+
uvx hiplot-mm data.csv > output.html
|
|
86
|
+
|
|
87
|
+
# Or start an interactive server
|
|
88
|
+
uvx --from 'hiplot-mm[server]' hiplot --port 8765
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Installation
|
|
79
92
|
|
|
80
93
|
```bash
|
|
81
|
-
|
|
94
|
+
# Core package (HTML export, CLI rendering)
|
|
95
|
+
pip install hiplot-mm
|
|
96
|
+
|
|
97
|
+
# With Jupyter notebook support
|
|
98
|
+
pip install hiplot-mm[notebook]
|
|
99
|
+
|
|
100
|
+
# With web server support (hiplot command)
|
|
101
|
+
pip install hiplot-mm[server]
|
|
102
|
+
|
|
103
|
+
# With Streamlit support
|
|
104
|
+
pip install hiplot-mm[streamlit]
|
|
105
|
+
|
|
106
|
+
# Everything
|
|
107
|
+
pip install hiplot-mm[all]
|
|
82
108
|
```
|
|
83
109
|
|
|
84
|
-
If you have a
|
|
110
|
+
If you have a Jupyter notebook, you can get started with something as simple as:
|
|
85
111
|
|
|
86
112
|
```python
|
|
87
113
|
import hiplot as hip
|
|
@@ -91,17 +117,46 @@ data = [{'dropout':0.1, 'lr': 0.001, 'loss': 10.0, 'optimizer': 'SGD'},
|
|
|
91
117
|
hip.Experiment.from_iterable(data).display()
|
|
92
118
|
```
|
|
93
119
|
|
|
94
|
-
### [See the live result](https://
|
|
95
|
-

|
|
121
|
+

|
|
96
122
|
|
|
97
123
|
## Links
|
|
98
124
|
|
|
99
|
-
*
|
|
100
|
-
* Documentation: https://
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
|
|
125
|
+
* Repository: https://github.com/mindthemath/hiplot
|
|
126
|
+
* Documentation: https://mindthemath.github.io/hiplot/
|
|
127
|
+
* PyPI package: https://pypi.org/project/hiplot-mm/
|
|
128
|
+
* Examples: https://github.com/mindthemath/hiplot/tree/main/examples
|
|
129
|
+
* Original blog post: https://ai.facebook.com/blog/hiplot-high-dimensional-interactive-plots-made-easy/
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
## Development
|
|
133
|
+
|
|
134
|
+
To build from source:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
# Install dependencies
|
|
138
|
+
bun install
|
|
139
|
+
uv sync --all-extras
|
|
140
|
+
|
|
141
|
+
# Build JavaScript bundles
|
|
142
|
+
bun run build
|
|
143
|
+
|
|
144
|
+
# Build Python package
|
|
145
|
+
uv build
|
|
146
|
+
|
|
147
|
+
# Or use the all-in-one build script
|
|
148
|
+
./build.sh
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**Output directories:**
|
|
152
|
+
- `npm-dist/` - NPM package artifacts
|
|
153
|
+
- `dist/` - Python wheel and sdist
|
|
154
|
+
- `hiplot/static/built/` - JS bundle included in Python package
|
|
155
|
+
|
|
156
|
+
**Run the dev server:**
|
|
157
|
+
```bash
|
|
158
|
+
uv run --extra server hiplot --port 8765
|
|
159
|
+
```
|
|
105
160
|
|
|
106
161
|
|
|
107
162
|
## Citing
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# HiPlot - High dimensional Interactive Plotting
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
[](https://github.com/mindthemath/hiplot/actions/workflows/ci.yml)
|
|
6
|
+
[](https://github.com/mindthemath/hiplot/actions/workflows/release.yml)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
[](https://pypi.python.org/pypi/hiplot-mm/)
|
|
9
|
+
[](https://pypi.python.org/pypi/hiplot-mm/)
|
|
10
|
+
[](https://colab.research.google.com/github/mindthemath/hiplot/blob/main/examples/HiPlotColabExample.ipynb)
|
|
11
|
+
|
|
12
|
+
> **Community-maintained fork**: This is a community-maintained fork of [Facebook Research's HiPlot](https://github.com/facebookresearch/hiplot), which has been archived. We aim to keep the project alive with bug fixes, security updates, and new features.
|
|
13
|
+
|
|
14
|
+
HiPlot is a lightweight interactive visualization tool to help AI researchers discover correlations and patterns in high-dimensional data using parallel plots and other graphical ways to represent information.
|
|
15
|
+
|
|
16
|
+
### [Try a demo now with sweep data](https://mindthemath.github.io/hiplot/_static/demo/ml1.csv.html) or [upload your CSV](https://mindthemath.github.io/hiplot/_static/hiplot_upload.html) or [](https://colab.research.google.com/github/mindthemath/hiplot/blob/main/examples/HiPlotColabExample.ipynb)
|
|
17
|
+
|
|
18
|
+
There are several modes to HiPlot:
|
|
19
|
+
- As a web-server (if your data is a CSV for instance)
|
|
20
|
+
- In a jupyter notebook (to visualize python data), or in [Streamlit apps](https://mindthemath.github.io/hiplot/tuto_streamlit.html)
|
|
21
|
+
- In CLI to render standalone HTML
|
|
22
|
+
|
|
23
|
+
## Quick Start
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Render a CSV to interactive HTML (no install needed)
|
|
27
|
+
uvx hiplot-mm data.csv > output.html
|
|
28
|
+
|
|
29
|
+
# Or start an interactive server
|
|
30
|
+
uvx --from 'hiplot-mm[server]' hiplot --port 8765
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Core package (HTML export, CLI rendering)
|
|
37
|
+
pip install hiplot-mm
|
|
38
|
+
|
|
39
|
+
# With Jupyter notebook support
|
|
40
|
+
pip install hiplot-mm[notebook]
|
|
41
|
+
|
|
42
|
+
# With web server support (hiplot command)
|
|
43
|
+
pip install hiplot-mm[server]
|
|
44
|
+
|
|
45
|
+
# With Streamlit support
|
|
46
|
+
pip install hiplot-mm[streamlit]
|
|
47
|
+
|
|
48
|
+
# Everything
|
|
49
|
+
pip install hiplot-mm[all]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
If you have a Jupyter notebook, you can get started with something as simple as:
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
import hiplot as hip
|
|
56
|
+
data = [{'dropout':0.1, 'lr': 0.001, 'loss': 10.0, 'optimizer': 'SGD'},
|
|
57
|
+
{'dropout':0.15, 'lr': 0.01, 'loss': 3.5, 'optimizer': 'Adam'},
|
|
58
|
+
{'dropout':0.3, 'lr': 0.1, 'loss': 4.5, 'optimizer': 'Adam'}]
|
|
59
|
+
hip.Experiment.from_iterable(data).display()
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### [See the live result](https://mindthemath.github.io/hiplot/_static/demo/demo_basic_usage.html)
|
|
63
|
+

|
|
64
|
+
|
|
65
|
+
## Links
|
|
66
|
+
|
|
67
|
+
* Repository: https://github.com/mindthemath/hiplot
|
|
68
|
+
* Documentation: https://mindthemath.github.io/hiplot/
|
|
69
|
+
* PyPI package: https://pypi.org/project/hiplot-mm/
|
|
70
|
+
* Examples: https://github.com/mindthemath/hiplot/tree/main/examples
|
|
71
|
+
* Original blog post: https://ai.facebook.com/blog/hiplot-high-dimensional-interactive-plots-made-easy/
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## Development
|
|
75
|
+
|
|
76
|
+
To build from source:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Install dependencies
|
|
80
|
+
bun install
|
|
81
|
+
uv sync --all-extras
|
|
82
|
+
|
|
83
|
+
# Build JavaScript bundles
|
|
84
|
+
bun run build
|
|
85
|
+
|
|
86
|
+
# Build Python package
|
|
87
|
+
uv build
|
|
88
|
+
|
|
89
|
+
# Or use the all-in-one build script
|
|
90
|
+
./build.sh
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Output directories:**
|
|
94
|
+
- `npm-dist/` - NPM package artifacts
|
|
95
|
+
- `dist/` - Python wheel and sdist
|
|
96
|
+
- `hiplot/static/built/` - JS bundle included in Python package
|
|
97
|
+
|
|
98
|
+
**Run the dev server:**
|
|
99
|
+
```bash
|
|
100
|
+
uv run --extra server hiplot --port 8765
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
## Citing
|
|
105
|
+
|
|
106
|
+
```bibtex
|
|
107
|
+
@misc{hiplot,
|
|
108
|
+
author = {Haziza, D. and Rapin, J. and Synnaeve, G.},
|
|
109
|
+
title = {{Hiplot, interactive high-dimensionality plots}},
|
|
110
|
+
year = {2020},
|
|
111
|
+
publisher = {GitHub},
|
|
112
|
+
journal = {GitHub repository},
|
|
113
|
+
howpublished = {\url{https://github.com/facebookresearch/hiplot}},
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Credits
|
|
118
|
+
Inspired by and based on code from [Kai Chang](http://bl.ocks.org/syntagmatic/3150059), [Mike Bostock](http://bl.ocks.org/1341021) and [Jason Davies](http://bl.ocks.org/1341281).
|
|
119
|
+
|
|
120
|
+
External contributors (*please add your name when you submit your first pull request*):
|
|
121
|
+
- [louismartin](https://github.com/louismartin)
|
|
122
|
+
- [GoldenCorgi](https://github.com/GoldenCorgi)
|
|
123
|
+
- [callistachang](https://github.com/callistachang)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
## License
|
|
127
|
+
HiPlot is [MIT](LICENSE) licensed, as found in the [LICENSE](LICENSE) file.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
from .experiment import (Experiment, ExperimentFetcherDoesntApply, ExperimentValidationError, ExperimentValidationCircularRef,
|
|
6
6
|
ExperimentValidationMissingParent, Datapoint, ExperimentDisplayed, ValueDef, ValueType, Displays)
|
|
7
7
|
from .server import run_server, run_server_main
|
|
8
|
-
from .pkginfo import
|
|
8
|
+
from .pkginfo import __version__, package_name
|
|
9
9
|
|
|
10
10
|
from . import fetchers
|
|
11
11
|
|
|
@@ -306,7 +306,7 @@ def get_fetcher(fetcher_spec: str) -> hip.ExperimentFetcher:
|
|
|
306
306
|
if module is None:
|
|
307
307
|
raise RuntimeError(f"Unable to create fetcher '{fetcher_spec}'")
|
|
308
308
|
|
|
309
|
-
return getattr(module, parts[-1])
|
|
309
|
+
return getattr(module, parts[-1])
|
|
310
310
|
|
|
311
311
|
|
|
312
312
|
def get_fetchers(add_fetchers: tp.List[str]) -> tp.List[hip.ExperimentFetcher]:
|
|
@@ -50,8 +50,8 @@ def demo_line_xy() -> hip.Experiment:
|
|
|
50
50
|
if i > 10:
|
|
51
51
|
from_parent = random.choice(exp.datapoints[-10:])
|
|
52
52
|
dp.from_uid = from_parent.uid # <-- Connect the parent to the child
|
|
53
|
-
dp.values['loss'] += from_parent.values['loss']
|
|
54
|
-
dp.values['param'] *= from_parent.values['param']
|
|
53
|
+
dp.values['loss'] += from_parent.values['loss']
|
|
54
|
+
dp.values['param'] *= from_parent.values['param']
|
|
55
55
|
exp.datapoints.append(dp)
|
|
56
56
|
# DEMO_LINE_XY_END
|
|
57
57
|
return exp
|
|
@@ -111,7 +111,7 @@ class IPythonExperimentDisplayed(exp.ExperimentDisplayed):
|
|
|
111
111
|
# msg is the comm_open message
|
|
112
112
|
|
|
113
113
|
# Register handler for later messages
|
|
114
|
-
@comm.on_msg
|
|
114
|
+
@comm.on_msg
|
|
115
115
|
def _recv(msg: t.Dict[str, t.Any]) -> None:
|
|
116
116
|
self._num_recv += 1
|
|
117
117
|
msg_data = msg["content"]["data"]
|
|
@@ -145,7 +145,7 @@ class IPythonExperimentDisplayed(exp.ExperimentDisplayed):
|
|
|
145
145
|
last_msg = self._last_data_per_type.get("brush_extents")
|
|
146
146
|
if last_msg is None:
|
|
147
147
|
raise self.no_data_received_error
|
|
148
|
-
return last_msg
|
|
148
|
+
return last_msg
|
|
149
149
|
|
|
150
150
|
|
|
151
151
|
def _should_embed_js_with_html() -> bool:
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
2
|
+
# This source code is licensed under the MIT license found in the
|
|
3
|
+
# LICENSE file in the root directory of this source tree.
|
|
4
|
+
|
|
5
|
+
from importlib.metadata import version, PackageNotFoundError
|
|
6
|
+
|
|
7
|
+
package_name = "hiplot-mm"
|
|
8
|
+
|
|
9
|
+
# Dynamic version from installed package metadata
|
|
10
|
+
# This ensures __version__ matches pyproject.toml when installed via pip
|
|
11
|
+
try:
|
|
12
|
+
__version__ = version(package_name)
|
|
13
|
+
except PackageNotFoundError:
|
|
14
|
+
# Package is not installed (e.g., running from source checkout)
|
|
15
|
+
__version__ = "0.0.0.dev0"
|
|
@@ -36,7 +36,7 @@ def html_inlinize(html: str, replace_local: bool = True) -> str:
|
|
|
36
36
|
static_root = str(Path(__file__).parent)
|
|
37
37
|
soup = BeautifulSoup(html, "html.parser")
|
|
38
38
|
for i in soup.find_all("link"):
|
|
39
|
-
href = i["href"]
|
|
39
|
+
href = str(i["href"])
|
|
40
40
|
if href.startswith("http") or href.startswith("//"):
|
|
41
41
|
continue
|
|
42
42
|
if not replace_local:
|
|
@@ -54,7 +54,7 @@ def html_inlinize(html: str, replace_local: bool = True) -> str:
|
|
|
54
54
|
i["href"] = f"data:{SUFFIX_TO_TYPE[file.suffix]};base64,{base64.b64encode(file.open('rb').read()).decode('ascii')}"
|
|
55
55
|
for i in soup.find_all("script"):
|
|
56
56
|
try:
|
|
57
|
-
src = i["src"]
|
|
57
|
+
src = str(i["src"])
|
|
58
58
|
except KeyError:
|
|
59
59
|
continue
|
|
60
60
|
if src.startswith("http") or src.startswith("//"):
|
|
@@ -51,7 +51,7 @@ def run_server(fetchers: List[exp.ExperimentFetcher], host: str = '127.0.0.1', p
|
|
|
51
51
|
|
|
52
52
|
def run_server_main() -> int:
|
|
53
53
|
parser = argparse.ArgumentParser(prog="HiPlot", description="Start HiPlot webserver")
|
|
54
|
-
parser.add_argument('--version', action='version', version=f'{pkginfo.package_name} {pkginfo.
|
|
54
|
+
parser.add_argument('--version', action='version', version=f'{pkginfo.package_name} {pkginfo.__version__}')
|
|
55
55
|
parser.add_argument("--host", type=str, default="127.0.0.1")
|
|
56
56
|
parser.add_argument("--port", type=int, default=5005)
|
|
57
57
|
parser.add_argument("--dev", action='store_true', help="Enable Flask Debug mode (watches for files modifications, etc..)")
|