Skip to content

Commit

Permalink
removed first run continue_run warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
1b15 committed Mar 12, 2024
1 parent 85b5ea9 commit 19212bb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions neurolib/models/model.py
Expand Up @@ -324,9 +324,6 @@ def storeOutputsAndStates(self, t, variables, append=False):
def setInitialValuesToLastState(self):
"""Reads the last state of the model and sets the initial conditions to that state for continuing a simulation."""
if not all([sv in self.state for sv in self.state_vars]):
logging.warning(
f"`setInitialValuesToLastState` was called, but the state dict is incomplete. This is probably caused by `continue_run=True` on the first model run."
)
return
for iv, sv in zip(self.init_vars, self.state_vars):
# if state variables are one-dimensional (in space only)
Expand Down
3 changes: 0 additions & 3 deletions neurolib/models/multimodel/model.py
Expand Up @@ -203,9 +203,6 @@ def integrate(self, append_outputs=False, simulate_bold=False, noise_input=None)

def setInitialValuesToLastState(self):
if not self.state:
logging.warning(
f"`setInitialValuesToLastState` was called, but the state dict is empty. This is probably caused by `continue_run=True` on the first model run."
)
return
new_initial_state = np.zeros((self.model_instance.initial_state.shape[0], self.maxDelay + 1))
total_vars_counter = 0
Expand Down

0 comments on commit 19212bb

Please sign in to comment.