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

ValueError: Number of processes must be at least 1 #137

Closed
anandsubbu007 opened this issue Aug 1, 2020 · 6 comments
Closed

ValueError: Number of processes must be at least 1 #137

anandsubbu007 opened this issue Aug 1, 2020 · 6 comments
Assignees

Comments

@anandsubbu007
Copy link

I'm a beginner, help me with this.
When i try to train in colab it shows :
ValueError: Number of processes must be at least 1

@EricFillion
Copy link
Owner

Hi @anandsubbu007, it's hard for me to help without seeing your code. Can you please post your code here? If it is confidential, you can email it to happytransformer@gmail.com

@anandsubbu007
Copy link
Author

I used the same code that is referred from the documentation:

image

image

@EricFillion
Copy link
Owner

Thanks @anandsubbu007 ,

Ted will help you from here.

@ted537
Copy link
Collaborator

ted537 commented Aug 4, 2020

process_count=cpu_count() - 2):

Looks like we were creating a pool with process_count=0. Should be a simple fix.

@ted537
Copy link
Collaborator

ted537 commented Aug 4, 2020

Also this code

text = [
        'Hi Anand, how are you',
        'Hi anand, did you complete',
        'Hi anand, did you complete your task',
        'Hi anand, what is status of task']

df = pd.DataFrame(text)
df.to_csv('train.csv',header=False)
pd.read_csv('train.csv')

Results in this output.

0,"Hi Anand, how are you"
1,"Hi anand, did you complete"
2,"Hi anand, did you complete your task"
3,"Hi anand, what is status of task"

From the HappyTransformer documentation, the label of each classifier must be 0 or 1. Values of 2 and 3 are not acceptable.

@anandsubbu007
Copy link
Author

Ok, thanks for your reply.

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

No branches or pull requests

3 participants