Skip to content

Commit

Permalink
[MINOR] Fix incremental SliceLine pruning configurations
Browse files Browse the repository at this point in the history
This patch fixes the disabled approximate pruning strategy, as well as
moves some of the tests (by correct alphabetical order) to builtin-part1
which also reduces the chances of timeouts.
  • Loading branch information
mboehm7 committed Sep 28, 2024
1 parent 665abc1 commit bbd79d2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions scripts/builtin/incSliceLine.dml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@
# prevTK previous top-k slices (for incremental updates)
# prevTKC previous top-k scores (for incremental updates)
# encodeLat flag for encoding output lattice for less memory consumption
# pruningStrat pruning strategy: 0 all pruning, 1 only score pruning, 2 only size pruning,
# 3 only max score pruning, 4 only approx pruning, 5 no pruning
# pruningStrat pruning strategy: 0 all pruning, 1 all exact pruning,
# 2 only score pruning, 3 only max score pruning,
# 4 only size pruning, 5 no pruning
# ---------------------------------------------------------------------------------------
#
# OUTPUT:
Expand Down Expand Up @@ -82,7 +83,7 @@ m_incSliceLine = function(
list[unknown] prevLattice = list(), list[unknown] metaPrevLattice = list(),
list[unknown] prevStats = list(), Matrix[Double] prevTK = matrix(0,0,0),
Matrix[Double] prevTKC = matrix(0,0,0), Boolean encodeLat = TRUE,
Int pruningStrat = 0)
Int pruningStrat = 1)
return(
Matrix[Double] TK, Matrix[Double] TKC, Matrix[Double] D,
list[unknown] L, list[unknown] metaLattice,
Expand All @@ -101,11 +102,10 @@ m_incSliceLine = function(
+ " -- see documentation for more details.");
}

enableIncScorePruning = ( pruningStrat <= 1);
enableIncSizePruning = ((pruningStrat == 0) | (pruningStrat == 2));
enableIncMaxScorePruning = ((pruningStrat == 0) | (pruningStrat == 3));
enableIncApproxPruning = ((pruningStrat == 0) | (pruningStrat == 4));
enableIncApproxPruning = FALSE;
enableIncScorePruning = (pruningStrat <= 2);
enableIncSizePruning = (pruningStrat <= 1 | pruningStrat == 4);
enableIncMaxScorePruning = (pruningStrat <= 1 | pruningStrat == 3);
enableIncApproxPruning = (pruningStrat == 0);

t1 = time();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

package org.apache.sysds.test.functions.builtin.part2;
package org.apache.sysds.test.functions.builtin.part1;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

package org.apache.sysds.test.functions.builtin.part2;
package org.apache.sysds.test.functions.builtin.part1;

import org.junit.Assert;
import org.junit.Test;
Expand Down
6 changes: 3 additions & 3 deletions src/test/scripts/functions/builtin/incSliceLineFull.dml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ disableIncScorePruning = $13;
disableIncSizePruning = $14;

if(disableIncScorePruning & disableIncSizePruning){
pruningStrat = 3;
pruningStrat = 5;
} else if (disableIncSizePruning){
pruningStrat = 2;
} else if (disableIncScorePruning){
pruningStrat = 1;
pruningStrat = 4;
} else {
pruningStrat = 0;
pruningStrat = 1;
}


Expand Down

0 comments on commit bbd79d2

Please sign in to comment.