public class Rabit extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Rabit.DataType |
static class |
Rabit.OpType |
Modifier and Type | Field and Description |
---|---|
static List<String> |
mockList |
static Map<String,String> |
rabitEnvs |
Constructor and Description |
---|
Rabit() |
Modifier and Type | Method and Description |
---|---|
static float[] |
allReduce(float[] elements,
Rabit.OpType op)
perform Allreduce on distributed float vectors using operator op.
|
static int |
getRank()
get rank of current thread.
|
static int |
getWorldSize()
get world size of current job.
|
static void |
init(Map<String,String> envs)
Initialize the rabit library on current working thread.
|
static void |
shutdown()
Shutdown the rabit engine in current working thread, equals to finalize.
|
static void |
trackerPrint(String msg)
Print the message on rabit tracker.
|
static int |
versionNumber()
Get version number of current stored model in the thread.
|
public static void init(Map<String,String> envs) throws XGBoostError
envs
- The additional environment variables to pass to rabit.XGBoostError
public static void shutdown() throws XGBoostError
XGBoostError
public static void trackerPrint(String msg) throws XGBoostError
msg
- XGBoostError
public static int versionNumber() throws XGBoostError
XGBoostError
public static int getRank() throws XGBoostError
XGBoostError
public static int getWorldSize() throws XGBoostError
XGBoostError
public static float[] allReduce(float[] elements, Rabit.OpType op)
elements
- local elements on distributed workers.op
- operator used for Allreduce.Copyright © 2020. All rights reserved.