Missed TensorFlow Dev Summit? Check out the video playlist. Watch recordings

tf_agents.bandits.environments.mushroom_environment_utilities.convert_mushroom_csv_to_tf_dataset

Converts the mushroom CSV dataset into a tf.Dataset.

tf_agents.bandits.environments.mushroom_environment_utilities.convert_mushroom_csv_to_tf_dataset(
    *args, **kwargs
)

The dataset CSV contains the label in the first column, then the features. Two example rows: p,x,s,n,t,p,f,c,n,k,e,e,s,s,w,w,p,w,o,p,k,s,u: poisonous; e,x,s,y,t,a,f,c,b,k,e,c,s,s,w,w,p,w,o,p,n,n,g: edible.

Args:

  • file_path: Path to the CSV file.
  • buffer_size: The buffer to use for shuffling the data.

Returns:

A tf.Dataset, infinitely looped, shuffled, not batched.

Raises:

  • AssertionError: If the CSV file does not conform to the syntax of the mushroom environment.