metaflow icon indicating copy to clipboard operation
metaflow copied to clipboard

Expose logConfiguration options for jobs running on AWS Batch

Open corleyma opened this issue 4 years ago • 3 comments

By default, AWS Batch uses the awslogs log driver to ship logs for a job container to AWS CloudWatch. However, this behavior is configurable, and even the awslogs driver itself has configurability that may be of interest to Metaflow users.

Example motivating usecases:

  • specifying the log group or stream prefix may be useful for organizations that have schemes dictating how logs are collected in CloudWatch
  • users of the Python standard logging library may benefit from the ability to configure multi-line pattern matching to ensure tracebacks and other multi-line log messages are interpreted as single events in CloudWatch.

The ask here is to expose awslogs logging config options, preferably in two ways:

  1. as properties settable per step when using the @batch decorator
  2. and, as is the case for other Batch configuration, as defaults in the Metaflow config profile.

Because Metaflow currently has an implicit dependency on logs making their way to CloudWatch, allowing users to specify log drivers other than awslogs may not be feasible today. Still, this is something worth thinking about for the future.

corleyma avatar Apr 07 '21 05:04 corleyma

Makes total sense. We can add this functionality in after we have published #449.

savingoyal avatar Apr 07 '21 18:04 savingoyal

https://github.com/Netflix/metaflow/pull/1767 offers it as properties settable per step when using the @batch decorator. Should we close this?

mt-ob avatar Mar 20 '24 21:03 mt-ob

Let's leave it open for now as there is still the other use case that is missing

  • Being able to configure defaults for the logging through Metaflow profile (or env variables set by the exec platform)

saikonen avatar Mar 21 '24 13:03 saikonen