title: Beam/Dataflow: No session file found: /var/opt/google/dataflow/pickled_main_session
body: <p>When using Apache Beam (GCP Dataflow) I see the following warning in worker logs:</p>
  <blockquote>
  <p>No session file found: /var/opt/google/dataflow/pickled_main_session.
  Functions defined in __main__ (interactive session) may fail.</p>
  </blockquote>
  <p>My Dataflow job seems to be fine regardless, but I'm wondering what this warning is all about.</p>
  <p>I have seen the following in some sample code (which I am NOT currently doing):</p>
  <pre><code>pipeline_options.view_as(SetupOptions).save_main_session = True
  </code></pre>
  <p>where <code>pipeline_options</code> is the main way of specifying options for the Beam/Dataflow pipeline, as in the following later in the code:</p>
  <pre><code>with beam.Pipeline(options=pipeline_options) as p:
      # actual pipeline code here
  </code></pre>
  <p>I am curious if the two are related. Does the presence of the warning mean I should always be saving the main session? Are these two things related? Unrelated?</p>