« first day (2594 days earlier)      last day (2349 days later) » 

12:04 AM
Aha, Proposition VIII.3.5 in Kobayashi-Nomizu Vol. 2
noice
 
12:16 AM
Hello, does anyone here know the timescale thermal effects tend to happen on? I heard the other day there existed one, and that there also existed light matter interactions which happen on timescales shorter than thermal effects.

I was wanting to know this timescale, so I can quantitatively say when an effect is no longer considered thermal.
 
rob
12:55 AM
@user400188 Perhaps a place to start is that thermal information can propagate no faster than the speed of sound, and that any equilibriation must allow phonons to cross your volume of interest many times.
 
 
1 hour later…
2:13 AM
@ACuriousMind I still teach basic graphical analysis in lab, and I still rig the requested graphs so that the functions are lines in case someone is hand graphing them. But I accept and encourage the use of computers to create the graphs. Next semester I'm going to request lab submissions via the learning management system, so computerized graphs become required.
 
vzn
2:30 AM
shared in line with/ spirit of the longrunning joke about a particular beloved mod as an AI
in theory salon, 9 hours ago, by vzn
The impossibility of intelligence explosion / Chollet see also aaronson https://www.scottaaronson.com/blog/?p=3553 and barak https://windowsontheory.org/2017/12/09/on-the-impossiblity-of-intelligence-explo‌​sion/
 
 
1 hour later…
3:48 AM
Induced representations and the Poincare group?
'Since the Poincaré group (or more precisely its 2-cover) has a semidirect product structure by an Abelian group N, one can used a special case of the general theory of induced representations, known as Wigner's little group method' hmm
 
 
2 hours later…
6:06 AM
@Alan morning :-)
 
Morning! :O
I know you said you'd be around, but I'm still (pleasantly) surprised :D
Wokay, so can I ask you a question here, or in the other room? O:)
 
Other room is best
 
Alright then :-)
<Heads over to the other room>
 
Anyone here familiar with multiprocessing or multithreading?
 
@enumaris depends what you mean by familiar. Also I only know the thread sync apis for Windows not Linux.
 
6:10 AM
hmmm, basically I'd like to know how I can get my CPU and GPU to run in parallel
using code in python
there's two processes which take similar amount of time, one of the processes is done by the CPU while the other is done by the GPU
right now they are run sequentially, CPU->GPU
if I can parallelize that, I could save half the time
processes are basically CPU grabs some data from file, GPU processes that data both in batches
 
@enumaris ask @BernardoMeurer
 
I don't know the Python threading apis I'm afraid.
 
@JohnRennie I can't believe you didn't direct him to Bernardo
 
If he comes in here, I'll definitely ask him heh
 
@BernardoMeurer come here
 
6:13 AM
@0celo7 good point.
BTW I bought that keyboard
 
this is what I get for switching from Keras to Pytorch
Keras has a built in API that does exactly that
"fit_generator"
 
@enumaris Bernardo told me he doesn't do Python at 4AM
ping him and he'll respond later
 
lol ok
@BernardoMeurer Need your help with something in python... :D
 
@JohnRennie mechanical keyboard master race
 
my mouse wheel squeeks...
what a crappy mouse
 
6:18 AM
I have the best mouse in existence
 
@0celo7 I'm looking forward to seeing what it's like. I've been using membrane keyboards for the last few ... well ... decades.
 
@JohnRennie now get this guy ^^
 
I use, and love, basic Dell mice. The shape just seems a perfect fit for my hand.
@Kaumudi.H morning :-)
 
@JohnRennie can you tilt the mouse wheel to go backwards and forwards in browsers?
 
user228700
@JohnRennie Morning! :-)
 
6:21 AM
@Kaumudi.H morning?
what time is it in India
 
user228700
Hmm?
 
user228700
@0celo7 Almost noon :-) 11:51 AM.
 
@0celo7 no, but you haven't asked if I want to tilt the mouse wheel to go backwards and forwards in browsers :-)
@Kaumudi.H the pizzaburger was excellent :-)
 
user228700
Wow, nice! :-)
 
And I finished off the mint ice cream for dessert :-)
 
user228700
6:24 AM
@JohnRennie I don't use a mouse at all!
 
@enumaris check out the multiprocessing module
 
user228700
@JohnRennie Cool :-) I had Maggi noodles for dinner last night!
 
