Sign in

Brandon Rohrer

@brandonrohrer.com
3.7K followers 2.2K following 994 posts

Robotics and Reinforcement Learning tinkerer. brandonrohrer.org Wrangler of algorithms. Eater of bread. Sipper of whisky. Reports to a Shih Tzu.

PostsRepliesMedia
Brandon Rohrer @brandonrohrer.com · 2h
right next to "make no mistakes" and "seriously, don't do it wrong"
000
Brandon Rohrer @brandonrohrer.com · 2h
3. xgboost_regression: optimizes an XGBoost regression model across a wide variety of hyperparameters and options codeberg.org/brohrer/reds... 4. xgboost_multiclass: same as the previous example, but with a multiclass classification problem codeberg.org/brohrer/reds...
000
Brandon Rohrer @brandonrohrer.com · 2h
As of right now, there are 4 examples, each in their own subdirectory: 1. sinc: optimizes a 2D variant of the sinc function, sin(x)/x codeberg.org/brohrer/reds... 2. perf: tests the execution time bottleneck in redsho and helps to streamline it codeberg.org/brohrer/reds...
100
Brandon Rohrer @brandonrohrer.com · 2h
3. Call the optimizer from redsho.optimizer import optimize error, params = optimize(evaluate, values) where error is the lowest error achieved, and params is the parameter values that achieved it.
100
Brandon Rohrer @brandonrohrer.com · 2h
Usage 1. Start with an evaluation function def evaluate(*, a, b, c): return a * b**3 % c (The leading * tells Python that everything that follows is a required keyword argument) 2. Build a collection of values to try for each parameter values = {"a": [4, 7, 9], "b": [2, 5, 6], "c": [5, 8, 11]}
100
Brandon Rohrer @brandonrohrer.com · 2h
I recently published the redsho package for hyperparameter optimization. More than anything, I want it to be useful. I find it helpful to start with a working example. To this end I created a second repo called redsho-examples that walks through how to do it. codeberg.org/brohrer/reds...
codeberg.org
redsho-examples
redsho-examples
110
Brandon Rohrer @brandonrohrer.com · 6h
AWS is fighting hard to keep up with GPU demand on the West Coast today, and they are losing.
000
Brandon Rohrer @brandonrohrer.com · 6h
jeez claude, rein it in a bit. I don't get paid by the line.
101
Brandon Rohrer @brandonrohrer.com · 29/09/2026
You can still put positional and optional keywords before the asterisk. `def estimate(a, b, verbose=False, *, method=None, n_iter=None):` It doesn't matter what default value these required kwargs get because it will always be overwritten.
000
Brandon Rohrer @brandonrohrer.com · 29/09/2026
This means that now when I write ``` def sum(*, a=None, b=None): return a + b ``` I no longer have to check that `a` and `b` are not `None` in the function, and I can call it with ``` arg_dict = {'a': 4, 'b': 9} print(sum(**arg_dict)) ```
100
Brandon Rohrer @brandonrohrer.com · 29/09/2026
I always did this by setting all the parameter keyword defaults to `None`, then checking for any `None` values in the function. But there's a better way: using the bare `*` in the argument list. Everything after the `*` will be a required keyword argument.
110
Brandon Rohrer @brandonrohrer.com · 29/09/2026
Cool Python trick: Sometimes you want functions to have keyword arguments, but you also want them to be required. This is especially useful when you're passing required arguments using dictionary expansion, like `function(**arg_dict)`.
100
Brandon Rohrer @brandonrohrer.com · 29/09/2026
Available on pypi uv add redsho or pip install redsho Or you can check out the repo and dig into the guts. (It's very small - about 1kloc for the whole project) codeberg.org/brohrer/redsho
codeberg.org
redsho
Robust Evolutionary Direction Set Hyperparameter Optimizer
010
Brandon Rohrer @brandonrohrer.com · 29/09/2026
It looks through the parameter combinations it has tried already and picks one randomly, leaning heavily toward the best performers. Then it chooses one of those parameters and tries a few random values that it hasn't before. how it works explainer: brandonrohrer.at/evopowell.html
brandonrohrer.at
100
Brandon Rohrer @brandonrohrer.com · 29/09/2026
redsho takes a middle ground approach for when the effects of parameters and options can be wildly non-linear and exhaustive grid search would take longer than we want to spend. Its distinguishing feature is that it is evolutionary in nature.
100
Brandon Rohrer @brandonrohrer.com · 29/09/2026
All of these options kind of suck. I couldn't find a solution I liked to this problem so I built one: redsho, a robust evolutionary direction set hyperparameter optimizer.
110
Brandon Rohrer @brandonrohrer.com · 29/09/2026
Optimizing models with lots of hyperparameters and options is a slog that usually requires a combination community wisdom, obscure blog posts, and tedious trial and error. Automated methods tend to rely on strong assumptions of smoothness or brute force their way through every permutation.
110
Brandon Rohrer @brandonrohrer.com · 24/09/2026
evergreen
030
Reposted by Brandon Rohrer
danah boyd @zephoria.bsky.social · 24/09/2026
Today is Pub Day for "Data Are Made, Not Found: A Story of Politics, Power, and the Civil Servants Who Saved the US Census"!!! ::bounce:: Please support me by buying a copy of the book or asking your library for a copy! press.uchicago.edu/ucp/books/bo...
1238795
Brandon Rohrer @brandonrohrer.com · 16/09/2026
And for those with a managerial bent: Senior EM, Infrastructure jobs.ashbyhq.com/patreon/ba5d... Senior EM, Payments jobs.ashbyhq.com/patreon/f145...
jobs.ashbyhq.com
Senior Engineering Manager, Infrastructure
Patreon is a media and community platform where over 300,000 creators give their biggest fans access to exclusive work and experiences. We offer creators a variety of ways to engage with their fans an...
000
Brandon Rohrer @brandonrohrer.com · 16/09/2026
Hey US eng friends, if you want to give Patreon a shot: Staff SWE, Data Infrastructure jobs.ashbyhq.com/patreon/e8f0... Senior MLE, Infrastructure (on my team) jobs.ashbyhq.com/patreon/722d... Staff SWE, Backend Platform jobs.ashbyhq.com/patreon/c277...
jobs.ashbyhq.com
Staff Software Engineer, Data Infrastructure
Patreon is a media and community platform where over 300,000 creators give their biggest fans access to exclusive work and experiences. We offer creators a variety of ways to engage with their fans an...
120
Brandon Rohrer @brandonrohrer.com · 15/09/2026
Three days of automated parameter sweeps saved me 15 minutes of Internet searches!
0140
Brandon Rohrer @brandonrohrer.com · 08/09/2026
In general, I pick up more on the second read, when I'm not consumed by curiosity about how they are going to escape their latest predicament. But Jeff's interpretations add another layer of richness (like the evolution of Katia) and it's all worth it just to hear Princess Donut. Princess Posse FTW
000
Brandon Rohrer @brandonrohrer.com · 08/09/2026
Also, the Soundbooth Theater version takes it up another level yet. Still Jeff Hays, but with a whole team of other writers, voices, composers, and sound folk. soundbooththeater.com/series/dunge...
soundbooththeater.com
Dungeon Crawler Carl - Soundbooth Theater
Dungeon Crawler Carl is the lastest audiobook series from author Matt Dinniman. Narration provided by Jeff Hays.
110
Brandon Rohrer @brandonrohrer.com · 08/09/2026
I enjoy these so much! Caught up on the books. Re-read is via audiobook, which is a whole extra dimension. Jeff Hays is a wizard. Zero pretension and a boatload of fun.
110
Brandon Rohrer @brandonrohrer.com · 08/09/2026
added type hints and ran mypy on some code I considered tight. It was like shining a black light in a hotel room.
040
Brandon Rohrer @brandonrohrer.com · 31/08/2026
Diving in to Python typechecking and stumbled on this @vickiboykis.com post vickiboykis.com/2023/12/11/w... The tldr: "The result of the deep dive is that I now no longer trust anything in the Python typing ecosystem." I'm now confused as ever, but on a higher level and about more important things
vickiboykis.com
Why if TYPE_CHECKING?
Typechecking is brittle yet important
070
Brandon Rohrer @brandonrohrer.com · 26/08/2026
the energy i bring to agile standups
020
Brandon Rohrer @brandonrohrer.com · 22/08/2026
Josh, Luis, and I had a great time chatting the other day and recorded in case you'd like to listen in www.youtube.com/live/Yx-ZkLf...
youtube.com
TRIPLE BAM!!! With Josh, Luis and special guest Brandon Rohrer
YouTube video by StatQuest with Josh Starmer
000
Brandon Rohrer @brandonrohrer.com · 20/08/2026
T-minus 30 minutes
130
Brandon Rohrer @brandonrohrer.com · 20/08/2026
If you’re into such things, I’m going to be chatting with Josh Starmer and Luis Serrano (two of the best ML educators I know) in a YouTube livestream, answering viewer questions, at 11:00am EDT Thursday (tomorrow/today). 8am PDT, 3pm UTC, 5pm CEST m.youtube.com/live/Yx-ZkLf...
m.youtube.com
TRIPLE BAM!!! With Josh, Luis and special guest Brandon Rohrer
YouTube video by StatQuest with Josh Starmer
021
Brandon Rohrer @brandonrohrer.com · 11/08/2026
@ellecordova.bsky.social is a wonder. If you'd like to tell her so, pop over to Patreon and buy her a coffee. www.patreon.com/cw/ellecordova
patreon.com
Elle Cordova — Reading science fiction and creating videos, songs, and poems
Get more from Elle Cordova on Patreon. Reading science fiction and creating videos, songs, and poems. Support Elle Cordova and get exclusive access to their work.
010
Brandon Rohrer @brandonrohrer.com · 10/08/2026
I steer them away from false positives with a variation of additive smoothing that includes a strong upward bias. P(AB|A) = count(AB) + beta / count(A) + beta Whether this is a "hack" or a "method" will depend on how important it ends up being in the proofreader's performance.
010
Brandon Rohrer @brandonrohrer.com · 10/08/2026
My Artisanal Language Model for proofreading continues to evolve. Pairing forward and backward first-order Markov models is proving to be just good enough to merit further exploration. brandonrohrer.com/alms_composi...
five plots showing five different proofreading evaluation scores: capitalization, grammar, missing words, punctuation, spelling. In each case, as the error threshold for identifying a proofreading error increases from 1e-5 to 1e-2, precision drops from 100% to very small and recall rises from very small to 100%. The crossover point tends to be in the 30-40% range at around 0.0002
110
Brandon Rohrer @brandonrohrer.com · 09/08/2026
I wish I did! Leaving this thread open in case anyone else has a rec
010
Brandon Rohrer @brandonrohrer.com · 09/08/2026
I can't put my finger on what exactly causes it, but I breathe deeper and my shoulders relax when I use it
000
Brandon Rohrer @brandonrohrer.com · 08/08/2026
Perfect for sitting down with a hot beverage for a few minutes a day and letting the current flow around you. (No promotional consideration here. I paid full price and I regret nothing.)
000
Brandon Rohrer @brandonrohrer.com · 08/08/2026
RSS is the vinyl records of the web. And the Current RSS reader is the $5000 turntable whose clean design matches the medium. Except it’s only $10. www.currentreader.app Built by one designer with a vision ( @terrygodier.com ), Current shows what the web can be.
currentreader.app
Current - A River of Reading
Current rethinks RSS for the modern reader. Your feeds flow like a river. No inbox anxiety, no unread counts. Just beautiful reading.
370
Brandon Rohrer @brandonrohrer.com · 07/08/2026
It's primary season Boston
000
Brandon Rohrer @brandonrohrer.com · 04/08/2026
Find and replace all occurrences of a string in a directory's Python files sed -i '.bak' -e 's/old string/new string/g' *.py To drill deeper on any of these run man <command>. I find the examples section at the end most helpful. I'm compiling a list of these here brandonrohrer.org/shell_tricks...
brandonrohrer.org
There are several command line incantations that I have had to look up at least a dozen times. I'm compiling a handy cheat sheet of them here.
020
Brandon Rohrer @brandonrohrer.com · 04/08/2026
There are several command line incantations that I have had to look up at least a dozen times. Finding a string in Python files grep -r --include \*.py 'string I am looking for' . Find files by name find . -name '*partial_name*'
110
Reposted by Brandon Rohrer
valyriansteelers.bsky.social @valyriansteelers.bsky.social · 27/07/2026
Listening to the Dungeon Crawler Carl books with Soundbooth Theater leads to really long walks because I can't stop listening. They are a blast!
041
Brandon Rohrer @brandonrohrer.com · 26/07/2026
If you want to avoid this you can pin your ruff version to 0.15.22. And for those who track such things, the last ruff release (Mar 12) before the OpenAI acquisition announcement (Mar 19) was 0.15.6
000
Brandon Rohrer @brandonrohrer.com · 26/07/2026
Heads up ruff users - with the release of 0.16.0 this week the number of default rules went up from 59 to to 413. This means that if you're ruff version auto updates, your CI pipelines might start failing on you all of a sudden.
143
Brandon Rohrer @brandonrohrer.com · 25/07/2026
Living small is part of the artisanal process. The constraints are not a barrier to the final product. They are an important shaping force. You can't come in at the end and magically shrink it. You can only build small if you start small and work with what you've got as you go. brandonrohrer.org
Book Project: Artisanal Language Models
Chapter 1: Artisanal Language Models
Chapter 2: Build a custom tokenizer
Chapter 3: Define a task and write evals
Chapter 4: Build an end-to-end prototype
Chapter 5: ALM v2, First-order Markov model
Chapter 6: ALM v3, Second-order Markov model
Chapter 7: ALM v6, Sparse second-order Markov model
Chapter 8: ALM v14, The Search for Data
162
Brandon Rohrer @brandonrohrer.com · 23/07/2026
I've had SO much fun with these. Waiting eagerly for Book 9. And if you really want to treat yourself, check out the Soundbooth Theater audio books. Absolutely top shelf entertainment. soundbooththeater.com/series/dunge...
soundbooththeater.com
Dungeon Crawler Carl - Soundbooth Theater
Dungeon Crawler Carl is the lastest audiobook series from author Matt Dinniman. Narration provided by Jeff Hays.
130
Brandon Rohrer @brandonrohrer.com · 21/07/2026
Artisanal Language Models take a step closer to being able to do proofreading. Trained and hosted on an old Mac. These are small but mighty. Kind of. Aspirationally mighty, at least. brandonrohrer.org/alms_data.html
brandonrohrer.org
It took a little time to figure out how to properly download Project Gutenberg texts at scale, but I finally set up three new training corpuses:
011
Brandon Rohrer @brandonrohrer.com · 08/07/2026
the biggest difference I've noticed between data scientists and machine learning engineers is that MLEs will do absolutely anything to avoid looking at their data
1112
Brandon Rohrer @brandonrohrer.com · 30/06/2026
that's a hell of a deep cut
030
Brandon Rohrer @brandonrohrer.com · 28/06/2026
don't touch those! those are my emotional support patreons!
020