Conversation
| val copy = | ||
| new OpWorkflowModel(uid = uid, trainingParams = trainingParams.copy()) | ||
| .setFeatures(copyFeatures(resultFeatures)) | ||
| .setRawFeatures(copyFeatures(rawFeatures)) |
There was a problem hiding this comment.
you shouldnt set the raw features - they should be derived from the features
There was a problem hiding this comment.
good point. what if somebody modifies it separately? I dont want to mess up any internal state.
There was a problem hiding this comment.
they shouldnt be able to - it is private to op. setting the raw features should never be done directly. In fact the method has no usages maybe we shoudl delete it
There was a problem hiding this comment.
Ha ha ha!! Removed it.
Codecov Report
@@ Coverage Diff @@
## master #270 +/- ##
==========================================
+ Coverage 86.38% 86.39% +<.01%
==========================================
Files 318 318
Lines 10447 10458 +11
Branches 321 559 +238
==========================================
+ Hits 9025 9035 +10
- Misses 1422 1423 +1
Continue to review full report at Codecov.
|
Related issues
Currently once the model is loaded it's impossible to reuse the same instance across multiple threads.
Describe the proposed solution
Added
model.copy()to allow deep copy of model instance so each thread would get it's own instance.