I’m trying to submit via Google Colab (Python submission) but I’m getting the “Failed with exit code 1” error. It is working fine and predicting the prices on the Colab notebook.
Not sure if this is related to additional packages but I have added xgboost into the additional packages section of the config.
Has anyone come across this error and managed to fix it?
It seems this idiosyncratic behaviour is due to the sensitivity of xgboost models being saved with a particular python version, and loaded with a slightly different version.
If you are using xgboost you can either:
Use the native save_model function provided by xgboost (see here). You will then have to use the corresponding load_model provided by the package.
Alternatively, in the config file / description cell in the notebook, you can specify and exact python version which would also prevent this issue.
I used xgboost==0.90 as this is the version that google collabs used, which gave the same error. I installed version 1.2.1 but this didn’t work either.
I also tried using the xgboost save/load method, however the load file suggests saving as .model and loading as .bin which doesn’t seem to work in collab. So used .model for both to no success.
I’ve tried using the native save method and it is now generating a new error message of “child ‘submission-h4sxr-3601207088’ failed” - submission ID is 111418. The save/load method was working fine in colab notebook.
It seems like setting proper extension matters. I was able to run your code by saving the model to model.bin instead of model.json. Can you try this change and make another submission?
I used xgboost and have specified the version in requirements.txt. I also used save_model and load_model with model.bin as the file name. I submitted using .zip method.
Hi,
I also got the error “failed with exit code 1”, but I’m in R (using xgboost 0.90.0 as well). I changed the function save_model, to save it with natural xgboost save function, and not save into a Rdata object. I also changed the load_function. Now the error is "REAL() can only be applied to a ‘numeric’, not a ‘logical’ ".
The error “exit code 1” is it similar for Python and R code ?
We’re looking to this for you and I will update you in some time regarding the issue of memory running out.
In the meanwhile, I’ve looked into your code and I think the issue could be that you are treating the vh_make_model as a category without any other preprocessing. The reason this might cause a memory problem is that there are thousands of unique values in that column meaning your resulting dataset will effectively have thousands of features.
If I remove this feature as a categorical feature then I can submit via a colaboratory notebook with your model (of course I set your premiums to zero so I don’t actually submit your model!).
If you want to treat this feature as categorical I recommend doing some preprocessing to see if you can reduce the number of categories.