diff --git a/mcmc/mcmc_coordinator_vertex.py b/mcmc/mcmc_coordinator_vertex.py index 1915d24..7948552 100644 --- a/mcmc/mcmc_coordinator_vertex.py +++ b/mcmc/mcmc_coordinator_vertex.py @@ -13,14 +13,17 @@ # limitations under the License. from typing import List +import random +import numpy -from pacman.model.graphs.machine import MachineVertex -from pacman.model.resources import ConstantSDRAM from spinn_utilities.overrides import overrides +from spinn_utilities.progress_bar import ProgressBar from spinnman.model.enums import ExecutableType +from pacman.model.graphs.machine import MachineVertex from pacman.model.placements import Placement +from pacman.model.resources import ConstantSDRAM from spinn_front_end_common.abstract_models.abstract_has_associated_binary \ import AbstractHasAssociatedBinary @@ -30,10 +33,6 @@ from spinn_front_end_common.data import FecDataView from spinn_front_end_common.interface.ds import ( DataSpecificationGenerator, DataType) -from spinn_utilities.progress_bar import ProgressBar - -import numpy -import random class MCMCCoordinatorVertex( diff --git a/mcmc/mcmc_vertex.py b/mcmc/mcmc_vertex.py index 90fc593..6eca989 100644 --- a/mcmc/mcmc_vertex.py +++ b/mcmc/mcmc_vertex.py @@ -12,13 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -from pacman.model.graphs.machine import MachineVertex -from pacman.model.resources import ConstantSDRAM +from enum import Enum +import numpy + from spinn_utilities.overrides import overrides from spinnman.model.enums import ExecutableType +from pacman.model.graphs.machine import MachineVertex from pacman.model.placements import Placement +from pacman.model.resources import ConstantSDRAM from spinn_front_end_common.abstract_models.abstract_has_associated_binary \ import AbstractHasAssociatedBinary @@ -34,9 +37,6 @@ from spinn_front_end_common.interface.buffer_management \ import recording_utilities -from enum import Enum -import numpy - class MCMCRegions(Enum): """ Regions in the MCMC Data diff --git a/mcmc_examples/lighthouse/lighthouse.py b/mcmc_examples/lighthouse/lighthouse.py index 5e818e8..4e048a2 100644 --- a/mcmc_examples/lighthouse/lighthouse.py +++ b/mcmc_examples/lighthouse/lighthouse.py @@ -292,6 +292,9 @@ def run_job(_thread_id, _model=model, _data_points=None, _n_samples=n_samples, _seed=seed): + """ + Main method to run once or in multiple threads + """ if _data_points is None: _data_points = list(data_points) samples = mcmc_framework.run_mcmc(