PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: codecov/uploader (ts)

Issue:
[c#] Uploader doesn't find cobertura reports generated by Microsoft.CodeCoverage
**Describe the bug**
Uploader doesn't find cobertura reports generated by `Microsoft.CodeCoverage`.
Those are placed inside a `TestResults/<guid>/<username>_<computername>_<date>_<time>.cobertura.xml`

**To Reproduce**
Steps to reproduce the behavior:
1. Clone https://github.com/visualon/NCrontab-Advanced
2. Run dotnet test
3. run coverage uploader

**Expected behavior**
The uploader should find the files like it's doing for `coverlet.collector`

**Screenshots**
MS Coverage
![image](https://user-images.githubusercontent.com/1798109/208411569-bbf60c06-bdbd-42d0-93cb-baba6707e45a.png)
Coverlet
![image](https://user-images.githubusercontent.com/1798109/208411797-f0a72dff-e2d8-4ebf-a836-893f752de8fc.png)

**Additional context**
no


Pull request:
feat: support cobertura reports generated by Microsoft.CodeCoverage
Fixes #917

Patch:
diff --git a/src/helpers/files.ts b/src/helpers/files.ts
index 853d65e..74d03ea 100644
--- a/src/helpers/files.ts
+++ b/src/helpers/files.ts
@@ -167,7 +167,7 @@ export function coverageFilePatterns(): string[] {
     'report.xml',
     '*.codecov.!(exe)',
     'codecov.!(exe)',
-    'cobertura.xml',
+    '*cobertura.xml',
     'excoveralls.json',
     'luacov.report.out',
     'coverage-final.json',


Test patch:
diff --git a/test/fixtures/codecov_demobox_2023-02-27_01-03-34.cobertura.xml b/test/fixtures/codecov_demobox_2023-02-27_01-03-34.cobertura.xml
new file mode 100644
index 0000000..e69de29
diff --git a/test/helpers/files.test.ts b/test/helpers/files.test.ts
index 211c991..b789c75 100644
--- a/test/helpers/files.test.ts
+++ b/test/helpers/files.test.ts
@@ -226,6 +226,7 @@ describe('File Helpers', () => {
       expect(results).not.toContain('codecov.exe')
 
       expect(results).toContain('test/fixtures/other/fake.codecov.txt')
+      expect(results).toContain('test/fixtures/codecov_demobox_2023-02-27_01-03-34.cobertura.xml')
     })
 
     it('can return a list of coverage files with a pattern', async () => {
Repository: deepjavalibrary/djl (java)

Issue:
[examples] ImageClassification gives invalid probability.
## Description
As discussion #1566, `examples.inference.ImageClassification` gives probability >0 or <1.

## What have you tried to solve it?

Set `.optApplySoftmax(true)` to set a Softmax classification layer.


Pull request:
[examples] Fix ImageClassification invalid probability
## Description ##

- Set a softmax classification layer in `examples.inference.ImageClassification`.
- Write a test for Class `ImageClassification`
- close #1574 


Patch:
diff --git a/examples/src/main/java/ai/djl/examples/inference/ImageClassification.java b/examples/src/main/java/ai/djl/examples/inference/ImageClassification.java
index 9712ecb82..69ae0f442 100644
--- a/examples/src/main/java/ai/djl/examples/inference/ImageClassification.java
+++ b/examples/src/main/java/ai/djl/examples/inference/ImageClassification.java
@@ -68,6 +68,7 @@ public final class ImageClassification {
                     ImageClassificationTranslator.builder()
                             .addTransform(new ToTensor())
                             .optSynset(classes)
+                            .optApplySoftmax(true)
                             .build();
 
             try (Predictor<Image, Classifications> predictor = model.newPredictor(translator)) {


Test patch:
diff --git a/examples/src/test/java/ai/djl/examples/training/TrainMnistTest.java b/examples/src/test/java/ai/djl/examples/training/TrainMnistTest.java
index 511e780ec..5c29059be 100644
--- a/examples/src/test/java/ai/djl/examples/training/TrainMnistTest.java
+++ b/examples/src/test/java/ai/djl/examples/training/TrainMnistTest.java
@@ -28,6 +28,7 @@ public class TrainMnistTest {
     public void testTrainMnist() throws ModelException, TranslateException, IOException {
         TestRequirements.engine("MXNet", "PyTorch");
 
+        double expectedProb;
         if (Boolean.getBoolean("nightly")) {
             String[] args = new String[] {"-g", "1"};
 
@@ -39,14 +40,18 @@ public class TrainMnistTest {
             Assert.assertTrue(accuracy > 0.9f, "Accuracy: " + accuracy);
             Assert.assertTrue(loss < 0.35f, "Loss: " + loss);
 
-            Classifications classifications = ImageClassification.predict();
-            Classifications.Classification best = classifications.best();
-            Assert.assertEquals(best.getClassName(), "0");
-            Assert.assertTrue(Double.compare(best.getProbability(), 0.9) > 0);
+            expectedProb = 0.9;
         } else {
             String[] args = new String[] {"-g", "1", "-m", "2"};
 
             TrainMnist.runExample(args);
+            expectedProb = 0;
         }
+
+        Classifications classifications = ImageClassification.predict();
+        Classifications.Classification best = classifications.best();
+        Assert.assertEquals(best.getClassName(), "0");
+        double probability = best.getProbability();
+        Assert.assertTrue(probability > expectedProb && probability <= 1);
     }
 }