

def sample_paths(policy_params, max_samples, max_path_length=np.inf):
    '\n    :param policy_params: parameters for the policy. This will be updated on each worker process\n    :param max_samples: desired maximum number of samples to be collected. The actual number of collected samples\n    might be greater since all trajectories will be rolled out either until termination or until max_path_length is\n    reached\n    :param max_path_length: horizon / maximum length of a single trajectory\n    :return: a list of collected paths\n    '
    singleton_pool.run_each(_worker_set_policy_params, ([(policy_params,)] * singleton_pool.n_parallel))
    return singleton_pool.run_collect(_worker_collect_one_path, threshold=max_samples, args=(max_path_length,), show_prog_bar=True)

dataset/ETHPy150Open rllab/rllab/rllab/sampler/parallel_sampler.py sample_paths/original