process_data.py pre-start is too slow 数据处理脚本启动过慢 #578
Labels
dj:efficiency
regarding to efficiency issues and enhancements
question
Further information is requested
Before Asking 在提问之前
I have read the README carefully. 我已经仔细阅读了 README 上的操作指引。
I have pulled the latest code of main branch to run again and the problem still existed. 我已经拉取了主分支上最新的代码,重新运行之后,问题仍不能解决。
Search before asking 先搜索,再提问
Question
I'm using the data processing function within a container, and after I executed the date command, I immediately executed process_data.py, and when the logs had output it took about 40s, while my ops execution only took 10s, and now the pre-start time is becoming a performance bottleneck
Additional 额外信息
root@ray-head-h7cfs:/opt/data-juicer# date
Tue Feb 18 10:27:59 CST 2025
root@ray-head-h7cfs:/opt/data-juicer# python ./tools/process_data.py --config configs/demo/process_qa.yaml
2025-02-18 10:28:38 | INFO | data_juicer.config.config:736 - Back up the input config file [/opt/data-juicer/configs/demo/process_qa.yaml] into the work_dir [/opt/data-juicer/outputs/qa]
2025-02-18 10:28:38 | INFO | data_juicer.config.config:758 - Configuration table:
╒══════════════════════════╤════════════════════════════════════════════════════════════════════════════════════════════╕
│ key │ values │
╞══════════════════════════╪════════════════════════════════════════════════════════════════════════════════════════════╡
│ config │ [Path_fr(configs/demo/process_qa.yaml, cwd=/opt/data-juicer)] │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ auto │ False │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ auto_num │ 1000 │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ hpo_config │ None │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ data_probe_algo │ 'uniform' │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ data_probe_ratio │ 1.0 │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ project_name │ 'qa' │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ executor_type │ 'default' │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ dataset_path │ '/opt/data-juicer/demos/data/demo-dataset-qa.jsonl' │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ generated_dataset_config │ None │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ export_path │ '/opt/data-juicer/outputs/qa/demo-processed.jsonl' │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ export_shard_size │ 0 │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ export_in_parallel │ False │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ keep_stats_in_res_ds │ False │
├──────────────────────────┼───────────────────��────────────────────────────────────────────────────────────────────────┤
│ keep_hashes_in_res_ds │ False │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ np │ 4 │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ text_keys │ 'text' │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ image_key │ 'images' │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ image_special_token │ '<__dj__image>' │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ audio_key │ 'audios' │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ audio_special_token │ '<__dj__audio>' │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ video_key │ 'videos' │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ video_special_token │ '<__dj__video>' │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ eoc_special_token │ '<|__dj__eoc|>' │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ suffixes │ [] │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ turbo │ False │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ use_cache │ True │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ ds_cache_dir │ '/root/.cache/huggingface/datasets' │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ cache_compress │ None │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ open_monitor │ True │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ use_checkpoint │ False │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ temp_dir │ None │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ open_tracer │ False │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ op_list_to_trace │ [] │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ trace_num │ 10 │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ open_insight_mining │ False │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ op_list_to_mine │ [] │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ op_fusion │ False │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ fusion_strategy │ 'probe' │
├─────────────────────────��┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ adaptive_batch_size │ False │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ process │ [{'generate_qa_from_text_mapper': {'accelerator': None, │
│ │ 'audio_key': 'audios', │
│ │ 'batch_size': 1000, │
│ │ 'cpu_required': 1, │
│ │ 'history_key': 'history', │
│ │ 'image_key': 'images', │
│ │ 'index_key': None, │
│ │ 'max_num': None, │
│ │ 'mem_required': 0, │
│ │ 'model': 'Qwen2.5-72B-Instruct', │
│ │ 'num_proc': 4, │
│ │ 'query_key': 'query', │
│ │ 'response_key': 'response', │
│ │ 'single_image_key': 'image', │
│ │ 'text_key': 'text', │
│ │ 'turbo': False, │
│ │ 'url': 'http://xxx/v1/chat/completions', │
│ │ 'video_key': 'videos', │
│ │ 'work_dir': '/opt/data-juicer/outputs/qa'}}] │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ percentiles │ [] │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ export_original_dataset │ False │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ save_stats_in_one_file │ False │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ ray_address │ 'auto' │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ debug │ False │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ work_dir │ '/opt/data-juicer/outputs/qa' │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ timestamp │ '20250218102825' │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ dataset_dir │ '/opt/data-juicer/demos/data' │
├──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────┤
│ add_suffix │ False │
╘══════════════════════════╧════════════════════════════════════════════════════════════════════════════════════════════╛
2025-02-18 10:28:38 | WARNING | data_juicer.utils.resource_utils:28 - Command nvidia-smi is not found. There might be no GPUs on this machine.
The text was updated successfully, but these errors were encountered: