class_docstr: Tflex component execution environment.
class_docstr_tok: ["Tflex","component","execution","environment","."]
code: def __init__(
      self,
      *,
      execution_info: data_types.ExecutionInfo,
      executor_spec: Optional[message.Message] = None,
      platform_config: Optional[message.Message] = None,
      pipeline_platform_config: Optional[message.Message] = None,
  ):
      super().__init__()
  
      self._module = module.DependencyModule()
  
      self._module.provide_value(value=execution_info)
      names = {
          *execution_info.input_dict,
          *execution_info.output_dict,
          *execution_info.exec_properties,
      }
      self._module.add_provider(
          di_providers.FlatExecutionInfoProvider(names)
      )
  
      # TODO(wssong): Change this to provide_class(context.ExecutionContext)
      # after wiring executor_spec, platform_config, and pipeline_platform_config
      # with concrete types (not message.Message) to be used for the
      # module.match() function.
      execution_context = context.ExecutionContext(
          exec_info=execution_info,
          executor_spec=executor_spec,
          platform_config=platform_config,
          pipeline_platform_config=pipeline_platform_config,
      )
      self._module.provide_value(execution_context)
  
file_path: tfx/tfx/orchestration/portable/execution_environ.py
imports: import contextlib
  from typing import Optional, Type, TypeVar
  from tfx.orchestration.portable import data_types
  from tfx.orchestration.portable.execution import di_providers
  from tfx.orchestration.portable.execution import context
  from tfx.utils.di import module
  from google.protobuf import message
label_desc: Use image node_id 1 to create a new Environ object from inherited base classes: contextlib with example: obj = Environ()