coco-visualize 0.1.0a1__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.
- coco_visualize-0.1.0a1/.github/workflows/build-wheel.yml +26 -0
- coco_visualize-0.1.0a1/.github/workflows/tag_release.yml +40 -0
- coco_visualize-0.1.0a1/.github/workflows/test.yml +31 -0
- coco_visualize-0.1.0a1/.gitignore +0 -0
- coco_visualize-0.1.0a1/AUTHORS +6 -0
- coco_visualize-0.1.0a1/LICENSE +34 -0
- coco_visualize-0.1.0a1/MANIFEST.in +4 -0
- coco_visualize-0.1.0a1/PKG-INFO +39 -0
- coco_visualize-0.1.0a1/README.md +14 -0
- coco_visualize-0.1.0a1/cocoviz.svg +192 -0
- coco_visualize-0.1.0a1/example.ipynb +172 -0
- coco_visualize-0.1.0a1/pyproject.toml +59 -0
- coco_visualize-0.1.0a1/setup.cfg +4 -0
- coco_visualize-0.1.0a1/src/coco_visualize.egg-info/PKG-INFO +39 -0
- coco_visualize-0.1.0a1/src/coco_visualize.egg-info/SOURCES.txt +28 -0
- coco_visualize-0.1.0a1/src/coco_visualize.egg-info/dependency_links.txt +1 -0
- coco_visualize-0.1.0a1/src/coco_visualize.egg-info/requires.txt +4 -0
- coco_visualize-0.1.0a1/src/coco_visualize.egg-info/top_level.txt +1 -0
- coco_visualize-0.1.0a1/src/cocoviz/__init__.py +6 -0
- coco_visualize-0.1.0a1/src/cocoviz/_typing.py +4 -0
- coco_visualize-0.1.0a1/src/cocoviz/_version.py +16 -0
- coco_visualize-0.1.0a1/src/cocoviz/exceptions.py +45 -0
- coco_visualize-0.1.0a1/src/cocoviz/indicator.py +120 -0
- coco_visualize-0.1.0a1/src/cocoviz/result.py +313 -0
- coco_visualize-0.1.0a1/src/cocoviz/rtp.py +153 -0
- coco_visualize-0.1.0a1/src/cocoviz/targets.py +39 -0
- coco_visualize-0.1.0a1/src/cocoviz/utilities.py +23 -0
- coco_visualize-0.1.0a1/tests/test_result.py +45 -0
- coco_visualize-0.1.0a1/tests/test_resultset.py +42 -0
- coco_visualize-0.1.0a1/tests/test_runtime_profile.py +39 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: Build wheels
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ "main" ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ "main" ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
wheel:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- name: Set up Python
|
|
15
|
+
uses: actions/setup-python@v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.10"
|
|
18
|
+
- name: Install dependencies
|
|
19
|
+
run: python -m pip install --upgrade pip
|
|
20
|
+
- name: Build wheel
|
|
21
|
+
run: python -m pip wheel -w dist/ .
|
|
22
|
+
- name: Archive wheel
|
|
23
|
+
uses: actions/upload-artifact@v4
|
|
24
|
+
with:
|
|
25
|
+
name: python-wheel
|
|
26
|
+
path: dist/cocoviz*.whl
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
name: tag-release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
# Pattern matched against refs/tags
|
|
6
|
+
tags:
|
|
7
|
+
- 'v*' # This includes only tags starting with v
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build-source:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
id-token: write
|
|
15
|
+
# Dedicated environments with protections for publishing are strongly recommended.
|
|
16
|
+
environment:
|
|
17
|
+
name: release
|
|
18
|
+
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
|
|
19
|
+
# url: https://pypi.org/p/YOURPROJECT
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
- uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.10"
|
|
25
|
+
cache: "pip"
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: |
|
|
28
|
+
python -m pip install --upgrade pip
|
|
29
|
+
python -m pip install build
|
|
30
|
+
- name: Build source Python package
|
|
31
|
+
run: python -m build -s -o dist .
|
|
32
|
+
- name: Publish release distributions to PyPI
|
|
33
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
34
|
+
- name: Release
|
|
35
|
+
uses: softprops/action-gh-release@v2
|
|
36
|
+
with:
|
|
37
|
+
files: |
|
|
38
|
+
./dist/**
|
|
39
|
+
|
|
40
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
branches: [ "main" ]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
strategy:
|
|
11
|
+
fail-fast: false
|
|
12
|
+
matrix:
|
|
13
|
+
runs-on: [ubuntu-latest, macos-latest, windows-latest]
|
|
14
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
15
|
+
runs-on: ${{matrix.runs-on}}
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
19
|
+
uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: ${{ matrix.python-version }}
|
|
22
|
+
- name: Install dependencies
|
|
23
|
+
run: |
|
|
24
|
+
python -m pip install --upgrade pip
|
|
25
|
+
python -m pip install ruff pytest
|
|
26
|
+
- name: Install package
|
|
27
|
+
run: python -m pip install .
|
|
28
|
+
- name: Lint with ruff
|
|
29
|
+
run: ruff check --output-format=github .
|
|
30
|
+
- name: Run tests
|
|
31
|
+
run: python -m pytest tests/
|
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Copyright (c) by the NumBBO/CoCO team. See AUTHORS for more details.
|
|
2
|
+
|
|
3
|
+
Some rights reserved.
|
|
4
|
+
|
|
5
|
+
### 3-clause BSD License ###
|
|
6
|
+
|
|
7
|
+
Redistribution and use in source and binary forms of the software as well
|
|
8
|
+
as documentation, with or without modification, are permitted provided
|
|
9
|
+
that the following conditions are met:
|
|
10
|
+
|
|
11
|
+
1. Redistributions of source code must retain the above copyright
|
|
12
|
+
notice, this list of conditions and the following disclaimer.
|
|
13
|
+
|
|
14
|
+
2. Redistributions in binary form must reproduce the above
|
|
15
|
+
copyright notice, this list of conditions and the following
|
|
16
|
+
disclaimer in the documentation and/or other materials provided
|
|
17
|
+
with the distribution.
|
|
18
|
+
|
|
19
|
+
3. The names of the contributors may not be used to endorse or
|
|
20
|
+
promote products derived from this software without specific
|
|
21
|
+
prior written permission.
|
|
22
|
+
|
|
23
|
+
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
|
24
|
+
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
|
|
25
|
+
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
26
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
|
|
27
|
+
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
28
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
29
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
30
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
31
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
32
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
33
|
+
SOFTWARE AND DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
|
34
|
+
DAMAGE.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: coco-visualize
|
|
3
|
+
Version: 0.1.0a1
|
|
4
|
+
Summary: Standalone COCO visualization toolbox
|
|
5
|
+
Author-email: Dimo Brockhoff <dimo.brockhoff@inria.fr>, Nikolaus Hansen <nikolaus.hansen@inria.fr>, Olaf Mersmann <olafm@p-value.net>, Tea Tušar <tea.tusar@ijs.si>
|
|
6
|
+
License: BSD-3-Clause
|
|
7
|
+
Project-URL: Homepage, https://github.com/numbbo/coco
|
|
8
|
+
Project-URL: Documentation, https://numbbo.github.io/coco-doc/apidocs/cocoex/
|
|
9
|
+
Project-URL: Issues, https://github.com/numbbo/coco/issues
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
12
|
+
Classifier: Programming Language :: Python
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
License-File: AUTHORS
|
|
21
|
+
Requires-Dist: numpy>=2.0
|
|
22
|
+
Requires-Dist: polars>=0.20
|
|
23
|
+
Requires-Dist: matplotlib>=3.7
|
|
24
|
+
Requires-Dist: scipy>=1.14.0
|
|
25
|
+
|
|
26
|
+
<h1 align="center">
|
|
27
|
+
<img src="https://raw.githubusercontent.com/numbbo/coco-visualize/main/cocoviz.svg" width="400">
|
|
28
|
+
</h1><br>
|
|
29
|
+
|
|
30
|
+
[](https://pypi.org/project/coco-visualize/)
|
|
31
|
+
[](https://github.com/numbbo/coco-visualize/issues)
|
|
32
|
+

|
|
33
|
+
|
|
34
|
+
`cocoviz` is a minimalist visualization toolkit for benchmark experiments.
|
|
35
|
+
|
|
36
|
+
- **Website:** https://numbbo.github.io
|
|
37
|
+
- **Source code:** https://github.com/numbbo/coco-visualize/
|
|
38
|
+
- **Contributing:** https://github.com/numbbo/coco-visualize/pulls
|
|
39
|
+
- **Bug reports:** https://github.com/numbbo/coco-visualize/issues
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<h1 align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/numbbo/coco-visualize/main/cocoviz.svg" width="400">
|
|
3
|
+
</h1><br>
|
|
4
|
+
|
|
5
|
+
[](https://pypi.org/project/coco-visualize/)
|
|
6
|
+
[](https://github.com/numbbo/coco-visualize/issues)
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
`cocoviz` is a minimalist visualization toolkit for benchmark experiments.
|
|
10
|
+
|
|
11
|
+
- **Website:** https://numbbo.github.io
|
|
12
|
+
- **Source code:** https://github.com/numbbo/coco-visualize/
|
|
13
|
+
- **Contributing:** https://github.com/numbbo/coco-visualize/pulls
|
|
14
|
+
- **Bug reports:** https://github.com/numbbo/coco-visualize/issues
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 28.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
|
|
4
|
+
<svg
|
|
5
|
+
version="1.1"
|
|
6
|
+
id="Layer_1"
|
|
7
|
+
x="0px"
|
|
8
|
+
y="0px"
|
|
9
|
+
viewBox="0 0 130 130"
|
|
10
|
+
xml:space="preserve"
|
|
11
|
+
sodipodi:docname="cocoviz.svg"
|
|
12
|
+
width="130"
|
|
13
|
+
height="130"
|
|
14
|
+
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
|
|
15
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
16
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
17
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
18
|
+
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
|
19
|
+
id="defs16" /><sodipodi:namedview
|
|
20
|
+
id="namedview16"
|
|
21
|
+
pagecolor="#ffffff"
|
|
22
|
+
bordercolor="#000000"
|
|
23
|
+
borderopacity="0.25"
|
|
24
|
+
inkscape:showpageshadow="2"
|
|
25
|
+
inkscape:pageopacity="0.0"
|
|
26
|
+
inkscape:pagecheckerboard="0"
|
|
27
|
+
inkscape:deskcolor="#d1d1d1"
|
|
28
|
+
inkscape:zoom="6.1617162"
|
|
29
|
+
inkscape:cx="55.828602"
|
|
30
|
+
inkscape:cy="55.909748"
|
|
31
|
+
inkscape:window-width="3840"
|
|
32
|
+
inkscape:window-height="2054"
|
|
33
|
+
inkscape:window-x="-11"
|
|
34
|
+
inkscape:window-y="-11"
|
|
35
|
+
inkscape:window-maximized="1"
|
|
36
|
+
inkscape:current-layer="Layer_1" />
|
|
37
|
+
<style
|
|
38
|
+
type="text/css"
|
|
39
|
+
id="style1">
|
|
40
|
+
.st0{fill:#4E763B;}
|
|
41
|
+
.st1{fill:#FFFFFF;stroke:#FFFFFF;stroke-miterlimit:10;}
|
|
42
|
+
.st2{fill:#FFFFFF;}
|
|
43
|
+
.st3{fill:#FFFFFF;stroke:#4E763B;stroke-miterlimit:10;}
|
|
44
|
+
</style>
|
|
45
|
+
<g
|
|
46
|
+
id="g16"
|
|
47
|
+
transform="translate(-129.5,-86.49)">
|
|
48
|
+
<path
|
|
49
|
+
class="st0"
|
|
50
|
+
d="m 213.5,207.41 h -38 c -20.39,0 -36.92,-16.53 -36.92,-36.92 v -38 c 0,-20.39 16.53,-36.92 36.92,-36.92 h 38 c 20.39,0 36.92,16.53 36.92,36.92 v 38 c -0.01,20.4 -16.53,36.92 -36.92,36.92 z"
|
|
51
|
+
id="path1" />
|
|
52
|
+
<g
|
|
53
|
+
id="g13">
|
|
54
|
+
<line
|
|
55
|
+
class="st1"
|
|
56
|
+
x1="157.3"
|
|
57
|
+
y1="159.42"
|
|
58
|
+
x2="174.8"
|
|
59
|
+
y2="145.22"
|
|
60
|
+
id="line1" />
|
|
61
|
+
<line
|
|
62
|
+
class="st1"
|
|
63
|
+
x1="157.21001"
|
|
64
|
+
y1="159.42"
|
|
65
|
+
x2="152.95"
|
|
66
|
+
y2="181.55"
|
|
67
|
+
id="line2" />
|
|
68
|
+
<line
|
|
69
|
+
class="st1"
|
|
70
|
+
x1="197.09"
|
|
71
|
+
y1="142.25999"
|
|
72
|
+
x2="214.59"
|
|
73
|
+
y2="128.06"
|
|
74
|
+
id="line3" />
|
|
75
|
+
<circle
|
|
76
|
+
class="st2"
|
|
77
|
+
cx="153.59"
|
|
78
|
+
cy="178.24001"
|
|
79
|
+
r="3.52"
|
|
80
|
+
id="circle3" />
|
|
81
|
+
<circle
|
|
82
|
+
class="st2"
|
|
83
|
+
cx="235.49001"
|
|
84
|
+
cy="126.91"
|
|
85
|
+
r="3.52"
|
|
86
|
+
id="circle4" />
|
|
87
|
+
<line
|
|
88
|
+
class="st1"
|
|
89
|
+
x1="174.8"
|
|
90
|
+
y1="145.27"
|
|
91
|
+
x2="197.11"
|
|
92
|
+
y2="142.03999"
|
|
93
|
+
id="line4" />
|
|
94
|
+
<line
|
|
95
|
+
class="st1"
|
|
96
|
+
x1="214.59"
|
|
97
|
+
y1="128.06"
|
|
98
|
+
x2="237.09"
|
|
99
|
+
y2="126.82"
|
|
100
|
+
id="line5" />
|
|
101
|
+
<g
|
|
102
|
+
id="g5">
|
|
103
|
+
<circle
|
|
104
|
+
class="st3"
|
|
105
|
+
cx="157.3"
|
|
106
|
+
cy="159.42"
|
|
107
|
+
r="7.2399998"
|
|
108
|
+
id="circle5" />
|
|
109
|
+
<path
|
|
110
|
+
class="st0"
|
|
111
|
+
d="m 160.05,159.42 c 0,1.52 -1.23,2.75 -2.75,2.75 -1.52,0 -2.75,-1.23 -2.75,-2.75 0,-1.52 1.23,-2.75 2.75,-2.75 0.91,0 1.72,0.44 2.22,1.13 0.33,0.45 0.53,1.01 0.53,1.62 z"
|
|
112
|
+
id="path5" />
|
|
113
|
+
</g>
|
|
114
|
+
<g
|
|
115
|
+
id="g7">
|
|
116
|
+
<path
|
|
117
|
+
class="st0"
|
|
118
|
+
d="m 160.07,159.42 c 0,1.53 -1.24,2.76 -2.76,2.76 -1.53,0 -2.76,-1.24 -2.76,-2.76 0,-1.53 1.24,-2.76 2.76,-2.76 0.92,0 1.73,0.45 2.23,1.14 0.33,0.45 0.53,1.01 0.53,1.62 z"
|
|
119
|
+
id="path6" />
|
|
120
|
+
<path
|
|
121
|
+
class="st0"
|
|
122
|
+
d="m 159.15,157.93 4.49,-2.68 3.58,9.24 -7.83,-3.27 c 0.25,-0.56 0.77,-1.9 0.59,-2.5 -0.13,-0.42 -0.42,-0.45 -0.83,-0.79 z"
|
|
123
|
+
id="path7" />
|
|
124
|
+
</g>
|
|
125
|
+
<g
|
|
126
|
+
id="g8">
|
|
127
|
+
<circle
|
|
128
|
+
class="st3"
|
|
129
|
+
cx="174.8"
|
|
130
|
+
cy="145.27"
|
|
131
|
+
r="7.2399998"
|
|
132
|
+
id="circle7" />
|
|
133
|
+
<path
|
|
134
|
+
class="st0"
|
|
135
|
+
d="m 177.55,145.27 c 0,1.52 -1.23,2.75 -2.75,2.75 -1.52,0 -2.75,-1.23 -2.75,-2.75 0,-1.52 1.23,-2.75 2.75,-2.75 0.91,0 1.72,0.44 2.22,1.13 0.33,0.46 0.53,1.02 0.53,1.62 z"
|
|
136
|
+
id="path8" />
|
|
137
|
+
</g>
|
|
138
|
+
<g
|
|
139
|
+
id="g9">
|
|
140
|
+
<circle
|
|
141
|
+
class="st3"
|
|
142
|
+
cx="197.11"
|
|
143
|
+
cy="142.03999"
|
|
144
|
+
r="7.2399998"
|
|
145
|
+
id="circle8" />
|
|
146
|
+
<path
|
|
147
|
+
class="st0"
|
|
148
|
+
d="m 199.85,142.04 c 0,1.52 -1.23,2.75 -2.75,2.75 -1.52,0 -2.75,-1.23 -2.75,-2.75 0,-1.52 1.23,-2.75 2.75,-2.75 0.91,0 1.72,0.44 2.22,1.13 0.33,0.46 0.53,1.02 0.53,1.62 z"
|
|
149
|
+
id="path9" />
|
|
150
|
+
</g>
|
|
151
|
+
<g
|
|
152
|
+
id="g11">
|
|
153
|
+
<path
|
|
154
|
+
class="st0"
|
|
155
|
+
d="m 199.87,142.04 c 0,1.53 -1.24,2.76 -2.76,2.76 -1.53,0 -2.76,-1.24 -2.76,-2.76 0,-1.53 1.24,-2.76 2.76,-2.76 0.92,0 1.73,0.45 2.23,1.14 0.33,0.45 0.53,1.01 0.53,1.62 z"
|
|
156
|
+
id="path10" />
|
|
157
|
+
<path
|
|
158
|
+
class="st0"
|
|
159
|
+
d="m 198.95,140.55 4.49,-2.68 3.58,9.24 -7.83,-3.27 c 0.25,-0.56 0.77,-1.9 0.59,-2.5 -0.13,-0.42 -0.42,-0.44 -0.83,-0.79 z"
|
|
160
|
+
id="path11" />
|
|
161
|
+
</g>
|
|
162
|
+
<g
|
|
163
|
+
id="g12">
|
|
164
|
+
<circle
|
|
165
|
+
class="st3"
|
|
166
|
+
cx="214.59"
|
|
167
|
+
cy="128.06"
|
|
168
|
+
r="7.2399998"
|
|
169
|
+
id="circle11" />
|
|
170
|
+
<path
|
|
171
|
+
class="st0"
|
|
172
|
+
d="m 217.34,128.06 c 0,1.52 -1.23,2.75 -2.75,2.75 -1.52,0 -2.75,-1.23 -2.75,-2.75 0,-1.52 1.23,-2.75 2.75,-2.75 0.91,0 1.72,0.44 2.22,1.13 0.33,0.46 0.53,1.02 0.53,1.62 z"
|
|
173
|
+
id="path12" />
|
|
174
|
+
</g>
|
|
175
|
+
</g>
|
|
176
|
+
<g
|
|
177
|
+
id="g15">
|
|
178
|
+
<path
|
|
179
|
+
class="st2"
|
|
180
|
+
d="m 213.94,181.76 -3.46,-12.78 h 3.55 l 1.89,8.73 1.91,-8.73 h 3.4 l -3.49,12.78 z"
|
|
181
|
+
id="path13" />
|
|
182
|
+
<path
|
|
183
|
+
class="st2"
|
|
184
|
+
d="m 224.13,181.76 v -12.78 h 3.37 v 12.78 z"
|
|
185
|
+
id="path14" />
|
|
186
|
+
<path
|
|
187
|
+
class="st2"
|
|
188
|
+
d="m 230.7,181.76 v -2.41 l 4.32,-7.67 h -4 v -2.7 h 7.78 v 2.43 l -4.25,7.63 h 4.47 v 2.72 z"
|
|
189
|
+
id="path15" />
|
|
190
|
+
</g>
|
|
191
|
+
</g>
|
|
192
|
+
</svg>
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cells": [
|
|
3
|
+
{
|
|
4
|
+
"cell_type": "markdown",
|
|
5
|
+
"id": "cedd9575-a97a-4c77-82ed-67e8bedfc64b",
|
|
6
|
+
"metadata": {},
|
|
7
|
+
"source": [
|
|
8
|
+
"If you haven't installed `coco-visualize` yet, run the cell below. \n",
|
|
9
|
+
"It runs `pip install -U coco-visualize` from inside the notebook. \n",
|
|
10
|
+
"You could also run the above command in a terminal."
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"cell_type": "code",
|
|
15
|
+
"execution_count": null,
|
|
16
|
+
"id": "83109af5-159c-4d5c-9acf-a4ba7af1bd18",
|
|
17
|
+
"metadata": {},
|
|
18
|
+
"outputs": [],
|
|
19
|
+
"source": [
|
|
20
|
+
"import sys\n",
|
|
21
|
+
"print(f\"Installing `coco-visualize` for {sys.executable}.\")\n",
|
|
22
|
+
"!\"{sys.executable}\" -m pip install -U coco-visualize"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"cell_type": "markdown",
|
|
27
|
+
"id": "ac5d1ded-be32-4d3a-a8e1-4099e17322a6",
|
|
28
|
+
"metadata": {},
|
|
29
|
+
"source": [
|
|
30
|
+
"Now we are ready to load all the required libraries."
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"cell_type": "code",
|
|
35
|
+
"execution_count": null,
|
|
36
|
+
"id": "7a828d09-1ddf-43c9-b4d3-4f5d6f8e7fbd",
|
|
37
|
+
"metadata": {},
|
|
38
|
+
"outputs": [],
|
|
39
|
+
"source": [
|
|
40
|
+
"import itertools\n",
|
|
41
|
+
"import pandas as pd\n",
|
|
42
|
+
"import matplotlib.pyplot as plt\n",
|
|
43
|
+
"\n",
|
|
44
|
+
"from tqdm.auto import tqdm\n",
|
|
45
|
+
"from pathlib import Path\n",
|
|
46
|
+
"from cocoviz import ProblemDescription, Result, ResultSet, Indicator, rtpplot\n",
|
|
47
|
+
"\n",
|
|
48
|
+
"DATA_DIR = Path(\"data/\")"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"cell_type": "markdown",
|
|
53
|
+
"id": "bb372e9b-88a0-418f-8e8f-99ba0e6906b9",
|
|
54
|
+
"metadata": {},
|
|
55
|
+
"source": [
|
|
56
|
+
"# Load demo results\n",
|
|
57
|
+
"\n",
|
|
58
|
+
"Here we are going to look at some data where we ran `MOEAD`, `NSGA-II`, and `GDE3` three times on `ZDT[1..4,6]` with 10 or 30 dimensions.\n",
|
|
59
|
+
"The data is hosted in an S3 bucket and needs to be downloaded the first time you run the notebook. \n",
|
|
60
|
+
"Afterwards it is stored locally in Parquet files.\n",
|
|
61
|
+
"\n",
|
|
62
|
+
"Let us define all results we expect to find:"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"cell_type": "code",
|
|
67
|
+
"execution_count": null,
|
|
68
|
+
"id": "69eea50f-9550-41f2-bc6f-97b92066fdfe",
|
|
69
|
+
"metadata": {},
|
|
70
|
+
"outputs": [],
|
|
71
|
+
"source": [
|
|
72
|
+
"ALGORITHMS = [\"MOEAD\", \"NSGA-II\", \"GDE3\"]\n",
|
|
73
|
+
"FUNCTIONS = [\"ZDT1\", \"ZDT2\", \"ZDT3\", \"ZDT4\", \"ZDT6\"]\n",
|
|
74
|
+
"VARS = [10, 30]\n",
|
|
75
|
+
"RUN = [1, 2, 3]\n",
|
|
76
|
+
"ALL_RESULTS = list(itertools.product(ALGORITHMS, FUNCTIONS, VARS, RUN))"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"cell_type": "markdown",
|
|
81
|
+
"id": "ae7e5d13-42d5-4239-afba-552e9424fc10",
|
|
82
|
+
"metadata": {},
|
|
83
|
+
"source": [
|
|
84
|
+
"Now we can iterate over the expected results, load them from the local Parquet file if present or download them otherwise.\n",
|
|
85
|
+
"This shows you both how to load data from a CSV file as well as quickly reloading data from binary files."
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"cell_type": "code",
|
|
90
|
+
"execution_count": null,
|
|
91
|
+
"id": "83f94523-b7f2-436f-b152-0894e20353e4",
|
|
92
|
+
"metadata": {},
|
|
93
|
+
"outputs": [],
|
|
94
|
+
"source": [
|
|
95
|
+
"results = ResultSet()\n",
|
|
96
|
+
"\n",
|
|
97
|
+
"for alg, fn, var, run in tqdm(ALL_RESULTS):\n",
|
|
98
|
+
" LOCAL = Path(f\"result-{alg}_{fn}_{var}_{run}.parquet\")\n",
|
|
99
|
+
" if not LOCAL.exists(): # Need to fetch results over the network\n",
|
|
100
|
+
" URL = f\"https://cocoviz-demo-data.s3.us-west-000.backblazeb2.com/{alg}_{fn}_vars={var}_run={run}.csv\" \n",
|
|
101
|
+
" data = pd.read_csv(URL)\n",
|
|
102
|
+
" # Add artifical performance indicator that must be minimized\n",
|
|
103
|
+
" data[\"neg_hv\"] = -data[\"Hypervolume\"]\n",
|
|
104
|
+
" \n",
|
|
105
|
+
" problem = ProblemDescription(fn, 1, var, 2)\n",
|
|
106
|
+
" result = Result(alg, problem, data, \"Evaluations\")\n",
|
|
107
|
+
" result.to_parquet(LOCAL)\n",
|
|
108
|
+
" \n",
|
|
109
|
+
" results.append(Result.from_parquet(LOCAL))"
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"cell_type": "markdown",
|
|
114
|
+
"id": "440a95d7-aa07-41dd-a2ff-3a3ba0eba993",
|
|
115
|
+
"metadata": {},
|
|
116
|
+
"source": [
|
|
117
|
+
"# Create a runtime profile plot each problem in the result set"
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"cell_type": "code",
|
|
122
|
+
"execution_count": null,
|
|
123
|
+
"id": "17f1ebd9-c24f-4459-9407-d564db0582ef",
|
|
124
|
+
"metadata": {},
|
|
125
|
+
"outputs": [],
|
|
126
|
+
"source": [
|
|
127
|
+
"number_of_targets = 101\n",
|
|
128
|
+
"\n",
|
|
129
|
+
"INDICATOR = [\n",
|
|
130
|
+
" Indicator(\"Hypervolume\", larger_is_better=True),\n",
|
|
131
|
+
" Indicator(\"neg_hv\", larger_is_better=False) \n",
|
|
132
|
+
"]\n",
|
|
133
|
+
"\n",
|
|
134
|
+
"nvar = len(results.number_of_variables)\n",
|
|
135
|
+
"fig, axes = plt.subplots(nvar, 2, figsize=(12, 12))\n",
|
|
136
|
+
"for axrow, (d, result_subset) in zip(axes, results.by_number_of_variables()):\n",
|
|
137
|
+
" for ax, ind in zip(axrow, INDICATOR):\n",
|
|
138
|
+
" rtpplot(result_subset, ind, number_of_targets=number_of_targets, ax=ax)\n",
|
|
139
|
+
" ax.set_title(f\"{ind.name} / {d} decision variables\")"
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"cell_type": "code",
|
|
144
|
+
"execution_count": null,
|
|
145
|
+
"id": "a3c21ca7-220f-47a3-a7b0-3ba1cf0c2bb2",
|
|
146
|
+
"metadata": {},
|
|
147
|
+
"outputs": [],
|
|
148
|
+
"source": []
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"metadata": {
|
|
152
|
+
"kernelspec": {
|
|
153
|
+
"display_name": "Python 3 (ipykernel)",
|
|
154
|
+
"language": "python",
|
|
155
|
+
"name": "python3"
|
|
156
|
+
},
|
|
157
|
+
"language_info": {
|
|
158
|
+
"codemirror_mode": {
|
|
159
|
+
"name": "ipython",
|
|
160
|
+
"version": 3
|
|
161
|
+
},
|
|
162
|
+
"file_extension": ".py",
|
|
163
|
+
"mimetype": "text/x-python",
|
|
164
|
+
"name": "python",
|
|
165
|
+
"nbconvert_exporter": "python",
|
|
166
|
+
"pygments_lexer": "ipython3",
|
|
167
|
+
"version": "3.12.4"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"nbformat": 4,
|
|
171
|
+
"nbformat_minor": 5
|
|
172
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = [
|
|
3
|
+
"setuptools >= 67.0",
|
|
4
|
+
"setuptools-scm >= 8",
|
|
5
|
+
"wheel",
|
|
6
|
+
]
|
|
7
|
+
build-backend = "setuptools.build_meta"
|
|
8
|
+
|
|
9
|
+
[project]
|
|
10
|
+
name = "coco-visualize"
|
|
11
|
+
authors = [
|
|
12
|
+
{name = "Dimo Brockhoff", email = "dimo.brockhoff@inria.fr" },
|
|
13
|
+
{name = "Nikolaus Hansen", email = "nikolaus.hansen@inria.fr" },
|
|
14
|
+
{name = "Olaf Mersmann", email = "olafm@p-value.net"},
|
|
15
|
+
{name = "Tea Tušar", email = "tea.tusar@ijs.si" },
|
|
16
|
+
]
|
|
17
|
+
description = 'Standalone COCO visualization toolbox'
|
|
18
|
+
readme = "README.md"
|
|
19
|
+
requires-python = ">=3.10"
|
|
20
|
+
license = {text = "BSD-3-Clause"}
|
|
21
|
+
classifiers = [
|
|
22
|
+
"Development Status :: 4 - Beta",
|
|
23
|
+
"License :: OSI Approved :: BSD License",
|
|
24
|
+
"Programming Language :: Python",
|
|
25
|
+
"Programming Language :: Python :: 3.10",
|
|
26
|
+
"Programming Language :: Python :: 3.11",
|
|
27
|
+
"Programming Language :: Python :: 3.12",
|
|
28
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
29
|
+
]
|
|
30
|
+
dependencies = [
|
|
31
|
+
"numpy >= 2.0",
|
|
32
|
+
"polars >= 0.20",
|
|
33
|
+
"matplotlib >= 3.7",
|
|
34
|
+
"scipy >= 1.14.0"
|
|
35
|
+
]
|
|
36
|
+
dynamic = ["version"]
|
|
37
|
+
|
|
38
|
+
[tool.setuptools_scm]
|
|
39
|
+
version_file = "src/cocoviz/_version.py"
|
|
40
|
+
|
|
41
|
+
[tool.setuptools.packages.find]
|
|
42
|
+
where = ["src"]
|
|
43
|
+
|
|
44
|
+
[tool.ruff]
|
|
45
|
+
line-length = 120
|
|
46
|
+
|
|
47
|
+
[tool.ruff.format]
|
|
48
|
+
quote-style = "double"
|
|
49
|
+
docstring-code-format = true
|
|
50
|
+
docstring-code-line-length = 80
|
|
51
|
+
|
|
52
|
+
[tool.pytest]
|
|
53
|
+
log_cli = true
|
|
54
|
+
addopts = "--doctest-modules"
|
|
55
|
+
|
|
56
|
+
[project.urls]
|
|
57
|
+
Homepage = "https://github.com/numbbo/coco"
|
|
58
|
+
Documentation = "https://numbbo.github.io/coco-doc/apidocs/cocoex/"
|
|
59
|
+
Issues = "https://github.com/numbbo/coco/issues"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: coco-visualize
|
|
3
|
+
Version: 0.1.0a1
|
|
4
|
+
Summary: Standalone COCO visualization toolbox
|
|
5
|
+
Author-email: Dimo Brockhoff <dimo.brockhoff@inria.fr>, Nikolaus Hansen <nikolaus.hansen@inria.fr>, Olaf Mersmann <olafm@p-value.net>, Tea Tušar <tea.tusar@ijs.si>
|
|
6
|
+
License: BSD-3-Clause
|
|
7
|
+
Project-URL: Homepage, https://github.com/numbbo/coco
|
|
8
|
+
Project-URL: Documentation, https://numbbo.github.io/coco-doc/apidocs/cocoex/
|
|
9
|
+
Project-URL: Issues, https://github.com/numbbo/coco/issues
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
12
|
+
Classifier: Programming Language :: Python
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
License-File: AUTHORS
|
|
21
|
+
Requires-Dist: numpy>=2.0
|
|
22
|
+
Requires-Dist: polars>=0.20
|
|
23
|
+
Requires-Dist: matplotlib>=3.7
|
|
24
|
+
Requires-Dist: scipy>=1.14.0
|
|
25
|
+
|
|
26
|
+
<h1 align="center">
|
|
27
|
+
<img src="https://raw.githubusercontent.com/numbbo/coco-visualize/main/cocoviz.svg" width="400">
|
|
28
|
+
</h1><br>
|
|
29
|
+
|
|
30
|
+
[](https://pypi.org/project/coco-visualize/)
|
|
31
|
+
[](https://github.com/numbbo/coco-visualize/issues)
|
|
32
|
+

|
|
33
|
+
|
|
34
|
+
`cocoviz` is a minimalist visualization toolkit for benchmark experiments.
|
|
35
|
+
|
|
36
|
+
- **Website:** https://numbbo.github.io
|
|
37
|
+
- **Source code:** https://github.com/numbbo/coco-visualize/
|
|
38
|
+
- **Contributing:** https://github.com/numbbo/coco-visualize/pulls
|
|
39
|
+
- **Bug reports:** https://github.com/numbbo/coco-visualize/issues
|