Skip to content

[jvm-packages] expose rabit configuration to user #4861

Closed

Description

@chenqin

I would like to start a discussion on if and how we expose rabit configurations to xgb-spark/flink users. Some use cases are,

  • allow user opt-in rabit_boostrap_cache within xgboost4-spark configuraiton setting
  • allow user opt-in verbose rabit allreduce/broadcast, checkpointing logs
  • allow user opt-in ring-scatter/ all gather based allreduce ( for large trees)
  • allow user tune default rabit network buffer size (default is 256MB)
  • support mocking to allreduce/broadcast operations for testing benefit

https://github.com/dmlc/rabit/blob/master/src/allreduce_base.cc#L43-L58
image

cc @CodingCat @hcho3

Activity

  1. trivialfis commented on Sep 17, 2019

    @trivialfis
    Member

    Firstly I would like to know how many of these are necessarily environment variables? Can they be function parameters? Or use a RPC protocol?

  2. chenqin commented on Sep 17, 2019

    @chenqin
    ContributorAuthor

    Good call, env variables initial used to read hadoop default setting. And it was applied to things not necessarily should exists in envs. I would suggest remove at least non hadoop envs and ask caller specifically pass down as arguments so we can log in debug mode.

    // initialization function
    bool AllreduceBase::Init(int argc, char* argv[]) {
      // setup from enviroment variables
      // handler to get variables from env
      for (size_t i = 0; i < env_vars.size(); ++i) {
        const char *value = getenv(env_vars[i].c_str());
        if (value != NULL) {
          this->SetParam(env_vars[i].c_str(), value);
        }
      }
      // pass in arguments override env variable.
      for (int i = 0; i < argc; ++i) {
        char name[256], val[256];
        if (sscanf(argv[i], "%[^=]=%s", name, val) == 2) {
          this->SetParam(name, val);
        }
      }
    
  3. chenqin commented on Sep 17, 2019

    @chenqin
    ContributorAuthor
  4. chenqin commented on Sep 19, 2019

    @chenqin
    ContributorAuthor
  5. locked as resolved and limited conversation to collaborators on Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions