Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes a provenance marshalling bug in
ModelProvenance
andEnsembleModelProvenance
and adds a test to ensure it doesn't happen again.Also adds system information to
ModelProvenance
andEnsembleModelProvenance
. Now these provenances track "java.version", "os.name" and "os.arch" from the Java properties. They can be removed by passing the appropriate flag on construction, or by stripping them usingStripProvenance
(and so StripProvenance gained the ability to remove system provenances).Motivation
Tribuo 4.0.2 can produce different outputs on Java 8 x86_64, Java 9+ x86_64 and Java on aarch64, due to differences in the implementation of Math.exp, Math.log and Math.sqrt on those platforms. To ensure replicability we need to track what platform the model was created on until we've run it down and either switched to the slower StrictMath for correctness or learned to live with it. Future optimisations using the Vector API will also likely induce model divergence based on the hardware as the order of operations will be different when training models with SGD, so we might need this permanently.