class_docstr: Singleton for shared Dataset resources and configurations.
  
  This object is automatically propagated to workers and can be retrieved
  from the driver and remote workers via DataContext.get_current().
docstr: Private constructor (use get_current() instead).
docstr_tok: ["Private","constructor","(","use","get_current","(",")","instead",")","."]
code: def __init__(
      self,
      target_max_block_size: int,
      target_shuffle_max_block_size: int,
      target_min_block_size: int,
      streaming_read_buffer_size: int,
      enable_pandas_block: bool,
      optimize_fuse_stages: bool,
      optimize_fuse_read_stages: bool,
      optimize_fuse_shuffle_stages: bool,
      optimize_reorder_stages: bool,
      actor_prefetcher_enabled: bool,
      use_push_based_shuffle: bool,
      pipeline_push_based_shuffle_reduce_tasks: bool,
      scheduling_strategy: SchedulingStrategyT,
      scheduling_strategy_large_args: SchedulingStrategyT,
      large_args_threshold: int,
      use_polars: bool,
      new_execution_backend: bool,
      use_streaming_executor: bool,
      eager_free: bool,
      decoding_size_estimation: bool,
      min_parallelism: bool,
      enable_tensor_extension_casting: bool,
      enable_auto_log_stats: bool,
      trace_allocations: bool,
      optimizer_enabled: bool,
      execution_options: "ExecutionOptions",
      use_ray_tqdm: bool,
      enable_progress_bars: bool,
      enable_get_object_locations_for_metrics: bool,
      use_runtime_metrics_scheduling: bool,
      write_file_retry_on_errors: List[str],
  ):
      """Private constructor (use get_current() instead)."""
      self.target_max_block_size = target_max_block_size
      self.target_shuffle_max_block_size = target_shuffle_max_block_size
      self.target_min_block_size = target_min_block_size
      self.streaming_read_buffer_size = streaming_read_buffer_size
      self.enable_pandas_block = enable_pandas_block
      self.optimize_fuse_stages = optimize_fuse_stages
      self.optimize_fuse_read_stages = optimize_fuse_read_stages
      self.optimize_fuse_shuffle_stages = optimize_fuse_shuffle_stages
      self.optimize_reorder_stages = optimize_reorder_stages
      self.actor_prefetcher_enabled = actor_prefetcher_enabled
      self.use_push_based_shuffle = use_push_based_shuffle
      self.pipeline_push_based_shuffle_reduce_tasks = (
          pipeline_push_based_shuffle_reduce_tasks
      )
      self.scheduling_strategy = scheduling_strategy
      self.scheduling_strategy_large_args = (
          scheduling_strategy_large_args
      )
      self.large_args_threshold = large_args_threshold
      self.use_polars = use_polars
      self.new_execution_backend = new_execution_backend
      self.use_streaming_executor = use_streaming_executor
      self.eager_free = eager_free
      self.decoding_size_estimation = decoding_size_estimation
      self.min_parallelism = min_parallelism
      self.enable_tensor_extension_casting = (
          enable_tensor_extension_casting
      )
      self.enable_auto_log_stats = enable_auto_log_stats
      self.trace_allocations = trace_allocations
      self.optimizer_enabled = optimizer_enabled
      # TODO: expose execution options in Dataset public APIs.
      self.execution_options = execution_options
      self.use_ray_tqdm = use_ray_tqdm
      self.enable_progress_bars = enable_progress_bars
      self.enable_get_object_locations_for_metrics = (
          enable_get_object_locations_for_metrics
      )
      self.use_runtime_metrics_scheduling = (
          use_runtime_metrics_scheduling
      )
      self.write_file_retry_on_errors = write_file_retry_on_errors
      # The additonal ray remote args that should be added to
      # the task-pool-based data tasks.
      self._task_pool_data_task_remote_args: Dict[str, Any] = {}
      # Max number of blocks that are allowed to have errors, unlimited if negative.
      # This option allows application-level exceptions in block processing tasks.
      # These exceptions may be caused by UDFs (e.g., due to corrupted data samples)
      # or IO errors.
      # Data in the failed blocks will be dropped.
      # This option can be useful to prevent a long-running job from failing due to
      # a small number of bad blocks.
      self.max_errored_blocks = 0
      # The extra key-value style configs.
      # These configs are managed by individual components or plugins via
      # `set_config`, `get_config` and `remove_config`.
      # The reason why we use a dict instead of individual fields is to decouple
      # the DataContext from the plugin implementations, as well as to avoid
      # circular dependencies.
      self._kv_configs: Dict[str, Any] = {}
  
file_path: ray/python/ray/data/context.py
imports: import os
  import threading
  from typing import TYPE_CHECKING, Any, Dict, List, Optional
  import ray
  from ray._private.ray_constants import env_integer
  from ray.util.annotations import DeveloperAPI
  from ray.util.scheduling_strategies import SchedulingStrategyT
label_desc: Use image node_id 1 to create a new DataContext object  with example: obj = DataContext(target_max_block_size, target_shuffle_max_block_size, target_min_block_size, streaming_read_buffer_size, enable_pandas_block, optimize_fuse_stages, optimize_fuse_read_stages, optimize_fuse_shuffle_stages, optimize_reorder_stages, actor_prefetcher_enabled, use_push_based_shuffle, pipeline_push_based_shuffle_reduce_tasks, scheduling_strategy, scheduling_strategy_large_args, large_args_threshold, use_polars, new_execution_backend, use_streaming_executor, eager_free, decoding_size_estimation, min_parallelism, enable_tensor_extension_casting, enable_auto_log_stats, trace_allocations, optimizer_enabled, execution_options, use_ray_tqdm, enable_progress_bars, enable_get_object_locations_for_metrics, use_runtime_metrics_scheduling, write_file_retry_on_errors)