metaflow icon indicating copy to clipboard operation
metaflow copied to clipboard

Inconsistent logging with batch

Open romain-intel opened this issue 4 years ago • 1 comments

Logging when executing on batch is somewhat inconsistent. When executing a simple task, this is what prints out:

2021-06-28 14:36:45.432 [7637/hello/92219 (pid 66823)] Task is starting.
2021-06-28 14:36:46.411 [7637/hello/92219 (pid 66823)] [24616654-4aca-42ad-9d86-c1133f519cb9] Task is starting (status SUBMITTED)...
2021-06-28 14:36:48.560 [7637/hello/92219 (pid 66823)] [24616654-4aca-42ad-9d86-c1133f519cb9] Task is starting (status RUNNABLE)...
2021-06-28 14:36:51.821 [7637/hello/92219 (pid 66823)] [24616654-4aca-42ad-9d86-c1133f519cb9] Task is starting (status STARTING)...
2021-06-28 14:37:11.387 [7637/hello/92219 (pid 66823)] [24616654-4aca-42ad-9d86-c1133f519cb9] Task is starting (status RUNNING)...
2021-06-28 14:37:10.625 [7637/hello/92219 (pid 66823)] [24616654-4aca-42ad-9d86-c1133f519cb9] Setting up task environment.
2021-06-28 14:37:19.546 [7637/hello/92219 (pid 66823)] [24616654-4aca-42ad-9d86-c1133f519cb9] Downloading code package...
2021-06-28 14:37:20.146 [7637/hello/92219 (pid 66823)] [24616654-4aca-42ad-9d86-c1133f519cb9] Code package downloaded.
2021-06-28 14:37:20.156 [7637/hello/92219 (pid 66823)] [24616654-4aca-42ad-9d86-c1133f519cb9] Task is starting.
2021-06-28 14:37:21.016 [7637/hello/92219 (pid 66823)] [24616654-4aca-42ad-9d86-c1133f519cb9] Metaflow says: Hi from AWS!
2021-06-28 14:37:24.257 [7637/hello/92219 (pid 66823)] [24616654-4aca-42ad-9d86-c1133f519cb9] Task finished with exit code 0.
2021-06-28 14:37:25.014 [7637/hello/92219 (pid 66823)] Task finished successfully.

Extracting the logs using the client shows this:

'[24616654-4aca-42ad-9d86-c1133f519cb9] Task is starting (status SUBMITTED)...\n[24616654-4aca-42ad-9d86-c1133f519cb9] Task is starting (status RUNNABLE)...\n[24616654-4aca-42ad-9d86-c1133f519cb9] Task is starting (status STARTING)...\nSetting up task environment.\n[24616654-4aca-42ad-9d86-c1133f519cb9] Task is starting (status RUNNING)...\nDownloading code package...\nCode package downloaded.\nTask is starting.\nMetaflow says: Hi from AWS!\n[24616654-4aca-42ad-9d86-c1133f519cb9] Task finished with exit code 0.\n'

In the UI, the batch ID is printed on every line (the [24616654-...] portion) but it is only present on some of the lines when extracting the log using the client.

romain-intel avatar Jun 28 '21 21:06 romain-intel

related to #550

savingoyal avatar Apr 12 '22 00:04 savingoyal