Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit f8d555f

Browse files
Merge branch 'master' into numpy-scaler
2 parents 656580b + f56a38f commit f8d555f

File tree

14 files changed

+179
-2412
lines changed

14 files changed

+179
-2412
lines changed

.install_neuron.sh

Lines changed: 0 additions & 37 deletions
This file was deleted.

.jenkins.sh

Lines changed: 0 additions & 39 deletions
This file was deleted.

.zenodo.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"title" : "BluePyOpt",
3+
"license": "LGPL-3.0",
4+
"upload_type": "software",
5+
"description": "The Blue Brain Python Optimisation Library (BluePyOpt) is an extensible framework for data-driven model parameter optimisation that wraps and standardises several existing open-source tools. It simplifies the task of creating and sharing these optimisations, and the associated techniques and knowledge. This is achieved by abstracting the optimisation and evaluation tasks into various reusable and flexible discrete elements according to established best-practices. Further, BluePyOpt provides methods for setting up both small- and large-scale optimisations on a variety of platforms, ranging from laptops to Linux clusters and cloud-based compute infrastructures.",
6+
"creators": [
7+
{
8+
"affiliation": "Blue Brain Project, EPFL",
9+
"name": "Van Geit, Werner",
10+
"orcid": "0000-0002-2915-720X"
11+
},
12+
{
13+
"affiliation": "Blue Brain Project, EPFL",
14+
"name": "Gevaert, Michael",
15+
"orcid": "0000-0002-7547-3297"
16+
},
17+
{
18+
"affiliation": "Blue Brain Project, EPFL",
19+
"name": "Damart, Tanguy",
20+
"orcid": "0000-0003-2175-7304"
21+
},
22+
{
23+
"affiliation": "Blue Brain Project, EPFL",
24+
"name": "Rössert, Christian",
25+
"orcid": "0000-0002-4839-2424"
26+
},
27+
{
28+
"affiliation": "Blue Brain Project, EPFL",
29+
"name": "Courcol, Jean-Denis",
30+
"orcid": "0000-0002-9351-1461"
31+
},
32+
{
33+
"affiliation": "Blue Brain Project, EPFL",
34+
"name": "Chindemi, Guiseppe",
35+
"orcid": "0000-0001-6872-2366"
36+
},
37+
{
38+
"affiliation": "Blue Brain Project, EPFL",
39+
"name": "Jaquier, Aurélien",
40+
"orcid": "0000-0001-6202-6175"
41+
},
42+
{
43+
"affiliation": "Blue Brain Project, EPFL",
44+
"name": "Muller, Eilif",
45+
"orcid": "0000-0003-4309-8266"
46+
}
47+
]
48+
}

README.rst

Lines changed: 42 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,59 +3,22 @@
33
BluePyOpt
44
=========
55

6-
.. raw:: html
7-
8-
<table>
9-
<tr>
10-
<td>Latest Release</td>
11-
<td>
12-
<a href="https://pypi.org/project/bluepyopt/">
13-
<img src="https://img.shields.io/pypi/v/bluepyopt.svg" alt="latest release" />
14-
</a>
15-
</td>
16-
</tr>
17-
<tr>
18-
<td>Documentation</td>
19-
<td>
20-
<a href="https://bluepyopt.readthedocs.io/">
21-
<img src="https://readthedocs.org/projects/bluepyopt/badge/?version=latest" alt="latest documentation" />
22-
</a>
23-
</td>
24-
</tr>
25-
<tr>
26-
<td>License</td>
27-
<td>
28-
<a href="https://github.com/BlueBrain/bluepyopt/blob/master/LICENSE.txt">
29-
<img src="https://img.shields.io/pypi/l/bluepyopt.svg" alt="license" />
30-
</a>
31-
</td>
32-
</tr>
33-
<tr>
34-
<td>Build Status</td>
35-
<td>
36-
<a href="https://github.com/BlueBrain/BluePyOpt/actions">
37-
<img src="https://github.com/BlueBrain/BluePyOpt/workflows/Build/badge.svg?branch=master" alt="Actions build status" />
38-
</a>
39-
</td>
40-
</tr>
41-
<tr>
42-
<td>Coverage</td>
43-
<td>
44-
<a href="https://codecov.io/gh/BlueBrain/bluepyopt">
45-
<img src="https://codecov.io/github/BlueBrain/BluePyOpt/coverage.svg?branch=master" alt="coverage" />
46-
</a>
47-
</td>
48-
</tr>
49-
<tr>
50-
<td>Gitter</td>
51-
<td>
52-
<a href="https://gitter.im/bluebrain/bluepyopt">
53-
<img src="https://badges.gitter.im/Join%20Chat.svg"
54-
</a>
55-
</td>
56-
</tr>
57-
</table>
586

7+
+----------------+------------+
8+
| Latest Release | |pypi| |
9+
+----------------+------------+
10+
| Documentation | |docs| |
11+
+----------------+------------+
12+
| License | |license| |
13+
+----------------+------------+
14+
| Build Status | |build| |
15+
+----------------+------------+
16+
| Coverage | |coverage| |
17+
+----------------+------------+
18+
| Gitter | |gitter| |
19+
+----------------+------------+
20+
| Zenodo | |zenodo| |
21+
+----------------+------------+
5922

