This is an automated email from the ASF dual-hosted git repository.
mboehm7 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/systemds.git
The following commit(s) were added to refs/heads/main by this push:
new 34f05fe5f8 [MINOR] Fix javadoc issues and codecov.yml coloring
configuration
34f05fe5f8 is described below
commit 34f05fe5f8adf91b6a92fc5de24462af66df375c
Author: Matthias Boehm <[email protected]>
AuthorDate: Wed Aug 21 20:14:42 2024 +0200
[MINOR] Fix javadoc issues and codecov.yml coloring configuration
---
codecov.yml | 2 +-
.../java/org/apache/sysds/resource/CloudUtils.java | 2 ++
.../resource/enumeration/EnumerationUtils.java | 4 ++--
.../sysds/resource/enumeration/Enumerator.java | 11 +++++++++--
.../test/component/resource/EnumeratorTests.java | 22 +++++++++++-----------
5 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/codecov.yml b/codecov.yml
index 40c0e1720b..548796ea26 100644
--- a/codecov.yml
+++ b/codecov.yml
@@ -31,4 +31,4 @@ coverage:
if_not_found: success
changes: no
precision: 2
- range: "75...100"
+ range: "50...75"
diff --git a/src/main/java/org/apache/sysds/resource/CloudUtils.java
b/src/main/java/org/apache/sysds/resource/CloudUtils.java
index 3a1e38f422..da09b80fc6 100644
--- a/src/main/java/org/apache/sysds/resource/CloudUtils.java
+++ b/src/main/java/org/apache/sysds/resource/CloudUtils.java
@@ -74,6 +74,7 @@ public abstract class CloudUtils {
/**
* Performs read of csv file filled with VM instance characteristics.
* Each record in the csv should carry the following information
(including header):
+ * <ul>
* <li>API_Name - naming for VM instance used by the provider</li>
* <li>Memory - floating number for the instance memory in GBs</li>
* <li>vCPUs - number of physical threads</li>
@@ -82,6 +83,7 @@ public abstract class CloudUtils {
* <li>diskSpeed - memory bandwidth in MB/s</li>
* <li>networkSpeed - memory bandwidth in MB/s</li>
* <li>Price - price for instance per hour</li>
+ * </ul>
* @param instanceTablePath csv file
* @return map with filtered instances
* @throws IOException in case problem at reading the csv file
diff --git
a/src/main/java/org/apache/sysds/resource/enumeration/EnumerationUtils.java
b/src/main/java/org/apache/sysds/resource/enumeration/EnumerationUtils.java
index fa075dd9d9..6900226947 100644
--- a/src/main/java/org/apache/sysds/resource/enumeration/EnumerationUtils.java
+++ b/src/main/java/org/apache/sysds/resource/enumeration/EnumerationUtils.java
@@ -40,12 +40,12 @@ public class EnumerationUtils {
* since the memory - cores combinations is often not unique.
* The {@code CloudInstance} objects are unique over the whole
* set of lists within this lowest level of the search space.
- * <br></br>
+ * <br>
* This representation allows compact storing of VM instance
* characteristics relevant for program compilation while
* still keeping a reference to the object carrying the
* whole instance information, relevant for cost estimation.
- * <br></br>
+ * <br>
* {@code TreeMap} data structures are used as building blocks for
* the complex search space structure to ensure ascending order
* of the instance characteristics - memory and number of cores.
diff --git
a/src/main/java/org/apache/sysds/resource/enumeration/Enumerator.java
b/src/main/java/org/apache/sysds/resource/enumeration/Enumerator.java
index 2147dfc368..3893f01e2e 100644
--- a/src/main/java/org/apache/sysds/resource/enumeration/Enumerator.java
+++ b/src/main/java/org/apache/sysds/resource/enumeration/Enumerator.java
@@ -100,13 +100,15 @@ public abstract class Enumerator {
/**
* Meant to be used for testing purposes
+ * @return ?
*/
public HashMap<String, CloudInstance> getInstances() {
- return instances;
+ return instances;
}
/**
* Meant to be used for testing purposes
+ * @return ?
*/
public InstanceSearchSpace getDriverSpace() {
return driverSpace;
@@ -114,6 +116,7 @@ public abstract class Enumerator {
/**
* Meant to be used for testing purposes
+ * @param inputSpace ?
*/
public void setDriverSpace(InstanceSearchSpace inputSpace) {
driverSpace.putAll(inputSpace);
@@ -121,6 +124,7 @@ public abstract class Enumerator {
/**
* Meant to be used for testing purposes
+ * @return ?
*/
public InstanceSearchSpace getExecutorSpace() {
return executorSpace;
@@ -128,6 +132,7 @@ public abstract class Enumerator {
/**
* Meant to be used for testing purposes
+ * @param inputSpace ?
*/
public void setExecutorSpace(InstanceSearchSpace inputSpace) {
executorSpace.putAll(inputSpace);
@@ -135,6 +140,7 @@ public abstract class Enumerator {
/**
* Meant to be used for testing purposes
+ * @return ?
*/
public ArrayList<SolutionPoint> getSolutionPool() {
return solutionPool;
@@ -142,6 +148,7 @@ public abstract class Enumerator {
/**
* Meant to be used for testing purposes
+ * @param solutionPool ?
*/
public void setSolutionPool(ArrayList<SolutionPoint> solutionPool) {
this.solutionPool = solutionPool;
@@ -254,7 +261,7 @@ public abstract class Enumerator {
* Deciding in the overall best solution out
* of the filled pool of potential solutions
* after processing.
- * @return - single optimal cluster configuration
+ * @return single optimal cluster configuration
*/
public SolutionPoint postprocessing() {
if (solutionPool.isEmpty()) {
diff --git
a/src/test/java/org/apache/sysds/test/component/resource/EnumeratorTests.java
b/src/test/java/org/apache/sysds/test/component/resource/EnumeratorTests.java
index 437770ce28..4555c4bbb3 100644
---
a/src/test/java/org/apache/sysds/test/component/resource/EnumeratorTests.java
+++
b/src/test/java/org/apache/sysds/test/component/resource/EnumeratorTests.java
@@ -35,7 +35,12 @@ import org.mockito.Mockito;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
import static org.apache.sysds.resource.CloudUtils.GBtoBytes;
import static org.junit.Assert.*;
@@ -193,8 +198,6 @@ public class EnumeratorTests {
@Test
public void estimateRangeExecutorsGridBasedStepSizeTest() {
Enumerator gridBasedEnumerator;
- ArrayList<Integer> expectedResult;
- ArrayList<Integer> actualResult;
// num. executors range starting from zero and step size = 2
gridBasedEnumerator = getGridBasedEnumeratorPrebuild()
@@ -202,8 +205,8 @@ public class EnumeratorTests {
.withStepSizeExecutor(2)
.build();
// test the general case when the max level of parallelism is
not reached (0 is never part of the result)
- expectedResult = new ArrayList<>(List.of(2, 4, 6, 8, 10));
- actualResult = gridBasedEnumerator.estimateRangeExecutors(-1,
4);
+ List<Integer> expectedResult = new ArrayList<>(List.of(2, 4, 6,
8, 10));
+ List<Integer> actualResult =
gridBasedEnumerator.estimateRangeExecutors(-1, 4);
Assert.assertEquals(expectedResult, actualResult);
// test the case when the max level of parallelism (1000) is
reached (0 is never part of the result)
expectedResult = new ArrayList<>(List.of(2, 4));
@@ -312,9 +315,6 @@ public class EnumeratorTests {
@Test
public void estimateRangeExecutorsInterestBasedCheckpointMemoryTest() {
- ArrayList<Integer> expectedResult;
- ArrayList<Integer>actualResult;
-
// fitting the memory estimates for checkpointing
Enumerator interestBasedEnumerator =
getInterestBasedEnumeratorPrebuild()
.withNumberExecutorsRange(0, 5)
@@ -340,8 +340,8 @@ public class EnumeratorTests {
}
// test the general case when the max level of parallelism is
not reached (0 is never part of the result)
- expectedResult = new ArrayList<>(List.of(1, 2, 3));
- actualResult =
interestBasedEnumerator.estimateRangeExecutors(GBtoBytes(16), 4);
+ List<Integer> expectedResult = new ArrayList<>(List.of(1, 2,
3));
+ List<Integer> actualResult =
interestBasedEnumerator.estimateRangeExecutors(GBtoBytes(16), 4);
Assert.assertEquals(expectedResult, actualResult);
// test the case when the max level of parallelism (1000) is
reached (0 is never part of the result)
expectedResult = new ArrayList<>(List.of(1, 2));
@@ -377,7 +377,7 @@ public class EnumeratorTests {
ArrayList<SolutionPoint> actualSolutionPoolIB =
gridBasedEnumerator.getSolutionPool();
- ArrayList<CloudInstance> expectedInstances = new
ArrayList<>(Arrays.asList(
+ List<CloudInstance> expectedInstances = new
ArrayList<>(Arrays.asList(
instances.get("c5.xlarge"),
instances.get("m5.xlarge")
));