Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML file reading error. #40

Open
kavicastelo opened this issue Dec 24, 2023 · 0 comments
Open

XML file reading error. #40

kavicastelo opened this issue Dec 24, 2023 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@kavicastelo
Copy link
Owner

I tried read .joblib file for make predictions in my system. but I got problems in here.

private org.dmg.pmml.PMML loadPMML(String pmmlPath) throws Exception {
        File file = new File(pmmlPath);
        StreamSource source = new StreamSource(file);
//        return PMMLUtil.unmarshal(source.getInputStream());
        try {
            return PMMLUtil.unmarshal(source.getInputStream());
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }

I need to pass directly InputSource to the unmarshal but it required InputStream. this occurs compile error.

here is the this function call

public AirHumidityModel() throws Exception {
        String pmmlPath = "../../../../../../../../AI_Models/airHumidity_model.joblib";
        this.pmml = loadPMML(pmmlPath);
    }
@kavicastelo kavicastelo added the help wanted Extra attention is needed label Dec 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant