How to install lightgbm on custom prediction routine?

Viewed 136

I have trained a LightGBM model and now want to create a custom prediction routine for deployment on google aiplatform.

While loading model file, its throws an error that lightgbm is not installed. I used below code in setup.py but its not working.

from setuptools import setup, find_packages
DEPENDENCIES = ['lightgbm==3.1.1']

setup(
      name='my_custom_code',
      version='0.4',
      install_requires=DEPENDENCIES,
      include_package_date=True,
      packages=find_packages(),
      description='custom code.',
      scripts=['predictor.py', 'preprocess.py'])
1 Answers

To achieve what you are trying to achieve, you will need to create a custom container that contains lightGBM pre-installed, here you can find a step by step guide on how to build and push the custom container image.

Related