Halite-III icon indicating copy to clipboard operation
Halite-III copied to clipboard

ML bot fails because of lacking libs

Open j-clap opened this issue 7 years ago • 7 comments

Error: error: communication error with bot: read failed, errno was: 0 (Success) Bot error output was: /usr/local/lib/python3.6/dist-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module’s documentation for alternative uses import imp Traceback (most recent call last): File “MyBot.py”, line 7, in import model File “/home/worker/Halite/apiserver/worker/tmpy76dau6m/496_0_jwjohns/model.py”, line 7, in from tqdm import tqdm ModuleNotFoundError: No module named ‘tqdm’

Need to bake these libs into base image

j-clap avatar Oct 16 '18 19:10 j-clap

Is there any ETA on this? My ml bot is dropping rank like a stone due to lacking libs on your side.

I just was informed about the install.sh. trying to work that out now.

jwjohns avatar Oct 16 '18 22:10 jwjohns

Hi,

we currently don't have an ETA. The recommendation as it stands is still to follow the instructions here https://forums.halite.io/t/the-halite-iii-server-environment/94 and use an install script. Ranks can be recovered very soon after a new version is uploaded: they are not permanent, and convergence is fast, so I wouldn't worry about that immediate result :)

j-clap avatar Oct 16 '18 23:10 j-clap

I've tried including the following lines in the install.sh script (not sure that --system is a valid flag, as mentioned in the official docs?):

python3.6 -m pip install --target . tqdm
python3.6 -m pip install --target . zstd

However, it still errors when running through the servers (runs fine locally), with the following log:

Initialization Phase
================================================================
error: communication error with bot: read failed, errno was: 0 (Success)
Bot error output was:
/usr/local/lib/python3.6/dist-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp

This isn't an actual error, only a warning so not sure what's going wrong

davidADSP avatar Oct 17 '18 00:10 davidADSP

You could try suppressing the warnings.

lidavidm avatar Oct 17 '18 00:10 lidavidm

Thanks for the suggestion - where would I do that?

I've tried entering this at the top of both MyBot.py and model.py but I'm still getting the same error.

import warnings
warnings.simplefilter("ignore")

davidADSP avatar Oct 17 '18 01:10 davidADSP

After adding exactly the same as he has in my install.sh. My bot will not even attempt to compete anymore. Since it wont compete, I dont get any logs, therefore have no idea what the issue could be.

after removing the install.sh, it competes again. Just does nothing.

I'm using the starter bot, trained with your started bot replay data, and have done absolutely nothing else to it.

Can you guys tell if anyone has a working ML bot at this time? if so could you see how they are getting their install.sh file to work properly?

jwjohns avatar Oct 17 '18 01:10 jwjohns

We'll get the requirements loaded on the servers and better document the steps to use the ML starter kit. In the meantime, a few tips for using the kit:

  • Be sure to include a .svc model weights file in your zipped bot. There are now two examples, aggressive.svc and passive.svc, available in the kit download; if you downloaded the kit on 10/16 you can download these from the repo: https://github.com/HaliteChallenge/Halite-III/tree/master/starter_kits/ml/SVM
  • To submit either the pre-trained Aggressive or Passive bot, rename SVMBotPassive.py or SVMBotAggressive.py to MyBot.py
  • Include an install.sh file in your zip with the following to install dependencies.:
#!/bin/sh
python3.6 -m pip install --target . tqdm
python3.6 -m pip install --target . zstd

whatelsie avatar Oct 17 '18 19:10 whatelsie