class_docstr: Pipeline for value-guided sampling from a diffusion model trained to predict sequences of states.
  
  This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods
  implemented for all pipelines (downloading, saving, running on a particular device, etc.).
  
  Parameters:
      value_function ([`UNet1DModel`]):
          A specialized UNet for fine-tuning trajectories base on reward.
      unet ([`UNet1DModel`]):
          UNet architecture to denoise the encoded trajectories.
      scheduler ([`SchedulerMixin`]):
          A scheduler to be used in combination with `unet` to denoise the encoded trajectories. Default for this
          application is [`DDPMScheduler`].
      env ():
          An environment following the OpenAI gym API to act in. For now only Hopper has pretrained models.
code: def __init__(
      self,
      value_function: UNet1DModel,
      unet: UNet1DModel,
      scheduler: DDPMScheduler,
      env,
  ):
      super().__init__()
  
      self.register_modules(
          value_function=value_function,
          unet=unet,
          scheduler=scheduler,
          env=env,
      )
  
      self.data = env.get_dataset()
      self.means = {}
      for key in self.data.keys():
          try:
              self.means[key] = self.data[key].mean()
          except:  # noqa: E722
              pass
      self.stds = {}
      for key in self.data.keys():
          try:
              self.stds[key] = self.data[key].std()
          except:  # noqa: E722
              pass
      self.state_dim = env.observation_space.shape[0]
      self.action_dim = env.action_space.shape[0]
  
file_path: diffusers/src/diffusers/experimental/rl/value_guided_sampling.py
imports: import numpy
  import torch
  import tqdm
  from ...models.unet_1d import UNet1DModel
  from ...pipelines import DiffusionPipeline
  from ...utils.dummy_pt_objects import DDPMScheduler
  from ...utils.torch_utils import randn_tensor
label_desc: Use image node_id 1 to create a new ValueGuidedRLPipeline object from inherited base classes: DiffusionPipeline with example: obj = ValueGuidedRLPipeline(value_function, unet, scheduler, env)