You are viewing a plain text version of this content. The canonical link for it is here.
Posted to submarine-user@hadoop.apache.org by kevin su <pi...@gmail.com> on 2019/05/29 20:09:35 UTC

When workers >= 2 and ps == 0 worker should throw exception

Hi all,

I found that when workers >= 2 and ps == 0 worker just return false .

private boolean determineIfDistributed(int nWorkers, int nPS)
      throws ParseException {
    // Check #workers and #ps.
    // When distributed training is required
    if (nWorkers >= 2 && nPS > 0) {
      return true;
    } else if (nWorkers <= 1 && nPS > 0) {
      throw new ParseException("Only specified one worker but non-zero PS, "
          + "please double check.");
    }
    return false;
  }


should throw a exception ?


Kevin,
Best   Regards