You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
69 # Init sync with the network. Updates the metagraph.
70 self.sync()
- template/base/validator.py
def save_state(self):
"""Saves the state of the validator to a file."""
bt.logging.info("Saving validator state.")
# Save the state of the validator to file.
np.savez(
self.config.neuron.full_path + "/state.npz",
step=self.step,
scores=self.scores,
hotkeys=self.hotkeys,
)
def load_state(self):
"""Loads the state of the validator from a file."""
bt.logging.info("Loading validator state.")
# Load the state of the validator from file.
state = np.load(self.config.neuron.full_path + "/state.npz")
self.step = state["step"]
self.scores = state["scores"]
self.hotkeys = state["hotkeys"]
load_state() in neurons/validator.py is not needed.
the state is cleared when sync() is called in template/base/validator.py
The text was updated successfully, but these errors were encountered:
- neurons/validator.py
- template/base/validator.py
- template/base/validator.py
load_state() in neurons/validator.py is not needed.
the state is cleared when sync() is called in template/base/validator.py
The text was updated successfully, but these errors were encountered: