726 karma · joined October 19, 2016
Fmr: YC W24, AI researcher at FAIR, Autopilot ML engineer at Tesla FSD
Personal website: https://ben.bolte.cc/
Example: One pattern (which I don't think a lot of people are familiar with?) that I started adopting recently is the use of `Literal` for type-checking strings. For example, instead of something like
(on closer reading I realized this was in the blog post as well, but I suspect maybe some ML people will have seen this specific case before)
class ActivationType(enum.Enum):
sigmoid = "sigmoid"
tanh = "tanh"
def get_activation(key: str | ActivationType) -> nn.Module:
key = ActivationType[key]
if key == ActivationType.sigmoid:
return nn.Sigmoid()
if key == ActivationType.tanh:
return nn.Tanh()
raise KeyError(key)
you can do something like this instead: from typing import Literal
ActivationType = Literal["sigmoid", "tanh"]
def get_activation(key: ActivationType) -> nn.Module:
if key == "sigmoid":
return nn.Sigmoid()
if key == "tanh":
return nn.Tanh()
raise KeyError(key)
The advantage is that you can do something like act = get_activation("tahn")
and Mypy will show an error for your typo (instead of having to run your code and eventually hit the `KeyError`). So if you're just trying to quickly implement an idea, you don't have to kill brain cells searching for typos.Of course, doesn't make a difference if your coworkers all use Vim and Emacs with no extensions...
Also this sounds like the “no true Scotsman” thing. Some of the people in the zone were self described anarchists, they were setting up co ops and volunteer medical services, and if it had succeeded (meaning, not been overrun by violent crime) I’m sure people would have pointed to it as a model of anarchist principles in action.
Wikipedia: https://en.m.wikipedia.org/wiki/Capitol_Hill_Occupied_Protes...
Example: My wife is in surgery, and has told me how surgical tools often come billed as a set. Rather than being able to bill for a single tool, if an operation requires another duplicate of the same tool the surgeon will often just open an entire new set.
Another example: In college I build a tDCS machine [1] for about $20. I knew a doctor from the VA who was working in the area who showed me one with essentially the same circuit which sold for $80,000 - essentially for the stamp of approval from the FDA to use it in a clinical research setting.
There are reasonable-sounding explanations for both things I guess, but the obvious consequence is that the number of people able to receive care is dramatically lower. I feel like there are probably similar analogies in technology, but maybe they are more easily disrupted because of lower regulatory barriers.
[1] https://www.hopkinsmedicine.org/psychiatry/specialty_areas/b...
[0] https://freakonomics.com/2005/05/abortion-and-crime-who-shou...
[1] https://freakonomics.com/podcast/abortion-and-crime-revisite...
Anecdotally, my wife is applying for surgical medical residencies, a field which generally attracts intelligent, ambitious individuals. The whole system seems downright hostile to having children. It obviously wasn't designed with women in mind, and the entire system has been intentionally ossified to prevent it from responding to the desires of residents, for the benefit of attending physicians. I imagine there are a large number of similar industries. This has definitely impacted our plans for children, and it wouldn't be an issue if she were considering a less competitive specialty. In fact, it seems that the very selectivity which ensures that the program is filled with intelligent people is used as justification for intense hours and lack of maternal support.
In my opinion this is the sort of externality that would benefit from government intervention in some way. However, I don't think financial support would be very good at targeting such cases. I think the reason that tech companies have done a better job of providing child care support is that the field doesn't have the same sorts of institutional barriers to responding to employee demands that medicine does - specifically demand by employees in their prime child-rearing ages.
Regarding Amazon, Uber and other "instant employment" type companies - it's a weird world, where you can basically get automatically hired and fired by an algorithm. It creates, in theory, full employment (although not very good employment, at least right now) and gives workers more leverage if they want to quit another job, but also more instability if the rules for the new job aren't made clear or are applied arbitrarily. It also feels like we're in a very nascent stage for this. Maybe this could be done better - it seems like an area that is ripe for disruption.