Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process_data.py pre-start is too slow 数据处理脚本启动过慢 #578

Open
3 tasks done
hhhhsc701 opened this issue Feb 18, 2025 · 1 comment
Open
3 tasks done
Labels
dj:efficiency regarding to efficiency issues and enhancements question Further information is requested

Comments

@hhhhsc701
Copy link

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 先搜索,再提问

  • I have searched the Data-Juicer issues and found no similar questions. 我已经在 issue列表 中搜索但是没有发现类似的问题。

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.

@hhhhsc701 hhhhsc701 added the question Further information is requested label Feb 18, 2025
@HYLcool
Copy link
Collaborator

HYLcool commented Feb 25, 2025

Yes. For a quick run or a small dataset, it's indeed a problem. We think loading some heavy dependencies for the first time might cause this. But we will profile this part and find out what's happening. And if there are any results, we will let you know~

@HYLcool HYLcool added the dj:efficiency regarding to efficiency issues and enhancements label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dj:efficiency regarding to efficiency issues and enhancements question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants