IIIS-Li-Group / OpenFE

OpenFE: automated feature generation with expert-level performance
MIT License
781 stars 99 forks source link

global variable failed in multiprocess task #1

Closed mao-zhou closed 1 year ago

mao-zhou commented 1 year ago

I run the sample code of california housing, and get this error. I am on Windows platform.

It appears that the code global _data don't work.....

data_temp = _data.loc[train_idx + val_idx] NameError: name '_data' is not defined

ZhangTP1996 commented 1 year ago

I run the sample code of california housing, and get this error. I am on Windows platform.

It appears that the code global _data don't work.....

data_temp = _data.loc[train_idx + val_idx] NameError: name '_data' is not defined

What python version are you using? This way of multi-processing requires python version >=3.8

mao-zhou commented 1 year ago

Yep, my python version is 3.8.3, I think the requirement is fulfilled

summerTony9 commented 1 year ago

same issue UnboundLocalError: local variable 'candidate_feature' referenced before assignment

ZhangTP1996 commented 1 year ago

Yep, my python version is 3.8.3, I think the requirement is fulfilled

It seems that the problem is on Windows platform. This way of multi-processing can only run on Linux. We will try to find another way for multiprocessing so that it supports both Linux and Windows. We will inform you when the bug is fixed (probably in one or two days).

ZhangTP1996 commented 1 year ago

same issue UnboundLocalError: local variable 'candidate_feature' referenced before assignment

Are you using the Windows platform too? We just find out that our codes can only run on Linux platforms. We will try to find another way for multiprocessing so that it supports both Linux and Windows. We will inform you when the bug is fixed (probably in one or two days).

summerTony9 commented 1 year ago

i have mac with m1 chip and linux with intel chip.Both have the same issue.

LXlearning commented 1 year ago

I have the same problem about local variable 'candidate_feature' referenced before assignmentwith Mac.

mao-zhou commented 1 year ago

Thx TP!

ZhangTP1996 commented 1 year ago

I run the sample code of california housing, and get this error. I am on Windows platform.

It appears that the code global _data don't work.....

data_temp = _data.loc[train_idx + val_idx] NameError: name '_data' is not defined

The updated latest version should solve your problem. Could you please try

pip uninstall openfe
pip install openfe

and tell me whether your problem is solved?

ZhangTP1996 commented 1 year ago

i have mac with m1 chip and linux with intel chip.Both have the same issue.

i have mac with m1 chip and linux with intel chip.Both have the same issue.

The updated latest version should solve your problem. Could you please try

pip uninstall openfe
pip install openfe

and tell me whether your problem is solved?

ZhangTP1996 commented 1 year ago

I have the same problem about local variable 'candidate_feature' referenced before assignmentwith Mac.

The updated latest version should solve your problem. Could you please try

pip uninstall openfe
pip install openfe

and tell me whether your problem is solved?

mao-zhou commented 1 year ago

OK, it works, Cheers!