deepmind-research
deepmind-research copied to clipboard
RL Unplugged colab doesn't work
I was able to solve the above problem by going to the source and renaming 'blacklist' to 'denylist' Now I'm getting this:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
[<ipython-input-5-ec8febcafb60>](https://localhost:8080/#) in <module>()
4 return sample._replace(data=sample.data[:5])
5
----> 6 dataset = atari.dataset(path=tmp_path, game='Pong', run=1, num_shards=1)
7 # Small batch size, experiments in the paper were run with batch size 256.
8 # dataset = dataset.map(discard_extras).batch(batch_size)
11 frames
[/content/deepmind-research/rl_unplugged/atari.py](https://localhost:8080/#) in dataset(path, game, run, num_shards, shuffle_buffer_size)
202 example_ds = example_ds.shuffle(shuffle_buffer_size)
203 return example_ds.map(_tf_example_to_reverb_sample,
--> 204 num_parallel_calls=tf.data.experimental.AUTOTUNE)
205
206
[/usr/local/lib/python3.7/dist-packages/tensorflow/python/data/ops/dataset_ops.py](https://localhost:8080/#) in map(self, map_func, num_parallel_calls, deterministic, name)
2022 deterministic,
2023 preserve_cardinality=True,
-> 2024 name=name)
2025
2026 def flat_map(self, map_func, name=None):
[/usr/local/lib/python3.7/dist-packages/tensorflow/python/data/ops/dataset_ops.py](https://localhost:8080/#) in __init__(self, input_dataset, map_func, num_parallel_calls, deterministic, use_inter_op_parallelism, preserve_cardinality, use_legacy_function, name)
5236 self._transformation_name(),
5237 dataset=input_dataset,
-> 5238 use_legacy_function=use_legacy_function)
5239 if deterministic is None:
5240 self._deterministic = "default"
[/usr/local/lib/python3.7/dist-packages/tensorflow/python/data/ops/structured_function.py](https://localhost:8080/#) in __init__(self, func, transformation_name, dataset, input_classes, input_shapes, input_types, input_structure, add_to_graph, use_legacy_function, defun_kwargs)
269 fn_factory = trace_tf_function(defun_kwargs)
270
--> 271 self._function = fn_factory()
272 # There is no graph to add in eager mode.
273 add_to_graph &= not context.executing_eagerly()
[/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/function.py](https://localhost:8080/#) in get_concrete_function(self, *args, **kwargs)
3069 """
3070 graph_function = self._get_concrete_function_garbage_collected(
-> 3071 *args, **kwargs)
3072 graph_function._garbage_collector.release() # pylint: disable=protected-access
3073 return graph_function
[/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/function.py](https://localhost:8080/#) in _get_concrete_function_garbage_collected(self, *args, **kwargs)
3034 args, kwargs = None, None
3035 with self._lock:
-> 3036 graph_function, _ = self._maybe_define_function(args, kwargs)
3037 seen_names = set()
3038 captured = object_identity.ObjectIdentitySet(
[/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/function.py](https://localhost:8080/#) in _maybe_define_function(self, args, kwargs)
3290
3291 self._function_cache.add_call_context(cache_key.call_context)
-> 3292 graph_function = self._create_graph_function(args, kwargs)
3293 self._function_cache.add(cache_key, cache_key_deletion_observer,
3294 graph_function)
[/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/function.py](https://localhost:8080/#) in _create_graph_function(self, args, kwargs, override_flat_arg_shapes)
3138 arg_names=arg_names,
3139 override_flat_arg_shapes=override_flat_arg_shapes,
-> 3140 capture_by_value=self._capture_by_value),
3141 self._function_attributes,
3142 function_spec=self.function_spec,
[/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/func_graph.py](https://localhost:8080/#) in func_graph_from_py_func(name, python_func, args, kwargs, signature, func_graph, autograph, autograph_options, add_control_dependencies, arg_names, op_return_value, collections, capture_by_value, override_flat_arg_shapes, acd_record_initial_resource_uses)
1159 _, original_func = tf_decorator.unwrap(python_func)
1160
-> 1161 func_outputs = python_func(*func_args, **func_kwargs)
1162
1163 # invariant: `func_outputs` contains only Tensors, CompositeTensors,
[/usr/local/lib/python3.7/dist-packages/tensorflow/python/data/ops/structured_function.py](https://localhost:8080/#) in wrapped_fn(*args)
246 attributes=defun_kwargs)
247 def wrapped_fn(*args): # pylint: disable=missing-docstring
--> 248 ret = wrapper_helper(*args)
249 ret = structure.to_tensor_list(self._output_structure, ret)
250 return [ops.convert_to_tensor(t) for t in ret]
[/usr/local/lib/python3.7/dist-packages/tensorflow/python/data/ops/structured_function.py](https://localhost:8080/#) in wrapper_helper(*args)
175 if not _should_unpack(nested_args):
176 nested_args = (nested_args,)
--> 177 ret = autograph.tf_convert(self._func, ag_ctx)(*nested_args)
178 if _should_pack(ret):
179 ret = tuple(ret)
[/usr/local/lib/python3.7/dist-packages/tensorflow/python/autograph/impl/api.py](https://localhost:8080/#) in wrapper(*args, **kwargs)
690 except Exception as e: # pylint:disable=broad-except
691 if hasattr(e, 'ag_error_metadata'):
--> 692 raise e.ag_error_metadata.to_exception(e)
693 else:
694 raise
TypeError: in user code:
File "/content/deepmind-research/rl_unplugged/atari.py", line 184, in _tf_example_to_reverb_sample *
return _make_reverb_sample(o_t, a_t, data['r_t'], data['d_t'], o_tp1, a_tp1,
File "/content/deepmind-research/rl_unplugged/atari.py", line 145, in _make_reverb_sample *
info = reverb.SampleInfo(
TypeError: __new__() got an unexpected keyword argument 'times_sampled'