diff --git a/CHANGES.md b/CHANGES.md index ad7ab1868..f8e341b28 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,7 @@ +# Version 1.0.3.1 + +- Hotfix to support new GUI functionality + # Version 1.0.3 **New features** diff --git a/doc/source/conf.py b/doc/source/conf.py index 30162cf37..c91f60e97 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -67,9 +67,9 @@ # built documents. # # The short X.Y version. -version = '1.0.3' +version = '1.0.3.1' # The full version, including alpha/beta/rc tags. -release = '1.0.3' +release = '1.0.3.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/netpyne/__init__.py b/netpyne/__init__.py index 145044e0a..3d199d1f4 100644 --- a/netpyne/__init__.py +++ b/netpyne/__init__.py @@ -4,7 +4,7 @@ NetPyNE consists of a number of sub-packages and modules. """ -__version__ = '1.0.3' +__version__ = '1.0.3.1' import os, sys display = os.getenv('DISPLAY') nogui = (sys.argv.count('-nogui')>0) diff --git a/netpyne/batch/batch.py b/netpyne/batch/batch.py index 759e9159d..b5d240106 100644 --- a/netpyne/batch/batch.py +++ b/netpyne/batch/batch.py @@ -22,16 +22,8 @@ except NameError: to_unicode = str -import imp -import json -import pickle -import logging import datetime -from copy import copy -from random import Random -from time import sleep, time -from itertools import product -from subprocess import Popen, PIPE +from time import time import importlib, types from neuron import h @@ -42,21 +34,6 @@ from .evol import evolOptim from .asd_parallel import asdOptim -try: - from .optuna_parallel import optunaOptim -except: - pass - # print('Warning: Could not import "optuna" package...') - - -try: - from .sbi_parallel import sbiOptim -except: - pass - #print('Error @ the batch.py file import section') - - - pc = h.ParallelContext() # use bulletin board master/slave if pc.id()==0: pc.master_works_on_jobs(0) @@ -277,6 +254,7 @@ def run(self): # ------------------------------------------------------------------------------- elif self.method == 'optuna': try: + from .optuna_parallel import optunaOptim optunaOptim(self, pc) except Exception as e: import traceback @@ -288,6 +266,7 @@ def run(self): # ------------------------------------------------------------------------------- elif self.method == 'sbi': try: + from .sbi_parallel import sbiOptim sbiOptim(self, pc) except Exception as e: import traceback diff --git a/netpyne/batch/grid.py b/netpyne/batch/grid.py index b40774d59..c8eacde53 100644 --- a/netpyne/batch/grid.py +++ b/netpyne/batch/grid.py @@ -185,40 +185,6 @@ def gridSearch(batch, pc): if batch.runCfg.get('type',None) == 'mpi_bulletin': pc.runworker() # only 1 runworker needed in rank0 - createFolder(batch.saveFolder) - - # save Batch dict as json - targetFile = batch.saveFolder+'/'+batch.batchLabel+'_batch.json' - batch.save(targetFile) - - # copy this batch script to folder - targetFile = batch.saveFolder+'/'+batch.batchLabel+'_batchScript.py' - os.system('cp ' + os.path.realpath(__file__) + ' ' + targetFile) - - # copy netParams source to folder - netParamsSavePath = batch.saveFolder+'/'+batch.batchLabel+'_netParams.py' - os.system('cp ' + batch.netParamsFile + ' ' + netParamsSavePath) - - # import cfg - if batch.cfg is None: - cfgModuleName = os.path.basename(batch.cfgFile).split('.')[0] - - try: - loader = importlib.machinery.SourceFileLoader(cfgModuleName, batch.cfgFile) - cfgModule = types.ModuleType(loader.name) - loader.exec_module(cfgModule) - except: - cfgModule = imp.load_source(cfgModuleName, batch.cfgFile) - - batch.cfg = cfgModule.cfg - - batch.cfg.checkErrors = False # avoid error checking during batch - - # set initial cfg initCfg - if len(batch.initCfg) > 0: - for paramLabel, paramVal in batch.initCfg.items(): - batch.setCfgNestedParam(paramLabel, paramVal) - processes, processFiles = [],[] if batch.method == 'list': @@ -280,7 +246,9 @@ def gridSearch(batch, pc): except: pass pc.done() - h.quit() + # TODO: line below was commented out due to issue on Netpyne-UI (https://dura-bernallab.slack.com/archives/C02UT6WECEL/p1671724489096569?thread_ts=1671646899.368969&cid=C02UT6WECEL) + # Needs to be re-visited. + # h.quit() def gridSubmit(batch, pc, netParamsSavePath, jobName, simLabel, processes, processFiles):