use of org.deeplearning4j.spark.stats.EventStats in project deeplearning4j by deeplearning4j.
the class TestTrainingStatsCollection method assertExpectedNumberMachineIdsJvmIdsThreadIds.
private static void assertExpectedNumberMachineIdsJvmIdsThreadIds(List<EventStats> events, int expNMachineIDs, int expNumJvmIds, int expNumThreadIds) {
Set<String> machineIDs = new HashSet<>();
Set<String> jvmIDs = new HashSet<>();
Set<Long> threadIDs = new HashSet<>();
for (EventStats e : events) {
machineIDs.add(e.getMachineID());
jvmIDs.add(e.getJvmID());
threadIDs.add(e.getThreadID());
}
assertTrue(machineIDs.size() == expNMachineIDs);
assertTrue(jvmIDs.size() == expNumJvmIds);
assertTrue(threadIDs.size() == expNumThreadIds);
}
Aggregations