* update seed_worker to set seed based on worker_id and rank * test case * set output_dir as remove tmp dir