You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have problems when compiling the generated Java Code from m2cgen.
I am using an XGBClassifier with n_estimators = 400.
The generated code is ~360k lines long, which is around 17MB.
Unfortunately, this code does not compile with javac as i get this error:
Model.java:1: error: too many constants
public class Model {
^
1 error
Using the approach suggested in #297, i have managed to split the score function into subroutines, which unfortunately does not fix my problem.
Is there any workaround for this type of error?
Manually adjusting the file is not really an option since i am planning to create a large number of models and compare them
The text was updated successfully, but these errors were encountered:
Unlike in the #297 issue, splitting code into subroutines doesn't help in your case, because the too many constants error is a constraint of the compiled Java class and not just a single method.
Unfortunately m2cgen doesn't support splitting code into multiple classes / modules today.
The only workaround that I can suggest for now is to reduce the number or size of your estimators. Though I realize that this likely doesn't work for you.
Hi!
I have problems when compiling the generated Java Code from m2cgen.
I am using an XGBClassifier with n_estimators = 400.
The generated code is ~360k lines long, which is around 17MB.
Unfortunately, this code does not compile with javac as i get this error:
Using the approach suggested in #297, i have managed to split the score function into subroutines, which unfortunately does not fix my problem.
Is there any workaround for this type of error?
Manually adjusting the file is not really an option since i am planning to create a large number of models and compare them
The text was updated successfully, but these errors were encountered: