def test_slateq_compilation(self): """Test whether SlateQ can be built with both frameworks.""" config = (slateq.SlateQConfig().environment( env=InterestEvolutionRecSimEnv).training( replay_buffer_config={"learning_starts": 1000})) num_iterations = 1 for _ in framework_iterator(config, with_eager_tracing=True): trainer = config.build() for i in range(num_iterations): results = trainer.train() check_train_results(results) print(results) check_compute_single_action(trainer) trainer.stop()
def _import_slate_q(): import ray.rllib.algorithms.slateq as slateq return slateq.SlateQ, slateq.SlateQConfig().to_dict()