@Test public void when_training_expect_onTrainingProgressCalled() { asyncLearning.setProgressMonitorFrequency(100); when(mockTrainingListener.onTrainingProgress(eq(asyncLearning))).thenReturn(TrainingListener.ListenerResponse.STOP); asyncLearning.train(); verify(mockTrainingListener, times(1)).onTrainingStart(); verify(mockTrainingListener, times(1)).onTrainingEnd(); verify(mockTrainingListener, times(1)).onTrainingProgress(eq(asyncLearning)); }
public void train() { log.info("AsyncLearning training starting."); canContinue = listeners.notifyTrainingStarted(); if (canContinue) { launchThreads(); monitorTraining(); } listeners.notifyTrainingFinished(); }
AsyncLearning extends Learning<OBSERVATION, ACTION, ACTION_SPACE, NN> implements IAsyncLearning { public void train() { log.info("AsyncLearning training starting."); canContinue = listeners.notifyTrainingStarted(); if (canContinue) { launchThreads(); monitorTraining(); } listeners.notifyTrainingFinished(); } }
AsyncLearning extends Learning<OBSERVATION, ACTION, ACTION_SPACE, NN> implements IAsyncLearning { public void train() { log.info("AsyncLearning training starting."); canContinue = listeners.notifyTrainingStarted(); if (canContinue) { launchThreads(); monitorTraining(); } listeners.notifyTrainingFinished(); }  }
AsyncLearning extends Learning<OBSERVATION, ACTION, ACTION_SPACE, NN> implements IAsyncLearning { public void train() { log.info("AsyncLearning training starting."); canContinue = listeners.notifyTrainingStarted(); if (canContinue) { launchThreads(); monitorTraining(); } listeners.notifyTrainingFinished(); }  void addListener(TrainingListener listener); abstract IAsyncLearningConfiguration getConfiguration(); @Override int getStepCount(); void train(); void terminate(); }
AsyncLearning extends Learning<OBSERVATION, ACTION, ACTION_SPACE, NN> implements IAsyncLearning { public void train() { log.info("AsyncLearning training starting."); canContinue = listeners.notifyTrainingStarted(); if (canContinue) { launchThreads(); monitorTraining(); } listeners.notifyTrainingFinished(); }  void addListener(TrainingListener listener); abstract IAsyncLearningConfiguration getConfiguration(); @Override int getStepCount(); void train(); void terminate();  }