2 months ago
Wed Nov 27, 2024 4:15pm PST
Show HN: Labfile, a declarative file format for orchestrating experiments
Hi friends.

I used to be a software architect/technical founder, but now I'm doing a PhD in neuroscience. One big culture shock was that much of computational science is still imperative, while software engineering shifted to declarative tools decades ago.

Many scientists (myself included) run Python scripts manually and track the inter-dependencies in their heads - often running scripts in the wrong order and getting silently incorrect results (leading to Nature papers).

This problem seems similar to managing infrastructure with Terraform or building an image with Dockerfile directives, so I've started sketching out a declarative file format for defining experiments, their hyperparameters, and their relationships.

https://github.com/FlywheelHQ/labfile

My hope is to change this workflow:

```bash

$ python script1.py ...

$ python script3.py <--- fuck, forgot to re-run script 2 ...

$ python script2.py ...

$ python script3.py ...

```

into this

```bash

$ lab Labfile

Using cached results for Exp1.

Running Exp2... Done.

Running Exp3... Done.

```

This library is just a parser, but I'm working on an orchestrator and will share it soon.

I would appreciate feedback on the syntax (I'm sure it sucks), and thoughts on what kinds of tooling could be built on top of a file format like this. I'd also like contributors (soon).

Side note: You might have noticed it's published under "Flywheel". This is a org I started recently with my friend, hoping to create the missing incentives for talented builders to work on tools for science - an often overlooked part of the tech ecosystem. That includes policy change (in the UK), funding, education, and some other things. I don't know what Flywheel is yet (non-profit? OSS collective? a fund of some sort?) since it's very new, but we have a website: https://flywhl.dev.

read article
comments:
add comment
loading comments...