Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Callbacks phase 1 #299

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

JimClarke5
Copy link
Contributor

This is the first Phase of Callbacks and is just a minimal set to start work on Model.

There is a chicken and egg relationship with Callbacks and Model, so this PR just addresses the first part with integration with Model postponed. Only enough Callbacks to get started with Model are provided for now.

Once model is done, then a 2nd phase PR with full integration with Model will be created.


/** Creates a Callback */
protected Callback() {
this(null);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to use Collections.emptyMap() here rather than null? Or is it mutated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far none of the subclasses write to it, so we could use emptyMap().
I don't think it is a good idea to leave it null. Also make it final in Callback.

}

@Test
void onEpochEnd() {}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests are empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will fix

@Craigacp
Copy link
Collaborator

Craigacp commented May 6, 2021

Mostly small stuff and some tidying in the docs. Otherwise it looks pretty good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants