Skip to content

Commit

Permalink
[ML-335] Fix issues (#337)
Browse files Browse the repository at this point in the history
* split CI script to python and scala

Signed-off-by: minmingzhu <minming.zhu@intel.com>

* fixed issues

Signed-off-by: minmingzhu <minming.zhu@intel.com>

* update ci-tests.yml

Signed-off-by: minmingzhu <minming.zhu@intel.com>

* update service.cpp

Signed-off-by: minmingzhu <minming.zhu@intel.com>

* update service.cpp code style

Signed-off-by: minmingzhu <minming.zhu@intel.com>

---------

Signed-off-by: minmingzhu <minming.zhu@intel.com>
  • Loading branch information
minmingzhu authored Jul 28, 2023
1 parent c80ad75 commit 3d71e21
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
10 changes: 10 additions & 0 deletions mllib-dal/src/main/java/com/intel/oap/mllib/feature/PCAResult.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,21 @@ public class PCAResult {
public long pcNumericTable;
public long explainedVarianceNumericTable;

public long getExplainedVarianceNumericTable() {
return explainedVarianceNumericTable;
}

public void setExplainedVarianceNumericTable(long explainedVarianceNumericTable) {
this.explainedVarianceNumericTable = explainedVarianceNumericTable;
}

public long getPcNumericTable() {
return pcNumericTable;
}

public void setPcNumericTable(long pcNumericTable) {
this.pcNumericTable = pcNumericTable;
}


}
7 changes: 6 additions & 1 deletion mllib-dal/src/main/native/OneCCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ static int fill_local_host_ip() {
continue;
if (strstr(ifa->ifa_name, iface_name) == NULL) {
family = ifa->ifa_addr->sa_family;
if (family == AF_INET) {
if (family == AF_INET || family == AF_INET6) {
memset(local_ip, 0, CCL_IP_LEN);
int res = getnameinfo(
ifa->ifa_addr,
Expand All @@ -161,6 +161,11 @@ static int fill_local_host_ip() {
return -1;
}
local_host_ips.push_back(local_ip);
} else {
std::cerr
<< "OneCCL (native): can't find interface to get host IP"
<< std::endl;
return -1;
}
}
}
Expand Down
13 changes: 6 additions & 7 deletions mllib-dal/src/main/native/service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,9 @@ void printNumericTable(NumericTable *dataTable, const char *message = "",
nPrintedRows, nCols, message, interval);
dataTable->releaseBlockOfRows(block);
} else {
try {
PackedArrayNumericTableIface *packedTable =
dynamic_cast<PackedArrayNumericTableIface *>(dataTable);
PackedArrayNumericTableIface *packedTable =
dynamic_cast<PackedArrayNumericTableIface *>(dataTable);
if (packedTable) {
packedTable->getPackedArray(readOnly, block);
if (isLower(layout)) {
printLowerArray<DAAL_DATA_TYPE>(
Expand All @@ -423,10 +423,9 @@ void printNumericTable(NumericTable *dataTable, const char *message = "",
nCols, message, interval);
}
packedTable->releasePackedArray(block);
} catch (const std::bad_cast &e) {
std::cout
<< "Dynamic cast to PackedArrayNumericTableIface* failed: "
<< e.what() << std::endl;
} else {
std::cout << "Dynamic cast to PackedArrayNumericTableIface* failed."
<< std::endl;
}
}
}
Expand Down

0 comments on commit 3d71e21

Please sign in to comment.