Skip to content

Commit

Permalink
update libs to 4.3.0 (#85)
Browse files Browse the repository at this point in the history
* update libs to 4.3.0

* swig4.2

* drop build cache

* drop build cache 2

* drop build cache 3

* remove md5 check temp
  • Loading branch information
shuttie authored May 31, 2024
1 parent 63eb16d commit 880a132
Show file tree
Hide file tree
Showing 49 changed files with 175 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Cache maven packages
uses: actions/cache@v2
env:
cache-name: cache-mvn
cache-name: cache-mvn2
with:
path: ~/.m2
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/microsoft/ml/lightgbm/CSRDirect.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down Expand Up @@ -33,7 +33,7 @@ protected static long swigRelease(CSRDirect obj) {
return ptr;
}

@SuppressWarnings("deprecation")
@SuppressWarnings({"deprecation", "removal"})
protected void finalize() {
delete();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down Expand Up @@ -33,7 +33,7 @@ protected static long swigRelease(doubleChunkedArray obj) {
return ptr;
}

@SuppressWarnings("deprecation")
@SuppressWarnings({"deprecation", "removal"})
protected void finalize() {
delete();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down Expand Up @@ -33,7 +33,7 @@ protected static long swigRelease(floatChunkedArray obj) {
return ptr;
}

@SuppressWarnings("deprecation")
@SuppressWarnings({"deprecation", "removal"})
protected void finalize() {
delete();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down Expand Up @@ -33,7 +33,7 @@ protected static long swigRelease(int32ChunkedArray obj) {
return ptr;
}

@SuppressWarnings("deprecation")
@SuppressWarnings({"deprecation", "removal"})
protected void finalize() {
delete();
}
Expand Down
14 changes: 13 additions & 1 deletion src/main/java/com/microsoft/ml/lightgbm/lightgbmlib.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down Expand Up @@ -325,6 +325,10 @@ public static int LGBM_BoosterPredictForMats(SWIGTYPE_p_void handle, SWIGTYPE_p_
return lightgbmlibJNI.LGBM_BoosterPredictForMats(SWIGTYPE_p_void.getCPtr(handle), SWIGTYPE_p_p_void.getCPtr(data), data_type, nrow, ncol, predict_type, start_iteration, num_iteration, parameter, SWIGTYPE_p_long_long.getCPtr(out_len), SWIGTYPE_p_double.getCPtr(out_result));
}

public static int LGBM_BoosterPredictForArrow(SWIGTYPE_p_void handle, long n_chunks, SWIGTYPE_p_ArrowArray chunks, SWIGTYPE_p_ArrowSchema schema, int predict_type, int start_iteration, int num_iteration, String parameter, SWIGTYPE_p_long_long out_len, SWIGTYPE_p_double out_result) {
return lightgbmlibJNI.LGBM_BoosterPredictForArrow(SWIGTYPE_p_void.getCPtr(handle), n_chunks, SWIGTYPE_p_ArrowArray.getCPtr(chunks), SWIGTYPE_p_ArrowSchema.getCPtr(schema), predict_type, start_iteration, num_iteration, parameter, SWIGTYPE_p_long_long.getCPtr(out_len), SWIGTYPE_p_double.getCPtr(out_result));
}

public static int LGBM_BoosterSaveModel(SWIGTYPE_p_void handle, int start_iteration, int num_iteration, int feature_importance_type, String filename) {
return lightgbmlibJNI.LGBM_BoosterSaveModel(SWIGTYPE_p_void.getCPtr(handle), start_iteration, num_iteration, feature_importance_type, filename);
}
Expand Down Expand Up @@ -365,6 +369,14 @@ public static int LGBM_NetworkInitWithFunctions(int num_machines, int rank, SWIG
return lightgbmlibJNI.LGBM_NetworkInitWithFunctions(num_machines, rank, SWIGTYPE_p_void.getCPtr(reduce_scatter_ext_fun), SWIGTYPE_p_void.getCPtr(allgather_ext_fun));
}

public static int LGBM_SetMaxThreads(int num_threads) {
return lightgbmlibJNI.LGBM_SetMaxThreads(num_threads);
}

public static int LGBM_GetMaxThreads(SWIGTYPE_p_int out) {
return lightgbmlibJNI.LGBM_GetMaxThreads(SWIGTYPE_p_int.getCPtr(out));
}

public static String LastErrorMsg() {
return lightgbmlibJNI.LastErrorMsg();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
Expand Down
99 changes: 97 additions & 2 deletions src/main/java/com/microsoft/ml/lightgbm/lightgbmlibJAVA_wrap.cxx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
* Version 4.2.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */


#define SWIG_VERSION 0x040101
#define SWIG_VERSION 0x040201
#define SWIGJAVA

/* -----------------------------------------------------------------------------
Expand Down Expand Up @@ -134,6 +134,36 @@
# pragma warning disable 592
#endif

#if defined(__cplusplus) && __cplusplus >=201103L
# define SWIG_NULLPTR nullptr
#else
# define SWIG_NULLPTR NULL
#endif

/* -----------------------------------------------------------------------------
* swigcompat.swg
*
* Macros to provide support compatibility with older C and C++ standards.
* ----------------------------------------------------------------------------- */

/* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF
* if you're missing it.
*/
#if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \
(defined __cplusplus && __cplusplus >= 201103L) || \
defined SWIG_HAVE_SNPRINTF) && \
!defined SWIG_NO_SNPRINTF
# define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A)
# define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B)
#else
/* Fallback versions ignore the buffer size, but most of our uses either have a
* fixed maximum possible size or dynamically allocate a buffer that's large
* enough.
*/
# define SWIG_snprintf(O,S,F,A) sprintf(O,F,A)
# define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B)
#endif


#include <jni.h>
#include <stdlib.h>
Expand Down Expand Up @@ -3238,6 +3268,43 @@ SWIGEXPORT jint JNICALL Java_com_microsoft_ml_lightgbm_lightgbmlibJNI_LGBM_1Boos
}


SWIGEXPORT jint JNICALL Java_com_microsoft_ml_lightgbm_lightgbmlibJNI_LGBM_1BoosterPredictForArrow(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jlong jarg3, jlong jarg4, jint jarg5, jint jarg6, jint jarg7, jstring jarg8, jlong jarg9, jlong jarg10) {
jint jresult = 0 ;
BoosterHandle arg1 = (BoosterHandle) 0 ;
int64_t arg2 ;
ArrowArray *arg3 = (ArrowArray *) 0 ;
ArrowSchema *arg4 = (ArrowSchema *) 0 ;
int arg5 ;
int arg6 ;
int arg7 ;
char *arg8 = (char *) 0 ;
int64_t *arg9 = (int64_t *) 0 ;
double *arg10 = (double *) 0 ;
int result;

(void)jenv;
(void)jcls;
arg1 = *(BoosterHandle *)&jarg1;
arg2 = (int64_t)jarg2;
arg3 = *(ArrowArray **)&jarg3;
arg4 = *(ArrowSchema **)&jarg4;
arg5 = (int)jarg5;
arg6 = (int)jarg6;
arg7 = (int)jarg7;
arg8 = 0;
if (jarg8) {
arg8 = (char *)jenv->GetStringUTFChars(jarg8, 0);
if (!arg8) return 0;
}
arg9 = *(int64_t **)&jarg9;
arg10 = *(double **)&jarg10;
result = (int)LGBM_BoosterPredictForArrow(arg1,arg2,(ArrowArray const *)arg3,(ArrowSchema const *)arg4,arg5,arg6,arg7,(char const *)arg8,arg9,arg10);
jresult = (jint)result;
if (arg8) jenv->ReleaseStringUTFChars(jarg8, (const char *)arg8);
return jresult;
}


SWIGEXPORT jint JNICALL Java_com_microsoft_ml_lightgbm_lightgbmlibJNI_LGBM_1BoosterSaveModel(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jint jarg3, jint jarg4, jstring jarg5) {
jint jresult = 0 ;
BoosterHandle arg1 = (BoosterHandle) 0 ;
Expand Down Expand Up @@ -3445,6 +3512,34 @@ SWIGEXPORT jint JNICALL Java_com_microsoft_ml_lightgbm_lightgbmlibJNI_LGBM_1Netw
}


SWIGEXPORT jint JNICALL Java_com_microsoft_ml_lightgbm_lightgbmlibJNI_LGBM_1SetMaxThreads(JNIEnv *jenv, jclass jcls, jint jarg1) {
jint jresult = 0 ;
int arg1 ;
int result;

(void)jenv;
(void)jcls;
arg1 = (int)jarg1;
result = (int)LGBM_SetMaxThreads(arg1);
jresult = (jint)result;
return jresult;
}


SWIGEXPORT jint JNICALL Java_com_microsoft_ml_lightgbm_lightgbmlibJNI_LGBM_1GetMaxThreads(JNIEnv *jenv, jclass jcls, jlong jarg1) {
jint jresult = 0 ;
int *arg1 = (int *) 0 ;
int result;

(void)jenv;
(void)jcls;
arg1 = *(int **)&jarg1;
result = (int)LGBM_GetMaxThreads(arg1);
jresult = (jint)result;
return jresult;
}


SWIGEXPORT jstring JNICALL Java_com_microsoft_ml_lightgbm_lightgbmlibJNI_LastErrorMsg(JNIEnv *jenv, jclass jcls) {
jstring jresult = 0 ;
char *result = 0 ;
Expand Down
Loading

0 comments on commit 880a132

Please sign in to comment.