nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: deepjavalibrary/djl
Pull request #1457 (2022-01-13 01:30:01)

Upgrade testng to 7.5
Change-Id: I4b0a730857c42e6b1bf879226fcac1fc443f7bbd

## Description ##

Brief description of what this PR is about

- If this change is a backward incompatible change, why must this change be made?
- Interesting edge cases to note here



Patch:
diff --git a/extensions/hadoop/build.gradle b/extensions/hadoop/build.gradle
index 2130fcf92..9ab777f21 100644
--- a/extensions/hadoop/build.gradle
+++ b/extensions/hadoop/build.gradle
@@ -8,7 +8,8 @@ dependencies {
     testImplementation "org.apache.hadoop:hadoop-minicluster:${hadoop_version}"
     testImplementation(project(":testing"))
 
-    testImplementation("org.testng:testng:${testng_version}");
+    testImplementation "org.testng:testng:${testng_version}"
+    testRuntimeOnly "junit:junit:${junit_version}" // hadoop-client test depends on junit
 }
 
 publishing {
diff --git a/gradle.properties b/gradle.properties
index 3dd6d9a6c..1c3f9e526 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -35,5 +35,5 @@ javacpp_version=1.5.6
 protobuf_version=3.8.0
 
 antlr_version=4.9.2
-# testng 7.4.0 has bug, we have to keep it as 7.3.0 for now
-testng_version=7.3.0
+testng_version=7.5
+junit_version=4.13.2


Test patch:
diff --git a/testing/build.gradle b/testing/build.gradle
index 2369e7396..9b2081f35 100644
--- a/testing/build.gradle
+++ b/testing/build.gradle
@@ -1,6 +1,4 @@
 dependencies {
     api project(":api")
-    api("org.testng:testng:${testng_version}") {
-        exclude group: "junit", module: "junit"
-    }
+    api "org.testng:testng:${testng_version}"
 }
Repository: deepjavalibrary/djl
Pull request #1510 (2022-02-23 08:56:40)

arena allocator setter
## Description ##

Add arena allocator boolean setter

Related to #1507



Patch:
diff --git a/engines/onnxruntime/onnxruntime-engine/src/main/java/ai/djl/onnxruntime/engine/OrtModel.java b/engines/onnxruntime/onnxruntime-engine/src/main/java/ai/djl/onnxruntime/engine/OrtModel.java
index c3d856a83..dfd9caa1f 100644
--- a/engines/onnxruntime/onnxruntime-engine/src/main/java/ai/djl/onnxruntime/engine/OrtModel.java
+++ b/engines/onnxruntime/onnxruntime-engine/src/main/java/ai/djl/onnxruntime/engine/OrtModel.java
@@ -180,6 +180,12 @@ public class OrtModel extends BaseModel {
         if (Boolean.parseBoolean(memoryOptimization)) {
             ortSession.setMemoryPatternOptimization(true);
         }
+
+        String cpuArena = (String) options.get("cpuArenaAllocator");
+        if (Boolean.parseBoolean(cpuArena)) {
+            ortSession.setCPUArenaAllocator(true);
+        }
+
         return ortSession;
     }
 }


Test patch:
diff --git a/engines/onnxruntime/onnxruntime-engine/src/test/java/ai/djl/onnxruntime/engine/OrtTest.java b/engines/onnxruntime/onnxruntime-engine/src/test/java/ai/djl/onnxruntime/engine/OrtTest.java
index 94fab66b0..6d6c709f0 100644
--- a/engines/onnxruntime/onnxruntime-engine/src/test/java/ai/djl/onnxruntime/engine/OrtTest.java
+++ b/engines/onnxruntime/onnxruntime-engine/src/test/java/ai/djl/onnxruntime/engine/OrtTest.java
@@ -48,6 +48,7 @@ public class OrtTest {
                             .optOption("executionMode", "SEQUENTIAL")
                             .optOption("optLevel", "NO_OPT")
                             .optOption("memoryPatternOptimization", "true")
+                            .optOption("cpuArenaAllocator", "true")
                             .build();
 
             IrisFlower virginica = new IrisFlower(1.0f, 2.0f, 3.0f, 4.0f);