ray/release/lightgbm_tests/workloads/distributed_api_test.py
Balaji Veeramani 7f1bacc7dc
[CI] Format Python code with Black (#21975)
See #21316 and #21311 for the motivation behind these changes.
2022-01-29 18:41:57 -08:00

27 lines
668 B
Python

"""Distributed LightGBM API test
This test runs unit tests on a distributed cluster. This will confirm that
LightGBM API features like custom metrics/objectives work with remote
trainables.
Test owner: Yard1 (primary), krfricke
Acceptance criteria: Unit tests should pass (requires pytest).
"""
import ray
from lightgbm_ray.tests.test_lightgbm_api import LightGBMAPITest
class LightGBMDistributedAPITest(LightGBMAPITest):
def _init_ray(self):
if not ray.is_initialized():
ray.init(address="auto")
if __name__ == "__main__":
import pytest
import sys
sys.exit(pytest.main(["-v", f"{__file__}::LightGBMDistributedAPITest"]))