Skip to content

Commit

Permalink
Merge branch 'master' into eprop_adaptive_update
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgait committed Sep 20, 2023
2 parents e7375d9 + f11f300 commit a87b9ca
Show file tree
Hide file tree
Showing 11 changed files with 308 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/c_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Checkout SupportScripts
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: SpiNNakerManchester/SupportScripts
path: support
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Checkout SupportScripts
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: SpiNNakerManchester/SupportScripts
path: support
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/python_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Checkout SupportScripts
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: SpiNNakerManchester/SupportScripts
path: support
Expand Down Expand Up @@ -97,9 +97,9 @@ jobs:
python-version: ["3.8"]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Checkout SupportScripts
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: SpiNNakerManchester/SupportScripts
path: support
Expand Down
6 changes: 3 additions & 3 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2017 The University of Manchester
# Copyright (c) 2023 The University of Manchester
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,9 +14,9 @@

version: 2
build:
os: ubuntu-20.04
os: ubuntu-22.04
tools:
python: "3.8"
python: "3.11"
sphinx:
configuration: doc/source/conf.py
builder: dirhtml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright (c) 2017 The University of Manchester
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

APP = $(notdir $(CURDIR))

NEURON_MODEL_H = $(NEURON_DIR)/neuron/models/neuron_model_lif_impl.h
INPUT_TYPE_H = $(NEURON_DIR)/neuron/input_types/input_type_delta.h
NEURON_IMPL_H = $(NEURON_DIR)/neuron/implementations/neuron_impl_standard.h
THRESHOLD_TYPE_H = $(NEURON_DIR)/neuron/threshold_types/threshold_type_static.h
SYNAPSE_TYPE_H = $(NEURON_DIR)/neuron/synapse_types/synapse_types_delta_impl.h
SYNAPSE_DYNAMICS = $(NEURON_DIR)/neuron/plasticity/stdp/synapse_dynamics_stdp_mad_impl.c
TIMING_DEPENDENCE = $(NEURON_DIR)/neuron/plasticity/stdp/timing_dependence/timing_nearest_pair_impl.c
TIMING_DEPENDENCE_H = $(NEURON_DIR)/neuron/plasticity/stdp/timing_dependence/timing_nearest_pair_impl.h
WEIGHT_DEPENDENCE = $(NEURON_DIR)/neuron/plasticity/stdp/weight_dependence/weight_additive_one_term_impl.c
WEIGHT_DEPENDENCE_H = $(NEURON_DIR)/neuron/plasticity/stdp/weight_dependence/weight_additive_one_term_impl.h

include ../neural_build.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright (c) 2017 The University of Manchester
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

APP = $(notdir $(CURDIR))

NEURON_MODEL_H = $(NEURON_DIR)/neuron/models/neuron_model_lif_impl.h
INPUT_TYPE_H = $(NEURON_DIR)/neuron/input_types/input_type_delta.h
NEURON_IMPL_H = $(NEURON_DIR)/neuron/implementations/neuron_impl_standard.h
THRESHOLD_TYPE_H = $(NEURON_DIR)/neuron/threshold_types/threshold_type_static.h
SYNAPSE_TYPE_H = $(NEURON_DIR)/neuron/synapse_types/synapse_types_delta_impl.h
SYNAPSE_DYNAMICS = $(NEURON_DIR)/neuron/plasticity/stdp/synapse_dynamics_stdp_mad_impl.c
TIMING_DEPENDENCE = $(NEURON_DIR)/neuron/plasticity/stdp/timing_dependence/timing_pair_impl.c
TIMING_DEPENDENCE_H = $(NEURON_DIR)/neuron/plasticity/stdp/timing_dependence/timing_pair_impl.h
WEIGHT_DEPENDENCE = $(NEURON_DIR)/neuron/plasticity/stdp/weight_dependence/weight_additive_one_term_impl.c
WEIGHT_DEPENDENCE_H = $(NEURON_DIR)/neuron/plasticity/stdp/weight_dependence/weight_additive_one_term_impl.h

include ../neural_build.mk
2 changes: 2 additions & 0 deletions neural_modelling/makefiles/neuron/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ ifneq ($(SPYNNAKER_DEBUG), DEBUG)
IZK_cond_exp_stdp_mad_pair_additive \
IZK_cond_exp_dual_stdp_mad_pair_additive \
IF_curr_alpha_stdp_mad_pair_additive \
IF_curr_delta_stdp_mad_pair_additive \
IF_curr_delta_stdp_mad_nearest_pair_additive \
IF_curr_exp_stdp_mad_recurrent_pre_stochastic_multiplicative \
IF_curr_exp_stdp_mad_pfister_triplet_additive \
eprop_adaptive \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.
import logging
import os
from spinn_utilities.config_holder import get_config_str
from spinn_utilities.config_holder import get_config_str_or_none
from spinn_utilities.log import FormatAdapter
from spinn_utilities.progress_bar import ProgressBar
from spynnaker.pyNN.data import SpynnakerDataView
Expand Down Expand Up @@ -54,7 +54,7 @@ def spynnaker_neuron_graph_network_specification_report():
# create holders for data
dot_diagram, exeNotFoundExn = _get_diagram(_GRAPH_TITLE)

graph_format = get_config_str("Reports", "network_graph_format")
graph_format = get_config_str_or_none("Reports", "network_graph_format")
if graph_format is None:
if (SpynnakerDataView.get_n_vertices() +
SpynnakerDataView.get_n_partitions()) > CUTOFF:
Expand Down
5 changes: 3 additions & 2 deletions spynnaker/pyNN/spinnaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
from pyNN import __version__ as pynn_version

from spinn_utilities.log import FormatAdapter
from spinn_utilities.config_holder import get_config_bool, get_config_str
from spinn_utilities.config_holder import (
get_config_bool, get_config_str_or_none)
from spinn_utilities.overrides import overrides

from spinn_front_end_common.interface.abstract_spinnaker_base import (
Expand Down Expand Up @@ -488,7 +489,7 @@ def _execute_delay_support_adder(self):
"""
Runs, times and logs the DelaySupportAdder if required.
"""
name = get_config_str("Mapping", "delay_support_adder")
name = get_config_str_or_none("Mapping", "delay_support_adder")
if name is None:
return
with FecTimer("DelaySupportAdder", TimerWork.OTHER):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import unittest
from spinn_utilities.exceptions import SimulatorShutdownException
import pyNN.spiNNaker as p
from time import sleep
import traceback
Expand Down Expand Up @@ -44,6 +46,9 @@ def send_sync(label, conn):
try:
n_spikes.append(0)
p.external_devices.continue_simulation()
except SimulatorShutdownException:
# Weird raise condition lost
sim_finished = True
except Exception: # pylint: disable=broad-except
traceback.print_exc()

Expand Down Expand Up @@ -73,7 +78,12 @@ def test_live_sync():
p.external_devices.activate_live_output_for(
pop, database_notify_port_num=conn.local_port)

p.external_devices.run_sync(100, 20)
try:
p.external_devices.run_sync(100, 20)
except Exception:
if sim_finished:
raise unittest.SkipTest("Stopped to0 soon")

sim_finished = True
p.end()

Expand Down
Loading

0 comments on commit a87b9ca

Please sign in to comment.