Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion sdks/python/apache_beam/options/pipeline_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -1798,7 +1798,10 @@ def _handle_load_main_session(self, validator):
# save_main_session default to False for dill, while default to true
# for cloudpickle
pickle_library = getattr(self, 'pickle_library')
if pickle_library in ['default', 'cloudpickle']:
if pickle_library == 'default':
from apache_beam.internal.pickler import DEFAULT_PICKLE_LIB
pickle_library = DEFAULT_PICKLE_LIB
if pickle_library == 'cloudpickle':
Copy link
Collaborator

@claudevdm claudevdm Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we only set save_main_session=True only if save_main_session is None, pickle_library = cloudpickle and is_service_runner=True?

setattr(self, 'save_main_session', True)
else:
setattr(self, 'save_main_session', False)
Expand Down
Loading