예제 #1
0
    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()
예제 #2
0
파일: registry.py 프로젝트: parasj/ray
def _import_slate_q():
    import ray.rllib.algorithms.slateq as slateq

    return slateq.SlateQ, slateq.SlateQConfig().to_dict()