6023

6124
Introduction
@@ -229,6 +192,33 @@ Copyright (c) 2016-2022 Blue Brain Project/EPFL
229192
The index.rst location is used for the docs README; index.rst also defined an end-marker,
230193
to skip content after the marker 'substitutions'.
231194
195+
.. |pypi| image:: https://img.shields.io/pypi/v/bluepyopt.svg
196+
:target: https://pypi.org/project/bluepyopt/
197+
:alt: latest release
198+
199+
.. |docs| image:: https://readthedocs.org/projects/bluepyopt/badge/?version=latest
200+
:target: https://bluepyopt.readthedocs.io/
201+
:alt: latest documentation
202+
203+
.. |license| image:: https://img.shields.io/pypi/l/bluepyopt.svg
204+
:target: https://github.com/BlueBrain/bluepyopt/blob/master/LICENSE.txt
205+
:alt: license
206+
207+
.. |build| image:: https://github.com/BlueBrain/BluePyOpt/workflows/Build/badge.svg?branch=master
208+
:target: https://github.com/BlueBrain/BluePyOpt/actions
209+
:alt: actions build status
210+
211+
.. |coverage| image:: https://codecov.io/github/BlueBrain/BluePyOpt/coverage.svg?branch=master
212+
:target: https://codecov.io/gh/BlueBrain/bluepyopt
213+
:alt: coverage
214+
215+
.. |gitter| image:: https://badges.gitter.im/Join%20Chat.svg
216+
:target: https://gitter.im/BlueBrain/blueptopt
217+
:alt: Join the chat at https://gitter.im/BlueBrain/BluePyOpt
218+
219+
.. |zenodo| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.8135890.svg
220+
:target: https://doi.org/10.5281/zenodo.8135890
221+
232222
.. substitutions
233223
.. |banner| image:: docs/source/logo/BluePyOptBanner.png
234224
.. |landscape_example| image:: examples/simplecell/figures/landscape_example.png

bluepyopt/deapext/tools/selIBEA.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
"""IBEA selector"""
22

3-
from __future__ import division
4-
5-
from past.builtins import xrange # pylint: disable=W0622
6-
73
"""
84
Copyright (c) 2016-2022, EPFL/Blue Brain Project
95
@@ -77,7 +73,7 @@ def _calc_fitness_components(population, kappa):
7773
box_ranges[box_ranges == 0] = 1.0
7874

7975
components_matrix = numpy.zeros((pop_len, pop_len))
80-
for i in xrange(0, pop_len):
76+
for i in range(0, pop_len):
8177
diff = population_matrix - population_matrix[i, :]
8278
components_matrix[i, :] = numpy.max(
8379
numpy.divide(diff, box_ranges),
@@ -115,9 +111,9 @@ def _mating_selection(population, mu, tournament_n):
115111
"""Returns the n_of_parents individuals with the best fitness"""
116112

117113
parents = []
118-
for _ in xrange(mu):
114+
for _ in range(mu):
119115
winner = _choice(population)
120-
for _ in xrange(tournament_n - 1):
116+
for _ in range(tournament_n - 1):
121117
individual = _choice(population)
122118
# Save winner is element with smallest fitness
123119
if individual.ibea_fitness < winner.ibea_fitness:

bluepyopt/ephys/efeatures.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,11 @@ def calculate_feature(
429429
peak_times = self._get_peak_times(
430430
responses, raise_warnings=raise_warnings
431431
)
432+
if peak_times is None:
433+
if return_waveforms:
434+
return None, None
435+
else:
436+
return None
432437

433438
if len(peak_times) > 1 and self.skip_first_spike:
434439
peak_times = peak_times[1:]
@@ -439,7 +444,10 @@ def calculate_feature(
439444
if responses[self.recording_names[""]] is not None:
440445
response = responses[self.recording_names[""]]
441446
else:
442-
return None
447+
if return_waveforms:
448+
return None, None
449+
else:
450+
return None
443451

444452
if np.std(np.diff(response["time"])) > 0.001 * np.mean(
445453
np.diff(response["time"])

bluepyopt/ephys/serializer.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
'''Mixin class to make dictionaries'''
2-
from __future__ import unicode_literals
3-
from __future__ import print_function
4-
from __future__ import division
5-
from __future__ import absolute_import
62

73
# Disabling lines below, generate error when loading ephys.examples
84
# from future import standard_library

bluepyopt/ipyp/bpopt_tasksdb.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
"""Get stats out of ipyparallel's tasks.db"""
22

3-
from __future__ import print_function
4-
53
"""
64
Copyright (c) 2016-2020, EPFL/Blue Brain Project
75

examples/graupnerbrunelstdp/run_fit.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
# pylint: disable=R0914
44

5-
from __future__ import print_function
6-
75
import pickle
86
import bluepyopt as bpop
97
import matplotlib.pyplot as plt

0 commit comments

Comments
 (0)