Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
RL4J Added listener pattern to SyncLearning #8050
Signed-off-by: Alexandre Boulanger firstname.lastname@example.org
What changes were proposed in this pull request?
The goal of this PR is to remove IDataManager from SyncLearning. I added a listener pattern to SyncLearning, and a listener class (DataManagerSyncTrainingListener) that will make the calls to DataManager that SyncLearning used to do.
I removed the try/catch from SyncLearning.train(). Listeners should be well-behaved and not throw. If a listener need to stop the training (because of an IOException for example), it can with SyncTrainingEvent.setCanContinue(false).
Since SyncLearning doesn't use IDataManager anymore, I moved it to ASyncLearning (where a similar refac will be done in an upcoming PR).
I did not add javadoc to IDataManager and IAsyncGlobal.
Summary of changes:
How was this patch tested?
The following checklist helps ensure your PR is complete:
AlexDBlack left a comment
I only quickly scanned this, looks reasonable at first glance. Get rid of the