rllib/agents/trainer_config.py
def offline_data(
        self,
        *,
        input_=None,
        input_config=None,
        actions_in_input_normalized=None,
        input_evaluation=None,
        postprocess_inputs=None,
        shuffle_buffer_size=None,
        output=None,
        output_config=None,
        output_compress_columns=None,
        output_max_file_size=None,
    ) -> "TrainerConfig":
        """Sets the config's offline data settings.

        Args:
            input_: Specify how to generate experiences:
             - "sampler": Generate experiences via online (env) simulation (default).
             - A local directory or file glob expression (e.g., "/tmp/*.json").
             - A list of individual file paths/URIs (e.g., ["/tmp/1.json",
               "s3://bucket/2.json"]).
             - A dict with string keys and sampling probabilities as values (e.g.,
               {"sampler": 0.4, "/tmp/*.json": 0.4, "s3://bucket/expert.json": 0.2}).
             - A callable that takes an `IOContext` object as only arg and returns a
               ray.rllib.offline.InputReader.
             - A string key that indexes a callable with tune.registry.register_input
            input_config: Arguments accessible from the IOContext for configuring custom
                input.
            actions_in_input_normalized: True, if the actions in a given offline "input"
                are already normalized (between -1.0 and 1.0). This is usually the case
                when the offline file has been generated by another RLlib algorithm
                (e.g. PPO or SAC), while "normalize_actions" was set to True.
            input_evaluation: Specify how to evaluate the current policy. This only has
                an effect when reading offline experiences ("input" is not "sampler").
                Available options:
                - "wis": the weighted step-wise importance sampling estimator.
                - "is": the step-wise importance sampling estimator.
                - "simulation": run the environment in the background, but use
                this data for evaluation only and not for learning.
            postprocess_inputs: Whether to run postprocess_trajectory() on the
                trajectory fragments from offline inputs. Note that postprocessing will
                be done using the *current* policy, not the *behavior* policy, which
                is typically undesirable for on-policy algorithms.
            shuffle_buffer_size: If positive, input batches will be shuffled via a
                sliding window buffer of this number of batches. Use this if the input
                data is not in random enough order. Input is delayed until the shuffle
                buffer is filled.
            output: Specify where experiences should be saved:
                 - None: don't save any experiences
                 - "logdir" to save to the agent log dir
                 - a path/URI to save to a custom output directory (e.g., "s3://bckt/")
                 - a function that returns a rllib.offline.OutputWriter
            output_config: Arguments accessible from the IOContext for configuring
                custom output.
            output_compress_columns: What sample batch columns to LZ4 compress in the
                output data.
            output_max_file_size: Max output file size before rolling over to a
                new file.

        Returns:
            This updated TrainerConfig object.
        """
        if input is not None:
            self.input_ = input_
        if input_config is not None:
            self.input_config = input_config
        if actions_in_input_normalized is not None:
            self.actions_in_input_normalized = actions_in_input_normalized
        if input_evaluation is not None:
            self.input_evaluation = input_evaluation
        if postprocess_inputs is not None:
            self.postprocess_inputs = postprocess_inputs
        if shuffle_buffer_size is not None:
            self.shuffle_buffer_size = shuffle_buffer_size
        if output is not None:
            self.output = output
        if output_config is not None:
            self.output_config = output_config
        if output_compress_columns is not None:
            self.output_compress_columns = output_compress_columns
        if output_max_file_size is not None:
            self.output_max_file_size = output_max_file_size

        return self
Sets the config's offline data settings.

        Args:
            input_: Specify how to generate experiences:
             - "sampler": Generate experiences via online (env) simulation (default).
             - A local directory or file glob expression (e.g., "/tmp/*.json").
             - A list of individual file paths/URIs (e.g., ["/tmp/1.json",
               "s3://bucket/2.json"]).
             - A dict with string keys and sampling probabilities as values (e.g.,
               {"sampler": 0.4, "/tmp/*.json": 0.4, "s3://bucket/expert.json": 0.2}).
             - A callable that takes an `IOContext` object as only arg and returns a
               ray.rllib.offline.InputReader.
             - A string key that indexes a callable with tune.registry.register_input
            input_config: Arguments accessible from the IOContext for configuring custom
                input.
            actions_in_input_normalized: True, if the actions in a given offline "input"
                are already normalized (between -1.0 and 1.0). This is usually the case
                when the offline file has been generated by another RLlib algorithm
                (e.g. PPO or SAC), while "normalize_actions" was set to True.
            input_evaluation: Specify how to evaluate the current policy. This only has
                an effect when reading offline experiences ("input" is not "sampler").
                Available options:
                - "wis": the weighted step-wise importance sampling estimator.
                - "is": the step-wise importance sampling estimator.
                - "simulation": run the environment in the background, but use
                this data for evaluation only and not for learning.
            postprocess_inputs: Whether to run postprocess_trajectory() on the
                trajectory fragments from offline inputs. Note that postprocessing will
                be done using the *current* policy, not the *behavior* policy, which
                is typically undesirable for on-policy algorithms.
            shuffle_buffer_size: If positive, input batches will be shuffled via a
                sliding window buffer of this number of batches. Use this if the input
                data is not in random enough order. Input is delayed until the shuffle
                buffer is filled.
            output: Specify where experiences should be saved:
                 - None: don't save any experiences
                 - "logdir" to save to the agent log dir
                 - a path/URI to save to a custom output directory (e.g., "s3://bckt/")
                 - a function that returns a rllib.offline.OutputWriter
            output_config: Arguments accessible from the IOContext for configuring
                custom output.
            output_compress_columns: What sample batch columns to LZ4 compress in the
                output data.
            output_max_file_size: Max output file size before rolling over to a
                new file.

        Returns:
            This updated TrainerConfig object.
        
Sets the config's offline data settings.
Sets the config ' s offline data settings .
def offline_data(
        self,
        *,
        input_=None,
        input_config=None,
        actions_in_input_normalized=None,
        input_evaluation=None,
        postprocess_inputs=None,
        shuffle_buffer_size=None,
        output=None,
        output_config=None,
        output_compress_columns=None,
        output_max_file_size=None,
    ) -> "TrainerConfig":
        if input is not None:
            self.input_ = input_
        if input_config is not None:
            self.input_config = input_config
        if actions_in_input_normalized is not None:
            self.actions_in_input_normalized = actions_in_input_normalized
        if input_evaluation is not None:
            self.input_evaluation = input_evaluation
        if postprocess_inputs is not None:
            self.postprocess_inputs = postprocess_inputs
        if shuffle_buffer_size is not None:
            self.shuffle_buffer_size = shuffle_buffer_size
        if output is not None:
            self.output = output
        if output_config is not None:
            self.output_config = output_config
        if output_compress_columns is not None:
            self.output_compress_columns = output_compress_columns
        if output_max_file_size is not None:
            self.output_max_file_size = output_max_file_size
        return self
def offline_data ( self , * , input_ = None , input_config = None , actions_in_input_normalized = None , input_evaluation = None , postprocess_inputs = None , shuffle_buffer_size = None , output = None , output_config = None , output_compress_columns = None , output_max_file_size = None , ) -> "TrainerConfig" : if input is not None : self . input_ = input_ if input_config is not None : self . input_config = input_config if actions_in_input_normalized is not None : self . actions_in_input_normalized = actions_in_input_normalized if input_evaluation is not None : self . input_evaluation = input_evaluation if postprocess_inputs is not None : self . postprocess_inputs = postprocess_inputs if shuffle_buffer_size is not None : self . shuffle_buffer_size = shuffle_buffer_size if output is not None : self . output = output if output_config is not None : self . output_config = output_config if output_compress_columns is not None : self . output_compress_columns = output_compress_columns if output_max_file_size is not None : self . output_max_file_size = output_max_file_size return self
Sets the config's offline data settings.
Sets the config ' s offline data settings .
"""Sets the config's offline data settings.

        Args:
            input_: Specify how to generate experiences:
             - "sampler": Generate experiences via online (env) simulation (default).
             - A local directory or file glob expression (e.g., "/tmp/*.json").
             - A list of individual file paths/URIs (e.g., ["/tmp/1.json",
               "s3://bucket/2.json"]).
             - A dict with string keys and sampling probabilities as values (e.g.,
               {"sampler": 0.4, "/tmp/*.json": 0.4, "s3://bucket/expert.json": 0.2}).
             - A callable that takes an `IOContext` object as only arg and returns a
               ray.rllib.offline.InputReader.
             - A string key that indexes a callable with tune.registry.register_input
            input_config: Arguments accessible from the IOContext for configuring custom
                input.
            actions_in_input_normalized: True, if the actions in a given offline "input"
                are already normalized (between -1.0 and 1.0). This is usually the case
                when the offline file has been generated by another RLlib algorithm
                (e.g. PPO or SAC), while "normalize_actions" was set to True.
            input_evaluation: Specify how to evaluate the current policy. This only has
                an effect when reading offline experiences ("input" is not "sampler").
                Available options:
                - "wis": the weighted step-wise importance sampling estimator.
                - "is": the step-wise importance sampling estimator.
                - "simulation": run the environment in the background, but use
                this data for evaluation only and not for learning.
            postprocess_inputs: Whether to run postprocess_trajectory() on the
                trajectory fragments from offline inputs. Note that postprocessing will
                be done using the *current* policy, not the *behavior* policy, which
                is typically undesirable for on-policy algorithms.
            shuffle_buffer_size: If positive, input batches will be shuffled via a
                sliding window buffer of this number of batches. Use this if the input
                data is not in random enough order. Input is delayed until the shuffle
                buffer is filled.
            output: Specify where experiences should be saved:
                 - None: don't save any experiences
                 - "logdir" to save to the agent log dir
                 - a path/URI to save to a custom output directory (e.g., "s3://bckt/")
                 - a function that returns a rllib.offline.OutputWriter
            output_config: Arguments accessible from the IOContext for configuring
                custom output.
            output_compress_columns: What sample batch columns to LZ4 compress in the
                output data.
            output_max_file_size: Max output file size before rolling over to a
                new file.

        Returns:
            This updated TrainerConfig object.
        """
This updated TrainerConfig object.
This updated TrainerConfig object .
self
input_
Specify how to generate experiences:
"sampler": Generate experiences via online (env) simulation (default).
A local directory or file glob expression .
A list of individual file paths/URIs .
A dict with string keys and sampling probabilities as values .
A callable that takes an `IOContext` object as only arg and returns a
ray.rllib.offline.InputReader.
A string key that indexes a callable with tune.registry.register_input
Specify how to generate experiences : " sampler " : Generate experiences via online ( env ) simulation ( default ) . A local directory or file glob expression . A list of individual file paths / URIs . A dict with string keys and sampling probabilities as values . A callable that takes an ` IOContext ` object as only arg and returns a ray . rllib . offline . InputReader . A string key that indexes a callable with tune . registry . register_input
input_config
Arguments accessible from the IOContext for configuring custom
input.
Arguments accessible from the IOContext for configuring custom input .
actions_in_input_normalized
True, if the actions in a given offline "input"
are already normalized (between -1.0 and 1.0). This is usually the case
when the offline file has been generated by another RLlib algorithm
, while "normalize_actions" was set to True.
True if the actions in a given offline " input " are already normalized ( between - 1 . 0 and 1 . 0 ) . This is usually the case when the offline file has been generated by another RLlib algorithm while " normalize_actions " was set to True .
input_evaluation
Specify how to evaluate the current policy. This only has
an effect when reading offline experiences ("input" is not "sampler").
Available options:
"wis": the weighted step-wise importance sampling estimator.
"is": the step-wise importance sampling estimator.
"simulation": run the environment in the background, but use
this data for evaluation only and not for learning.
Specify how to evaluate the current policy . This only has an effect when reading offline experiences ( " input " is not " sampler " ) . Available options : " wis " : the weighted step - wise importance sampling estimator . " is " : the step - wise importance sampling estimator . " simulation " : run the environment in the background but use this data for evaluation only and not for learning .
postprocess_inputs
Whether to run postprocess_trajectory() on the
trajectory fragments from offline inputs. Note that postprocessing will
be done using the *current* policy, not the *behavior* policy, which
is typically undesirable for on-policy algorithms.
Whether to run postprocess_trajectory () on the trajectory fragments from offline inputs . Note that postprocessing will be done using the * current * policy not the * behavior * policy which is typically undesirable for on - policy algorithms .
shuffle_buffer_size
If positive, input batches will be shuffled via a
sliding window buffer of this number of batches. Use this if the input
data is not in random enough order. Input is delayed until the shuffle
buffer is filled.
If positive input batches will be shuffled via a sliding window buffer of this number of batches . Use this if the input data is not in random enough order . Input is delayed until the shuffle buffer is filled .
output
Specify where experiences should be saved:
None: don't save any experiences
"logdir" to save to the agent log dir
a path/URI to save to a custom output directory
a function that returns a rllib.offline.OutputWriter
Specify where experiences should be saved : None : don ' t save any experiences " logdir " to save to the agent log dir a path / URI to save to a custom output directory a function that returns a rllib . offline . OutputWriter
output_config
Arguments accessible from the IOContext for configuring
custom output.
Arguments accessible from the IOContext for configuring custom output .
output_compress_columns
None
output_max_file_size
Max output file size before rolling over to a
new file.
Max output file size before rolling over to a new file .