alteryx / featuretools

An open source python library for automated feature engineering
https://www.featuretools.com
BSD 3-Clause "New" or "Revised" License
7.25k stars 879 forks source link

colab gives Timeout Error: worker failed to start #414

Closed AtharKharal closed 5 years ago

AtharKharal commented 5 years ago

I just ran following code in CoLab and got "Worker failed to start error", any help please!

import featuretools as ft

df = pd.DataFrame({'df_index' : [1,2,3,4,5],
                 'location':['aust','aust','aust','canada','canada'],
                  'prices':[34,52,46,25,67]
                  })
df['date']=pd.date_range(start='02/07/2019',periods=5, frequency='D')

es = ft.EntitySet(id='Transactions')
es.entity_from_dataframe(entity_id='log', dataframe=df, index='df_index',time_index='date')
es.normalize_entity(base_entity_id='log', new_entity_id='loc', index= 'location' )

fm, features = ft.dfs(entityset=es, target_entity='log', 
                      agg_primitives = ['sum', 'mean'], 
                      trans_primitives = ['day'],
                      max_depth = 2,
                      verbose = 2,
                      n_jobs = 3
                     )

Thanks indeed

kmax12 commented 5 years ago

@AtharKharal I suspect the issue is that google colab doesn't allow spawning new process using python's multiprocessing. if you change n_jobs=3 to n_jobs=1, your code should run without problem.

can you let us know if that fix helps?

AtharKharal commented 5 years ago

@kmax12 thanks, I ran with n_jobs=1 but not successful. Same errors again. First error is like: ----> 6 n_jobs = 1

and last error message is: TypeError: group() got an unexpected keyword argument 'observed'

gsheni commented 5 years ago

@AtharKharal Can you verify that you have the latest version of pandas (0.24.1) installed? observed is an argument that was added in a newer release

AtharKharal commented 5 years ago

@gsheni thanks indeed, it is working now with pandas==0.24.1 and n_jobs=1. Earlier I was using pandas==0.22.0 regards