Skip to content

Add incremental training and related unit tests#445

Merged
yunboouyang merged 3 commits into
linkedin:masterfrom
yunboouyang:incremental
Mar 7, 2020
Merged

Add incremental training and related unit tests#445
yunboouyang merged 3 commits into
linkedin:masterfrom
yunboouyang:incremental

Conversation

@yunboouyang

@yunboouyang yunboouyang commented Oct 24, 2019

Copy link
Copy Markdown
Collaborator

Changes are:
(1) Add PriorDistribution to implement incremental learning prior distribution loss function
(2) Enable photon-ml to read variance vectors
(3) Add 2 new parameters: i. Boolean incrementalLearning as the switch for incremental learning. ii. incrementalWeight to specify the importance of prior distribution.

Current implementation only covers diagonal prior variance. For Full Hessian implementation, see #450

Comment thread photon-lib/src/main/scala/com/linkedin/photon/ml/function/PriorDistribution.scala Outdated

@ashelkovnykov ashelkovnykov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good - let's begin testing (once unit/integ tests are fixed)


private val OPTIMIZER_CONFIG = OptimizerConfig(OPTIMIZER_TYPE, MAX_ITER, TOLERANCE)
private val MOCK_NORMALIZATION = mock(classOf[NormalizationContext])
private val MOCK_NORMALIZATION = mock(classOf[NormalizationContext], withSettings().serializable())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What was the reason for this change?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Integ test throws an error that MOCK_NORMALIZATION is not serializable. Original class NormalizatoinContext extends Serializable. Need to set MOCK_NORMALIZATION to be serializable as well.

Comment thread photon-api/src/main/scala/com/linkedin/photon/ml/data/RandomEffectDataset.scala Outdated
Comment thread photon-client/src/main/scala/com/linkedin/photon/ml/data/avro/AvroUtils.scala Outdated
Comment thread photon-lib/src/main/scala/com/linkedin/photon/ml/function/PriorDistribution.scala Outdated
Comment thread photon-lib/src/main/scala/com/linkedin/photon/ml/function/PriorDistribution.scala Outdated
Comment thread photon-lib/src/main/scala/com/linkedin/photon/ml/function/PriorDistribution.scala Outdated
Comment thread photon-api/src/main/scala/com/linkedin/photon/ml/estimators/GameEstimator.scala Outdated
Comment thread photon-api/src/main/scala/com/linkedin/photon/ml/estimators/GameEstimator.scala Outdated
Comment thread photon-lib/src/main/scala/com/linkedin/photon/ml/util/VectorUtils.scala Outdated

@cmjiang cmjiang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great job! Thank you for adding incremental training to Photon ML. This is a big step forward!

@yunboouyang yunboouyang merged commit aa8fcce into linkedin:master Mar 7, 2020
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.

5 participants