News for hackers. Stuff that matters.
Re:Deep learning experiments in OCaml by nnq on Friday September 21, 2018 @10:54AM (#18040119)
> You'd be a moron to pass an argument of a different type 'a couple of hours' into the training

Huh?! At least in non-ML code this happens all the time, data fetched by whatever thinggie that uses zillion chained libraries of code nobody has time to audit, comes in hours or days late in a long running service blowing it up... eg. "oops, point.x is now no longer and integer but more like a map[ErrorObject->vector[int]]" bc something blew up in a very unexpected way in some other nodejs code light years away from the business logic you hold in your head... (yeah, the service gets restarted, but at some point some data that should have been saved in the DB hasn't been am may need to be recovered manually from some obscure log if even recoverable)

Re:Deep learning experiments in OCaml by gaius on Friday September 21, 2018 @02:43PM (#18041760)
in some other nodejs code

ML/DL is nothing at all like webdev :-) but these days you can compile OCaml to JavaScript if you want, I encourage you to check it out

Re:Deep learning experiments in OCaml by deepGem on Friday September 21, 2018 @11:08AM (#18040232)
Yeah I should have been more explicit that this comment is in reference to ML code. Training is nothing but a loop so its unlikely you pass type A in iteration 1 and type B in iteration 200. If that happens most likely your training data is messed up and type safety cannot help you as you would have compiled and tested for type A.
Re:Deep learning experiments in OCaml by mlthoughts2018 on Friday September 21, 2018 @11:11AM (#18040262)
You could also have a complex training job that trains a shallow model for a while, then uses it to train a deeper model, or extract an embedding from some layer and train a classical prediction model that uses the embedding as the feature vector.

But the point is that the right way to ensure safety is with realistic fixture-based integration testing. That’s not what static typing is for in that type of use case and is not a de facto benefit of static typing.