Skip to content

Commit 455ae9b

Browse files
committed
added cache
1 parent e151877 commit 455ae9b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

common/core/src/main/java/zingg/common/core/executor/Trainer.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ public void execute() throws ZinggClientException {
2929
ZFrame<D,R,C> positives = null;
3030
ZFrame<D,R,C> negatives = null;
3131
ZFrame<D,R,C> traOriginal = getDSUtil().getTraining(getPipeUtil(), args, getModelHelper());
32-
ZFrame<D,R,C> tra = preprocess(traOriginal);
32+
ZFrame<D,R,C> tra = preprocess(traOriginal).cache();
3333
tra = getDSUtil().joinWithItself(tra, ColName.CLUSTER_COLUMN, true);
34-
tra = tra.cache();
3534
positives = tra.filter(tra.equalTo(ColName.MATCH_FLAG_COL,ColValues.MATCH_TYPE_MATCH));
3635
negatives = tra.filter(tra.equalTo(ColName.MATCH_FLAG_COL,ColValues.MATCH_TYPE_NOT_A_MATCH));
3736

common/core/src/main/java/zingg/common/core/executor/TrainingDataFinder.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public void execute() throws ZinggClientException {
4747
ZFrame<D,R,C> trFile = getTraining();
4848

4949
if (trFile != null) {
50-
trFile = preprocess(trFile);
50+
trFile = preprocess(trFile).cache();
5151
ZFrame<D,R,C> trPairs = getDSUtil().joinWithItself(trFile, ColName.CLUSTER_COLUMN, true);
5252

5353
posPairs = trPairs.filter(trPairs.equalTo(ColName.MATCH_FLAG_COL, ColValues.MATCH_TYPE_MATCH));

0 commit comments

Comments
 (0)