-
Notifications
You must be signed in to change notification settings - Fork 24
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
Memory Explosion #5
Comments
So sorry about that! You are correct, I am running this on a beefy server... Going over plans in an iterator is possible, but isn't needed because
The planner takes around 15 seconds to train on my machine. The inference time for 1,900 graphs of various sizes is 7 seconds on my machine. The Neural Planner is built in such a way it can't create a wrong plan (it has to follow a structure, and has to include every fact from the graph). Feel free to suggest any improvements to the naive planner / neural planner. or let me know if anything is not working for you, and I'll sort it out. |
Awesome! I'm testing it out with the neural planner and i'll get back eventually on what happens! |
Just to make sure you know, you don't need to restart the entire thing for the change to take effect, only remove |
Yup I noticed! I tried to put it into the server to see if I could visualize it, but the neural planner is missing the score method implementation. I'm guessing its missing the score method because it just generates the plan |
Yeah... still need to do that part. That is part of why it is not documented - ongoing research.
And in the neural planner’s case, getting the “best” plan is very fast, but scoring all plans would probably be slow
… On Apr 30, 2019, at 23:46, Pedro ***@***.***> wrote:
Yup I noticed! I tried to put it into the server to see if I could visualize it, but the neural planner is missing the score method implementation
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
If it gets the best plan, then thats the highest score (and if there were a way to vectorize the plans then just scale the score according to the closest plan vectors). Some other thoughts are that maybe something could be done like the discriminator in a GAN (just some shower thoughts) |
Also, even if you set parallel to False, you still have the memory explosion at some point in the process, so I guess filtering the graph somehow to remove redundancies or make it smaller will have to be a thing. I'll see if I can come up with something. |
Ok. So, I'll explain what I think a solution can be, but I don't have time to test this until the end of NAACL (mid-June) - Though I did implement it. The "best_plan" planning is done in 3 stages:
Step 1 is not a problem. Step 2 however can be change to Lines 74 to 85 in 8f6df05
In lines 76, 80, 83, and 85 instead of doing a list with parenthesis, like: Lines 74 to 85 in e939eac
I have done the same for StructuredNode , which is a tiny bit more complex, but same idea.
Step 3 now becomes the problem, as it does not work with generators: chimera/planner/naive_planner.py Lines 31 to 36 in 8f6df05
So I changed it as well, to the most basic implementation of O(1) memory MAX function: chimera/planner/naive_planner.py Lines 34 to 41 in b69194e
If you want to test this, it is on the |
I have implemented a fast scorer for the neural planner. Around 500~ plans a second on average, which depends on how long they are. |
I havent had a chance to test it, but awesome! |
Hi there,
I have been trying to run this for the past couple of weeks, and it seems one needs a beefy computer to run through the process. In the reader.py code, where the multiprocessing is used, at some point in the planning, I believe the system goes either into a very deep recursion, or it explores too many branches, and eventually, the system runs out of memory. I've tried this on a machine with 64gb of ram and it eats that up too. The problem occurs around iteration 890 in the create_plans method of the DataReader class. I'm going to try and debug this to see if I can limit depth or size or run time as lack of a feasible plan. A small memory optimization is to replace Pool with ThreadPool.
The text was updated successfully, but these errors were encountered: