Before you group resources in a cluster and divide a model, you must call the whale.init operation to initialize Whale. This topic describes the syntax and features of the whale.init operation. This topic also provides the sample code to show you how to call the operation.
Initializes Whale before you define a model. After Whale is initialized, the cluster and scope settings take effect. The system implements parallel training based on the settings. If this operation is not called, the model cannot be divided based on the scope settings. In this case, the code is run on a machine with a single GPU.
- Return value
import whale as wh wh.init()