@DavidZ I am actually looking at it, but the documentation is really dense for me
I have little experience in multi-processing :(
 
@JohnRennie If you're not, you're running at $\mathfrak{suboptimal}$ speed.
 
@Kaumudi.H even though I use a laptop (very like yours in fact) I use an external keyboard and mouse. I find it easier to work with given that I spend hours a day at the keyboard.
 
6:25 AM
@enumaris Ah, I guess you never used threading in Python or Java or any similarly constructed library?
 
I have not
 
user228700
@JohnRennie Right, that makes sense.
 
(Random D wave comment to be uttered when the non weirds are on)
 
@Kaumudi.H nice, if not stunningly nice ...
 
A long time ago, I took a course in parallel computing, but I've since forgotten pretty much the entire course
lol
also, that course was more to do with using the supercomputing cluster at UCSD
 
6:27 AM
@Kaumudi.H you back at college?
 
@enumaris hm, well maybe it'll come back to you
I'd say you might want to start by looking up a tutorial on Python's multiprocessing and running through it quickly to get a general sense of how it works
You might be able to get away with basic usage of the Process class
 
it looks like pytorch has what I need implemented in a utils package
but I'm not sure how to use it yet
 
Ah, well then you'll likely do better by reading the documentation for that than with anything I could tell you
 
the tutorial mentions that it implements multiprocessing, but I don't see an example...
 
Hm, can you share a link?
 
Ah, I don't see much there... did you look at torch.multiprocessing though?
 
I did not
the tutorial states:
However, we are losing a lot of features by using a simple for loop to iterate over the data. In particular, we are missing out on:

Batching the data
Shuffling the data
Load the data in parallel using multiprocessing workers.
torch.utils.data.DataLoader is an iterator which provides all these features.
so it seems like the DataLoader should have the multiprocessing feature in it...but I'm not seeing how
 
Yeah, that's talking about loading the data using several processes at once. But it doesn't seem to say anything about actually running computations in parallel.
 
oh..
 
If you pass num_workers to the DataLoader() constructor it will use that many extra processes to load the data, but again, that's just loading, not actually calculating.
As far as I can tell
 
6:43 AM
I see
I tried to look at keras source code for fit_generator to see how they implement it
but
it just calls another fit_generator...and I don't know where the other method comes from lol
 
I can't say for sure without knowing exactly what you're doing (i.e. seeing code), but I think you might need to create two functions, one to do your CPU tasks and one to do your GPU tasks, pass each one to a torch.multiprocessing.Process constructor (so you have two Process objects), and start() them
 
@JohnRennie temp oscillations in a nuclear reactor
probably very unphysical
 
I only know about reactor cooling system corrosion rates. As long as my cooling systems don't fail I'm not that fussed what goes on inside the core :-)
 
The thing I'm doing is basically just 2 things 1. grab a minibatch from a hdf5 file 2. train a neural network on that mini-batch
what I'd like to do is 1. grab 10 minibatches from a hdf5 file and send it into a que using the CPU, 2. train on those mini batches sequentially using the GPU 3. while the GPU is training, continue to grab minibatches using the CPU and send those minibatches to the que
this way the que is populated (roughly) as fast as the GPU is training on them and I'll save a lot of time
right now it's like CPU grabs a minibatch GPU trains CPU grabs a minibatch GPU trains
pretty much doubles the time
since both processes take almost equal time to do
 
Oh OK that makes sense.
 
6:51 AM
yeah...that multiprocessing is like...so dense to me lol
keras has that method above which does exactly what I wanna do
specifically: "The generator is run in parallel to the model, for efficiency. For instance, this allows you to do real-time data augmentation on images on CPU in parallel to training your model on GPU."
 
@JohnRennie so when I tune my controller to get minimum overshoot I get those insane oscillations
 
I think you could use a Queue (in your case, torch.multiprocessing.Queue) which is shared between a "loader" Process and a "trainer" Process. Have the "loader" load minibatches from files, maybe using a for loop, and once each one is loaded, push it to the Queue.
In the other process, you just pop minibatches from the Queue and use them to train the network. Again you can do this using a for loop.
 
yeah, in theory that sounds right
but reading the documentation
 
I have no idea how to do that
 
6:54 AM
@0celo7 it's obviously underdamped ...
 
I will take a look
but it looks a lot more complicated than I initially thought lol
 
@JohnRennie but I'm doing maximum damping!!!!!
 
@0celo7 maximum damping?
 
yes, maximum damping allowed by quantum mechanics matlab
 
@enumaris Concurrent programming (like multiprocessing) takes a certain way of thinking. It's not easy, exactly, but once you get a good mental model it doesn't seem so complicated anymore. From the way you're talking about it I wonder if you might not be there yet.
I'm writing up a gist for you to get started with
 
7:00 AM
I think I get theoretically how it should work, but the coding to get it to do what I want it to do is somewhat beyond my level
 
@enumaris here's an outline, at least. I don't expect that you can literally just copy this and fill in the blanks to get something runnable, but in broad strokes this is how you'd implement the concurrent producer-consumer model I mentioned above.
i.e. there might be errors or something, I haven't tried to use this
 
