Skip to content

Commit 75ff4a3

Browse files
committed
logger for load process from context
1 parent c3f0995 commit 75ff4a3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/plumpy/processes.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,15 +285,20 @@ def recreate_from(
285285
if 'loop' in load_context:
286286
proc._loop = load_context.loop
287287
else:
288+
_LOGGER.warning(f'cannot find `loop` store in load_context, use default event loop')
288289
proc._loop = asyncio.get_event_loop()
289290

290291
proc._state = proc.recreate_state(saved_state['_state'])
291292

292-
if 'communicator' in load_context:
293+
if 'coordinator' in load_context:
293294
proc._coordinator = load_context.coordinator
295+
else:
296+
_LOGGER.warning(f'cannot find `coordinator` store in load_context')
294297

295298
if 'logger' in load_context:
296299
proc._logger = load_context.logger
300+
else:
301+
_LOGGER.warning(f'cannot find `logger` store in load_context')
297302

298303
# Need to call this here as things downstream may rely on us having the runtime variable above
299304
persistence.load_auto_persist_params(proc, saved_state, load_context)

0 commit comments

Comments
 (0)