« first day (4548 days earlier)      last day (383 days later) » 

1:49 AM
Have you guys thought about robust ways to ensure numpy random seeds are nailed to same value in continuous testing environments. You could do something like set the numpy random seed in each script but that solution requires manual intervention. There used be some kind of environment exports for random ness that can be done for CI environments?
 
 
3 hours later…
4:32 AM
@Mikhail autouse fixture that seeds?
 
 
2 hours later…
6:08 AM
Is there a better version of this around? stackoverflow.com/questions/8575895
I could have sworn I saw a version that already includes an answer about dataclasses
 
 
2 hours later…
7:50 AM
After 20 or so full iterations to try get the base template of my new project website right, trying to mash together every bit of cargo-culted components I could find, I've ended up with just the following in my .css file.
#sidebar-nav {
    width: 160px;
}
I don't know quite how to feel about that. I should have stopped fighting with the navbar widget playing nice with it and focussed on the <header> tag instead. At least I have something minimal to build on. Apparently I still haven't learned that cargo-culting is bad
 
8:20 AM
"There is no time difference between Central European Time and Central European Summer Time"
This is how AI destroys the world... :/
 
there is no war in ba sing standard time
@roganjosh at least you recognize that you are doing it.
 
Normally it does speed me up a bit and I faff to get it to work in the end, but in this case everything I thought I wanted came with sizeable amounts of CSS and JS required. All of that stopped me from finding out that you can just implement the full functionality with just bootstrap components out of the box as none of the answers I found actually used the base tools available
 
sounds like... everything else
 
 
2 hours later…
10:08 AM
My new glasses have turned me into the arch-nemesis of flat earthers; I can make the world curve just by moving my head
 
 
1 hour later…
11:08 AM
@Aran-Fey That sounds... sub-optimal. If you're not used to it in a few days, please contact your optometrist. Effects like that can induce nausea.
 
11:25 AM
I'm sure I'll get used to it, but it certainly does seem sub-optimal
 
At least one of those weird, curved ergonomic keyboards will probably look straight now, though
That, or bent at a 90 degree angle
 
@Aran-Fey I remember having this when I first got my glasses a year ago, couldn't walk by myself for a few minutes
 
peps.python.org/pep-3107 - hold on, type annotations have really been valid syntax since 3.0?
 
@Aran-Fey Ok. Maybe go for walks outside, where your eyes can focus on stuff at varying distances and angles. The idea is to pump data through your neural networks so that your visual and balance systems can adjust to the new conditions.
 
12:00 PM
@KarlKnechtel Annotations have been.
They were only codified as only types later on, though it was already the intention back then.
 
not sure what you mean by "codified". considering e.g. 3.8 will accept def example() -> 'bring me a shrubbery': pass just fine
 
@Marco TF32 is just a truncated version of standard IEEE-754 float32, which is the format used by numpy.float32. I don't use TensorFlow, but surely it provides stuff that can convert between those formats. There's info about various float formats here: en.wikipedia.org/wiki/Bfloat16_floating-point_format
@Marco Why are you even talking about decimal places? These are binary formats. If you want to understand how they work, you need to think about what's happening at the bit level.
I suppose you could do rounding, but why bother? It's easy enough to do in C with bit twiddling, but a bit tedious in Python. Truncation should be fine.
 
1:04 PM
Can C do bit operations on floats?
 
morning cabbages, folks!
 
@Aran-Fey It's C, you can treat any memory however you like with it, including float data.
You might have to do some pointer aliasing/casting, but I think that's par for the course when doing bit-fiddling
 
You can't do that directly though
float is invalid operand for "<<"
 
user17135505
1:24 PM
hello, we have multiple processes triggered by various means regularly. In order to report on their results, i am thinking of developing some framework for results. Basically each task would need to produce and store some simple file with timestamp, task name, result. And the overarching process would scan these files and report on progress.
 
user17135505
Rather than orchestrating some sort of global scheduler for tasks, I would like to only works with outputs of the tasks. It is presumably much simpler.
 
user17135505
Have you ever seen something similar done?
 
As message queues, yes. But not with files, that seems like it often be a bottleneck unless you have really long tasks.
 
user17135505
So some sort of broker which receives a message on task start and finish? It would need to run continuously eh?
 
1:43 PM
You could use apache kafka presumably
The broker needs only to store the filename and the consumer can pick it up once the file is completely written.
 
user17135505
Is file-based MQ a thing?

To be frank, i do not understand what makes it different from simply running some infinite loop that scans directory for files with task results.
 
Ok, so we're in the same context that we were yesterday?
 
user17135505
1:59 PM
Is it same, if I do not stress CPU with some sleep
 
Having a broker decouples all of the processes because each process can subscribe to different events. However, if you're just trying to solve the problems that I raised yesterday then my gut feeling is between a) your approach yesterday was totally off the mark on what you needed or b) you're now reaching for something totally over-engineered
 
user17135505
This is a brand new problem :-) Yesterday's problem is one of the tasks that need to submit their result
 
user17135505
What type of subcriptions are we talking about?
 
Kafka is a pub/sub broker. That is; certain processes will publish to a topic - e.g. posting to a particular forum saying "hey, I've just finished Process X" and then there are subscriber processes to that topic that get a notification that there's been a new post in that forum. All the other processes that aren't subscribed don't get the notification
So you can configure each process to publish their new posts to particular channels, and you have other processes that subscribe to those channels. If it's not relevant to the process, you don't subscribe to that topic
 
Files are fragile while they are being written to - so for example, you might try to read from it while it is in the middle of being saved to and get corrupted data.
 
user17135505
2:06 PM
If broker is down, does this mean publishing process needs to wait for it to be back to inform it about the result?
 
user17135505
the publishers are simple scripts that process data
 
user17135505
they update database, send emails or produce some files
 
I don't know how contingency works in this case but it's a high-uptime application that big business relies on. Presumably, yeah, everything grinds to a halt if it goes down but I suspect you have to deliberately pull it down
(Everything can go down unexpectedly but hopefully you know what I mean in terms of robustness)
 
user17135505
Is MQ advisable in situation where processes run ad hoc / not continuously?
 
user17135505
I guess in case of MQ downtime, there could be a file created. (I feel the logic around files is simple and can be implemented in 50 lines of code.)
 
2:20 PM
That would be contingency that I said I don't know about. It might be able to dump events to a local file and sync it up later when then the service is back up. That's too much in the engineering side for my knowledge
 
I won't say that you shouldn't plan for MQ downtime cause it's good to have backup plan, but it's really not something that will happen too often if setup properly
 
user17135505
Thanks a lot @roganjosh and @matszwecja - i will research a bit more.
 
File based solution may seem simple, but will prove very fragile should your system grow
 
I feel like worlds are colliding here. Kafka would only report "my file is complete" and the consumers would then get to work on the file. Watching the filesystem is just a terrible and fragile idea, I agree
 
Oh, right, I was thinking about sending the data itself through MQ but just sending notifications about the files doesn't seem too bad.
 
2:27 PM
37 mins ago, by roganjosh
The broker needs only to store the filename and the consumer can pick it up once the file is completely written.
:)
But it is what @learning_python_self suggested re: files so you didn't misunderstand. I think we were just talking a bit cross-purpose
 
To put why watching filesystem into perspective, let's say you've got 10 producers and 10 consumers. So now you've 100x file checks each time you want an update. If they write and read from MQ instead, that comes down to just 10 messages to MQ and however many were send by producers in the meantime.
 
user17135505
Good point. There is currently only 1 consumer intended.

The biggest issue I see is that consumers need to run from same machine.
 
user17135505
Filesystem can be accessed by other machines. The broker itself - I am not so sure.
 
I'm pretty sure it is way more accessible than filesystem
Maybe after a bit of initial setup
 
user17135505
The system where broker would run is a single user virtual machine.
 
2:34 PM
As long as it is connected to the network its completely doable
Things like MQ were actually designed for running services distributed among different environments
So yeah, they can do the thing they were designed for :)
 
2:48 PM
The broker doesn't run the service. The broker just passes messages between services
 
user17135505
web service might be better option
 
That's the definition of the broker here. It's a middleman that just passes messages
Twitter doesn't write your tweet response if you get a notification from someone you're following
 
 
4 hours later…
6:26 PM
@learning_python_self I misread this on my phone sorry. My personal website is a relatively small instance that's running (continuously) the site itself, a Java server and a C++ server. Plus it runs some computational stuff in Python. You can access it, as can anyone else. You can overload it, but you can spec a VM much higher and it would depend on what load you expect
I wonder whether "collectives" on SO actually feed back to the employees? I had my rant so I hope AWS actually sees it
 
7:14 PM
And another question. I don't really know how AWS gets away with their pretend filesystem with S3 and its truly wonky ways. At least it's not just me that is baffled by the results
 
7:28 PM
@roganjosh Right, it isn't really a file system, just a bunch of keys with embedded slashes, which S3 allows you to (sort of) use like they were file paths.
 
I can live with it as a thing, with its quirks. But then they threw a terrible library on top that is just weird. When you combine them, it gets really confusing
The real fun is that the OP faced a number of problems that I ranted about before
Aug 5, 2022 at 15:31, by roganjosh
boto3 has got me questioning my sanity. Even down to the most fundamental things you might want to do it just goes off on one. "Can you tell me what's in this directory please?" "Sure, I'll recurse every single directory I find, though. Oopsie, I can only hold 1000 items so I've truncated it. Wanna see? Just call .get('IsTruncated'); it's that simple! Can I introduce you to my brother list_objects_v2?"
 
7:48 PM
@PaulMcG Cute trick. It reminds me of multidimensional arrays in awk, where a[i,j,k] is really just a dict item with a key created by joining the indices into a string (with a separator between each index).
 
@PaulMcG and here I thought this was just a Fuse filesystem or "distributed" Fuse, like Glusterfs...
I guess that's why they call it buckets. It's just a glorified dict
 
Indeed. But then the library treats it as such, so things like .get('IsTruncated') are needed to read the JSON response (which it doesn't bother to deserialize). If there's an error, it won't throw, you need to do .get("Errors") (slightly paraphrased on the last bit)
 
Hello. Sorry for only replying now, I couldn't reply sooner.

Yes, that was already clear to me. About function ready for conversion, I didn't find it. Thanks for the reference.
I think I just might be using the wrong nomenclature. I'm referring to significant decimal digits precision. Wouldn't that be decimal places? So my rounding considering the decimal places is wrong? On the website that I had sent here in the chat, it says that the TF32 has 4 significant decimal digits precision.

"I suppose you could do rounding, but why bother? It's easy enough to do in C with bit twiddling, but a bit tedious in Python. Truncation should be fine."

Well, I didn't quite understand what you said, I'm just caring if this rounding I'm doing is something reasonable. As I underst
Well, I don't know why your username wasn't automatically tagged when I answered you, so I'll tag it individually. @PM2Ring
 
8:08 PM
how to deal with when your code depend on certain values which is required (which make certain decision)but not present in db and this make whole data courrpted, and wrong finnical reports
 
@Marco "it says that the TF32 has 4 significant decimal digits precision." That's just an approximate equivalent. TF32 uses an 11 bit mantissa, but only 10 of those bits are stored. 11 bits covers the range from 0 to 2047 (inclusive).
 
@sahasrara62 That's unanswerable. We have no idea of the setup and getting financial reports wrong is... not good
 
@PM2Ring Ok, but it refers to the fractional part, right? Is my rounding to 4 decimal places reasonable or wrong?
 
@roganjosh this is for offline record entry in main table , where certain time values for some trade/transactions is not captured and because of it is , reports are corrupted, since it is financial data that is not good
 
@Marco You probably don't need a conversion function. If the TF32 value is stored in a 32 bit word, with the 19 TF32 bits occupying the most significant bits, then that word us a valid float. And I expect that the TensorFlow stuff that reads the 19 bits of a TF32 out of a 32 bit word just ignores the bits it doesn't need, or maybe it does rounding for you.
 
8:17 PM
@sahasrara62 so there's nothing we can suggest. The datetimes are gone and you need them for financial reporting. Are you asking for us to find a way of making them up for you?
 
@Marco Rounding to 4 decimal digits won't lose anything, since that covers the range from 0 to 9999, which is larger than what TF32 uses.
 
Okay, so my rounding is wrong. Thanks for letting me know. What do you suggest I do?
@PM2Ring What do you mean when you say I don't need a conversion function?
 
@roganjosh solution is improving the capture system and not letting anyone making entry without all values required. asking what to do.deal when you are building some of your own independent project and when such incident occur has to. focus on this immediately and solve this asap , in that kind of situation what to do
 
I'm not entirely sure what you're asking but there's a conversation starting here that might be relevant
 
just a rant and frustration from me. thanks
 
8:25 PM
Fair enough, I know the feeling
 
@Marco As I said earlier, I don't use TensorFlow, and I don't know how it works, so I can't give you specific advice. OTOH, I have a reasonably good understanding of floating-point formats, and how they work.
However, I'm used to dealing with datatypes that consist of whole numbers of bytes. I've never worked with a 19 bit datatype. From the little I've read on TF32 it appears that a TF32 number is normally stored in 32 bits (hence the name), but in the GPU that gets chopped down to 19 bits.
 
@PM2Ring Ok. It's actually just a format made by TensorFlow, but I'm not using TensorFlow. Important TF32 reference: blogs.nvidia.com/blog/2020/05/14/….
 
I love how you keep linking to TF32 blog posts but never actually say what you're doing and why you need these values
 
But they don't put out these blogs without some method of conversion
 
any week now we'll figure out what you're trying to ask
 
8:31 PM
@PM2Ring I see.
@AndrasDeak--СлаваУкраїні The details would just get confusing. Just know that I want to try using this type of format because I need to reduce the precision of my data.
 
Oh yeah, I completely trust your assessment, don't worry about that
 
Ok
But if anyone is curious about the details, you can check it out here: discuss.pytorch.org/t/fp32-with-tf32-precision/176212/7.
 
@Marco Yes, I've seen that page. How do you normally send TF32 values to the GPU? And how do you recieve them? I assume those values are in a 32 bit word. Is that correct?
 
@Marco I'm sorry but "Ok. Well, maybe my data is special" and the fact your model is diverging - are you really going to pin it down on a conversion between 32 bit representations?
 
@PM2Ring Ok, maybe I sent it myself here in the chat and I forgot. Good point, This is done internally by some Deep Learning framework, there are details on this page: developer.nvidia.com/blog/….
@roganjosh I didn't understand, could you be more clear please?
 
8:38 PM
Your model is divergent and you're blaming it on the representation of your values
 
@roganjosh No exactly. I meant that since my data has many decimal places, this can be considered special, to the point where actually less precision (but not that much less) is needed.
From the last tests I've done, the FFT calculations I do are greatly affected by this likely difference in precision.
 
Does it converge on a CPU (for my own curiosity)
 
It's a fact that running on a GPU ampere I get convergence, and running on a Volta GPU I don't.
 
Guess that answers that, with a little GPU flare on top :P
 
@roganjosh I even tried to test this, but I didn't finish the execution, since running in CPU (even using many cores) takes "eternity".
 
8:45 PM
@Marco Why don't you try passing an array of values to the GPU and read them back without changing them, to make sure that you get back what you sent? Eg, np.linspace(0, 1, num=2048, endpoint=False, dtype=np.float32)
 
@Marco Ampere GPU *
@PM2Ring I think this message would be relevant for you: discuss.pytorch.org/t/fp32-with-tf32-precision/176212/….
@roganjosh Sorry?
 
@Marco The async nature of chat means I saw "since running in CPU (even using many cores) takes "eternity" before my post appeared, so you answered my question and added extra detail
 
Ah, ok, I understand now
 
@Marco No, I don't want to get into the details of PyTorch. BTW, TF32 has exactly the same precision as float16: they both use a 11 bit mantissa. But TF32 has an 8 bit exponent, instead of float16's 5 bit exponent, so it covers a larger range. Of course, when the exponent is large, the quantization gets rather chunky, as I mentioned here: stackoverflow.com/a/46706603/4014959
I suspect that TF32 is ok for the simple linear algebra (dot products & their cumulative sums) used in neural networks, but it's probably a bit too crude for FFT work.
 
@Marco what is it you're modelling? In a rough sense
 
8:57 PM
@PM2Ring Ok. But in any case I couldn't understand what was the reason for the test you had suggested to me. About FP16, that's a great point I was about to comment on. I did some tests, converting the data to FP16, but they weren't successful. I don't know why, but I believe that in the PyTorch or CUDA internals things end up being different.
@PM2Ring In my case there would be no problem regarding the exponents, my data is normalized between 0 and 1.
@PM2Ring In fact the opposite happened, it worked fine.
 
I ask because the types of models I'm used to wouldn't become divergent at these sorts of scales but convergent based on different representations of values. They can overflow (ugh) but they don't fundamentally change based on the 5th decimal point of a value
 
@roganjosh Prediction of a natural phenomenon.
@roganjosh Ok, I wouldn't know how to comment on that.
Fact: fftn liked TF32 and didn't do well with others formats I've tested.
 
@Marco The array I suggested completely covers the range of the mantissa of a normal float16 or TF32 number. If you can send that array to your GPU in TD32 mode and you get the same data back then you know it's being converted correctly
 
As I said in the PyTorch discussion, I get convergence on the L1 metric, but my main loss, which is composed of relative L1 + a result coming from FFT, doesn't converge well, which ends up hurting the model's results in general.
@PM2Ring Humm, I 'm thinking about it.
 
9:14 PM
Here's an example of my test with float16. If you increase the num arg to 1<<12, the test fails.
import numpy as np
a = np.linspace(0, 1, num=1<<11, endpoint=False, dtype=np.float32)
b = a.astype(np.float16)
c = b.astype(np.float32)
print(np.all(a == c))
 
9:24 PM
Interesting
Thanks. I'm just trying to understand it more. Would that serve as a type of conversion?
So would I do mynewtensor = np.linspace(min(mytensor), max(mytensor), num=len(mytensor), endpoint=False, dtype=np.float32)?
Well, I think the num parameter is wrong. I don't know how it would look.
 
@Marco I don't know why you'd want to do that. Do you know what linspace does?. Try print(np.linspace(0, 1, num=8, endpoint=False))
 
Yes, I said it's wrong the way I did it, I'm trying to understand what this example would be for.
 

« first day (4548 days earlier)      last day (383 days later) »