keepsake icon indicating copy to clipboard operation
keepsake copied to clipboard

Document how to integrate Replicate with configuration libraries

Open bfirsh opened this issue 5 years ago • 1 comments

Replicate is intentionally not opinionated about how you specific and store hyperparams. It just records a dict that can come from any source (CLI arguments, training platform library, configuration library, etc). And, if that system stores params in a file, Replicate can record that file too.

However, just using CLI arguments as suggested in the tutorial doesn't scale very well. Libraries such as gin, Omega, Spock, etc, make this much more organized and scalable.

We should document how to use these libraries with Replicate.

Future

At some point this we might want to integrate this sort of thing with Replicate, or integrate deeply with another library. This will make it possible to do things like automatically reproducing an experiment.

See also

  • https://github.com/replicate/replicate/discussions/415

bfirsh avatar Jan 12 '21 19:01 bfirsh

From #415

Something I think that would be great is some lightweight documentation showing how to integrate Replicate with configuration libraries. I've created an issue to track that. If you wanted to help out with that, that would be amazing!

I can absolutely help with this. Should be quite simple seeing that since Replicate isn't opinionated at all and the default is to stuff it all in a dictionary. I know that both Spock and OmegaConf return the configurations as a derived class of the standard library Namespace which can easily be converted to a dictionary (seeing as I'm the author of Spock I know the conversion to dict is already natively built into the API docs).

Seems like a good place to start by showing an example that integrates Spock or OmegaConf natively within the Python code and then just dumping/converting the configuration to a dict to shim it into the Replicate API...

ncilfone avatar Jan 14 '21 15:01 ncilfone