anishmehta24 commented on code in PR #40165:
URL: https://github.com/apache/beam/pull/40165#discussion_r4129730465


##########
sdks/python/apache_beam/metrics/metric.py:
##########
@@ -46,18 +47,76 @@
 from apache_beam.metrics.metricbase import Histogram
 from apache_beam.metrics.metricbase import MetricName
 from apache_beam.metrics.metricbase import StringSet
+from apache_beam.options.pipeline_options import DebugOptions
 
 if TYPE_CHECKING:
   from apache_beam.internal.metrics.metric import MetricLogger
   from apache_beam.metrics.execution import MetricKey
   from apache_beam.metrics.metricbase import Metric
+  from apache_beam.options.pipeline_options import PipelineOptions
   from apache_beam.utils.histogram import BucketType
 
 __all__ = ['Metrics', 'MetricsFilter', 'Lineage']
 
 _LOGGER = logging.getLogger(__name__)
 
 
+class MetricsFlag(object):

Review Comment:
   Thanks, that makes sense. I moved the flag logic into a new 
metrics/metrics_flag.py whose only module-level import is cells, and 
DebugOptions is now imported inside set_default_pipeline_options. execution.py 
reads the disabled cell types straight from metrics_flag, so metric.py no 
longer imports execution or options and is back to what's on master.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to