Facebook’s Hydra aims to simplify Python development

Open source framework replaces boilerplate code in complex apps with the ability to compose and override configurations

Credit: ID 117583330 © Tampatra1 | Dreamstime.com

Aiming to reduce the need for boilerplate code and speed up the development of complex Python applications, Facebook Engineering has created an open source framework called Hydra. Hydra allows developers to “compose” the configurations of applications from the command line or from configuration files. 

Facebook says Hydra offers a flexible approach to developing and maintaining code and configurations, thus speeding up the development of complex applications in fields such as machine learning research. Offered under an MIT license, Hydra lets developers compose and override configurations.

Other promised benefits of Hydra include:

  • Making it easier to add functionality to projects for new use cases and requirements with no need to rewrite significant portions of code.
  • A reduction in the need for some boilerplate code common in complex applications, such as manipulating configuration files, configuration logging, and defining command-line flags.

With Hydra, changes to a composition can be done through configuration files or from the command line. This addresses issues that can arise when modifying a config, such as maintaining slightly different copies of a configuration or adding logic to override configuration values. Configuration can be composed and overridden just prior to running the application. Dynamic command-line tab completion assists developers with discoverability of complex configurations and reduces errors. Applications can be launched locally or remotely, enabling users to take advantage of more local resources.

Facebook engineers use Hydra for prototyping complex research projects. It has a pluggable architecture for adding new features in the future, whether internally from Facebook or from the community. Future plug-ins are planned that will enable the launching of code from Amazon Web Services or other clouds via the command line.

Where to download Hydra

You can download Hydra from GitHub.

Join the newsletter!

Or

Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

Tags FacebookpythonHydra

More about AmazonAmazon Web ServicesFacebookGitHubMIT

Show Comments
[]