I see, thanks!
will that load 10 minibatches at a time?
like always load them in 10's?
I'm a little confused with the for i in range(10) parts of both functions
well, also a lot of other questions come to mind due to me not knowing what the multiprocessing methods are exactly doing heh
 
@enumaris No, it loads one at a time. After a minibatch is loaded, the loader process places it in a queue and goes on to loading the next minibatch, while the trainer process takes the former one out of the queue and starts using it to train the NN.
This is written assuming you have a total of 10 minibatches. If you have more, change the number accordingly.
 
and the maxsize argument makes it so I can't load more into the que, correct? So the loader will pause if it hits max size?
 
Right. The loader will pause if it ever tries to put a minibatch into the queue when there is already one there.
Once the trainer takes that minibatch out of the queue, the loader will resume and put the next one in the queue.
 
7:11 AM
I see
 
I think there should be no problem with raising the maxsize if you like. It just means more memory might be used, since you might have more than two minibatches loaded into memory at once.
 
I usually just go with keras practice to use a que size of about 10
 
is he supposed to look American?
 
does he
 
7:13 AM
sunglasses and fat
 
the two attributes of the American
It is from a meme with an American, originally, yes
 
the q.get() method returns exactly one mini-batch right?
 
@enumaris That should be fine here too. I mean, as long as you keep the queue small enough that your system has enough memory, it's no problem.
 
my system has plenty of memory
 
7:14 AM
@enumaris Yes. Or more precisely, q.get() returns the same thing that was added to the queue with q.put().
 
@Slereah I know it's meant to mock but all but one of those things is correct.
 
it can load probably 1000 minibatches
in CPU memory anyways
GPU memory couldn't do it
so, if I understand the code right...I should be able to just fill in the template and train it o.o
 
@enumaris Shouldn't be a problem. As long as you only access the GPU from the trainer thread, you will never have more than one minibatch loaded into GPU memory at once.
 
right
will the
 
@enumaris Well I'd start with trying that. Like I said, I can't guarantee this will actually work :-P
but it should be close
 
7:16 AM
trainer start simultaneously to the loader?
or will it start once the que is full?
 
@enumaris yeah, pretty much, but the trainer won't do anything until the loader has finished with one minibatch.
I mean, both processes start simultaneously.
The trainer starts actively doing work as soon as the loader has placed the first minibatch into the queue.
 
I see
I think keras makes it wait until the que is full
not sure why
btw, do you know of any good guides to the multiprocessing module? Something simple that doesn't assume I know a lot about multiprocessing already...
I'm gonna try to implement this
 
@enumaris No, sorry. FWIW I think the way to learn how to use the multiprocessing module is to learn about concurrent programming in general. Regardless of which language you're working in, it's all based on the same few fundamental structures.
 
I see
 
What really helped me learn about this was taking an operating systems class in which I had to implement a mutex (the most fundamental concurrent programming structure) for an assignment.
If you want to implement mutexes for yourself, great, but in practice it's a bit of a time sink :-P
 
7:24 AM
dunno what a mutex is
 
It's a way of signaling changes in state from one thread (or process) to another
Or, basically, it's a lock
 
o.o
 
It can be used to lock a resource to one thread so that other threads can't access it at the same time
(or equivalently with processes)
Pretty much everything in the Python threading module (or multiprocessing) is based on mutexes at some level. They're probably not implemented in Python, though, they're a facility provided by the operating system.
Look at Python's _thread if you want an example
 
I see..
is there a way to make the loader tell the trainer when it's done training?
like when there's no more mini-batches, end
 
You mean when it's done loading? Sure, one easy way is to send a sentinel value like q.put(None)
 
7:30 AM
I see
 
In that case you could replace the for loop in the trainer process with a while True loop that breaks when it finds None in the queue
There might be a more elegant built-in way, but I can't tell (yet) from the documentation
 
I'm trying to think of which way is better...to do that and keep the loop in the loader...or...to just write some code to figure out exactly how many steps I need to be taking...
oh wait, I already did the second part when I did this model in keras lol
 
Well, you need loops of some kind in both processes. But only the loader needs to actually figure out when there are no more minibatches to load.
 
I guess if I mess up and have the loader load fewer batches than the trainer is expecting...at some point...my program will break...
that's kinda worrisome since it takes me like 3 hours to do one epoch...and if I set it to train for 100 epochs I'd hate the program to break after 300 hours of training lol
 
@enumaris Well, yes, if the trainer is programmed to expect a specific number of batches and the loader doesn't load that many, it will break. (Or rather, the trainer process will hang.) But it seems fairly straightforward to write your code in a way that that doesn't happen.
You can use the technique I mentioned of passing None, and/or you can call q.get() with a timeout parameter so it doesn't wait forever.
 
7:36 AM
what happens if it times out?
 
It raises an exception, I believe, which you could catch and handle gracefully
 
