Skip to content

Commit

Permalink
Merge pull request #8138 from brs96/fix-kge-mutate-conflict
Browse files Browse the repository at this point in the history
Fix conflicts from KGEMutateProc
  • Loading branch information
brs96 authored Sep 13, 2023
2 parents 4fade19 + 889bb84 commit 7844a62
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions ml/ml-core/src/main/java/org/neo4j/gds/ml/core/tensor/Tensor.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ public int totalSize() {
return Dimensions.totalSize(dimensions);
}

// TODO: figure out how to replace this one
public SELF elementwiseProduct(Tensor<?> other) {
var result = createWithSameDimensions();
for (int i = 0; i < data.length; i++) {
result.data[i] = data[i] * other.data[i];
}
return result;
}


public Tensor<SELF> elementwiseProductMutate(Tensor<?> other) {
for (int i = 0; i < data.length; i++) {
this.data[i] = data[i] * other.data[i];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import org.neo4j.gds.RelationshipType;
import org.neo4j.gds.ResultBuilderFunction;
import org.neo4j.gds.core.Aggregation;
import org.neo4j.gds.core.concurrency.DefaultPool;
import org.neo4j.gds.core.concurrency.ParallelUtil;
import org.neo4j.gds.core.concurrency.Pools;
import org.neo4j.gds.core.loading.construction.GraphFactory;
import org.neo4j.gds.core.utils.TerminationFlag;
import org.neo4j.gds.executor.ComputationResult;
Expand Down Expand Up @@ -64,7 +64,7 @@ protected void updateGraphStore(
.orientation(Orientation.NATURAL)
.addPropertyConfig(GraphFactory.PropertyConfig.of(KGE_PREDICT_MUTATE_PROPERTY))
.concurrency(concurrency)
.executorService(Pools.DEFAULT)
.executorService(DefaultPool.INSTANCE)
.build();

var similarityResultStream = computationResult.result()
Expand Down

0 comments on commit 7844a62

Please sign in to comment.