Beam includes a concurrency-safe distributed map, accessible both locally and within remote containers. Serialization is done using cloudpickle, so any pickleable object will work. The interface is that of a standard python dictionary, but unlike a typical dicitonary it will persist between runs.Documentation Index
Fetch the complete documentation index at: https://docs.beam.cloud/llms.txt
Use this file to discover all available pages before exploring further.
Example: Accessing a map locally and remotely
In the following example, we create a distributed map. Our first function is invoked remotely using.remote(), and it sets the value a key in our map. The second function is invoked locally using .local(), and it sets another value. Finally, we print the result of our third, remotely invoked function, which retrieves the values we just set.
python app.py. The output will be: