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

Make only torch models (and Agarwal) threaded #246

Merged
merged 1 commit into from
Jan 16, 2020
Merged

Make only torch models (and Agarwal) threaded #246

merged 1 commit into from
Jan 16, 2020

Conversation

tmke8
Copy link
Member

@tmke8 tmke8 commented Jan 14, 2020

This has two main reasons:

  1. It simplifies the code a lot. Algorithms are now either just threaded or just non-threaded (i.e. they run in the main context of the process). This will hopefully make it easier to implement new algorithms.
  2. It is really only models that run on the GPU that benefit from running in their own thread. The problem with these models is that they can often hog the GPU if the process is not properly shut down. This is especially a problem when you run algorithms in a notebook. For the sklearn models this is not really an issue and running them explicitly parallel also doesn't have much of an effect, because they naturally use as many CPUs as they can.

closes #229

@tmke8 tmke8 changed the title Make only torch model (and Agarwal) threaded Make only torch models (and Agarwal) threaded Jan 14, 2020
@tmke8
Copy link
Member Author

tmke8 commented Jan 14, 2020

(This removed about 500 lines of code 🎉 )

@tmke8
Copy link
Member Author

tmke8 commented Jan 16, 2020

The algorithms fall now into the following classes:

  • PreAlgorithm:
    • Upsampler
  • PreAlgorithmAsync:
    • Beutel
    • VFAE
    • Zemel
  • InAlgorithm:
    • Kamiran
    • LR
    • LRProb
    • LRCV
    • MLP
    • SVM
  • InAlgorithmAsync:
    • Agarwal

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

Successfully merging this pull request may close these issues.

Idea for simplifying algorithms: have each algorithm either run in its own process or not. Don't allow both
2 participants