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

Running tffm on a single core #41

Open
martincousi opened this issue Apr 12, 2018 · 1 comment
Open

Running tffm on a single core #41

martincousi opened this issue Apr 12, 2018 · 1 comment

Comments

@martincousi
Copy link

I need to run multiple TFFMRegressor objects in joblib Parallel. To do so, I passed the following parameter:

session_config=tf.ConfigProto(intra_op_parallelism_threads=1,
                                                    inter_op_parallelism_threads=1,
                                                    allow_soft_placement=True,
                                                    device_count = {'CPU': 1, 'GPU': 0})

However, my cores do not seem to run whenever I use n_jobs=2 or higher in Parallel; my python notebook cell just hangs, never completes and my processors are not used. At n_jobs=1, everything is running fine. What am I missing? Would I better use polylearn instead for this kind of task?

@martincousi
Copy link
Author

Ok it appears that passing this session_config parameter does not do anything, at least, on my machine. So, it is not needed

I was able to use Parallel in the end by:

  • passing a numpy.float32 value for init_std (otherwise I sometime got an error)
  • standardizing the values in X to $|x_{ij}| <= 1$ (otherwise I got an error when using a high order)

It appears that passing a numpy.float32 value is not necessary the parameter reg.

Now, I know that my question is highly problem dependent but what are good range of values when doing a randomized search over the different parameters? My problem contains about 400 observations and I see that there are several parameters that could be tuned such as order, rank, optimizer (and its parameters), reg, etc. It even appears that batch_size and n_epochs are somewhat linked.

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

1 participant