h2oai / h2o-3

H2O is an Open Source, Distributed, Fast & Scalable Machine Learning Platform: Deep Learning, Gradient Boosting (GBM) & XGBoost, Random Forest, Generalized Linear Modeling (GLM with Elastic Net), K-Means, PCA, Generalized Additive Models (GAM), RuleFit, Support Vector Machine (SVM), Stacked Ensembles, Automatic Machine Learning (AutoML), etc.
http://h2o.ai
Apache License 2.0
6.78k stars 1.99k forks source link

XGBoost Error in Virtual Docker Container on MacOS Hardware in a VSCode Devcontainer: POST /3/ModelBuilders/xgboost not found #16311

Closed Molier closed 6 days ago

Molier commented 1 week ago

H2O version, Operating System and Environment H2O 3.46.0.3, Mac OS M1 chip. Running inside a vscode devcontainer.

Actual behavior error stating:

  h2o.exceptions.H2OResponseError: Server error water.exceptions.H2ONotFoundArgumentException:
  Error: POST /3/ModelBuilders/xgboost not found
  Request: POST /3/ModelBuilders/xgboost

when running

    from h2o.estimators import H2OXGBoostEstimator
    from enda.ml_backends.h2o_estimator import EndaH2OEstimator
    from enda.power_predictor import PowerPredictor
    wind_predictor = PowerPredictor(standard_plant=True)
    ntrees = 15
    max_depth = 10
    sample_rate = 1
    grad_boost_estimator = EndaH2OEstimator(H2OXGBoostEstimator(
    ntrees=ntrees,
        max_depth=max_depth,
        sample_rate=sample_rate,
        min_rows=5,
        seed=17
    ))
wind_predictor.train(df_train, estimator=grad_boost_estimator, target_col='load_factor') 

Expected behavior code functions and uses xgboost to train model

Steps to reproduce Steps to reproduce the behavior (with working code on a sample dataset, if possible): see code. Run any training sample

Additional context Possibly because of the docker environment. running on the macos m1 chip. with the visualstudiocode is giving some sort of error. different versions of java have been tried. issue has been referenced here too: https://github.com/h2o/h2o/issues/3039 vscode dev container as follows:

// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
    "name": "Python 3",
    // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
    "image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye",
    "features": {
        "ghcr.io/devcontainers/features/python:1": {
            "installTools": true,
            "installJupyterlab": true,
            "version": "latest"
        }
    },

    // Features to add to the dev container. More info: https://containers.dev/features.
    // "features": {},

    // Use 'forwardPorts' to make a list of ports inside the container available locally.
    // "forwardPorts": [],

    // Use 'postCreateCommand' to run commands after the container is created.
    "postCreateCommand": "pip3 install --user wheel; pip3 install --user -r requirements.txt --no-deps; cp -n secrets_sample.json secrets.json",

    // Configure tool-specific properties.
    "customizations": {
        "vscode": {
            "extensions": [
                "ms-python.python",
                "ms-toolsai.jupyter"
            ]
        }
    }

    // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
    // "remoteUser": "root"
}
valenad1 commented 6 days ago

Possibly because of the docker environment. running on the macos m1 chip. with the visualstudiocode is giving some sort of error.

yes, the xgboost is not supported yet on M1 chips.

https://docs.h2o.ai/h2o/latest-stable/h2o-docs/data-science/xgboost.html#limitations