Skip to content

Update dataset_validator.py #537

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

windson
Copy link
Contributor

@windson windson commented Mar 26, 2025

Issue #, if available:

*Description of changes:*standard call to get cpu count. os.cpu_count()

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

standard call to get cpu count. os.cpu_count()
@@ -235,7 +235,7 @@ def process_s3_path(path, is_invocation_logs):

def validate_prompts_in_parallel(prompts, file_path, is_invocation_logs):
"""Validates the given prompts in parallel"""
max_workers = os.process_cpu_count()
max_workers = os.cpu_count()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it threw the error:
AttributeError: module 'os' has no attribute 'process_cpu_count'

Set up:

python3 -m venv env                                                                                     
source env/bin/activate
pip install -U pip
pip install -r requirements.txt
python3 dataset_validator.py -p /Users/user/Documents/tech/distillation/data/distillation_data.jsonl

Output

2025-03-27 11:01:15,537 - INFO - Validating file: /Users/user/Documents/tech/distillation/data/distillation_data.jsonl
AttributeError: module 'os' has no attribute 'process_cpu_count'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants