Skip to content

Commit

Permalink
Merge pull request #583 from autonomio/fix_param_index
Browse files Browse the repository at this point in the history
Fix param index
  • Loading branch information
mikkokotila committed Apr 15, 2022
2 parents f32bd19 + 911e71e commit 4eb8712
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
URL = 'http://autonom.io'
LICENSE = 'MIT'
DOWNLOAD_URL = 'https://github.com/autonomio/talos/'
VERSION = '1.2'
VERSION = '1.2.2'


try:
Expand Down
2 changes: 1 addition & 1 deletion talos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
del commands, scan, model, metrics, key
del sub, keep_from_templates, template_sub, warnings

__version__ = "1.2"
__version__ = "1.2.2"
24 changes: 9 additions & 15 deletions talos/parameters/ParamSpace.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,21 +129,15 @@ def _param_space_creation(self):
actual parameter permutations for the experiment.
'''

if len(self.param_index) < 100000:

final_grid = list(it.product(*self._params_temp))
return np.array(final_grid, dtype='object')

else:
final_grid = []
for i in self.param_index:
p = []
for l in reversed(self._params_temp):
i, s = divmod(int(i), len(l))
p.insert(0, l[s])
final_grid.append(tuple(p))

return np.array(final_grid, dtype='object')
final_grid = []
for i in self.param_index:
p = []
for l in reversed(self._params_temp):
i, s = divmod(int(i), len(l))
p.insert(0, l[s])
final_grid.append(tuple(p))

return np.array(final_grid, dtype='object')

def _check_time_limit(self):

Expand Down

0 comments on commit 4eb8712

Please sign in to comment.