oh, I'd have to put in a try block then?
I haven't done one of those before lol
 
Oh you have a lot to learn :-P
It's quite ambitious to be tinkering with multiprocessing if you've never worked with exceptions
 
yeah, since I'm not in CS, I just learn stuff as it pertains to what I'm doing
so far, if I get an exception I just try to fix it
 
Well, that's good - that's generally what you should be doing
but sometimes the appropriate way of "fixing" an exception is to catch it
 
7:42 AM
right
if the que closes
and trainer still is expecting more stuff
does it just hang forever?
I'm 99% sure I have the right number of steps
but I'm still kinda worried lol
 
@enumaris That I'm not sure about
You could try it with some dummy data and see
 
yeah, let me try it with smaller data first XD
 
But again, you can just push None or something to indicate that there are no more minibatches. That way it's totally safe - the trainer knows exactly when it's done.
 
right
 
Hi all.
 
7:56 AM
hmm I got an AssertonError: group argument must be None for now
 
@enumaris that's the kind of thing I suggested you might have to fix ;-)
 
Am I not allowed to pass more arguments than the que?
 
or wait, is this happening when you construct the Process?
 
it's happening at the stage of loader = tmp.Process()
I think it's cus, you had this line: loader = tmp.Process(load_minibatches, args=(q,))
but my load_minibatches function takes more arguments than just q
so I have something like loader = tmp.Process(load_minibatches, args=(q,arg1,arg2))
I assumed that's what the "args" is asking for, the arguments to "load_minibatches)
"
 
Did you look at the documentation?
 
8:05 AM
lol that documentation just taught me kwargs means keyword args....
yeah I think the error is I have to specify "target=fcn"
it was putting the fcn into group and it needs group to be None
whoop
it hanged
how did it throw a runtime error without actually stopping the process
O.O
 
Well there are multiple processes, one of them could have thrown an error while the others are still going
 
seems like that's what happened
the GPU threw an error
RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the 'spawn' start method
I don't see a spawn method in Process though...
 
cold COLD
hands are freezing off
 
@enumaris Ah, well then see this
And this
 
Could you explain why they use the if statement if name == 'main':
?
what is that...
 
8:12 AM
Standard Python convention
3338
Q: What does if __name__ == "__main__": do?

DevotedWhat does the if __name__ == "__main__": do? # Threading example import time, thread def myfunction(string, sleeptime, lock, *args): while 1: lock.acquire() time.sleep(sleeptime) lock.release() time.sleep(sleeptime) if __name__ == "__main__": lock = threa...

 
9 hours ago, by 0celo7
ACM is now an experimentalist
I am so tempted to star this, because it means the near omniscient ACM is expected to expanding the territory to experimental physics
and thus one step closer to omniscience
 
ah I see
not important for me then since this code will never be imported
 
Hey everyone. Does anyone have some information about RG flow in curved spacetime?
 
@enumaris I guess so, but still a good practice I think in case things change in the future
 
alright
wooo, learning a lot
I can't pickle generator objects
hmmm
 
8:16 AM
@Kiarash sounds like a question for @0celo7
 
but did I ask it to pickle it though...
I guess the multiprocessing asked it to pickle it...
 
@0celo7 Do you have some information about RG flow in curved spacetime?
 
Well @0celo7 is from mamerica
he's probably in bed right now
might have to wait a bit
 
@enumaris yeah I think that's how Queue works, by pickling objects to send them to the other process
 
@Slereah Thanks! all right
 
8:19 AM
hmmm...I can convert my generator into the loader...
or...uh...
what else can I do...hmmm
 
Sounds like a fun problem :-P
I gotta take off
 
alrighty, thanks for the help :D
 
cya
 
8:48 AM
@Slereah you don't know much about renormalization group. I consider you know much about it. I have written an mail to a profeesor in that field asking for PhD opportunity, but he doesn't reply me.
 
Oh renormalization group
I thought he was talking about Ricci flow or something
I am also not very good at renormalization group
Although like most physics
I know enough to nitpick
(It's actually a semigroup)
 
Winter Bash 2017 countdown link.
 
One line in my book in progress just says "Something something rigged Hilbert space"
 
@Slereah OK, I am not sure he is asking renormalization group or Ricci flow.
 
Well RG
I'm guessing renormalization group
Something I don't think @0celo7 knows about
Since he hates QFT
 
8:54 AM
I am not sure if I really want to work on renormalization group. I know too little about it. But I see quite a few professors work on asymptotic safe gravity.
 
I'm not 100% what renormalization (semi)groups are, rly
I know renormalization but that's about it
 
I just feel asymptotic safe gravity sounds like a speculative, rather than bona fide, approach.
 
Here's a secret
All QG theories are speculative
Most of them don't really even have proper math
 

« first day (2594 days earlier)      last day (2349 days later) »