Inference failed errors

Hi, I’ve been having an issue with a Lightgbm model. The training works but I get an error importing lightgbm during inference.

########## Generating Predictions on /data/mse_debug_data.csv #############
Traceback (most recent call last):
File “predict.py”, line 20, in
from utils import *
File “/home/aicrowd/utils.py”, line 1, in
from global_imports import *
File “/home/aicrowd/global_imports.py”, line 5, in
import lightgbm as lgb
File “/usr/local/lib/python3.8/site-packages/lightgbm/init.py”, line 8, in
from .basic import Booster, Dataset
File “/usr/local/lib/python3.8/site-packages/lightgbm/basic.py”, line 43, in
_LIB = _load_lib()
File “/usr/local/lib/python3.8/site-packages/lightgbm/basic.py”, line 34, in _load_lib
lib = ctypes.cdll.LoadLibrary(lib_path[0])
File “/usr/local/lib/python3.8/ctypes/init.py”, line 451, in LoadLibrary
return self._dlltype(name)
File “/usr/local/lib/python3.8/ctypes/init.py”, line 373, in init
self._handle = _dlopen(self._name, mode)
OSError: libgomp.so.1: cannot open shared object file: No such file or directory

Hi @skiracer

I think the issue is that you need to also install the correct apt package. Please see this discussion thread for instructions.

If that doesn’t work then comment here and we’ll get to the bottom of it :muscle:

1 Like

@alfarzan

I keep getting Inference error messages, even thought my notebook codes works correctly. Can you help me figure out what is going on? Submission # 118475

Hi @sam_kloese

Yes :slight_smile: I see what is going on. I think you may be using one of the notebook versions from the early weeks of the game. We made a small change to the load_model function by making sure it requires no arguments.

In your case the fix is easy, can you please replace your load_model function with this?

load_model <- function(){ 
 # Load a saved trained model from the file `trained_model.RData`.

 #    This is called by the server to evaluate your submission on hidden data.
 #    Only modify this *if* you modified save_model.

  load('trained_model.RData')
  return(model)
}

I can generate prices using your submission with the following change :+1:

Hi @alfarzan , I’ve got an inference error. Can I get some help to see what’s happening in there please ?. Thank you. Submission #120257

Hi @daniel_fat

It seems like you were expecting specific policy IDs to be in the leaderboard. I have privately sent you the traceback error :mailbox:

Hi @alfarzan. I’am getting the inference failed error a’d couldn’t find the issue in the log file. How could i fix this please ? Thank you

Hi @lokmen_messaoudi

We’ll get to the bottom of it. Could I have your submission number please?

Thank you @alfarzan. Submission #125433

I’ve messaged you privately about this one :slight_smile: