When I search on Google for "python reverse list", not a single link is to the official Python documentation. Not even if I search for "python reverse" does the documentation page show up. Searching for "python reverse documentation" leads to the second link to the Build-in Functions page (https://docs.python.org/3/library/functions.html), which is what I "need".
Excuse the comparison, but "matlab reverse list" has the top three to the official documentation (all of them relevant, but slightly different semantics). Why can't Python be better than that?
The solution I have in that issue adapts from the very helpful discussions in the original Pytorch issue [2]
`worker_init_fn=lambda id: np.random.seed(torch.initial_seed() // 2*32 + id)`
I will admit that this is *very* easy to mess up as evidenced by the fact that examples in the official tutorials for Pytorch and other well known code-bases suffer from it. In the Pytorch training framework I've helped develop at work, we've implemented a custom `worker_init_fn` as outlined in [1] that is the default for all "trainer" instances who are responsible for instantiating DataLoaders in 99% of our training runs.
Also, as an aside, Holy Clickbaity title Batman! Maybe I should have blogged about this 2 years ago. Heck, every 6 months or so, I think that, and then I realize that I'd rather spend time with my kids and on my hobbies when I'm not working on interesting ML stuff and/or coding. An added side benefit is not having to worry about making idiotic clickbaity titles like this to farm karma, or provide high-quality unpaid labor for Medium in order for my efforts to be actually seen by people. But it could also just be that I'm lazy :-)
torch.utils.data.get_worker_info().seed
So I guess something like the below (untested!) could work too: worker_init_fn=lambda id: np.random.seed(torch.utils.data.get_worker_info().seed)Other than that, I agree, much better than % and less verbose than .format.
It's just the f" or f' that doesn't sit right with me
Deleted Comment
I use the command line whenever possible over a GUI application, but sometimes I wish it wasn't still stuck in the 80s. Keep the speed an simplicity (I don't want images or anything), but make it easy to make robust applications with a clean text based UI. I shouldn't still have ghosting in my Vim setup, it's 2020.
We built Linear as we’re frustrated the practices and the available tools when it came to managing software projects.
On the product, we especially tackled the performance problem. Everything is synced to the client and we sync just delta packages between the cloud and client as changes happen. This way all actions a happen instantly and navigating around the app is really fast. And the app works offline too.
We also streamlined the UI and UX, overall we are rethinking what comes after agile for software development. I think many teams looking for something simple to run their teams.
Our announcement post: https://medium.com/linear-app/practices-for-building-linear-...
Alas, the e-mail sign up seems to take a while to send the registration link e-mail. When I got the e-mail after maybe 5-10 minutes of waiting, the sign up link had already expired. :( It says "Verification code expired. Please request a new one." I did, but the same thing happened.
Even if you don't have process isolation between workers (which is generally what you want) then you can still put memory arenas far apart in virtual memory, make use of inaccessible guard pages, and take other precautions to prevent catastrophic memory corruption.