Back to News for Developers

ELI5: Bento - Interactive Notebook that Empowers Development Collaboration & Best Practices

September 20, 2021ByJessica Lin

In this series, we discuss a lot of open source projects; however, today will be slightly different. We will be learning about Bento, a project built off of the open source project Jupyter and is now used internally at Facebook to help data scientists and ML engineers share code and collaborate interactively.

In this blog post, we explain Bento in a way that is simple to understand (or as it’s commonly known online, ELI5. If you're interested in learning by watching or listening, check out the linked video about Bento on our Facebook Open Source Youtube channel.

What is Bento?

Before we can understand Bento, we need to understand “what is Jupyter?” Jupyter notebooks are an open source web tool that is commonly used by data scientists and machine learning engineers to create and share documents that contain live code, equations, visualizations and narrative text - similar to how you might use Google docs to share your document and collaborate with your peers.

Examples of Jupyter Notebooks. Image source

While Jupyter is great at sharing code and documents, and was used widely at Facebook, our teams realized that there was a need to customize Jupyter to better integrate into the Facebook stack as well as improve the authoring experience. Doing so could drastically improve the experience of using this tool, improve code quality and nudge best practices.

By authoring experiences, we mean adding in features that are common in most other IDEs such as linters, formatters and code autocompletion. And integrating Bento directly into Facebook’s stack helps teams more easily and safely build, share and review their work -- be it better integration with other data tools at Facebook, more consistency with other internal tools, or stronger privacy standards safeguarding data analysis.

And thus, in 2017, Bento was born! The name Bento references a Bento box because it brings in analytics and machine learning all together in a “box”.

Bento is the officially supported way of using Jupyter notebooks at Facebook. You can share documents containing live code, equations, visualizations and text. It bundles together popular external libraries for the scientific Python data stack such as numpy, pandas as well as many internal libraries for data analysis.

Notebooks have been a great innovation, especially for the data science and machine learning community to be able to rapidly write, iterate and improve code. Improving the authoring experience by adding these features improves productivity, quickly helping users catch and identify bugs or code issues, saving a developer’s sanity.

Where is Bento used?

As of 2020, there are almost 9,000 data developers using Bento each month at Facebook.

Inside Facebook, Bento users are diverse. For example, non-technical roles comment in notebooks to provide feedback, machine learning scientists use it to test models for fairness and threat investigators use it to manage records of their response work.

As of the making of this blog, Bento is not yet open sourced, but our teams are exploring the possibility of doing so, particularly with the assistive authoring platform that we’ve built to make writing code faster and easier in Bento.

Where can I learn more?

Want more info on Bento? Check out this video from Tanya Rai (PM at Facebook) for an overview of Bento.

About the ELI5 series

In a series of short videos, one of our Developer Advocates on the Facebook Open Source team explains a Facebook open source related project in a way that is easy to understand and use.

We will write an accompanying blog post (like the one you're reading right now) for each of these videos, which you can find on our Youtube channel.

To learn more about Facebook Open Source, visit our open source site, subscribe to our Youtube channel, or follow us on Twitter and Facebook.

Interested in working with open source at Facebook? Check out our open source-related job postings on our career page by taking this quick survey.