kanav anand
kanav anand

Reputation: 420

How to install lightgbm on custom prediction routine?

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'])

Upvotes: 5

Views: 235

Answers (1)

Eduardo Ortiz
Eduardo Ortiz

Reputation: 761

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.

Upvotes: 2

Related Questions