Rasa 2 cannot run on Windows 10

OS: Windows 10

Package versions:

Tensorflow 2.3.1

Rasa 2.0.0

Tensorflow-addons: 0.11.2

I tried to migrate my project to Rasa 2.0.0, following the guide posted on the official site. However, whenever I try to train a model I am getting the following error:

Traceback (most recent call last):
 File "c:\users\npashov\appdata\local\programs\python\python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\npashov\AppData\Local\Programs\Python\Python38\Scripts\rasa.exe\__main__.py", line 7, in <module>
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\rasa\__main__.py", line 116, in main
    cmdline_arguments.func(cmdline_arguments)
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\rasa\cli\train.py", line 151, in train_nlu
    return train_nlu(
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\rasa\train.py", line 461, in train_nlu
    return rasa.utils.common.run_in_loop(
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\rasa\utils\common.py", line 308, in run_in_loop
    result = loop.run_until_complete(f)
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\asyncio\base_events.py", line 616, in run_until_complete
    return future.result()
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\rasa\train.py", line 506, in _train_nlu_async
    return await _train_nlu_with_validated_data(
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\rasa\train.py", line 541, in _train_nlu_with_validated_data
    await rasa.nlu.train(
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\rasa\nlu\train.py", line 114, in train
    interpreter = trainer.train(training_data, **kwargs)
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\rasa\nlu\model.py", line 206, in train
    updates = component.train(working_data, self.config, **context)
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\rasa\nlu\classifiers\diet_classifier.py", line 760, in train
    self.model = self._instantiate_model_class(model_data)
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\rasa\nlu\classifiers\diet_classifier.py", line 1082, in _instantiate_model_class
    return self.model_class()(
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\rasa\nlu\classifiers\diet_classifier.py", line 1104, in __init__
    super().__init__("DIET", config, data_signature, label_data)
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\rasa\utils\tensorflow\models.py", line 649, in __init__
    super().__init__(
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\rasa\utils\tensorflow\models.py", line 83, in __init__
    super().__init__(**kwargs)
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\training\tracking\base.py", line 457, in _method_wrapper
    result = method(self, *args, **kwargs)
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\keras\engine\training.py", line 308, in __init__
    self._init_batch_counters()
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\training\tracking\base.py", line 457, in _method_wrapper
    result = method(self, *args, **kwargs)
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\keras\engine\training.py", line 317, in _init_batch_counters
    self._train_counter = variables.Variable(0, dtype='int64', aggregation=agg)
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\ops\variables.py", line 262, in __call__
    return cls._variable_v2_call(*args, **kwargs)
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\ops\variables.py", line 244, in _variable_v2_call
    return previous_getter(
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\ops\variables.py", line 237, in <lambda>
    previous_getter = lambda **kws: default_variable_creator_v2(None, **kws)
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\ops\variable_scope.py", line 2633, in default_variable_creator_v2
    return resource_variable_ops.ResourceVariable(
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\ops\variables.py", line 264, in __call__
    return super(VariableMetaclass, cls).__call__(*args, **kwargs)
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\ops\resource_variable_ops.py", line 1507, in __init__
    self._init_from_args(
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\ops\resource_variable_ops.py", line 1661, in _init_from_args
    handle = eager_safe_variable_handle(
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\ops\resource_variable_ops.py", line 242, in eager_safe_variable_handle
    return _variable_handle_from_shape_and_dtype(
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\ops\resource_variable_ops.py", line 174, in _variable_handle_from_shape_and_dtype
    gen_logging_ops._assert(  # pylint: disable=protected-access
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\ops\gen_logging_ops.py", line 49, in _assert
    _ops.raise_from_not_ok_status(e, name)
  File "c:\users\npashov\appdata\local\programs\python\python38\lib\site-packages\tensorflow\python\framework\ops.py", line 6843, in raise_from_not_ok_status
    six.raise_from(core._status_to_exception(e.code, message), None)
  File "<string>", line 3, in raise_from
tensorflow.python.framework.errors_impl.InvalidArgumentError: assertion failed: [0] [Op:Assert] name: EagerVariableNameReuse

I can confirm all the training files are correct, this error appears even after I try to train with a clean directory after rasa init.

P.S. I tried training with the same configuration on Ubuntu and it run immediately.

Have you tried Multipass for Ubuntu on Windows? We’re using it for our lightweight kubernetes setup but it may be easier to run Multipass and not have to deal with windows specific issues.

Greg

Hi Greg, thanks for the reply!

I think we can use Multipass or something similar to work around the issue.

However, just for the record, will there be a fix to such issues that are windows-specific? I’m asking mainly because I’m curious whether machine learning technologies prioritize linux/mac support over windows. :grinning_face_with_smiling_eyes:

In this case, it looks like a Tensorflow issue so you would need to check with them about Windows issues. In my experience, debian linux seems to be the path of least resistence with other linux and Mac not far behind.