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

Parralelization fail #9

Open
sshleifer opened this issue Feb 11, 2018 · 3 comments
Open

Parralelization fail #9

sshleifer opened this issue Feb 11, 2018 · 3 comments

Comments

@sshleifer
Copy link

Any idea how to fix? Has just started happening without changing code. Thought this was from running too many kernels at once but even if I run one kernel I get this error....

From kaggle script environment

WORBBAG_ITEM_DESC_PARAMS = {'hash_ngrams': 2, 'hash_ngrams_weights': [1.0, 1.0],
                            'hash_size': 2 ** 26, 'norm': 'l2', 'tf': 1.0, 'idf': None}
   wb = wordbatch.WordBatch(normalize_text, extractor=(WordBag, WORBBAG_ITEM_DESC_PARAMS),
                             procs=procs)
    wb.dictionary_freeze= True
    X_description = wb.fit_transform(full_df['item_description'])


2237.9s
477
Parallelization fail. Method: multiprocessing Task: <function batch_normalize_texts at 0x7f76ce912ea0>
Retrying, attempt: 1 timeout limit: 1200 seconds
2250.8s
478
Parallelization fail. Method: multiprocessing Task: <function batch_normalize_texts at 0x7f76ce912ea0>
Retrying, attempt: 2 timeout limit: 2400 seconds
2263.4s
479
Parallelization fail. Method: multiprocessing Task: <function batch_normalize_texts at 0x7f76ce912ea0>
Retrying, attempt: 3 timeout limit: 4800 seconds
2276.2s
480
Parallelization fail. Method: multiprocessing Task: <function batch_normalize_texts at 0x7f76ce912ea0>
Retrying, attempt: 4 timeout limit: 9600 seconds
2288.9s
481
Parallelization fail. Method: multiprocessing Task: <function batch_normalize_texts at 0x7f76ce912ea0>
Extract wordbags
2288.9s
482
Traceback (most recent call last):
  File "../src/script.py", line 573, in <module>
    sparse_mat = preprocess_for_fm(full_df)
  File "../src/script.py", line 552, in preprocess_for_fm
    X_description = wb.fit_transform(full_df['item_description'])
  File "/opt/conda/lib/python3.6/site-packages/wordbatch/wordbatch.py", line 230, in fit_transform
    return self.transform(texts, labels, extractor, cache_features, input_split)
  File "/opt/conda/lib/python3.6/site-packages/wordbatch/wordbatch.py", line 242, in transform
    texts= extractor.transform(texts, input_split= True, merge_output= True)
  File "wordbatch/extractors/extractors.pyx", line 185, in wordbatch.extractors.extractors.WordBag.transform
  File "/opt/conda/lib/python3.6/site-packages/wordbatch/wordbatch.py", line 305, in parallelize_batches
    paral_params=  [[data_batch]+ args for data_batch in data]
TypeError: 'NoneType' object is not iterable
2288.9s
483
2288.9s
484
Failed. Exited with code 1.
@sshleifer
Copy link
Author

Also the parrelization fail warnings are 13 seconds apart but cite timeout limits that are 1200/2400/4800 seconds apart?

@anttttti
Copy link
Owner

anttttti commented Feb 11, 2018

Usually this is something wrong with the input. Try adding method="serial" to the wb initializer. This will run calls serially without multiprocessing, so you will see where the code crashes.

The fail warnings come as soon as the parallelization fails. The timeout limits are doubled on each attempt.

@sshleifer
Copy link
Author

sshleifer commented Feb 11, 2018 via email

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

2 participants