code: public ComputationGraph fit(String path) {
          if (Nd4j.getExecutioner() instanceof GridExecutioner)
              ((GridExecutioner) Nd4j.getExecutioner()).flushQueue();
  
          JavaRDD<String> paths;
          try {
              paths = SparkUtils.listPaths(sc, path);
          } catch (IOException e) {
              throw new RuntimeException("Error listing paths in directory", e);
          }
  
          return fitPaths(paths);
      }
docs: Fit the SparkComputationGraph network using a directory of serialized DataSet objects
  The assumption here is that the directory contains a number of {@link DataSet} objects, each serialized using
  {@link DataSet#save(OutputStream)}
  
  @param path Path to the directory containing the serialized DataSet objcets
  @return The MultiLayerNetwork after training