ModuleNotFoundError: No module named 'tensorflow_core.keras' in Flask

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template
System information

OS X 10.15.1 Catalina
TensorFlow version: 1.15.0
Python version: 3.7.3
virtualenv (Flask)

Describe the problem
I'm unable to import and run a model using Flask services because of this error: ModuleNotFoundError: No module named 'tensorflow_core.keras'
Provide the exact sequence of commands / steps that you executed before running into the problem

I have pip installed keras and tensorflow into my virtualenv (I've also tried pip3 install)
My code is like this:

import tensorflow as tf
from keras.models import load_model
model = load_model("model.hdf5")
# ... preprocess images
predictions = model.predict(processed_images)

Any other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
Traceback (most recent call last):
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/bin/flask", line 8, in <module>
    sys.exit(main())
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/flask/cli.py", line 966, in main
    cli.main(prog_name="python -m flask" if as_module else None)
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/flask/cli.py", line 586, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/flask/cli.py", line 860, in run_command
    extra_files=extra_files,
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/werkzeug/serving.py", line 1008, in run_simple
    run_with_reloader(inner, extra_files, reloader_interval, reloader_type)
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/werkzeug/_reloader.py", line 337, in run_with_reloader
    reloader.run()
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/werkzeug/_reloader.py", line 202, in run
    for filename in chain(_iter_module_files(), self.extra_files):
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/werkzeug/_reloader.py", line 24, in _iter_module_files
    filename = getattr(module, "__file__", None)
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/tensorflow/__init__.py", line 50, in __getattr__
    module = self._load()
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/tensorflow/__init__.py", line 44, in _load
    module = _importlib.import_module(self.__name__)
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tensorflow_core.keras'
Using TensorFlow backend.
Using TensorFlow backend.
WARNING:tensorflow:From /Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/tensorflow_core/python/ops/resource_variable_ops.py:1630: calling BaseResourceVariable.__init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
WARNING:tensorflow:From /Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/tensorflow_core/python/ops/resource_variable_ops.py:1630: calling BaseResourceVariable.__init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
WARNING:tensorflow:From /Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:4070: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.

WARNING:tensorflow:From /Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:4070: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.

2019-11-26 15:33:29.703531: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7fb84403e4f0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2019-11-26 15:33:29.703585: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2019-11-26 15:33:29.705059: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7fa1f9bbcd00 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2019-11-26 15:33:29.705389: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
WARNING:tensorflow:From /Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/tensorflow_core/python/ops/math_grad.py:1424: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
WARNING:tensorflow:From /Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/tensorflow_core/python/ops/math_grad.py:1424: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
WARNING:tensorflow:From /Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:422: The name tf.global_variables is deprecated. Please use tf.compat.v1.global_variables instead.

WARNING:tensorflow:From /Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:422: The name tf.global_variables is deprecated. Please use tf.compat.v1.global_variables instead.

@zzeniale , refer https://github.com/tensorflow/tensorflow/issues/32768. Looks similar. Let me know if this helps. :)

Hi @nikochiko. Thanks for the reply. Unfortunately the solution mentioned in that thread isn't quite clear:

I was missing CUDA/cudnn on my PATH, adding those then rerunning pip install fixed the issue.
(pip install without CUDA on path does not install: libtensorflow_framework.so.2)

I was unable to find any solution online as to what path was and how to add CUDA/cudnn to it.

I have had a similar problem when loading a model.  it seems to break  but I don't have cuda installed and need to install this on a ubuntu server with no access to cuda / gpu.
I have noticed if i turn off my debugging it will run the first time through the code but the second time break.  this is installed inside flask and I can't reproduce it outside of flask

The Trace on the second time through shows this error...
Traceback (most recent call last):   File "C:\Program Files\Python37\lib\site-packages\flask\app.py", line 1949, in full_dispatch_request     rv = self.dispatch_request()   File "C:\Program Files\Python37\lib\site-packages\flask\app.py", line 1935, in dispatch_request     return self.view_functions[rule.endpoint](**req.view_args)   File "C:\Program Files\Python37\lib\site-packages\flask_restful\__init__.py", line 458, in wrapper     resp = resource(*args, **kwargs)   File "C:\Program Files\Python37\lib\site-packages\flask\views.py", line 89, in view     return self.dispatch_request(*args, **kwargs)   File "C:\Program Files\Python37\lib\site-packages\flask_restful\__init__.py", line 573, in dispatch_request     resp = meth(*args, **kwargs)   File "E:\Dropbox\Code\wld\API\v1\routes\functions.py", line 24, in post     response = local(post_data)   File "E:\Dropbox\Code\wld\API\v1\functions\pofg_xrf_nn\v1\__init__.py", line 20, in local     output = xrd_nn_model(event,'tmp')   File "E:\Dropbox\Code\wld\API\v1\functions\pofg_xrf_nn\v1\main.py", line 28, in xrd_nn_model     new_model = load_model(some_model,compile=False)   File "C:\Program Files\Python37\lib\site-packages\keras\engine\saving.py", line 492, in load_wrapper     return load_function(*args, **kwargs)   File "C:\Program Files\Python37\lib\site-packages\keras\engine\saving.py", line 584, in load_model     model = _deserialize_model(h5dict, custom_objects, compile)   File "C:\Program Files\Python37\lib\site-packages\keras\engine\saving.py", line 274, in _deserialize_model     model = model_from_config(model_config, custom_objects=custom_objects)   File "C:\Program Files\Python37\lib\site-packages\keras\engine\saving.py", line 627, in model_from_config     return deserialize(config, custom_objects=custom_objects)   File "C:\Program Files\Python37\lib\site-packages\keras\layers\__init__.py", line 168, in deserialize     printable_module_name='layer')   File "C:\Program Files\Python37\lib\site-packages\keras\utils\generic_utils.py", line 147, in deserialize_keras_object     list(custom_objects.items())))   File "C:\Program Files\Python37\lib\site-packages\keras\engine\sequential.py", line 302, in from_config     model.add(layer)   File "C:\Program Files\Python37\lib\site-packages\keras\engine\sequential.py", line 162, in add     name=layer.name + '_input')   File "C:\Program Files\Python37\lib\site-packages\keras\engine\input_layer.py", line 178, in Input     input_tensor=tensor)   File "C:\Program Files\Python37\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper     return func(*args, **kwargs)   File "C:\Program Files\Python37\lib\site-packages\keras\engine\input_layer.py", line 87, in __init__     name=self.name)   File "C:\Program Files\Python37\lib\site-packages\keras\backend\tensorflow_backend.py", line 73, in symbolic_fn_wrapper     if _SYMBOLIC_SCOPE.value: AttributeError: '_thread._local' object has no attribute 'value'

@zzeniale
Can you try with from tensorflow import keras and see how it progresses.Also , can you check
 keras_applications.__version__
keras_preprocessing.__version__

Thanks!

this seems to have worked
from tensorflow import keras model = keras.models.load_model(new_model)
vs failing
from keras.models import load_model model = load_model(new_model)

@adclose
Please close this thread if it solves your question. Thanks!

@ravikyram, I'm still getting the same error unfortunately:
my code is:
from tensorflow import keras
model = keras.models.load_model("model.hdf5")

My keras_applications version is 1.0.8 and keras_preprocessing version is 1.1.0.
The full error traceback:
Traceback (most recent call last):
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/bin/flask", line 8, in <module>
    sys.exit(main())
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/flask/cli.py", line 966, in main
    cli.main(prog_name="python -m flask" if as_module else None)
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/flask/cli.py", line 586, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/flask/cli.py", line 860, in run_command
    extra_files=extra_files,
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/werkzeug/serving.py", line 1008, in run_simple
    run_with_reloader(inner, extra_files, reloader_interval, reloader_type)
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/werkzeug/_reloader.py", line 337, in run_with_reloader
    reloader.run()
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/werkzeug/_reloader.py", line 202, in run
    for filename in chain(_iter_module_files(), self.extra_files):
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/werkzeug/_reloader.py", line 24, in _iter_module_files
    filename = getattr(module, "__file__", None)
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/tensorflow/__init__.py", line 50, in __getattr__
    module = self._load()
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/tensorflow/__init__.py", line 44, in _load
    module = _importlib.import_module(self.__name__)
  File "/Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tensorflow_core.keras'
WARNING:tensorflow:From /Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/tensorflow_core/python/ops/resource_variable_ops.py:1630: calling BaseResourceVariable.__init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
WARNING:tensorflow:From /Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/tensorflow_core/python/ops/resource_variable_ops.py:1630: calling BaseResourceVariable.__init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
2019-11-27 19:29:43.399134: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7f99c9539650 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2019-11-27 19:29:43.399187: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
WARNING:tensorflow:From /Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/tensorflow_core/python/ops/math_grad.py:1424: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
2019-11-27 19:29:43.769712: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7fd831f1ae30 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2019-11-27 19:29:43.769750: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
WARNING:tensorflow:From /Users/llemonthyme/Desktop/traffic-app/flaskservice/lib/python3.7/site-packages/tensorflow_core/python/ops/math_grad.py:1424: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where

Any solution?

I'm getting the same issue. Simply adding the line "from tensorflow import keras" into my flask app.py will cause the error:
ModuleNotFoundError: No module named 'tensorflow_core.keras'

I am facing the same issue when running my flask app in a docker container.

 As an annoying work around setting FLASK_DEBUG=1 allows you to continue working but you'll need to restart your server after every change.
I'm still trying to figure out why flask debug mode is causing this issue.

This issue happens with me running a falcon app inside the tensorflow/tensorflow:nightly-py3 docker, just when it uses tensorflow.keras.models.load_model method.

I have found that down grading the tensorflow version to 1.x resolved my issue - is everyone experiencing issues using TF 2?

@alexespencer I'm experiencing the issue in TF2, What 1.x version worked for you? I tried 1.15 and 1.14 but still had the error.

I've got the same error, but with django though.
TF 1.15.0.
With TF 1.14.0 it works fine.
Using TensorFlow backend.
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 61, in execute
    super(Command, self).execute(*args, **options)
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 100, in handle
    self.run(**options)
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 109, in run
    autoreload.main(self.inner_run, None, options)
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/utils/autoreload.py", line 341, in main
    reloader(wrapped_main_func, args, kwargs)
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/utils/autoreload.py", line 307, in python_reloader
    reloader_thread()
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/utils/autoreload.py", line 277, in reloader_thread
    change = fn()
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/utils/autoreload.py", line 206, in code_changed
    for filename in gen_filenames():
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/utils/autoreload.py", line 104, in gen_filenames
    [filename.__file__ for filename in new_modules
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/utils/autoreload.py", line 105, in <listcomp>
    if hasattr(filename, '__file__')])
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/tensorflow/__init__.py", line 50, in __getattr__
    module = self._load()
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/tensorflow/__init__.py", line 44, in _load
    module = _importlib.import_module(self.__name__)
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tensorflow_core.keras'

I have the same error, Python 3.7.5, TensorFlow 2.0.0, Flask 1.1.1.
Traceback (most recent call last):
  File "/Users/testuser/web/v/bin/flask", line 8, in <module>
    sys.exit(main())
  File "/Users/testuser/web/v/lib/python3.7/site-packages/flask/cli.py", line 966, in main
    cli.main(prog_name="python -m flask" if as_module else None)
  File "/Users/testuser/web/v/lib/python3.7/site-packages/flask/cli.py", line 586, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "/Users/testuser/web/v/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/Users/testuser/web/v/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/testuser/web/v/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/testuser/web/v/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/testuser/web/v/lib/python3.7/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/Users/testuser/web/v/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/testuser/web/v/lib/python3.7/site-packages/flask/cli.py", line 860, in run_command
    extra_files=extra_files,
  File "/Users/testuser/web/v/lib/python3.7/site-packages/werkzeug/serving.py", line 1008, in run_simple
    run_with_reloader(inner, extra_files, reloader_interval, reloader_type)
  File "/Users/testuser/web/v/lib/python3.7/site-packages/werkzeug/_reloader.py", line 337, in run_with_reloader
    reloader.run()
  File "/Users/testuser/web/v/lib/python3.7/site-packages/werkzeug/_reloader.py", line 202, in run
    for filename in chain(_iter_module_files(), self.extra_files):
  File "/Users/testuser/web/v/lib/python3.7/site-packages/werkzeug/_reloader.py", line 24, in _iter_module_files
    filename = getattr(module, "__file__", None)
  File "/Users/testuser/web/v/lib/python3.7/site-packages/tensorflow/__init__.py", line 50, in __getattr__
    module = self._load()
  File "/Users/testuser/web/v/lib/python3.7/site-packages/tensorflow/__init__.py", line 44, in _load
    module = _importlib.import_module(self.__name__)
  File "/Users/testuser/.pyenv/versions/3.7.5/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tensorflow_core.keras'

@alexespencer I'm experiencing the issue in TF2, What 1.x version worked for you? I tried 1.15 and 1.14 but still had the error.

Sorry for the delay. I had to roll back to Tensorflow 1.13.1 to get this to work.

I also tested with tensorflow==2.0.0 both with python 3.7.5 and 3.7.3 - still the same :(

..Also tested on tensorflow-cpu==1.5.0, python 3.7.5 same story.

Hi!
I have the same problem but on Raspbian.
System:
OS: Raspbian GNU/Linux 10 (buster) armv7l
Host: Raspberry Pi 4 Model B Rev 1.1
Kernel: 4.19.75-v7l+
Uptime: 3 days, 2 hours, 5 mins
Packages: 662 (dpkg)
Shell: bash 5.0.3
Terminal: /dev/pts/0
CPU: BCM2835 (4) @ 1.500GHz
Memory: 125MiB / 3906MiB

Python:
Python 3.7.3 (default, Apr  3 2019, 05:39:12)
[GCC 8.2.0] on linux

Env:
absl-py==0.9.0
astor==0.8.1
attrs==19.3.0
bleach==3.1.0
cachetools==4.0.0
certifi==2019.11.28
cffi==1.13.2
chardet==3.0.4
Click==7.0
cryptography==2.8
cycler==0.10.0
decorator==4.4.1
docutils==0.15.2
Flask==1.1.1
gast==0.2.2
google-auth==1.10.0
google-auth-oauthlib==0.4.1
google-pasta==0.1.8
grpcio==1.26.0
h5py==2.10.0
idna==2.8
imageio==2.6.1
importlib-metadata==1.3.0
itsdangerous==1.1.0
jeepney==0.4.1
Jinja2==2.10.3
joblib==0.14.1
Keras==2.2.4
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
keyring==20.0.0
kiwisolver==1.1.0
Markdown==3.1.1
MarkupSafe==1.1.1
matplotlib==3.1.2
more-itertools==8.0.2
networkx==2.4
numpy==1.16.2
oauthlib==3.1.0
opencv-python==<IP_ADDRESS>
opt-einsum==3.1.0
packaging==19.2
PassportEye==1.4.1
pdfminer3k==1.3.1
Pillow==6.2.1
pkg-resources==0.0.0
pkginfo==<IP_ADDRESS>
pluggy==0.13.1
ply==3.11
protobuf==3.11.2
py==1.8.0
py-agender==0.0.9
pyasn1==0.4.8
pyasn1-modules==0.2.7
pycparser==2.19
Pygments==2.5.2
pyparsing==2.4.5
pytesseract==0.3.1
pytest==5.3.2
python-dateutil==2.8.1
PyWavelets==1.1.1
PyYAML==5.2
readme-renderer==24.0
requests==2.22.0
requests-oauthlib==1.3.0
requests-toolbelt==0.9.1
rsa==4.0
scikit-image==0.16.2
scikit-learn==0.22
scipy==1.4.1
SecretStorage==3.1.1
six==1.13.0
tensorboard==2.0.2
tensorflow==1.14.0
tensorflow-estimator==1.14.0
termcolor==1.1.0
tqdm==4.41.0
twine==3.1.1
urllib3==1.25.7
wcwidth==0.1.7
webencodings==0.5.1
Werkzeug==0.16.0
wrapt==1.11.2
zipp==0.6.0

same here with Flask==1.1.1 tensorflow==1.15.0 in a ubuntu 18.04 docker. I have to set FLASK_DEBUG=0 to let it work.

same here with tensorflow==2.0.0 and django==2.1.13.
Placing this in my manage.py this seems to temporarily remove the issue:
from gevent import monkey
monkey.patch_all()

I am facing the same issue when running my flask app in a docker container.

It worked when using python 3.6.

As other comments have mentioned, a similar error happens in Django as well.
I am facing the same issue with:
Python 3.6.1
Django 2.0.3

Thanks to other comments I have found it only happens with
tensorflow==1.15.0 and tensorflow==2.0
Hence, a possible workaround is to downgrade to tensorflow==1.14.0 or below.
Another workaround I have found, which is ugly as well, is to include
import tensorflow as tf
in the import section of the app's manage.py
I hope that information could also help to eventually resolve the bug.

Thanks @enriqueav I worked I was facing this same error with:
python 3.6.4
Django 1.11
Tensorflow 2
Apparently as you said when placing the import:
import tensorflow as tf
In the apps section manage.py
The django server runs without any problem.

Any functioning workaround for flask yet? Same error here when flask debug mode is tuned on:
   return _bootstrap._gcd_import(name[level:], package, level)   File "<frozen importlib._bootstrap>", line 1006, in _gcd_import   File "<frozen importlib._bootstrap>", line 983, in _find_and_load   File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked ModuleNotFoundError: No module named 'tensorflow_core.keras'
Thanks!

@seabass86 see my comment above it works with the most recent release of Tensor Flow and Flask

I've been struggling with this issue for the past few days, I just tried to run flask with debug mode off and the exception no longer occurs. As an annoying work around setting FLASK_DEBUG=1 allows you to continue working but you'll need to restart your server after every change.
I'm still trying to figure out why flask debug mode is causing this issue.
@alexdibattista Thank you for quick fix.

Same issue here. Just FLASK_DEBUG=0 helps

@seabass86 see my comment above it works with the most recent release of Tensor Flow and Flask

Thanks @adclose , but the issue sadly remains even with version 2.1:
  return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tensorflow_core.keras'

I retrained the model with tensorflow==1.14.0 then saved the model and used gunicorn to run flask. This solved my problem.

This does not solve the problem - you should be able to work with TensorFlow and flask in debug mode

I've been having this same issue while using the docker container of tensorflow-latest-gpu-py3 when trying to load anything from keras, it shows the ModuleNotFoundError

I'm also facing the same issue when using TensorFlow v2.1.0 and 2.0.0 with Flask in Docker & Docker-Compose. As mentioned by above thread, setting FLASK_DEBUG=0 is a valid workaround.
Another way that worked for me that allows keeping FLASK_DEBUG=1 during development is to use package versions Flask==1.1.1 and tensorflow==2.0.0-beta1. By the way, I'm using this flask+docker image from uwsgi-nginx-flask-docker

I encountered the same error recently, using Tensorflow 2.1 GPU in Ubuntu 19.10.
When I ran:
sudo python3 -c 'import tensorflow.keras as keras; print(keras.__version__)'
it worked; but, running:
python3 -c 'import tensorflow.keras as keras; print(keras.__version__)'
without the sudo prefix gave me this error.
Here is how I fixed it. In my case, I correctly identified that the user account did not have the necessary tensorflow.keras python dependencies installed.
I resolved this issue by running:
python3 -m pip install grpcio  grpcio-tools cycler kiwisolver \                                      absl-py astunparse gast matplotlib     \                                      google-pasta opt-einsum                   \                                      tensorboard tensorflow-estimator      \                                      termcolor wrapt Cython                      \                                      setuptools pybind11 Sphinx tables
python3 -m pip install -U --user pip six numpy wheel setuptools mock 'future>=0.17.1'
python3 -m pip install -U --user keras_applications --no-deps keras_preprocessing --no-deps
NOTE: All of the python package installation steps above DO NOT have the sudo prefix.

The recommended way to prevent this is to:

install using python -m pip install ...
check using python -m pip list

Or, to use virtualenvs or similar.

As @enriqueav commented in the workaround for "manage.py" Django.
In the Flask you should put "import tensorflow as tf" in the "init.py" file.
Works perfectly for Flask==1.1.1 and tensorflow==2.1.0

A workaround for this issue that works for me is to run the TensorFlow part within a separate process
Something like;
from multiprocessing import Pool
with Pool() as pool:
    result = pool.starmap(function_that_runs_tf, [(var1, var2..._),(...)]

Same problem here. Running docker-compose with a flask app. Using tensorflow 2.1 and when the container(s) are building I get the error
File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner     self.run()   File "/usr/local/lib/python3.6/site-packages/gunicorn/reloader.py", line 44, in run     for filename in self.get_files():   File "/usr/local/lib/python3.6/site-packages/gunicorn/reloader.py", line 32, in get_files     for module in tuple(sys.modules.values())   File "/usr/local/lib/python3.6/site-packages/gunicorn/reloader.py", line 33, in <listcomp>     if getattr(module, '__file__', None)   File "/usr/local/lib/python3.6/site-packages/tensorflow/__init__.py", line 50, in __getattr__     module = self._load()   File "/usr/local/lib/python3.6/site-packages/tensorflow/__init__.py", line 44, in _load     module = _importlib.import_module(self.__name__)   File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module     return _bootstrap._gcd_import(name[level:], package, level)   File "<frozen importlib._bootstrap>", line 994, in _gcd_import   File "<frozen importlib._bootstrap>", line 971, in _find_and_load   File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked ModuleNotFoundError: No module named 'tensorflow_core.keras'

UPDATE: for those using Flask, TF2, and gunicorn
For those running flask through gunicorn, I found that running
gunicorn -b <IP_ADDRESS>:5000 -w 4
        --access-logfile -
        --reload
        app:app

was causing issues with the --reload flag. So basically you would get
the ModuleNotFoundError: No module named 'tensorflow_core.keras' error.
But if you removed the --reload flag it would fix the error. However, while developing your app, you want to be able to use --reload. I was using gunicorn = "==19.9.0".
But, when I upgraded to gunicorn = "==20.0.4" everything was fixed. Here are some of the package versions I was using.
Flask==1.1.1
Flask-CeleryExt==0.3.4
Flask-Cors==3.0.8
Flask-SQLAlchemy==2.4.1
gunicorn==20.0.4
numpy==1.18.1
Pillow==7.0.0
protobuf==3.11.3
scikit-learn==0.22.1
scipy==1.4.1
tensorboard==2.1.0
tensorflow==2.1.0
tensorflow-estimator==2.1.0

Same here! Also giving more ram to Docker made my flask app start, otherwise the workers would just restart indefinitely

I'm also running into this issue with the flask run command in development with the latest versions of tensorflow and flask:
FLASK_ENV=development flask run

Flask==1.1.1
pdfminer.six==20200124
lmdb==0.98
flask-cors==3.0.8
numpy==1.17.4
tensorflow==2.1.0
keras
nltk
environment:

FLASK_DEBUG=0
FLASK_APP_CONFIG=Product

did the trick for me.

pip install tensorflow==1.13.1
try it~!

pip uninstall tensorflow after that pip install tensorflow worked for me

I stopped getting ModuleNotFoundError: No module named 'tensorflow_core.keras' in Flask when I used
export FLASK_APP=your_app_name

flask run

i.e didn't use export FLASK_ENV=development

@svensevenslow Thanks man, it's solved my issue.

Can we close this then, since it is solved and it is actually a flask issue?

@mihaimaruseac I've seen several people mention that it also affects the Django reloader. I'm wondering if there's a way to modify TensorFlow so that both the Flask and Django reloaders will work with it.

It is worth noting that Flask uses Werkzeug. I wonder if this issue is reproducible with the Werkzeug reloader. My bet is that it would be.

I do have an app that uses TF Lite with Flask and I haven't be able to reproduce this error with that combination. That might be another work around for folks.

Filled this issue on the Flask project in case they can help:
https://github.com/pallets/flask/issues/3549

It looks like passing --eager-loading to the flask run command is another work around.

Here's a minimal, reproducible example of this error that only imports tensorflow.
import os
import subprocess
import sys
from threading import Thread
import time

class ReloaderLoop(object):
    def run(self):
        while True:
            for module in list(sys.modules.values()):
                getattr(module, "__file__", None)
            time.sleep(1)

    def restart_with_reloader(self):
        while 1:
            args = [sys.executable, os.path.abspath(sys.argv[0])] + sys.argv[1:]

            new_environ = {"RUN_MAIN": "true"}

            exit_code = subprocess.call(args, env=new_environ, close_fds=False)
            return exit_code

def loader():
    import tensorflow

t = Thread(target=loader, args=())
t.start()

def run_with_reloader():
    reloader = ReloaderLoop()
    if os.environ.get("RUN_MAIN") == "true":
        reloader.run()
    else:
        reloader.restart_with_reloader()

run_with_reloader()

@mulka Thank you for working that up.  (I think it can be just slightly more minimal; restart_with_reloader() does not seem to need while 1:.)  Hopefully they can make progress from your reproducer.  Very nice!

@mulka :sparkles: Beautiful!  From your minimal repro, I wondered if import is thread-safe. There is an unconfirmed bug on the CPython tracker.  The repro there also uses tensorflow, so it's as yet unclear if this is a tensorflow problem or a Python problem.

Thank you for the reproduction.
It seems this is going to be solved in 2.2, but it happens in 1.15 and 2.1. Unfortunately, I'm not sure if we can backport a fix safely.
(env) [tf] λ pip install -q tensorflow-cpu==2.2.0rc2
(env) [tf] λ python test.py
(env) [tf] λ pip uninstall -y tensorflow-cpu
Found existing installation: tensorflow-cpu 2.2.0rc2
Uninstalling tensorflow-cpu-2.2.0rc2:
  Successfully uninstalled tensorflow-cpu-2.2.0rc2
(env) [tf] λ pip install -q tensorflow-cpu==2.1
(env) [tf] λ python test.py
Traceback (most recent call last):
  File "test.py", line 13, in <module>
    getattr(module, "__file__", None)
  File "/tmp/tf/env/lib64/python3.7/site-packages/tensorflow/__init__.py", line 50, in __getattr__
    module = self._load()
  File "/tmp/tf/env/lib64/python3.7/site-packages/tensorflow/__init__.py", line 44, in _load
    module = _importlib.import_module(self.__name__)
  File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tensorflow_core.keras'
(env) [tf] λ pip uninstall -y tensorflow-cpu
Found existing installation: tensorflow-cpu 2.1.0
Uninstalling tensorflow-cpu-2.1.0:
  Successfully uninstalled tensorflow-cpu-2.1.0
(env) [tf] λ pip install -q tensorflow-cpu==1.15
(env) [tf] λ python test.py
Traceback (most recent call last):
  File "test.py", line 13, in <module>
    getattr(module, "__file__", None)
  File "/tmp/tf/env/lib64/python3.7/site-packages/tensorflow/__init__.py", line 50, in __getattr__
    module = self._load()
  File "/tmp/tf/env/lib64/python3.7/site-packages/tensorflow/__init__.py", line 44, in _load
    module = _importlib.import_module(self.__name__)
  File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tensorflow_core.keras'

(where test.py is the code in the reproducer)

Decreasing the tensorflow version to version 1.14.0 by command pip install tensorflow == 1.14.0 solved the issue for me

Recommend upgrading to 2.2 where this issue is also fixed (rc3 is available for testing now, final release will be early next week). This is because 1.14 release has a large number of bugs and inconsistencies and is already outside the support window. Sure, switching to 2.2 means upgrading to use TF2.0 APIs but this is also something we recommend.

I'm not TBAALi<EMAIL_ADDRESS>签名由 网易邮箱大师 定制 On 04/18/2020 00:06, Mihai Maruseac wrote: Recommend upgrading to 2.2 where this issue is also fixed (rc3 is available for testing now, final release will be early next week). This is because 1.14 release has a large number of bugs and inconsistencies and is already outside the support window. Sure, switching to 2.2 means upgrading to use TF2.0 APIs but this is also something we recommend. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

I've got the same error, but with django though.
Python 3.7.5
TF 1.15.0.
With TF 1.14.0 it works fine.
Using TensorFlow backend.
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 61, in execute
    super(Command, self).execute(*args, **options)
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 100, in handle
    self.run(**options)
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 109, in run
    autoreload.main(self.inner_run, None, options)
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/utils/autoreload.py", line 341, in main
    reloader(wrapped_main_func, args, kwargs)
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/utils/autoreload.py", line 307, in python_reloader
    reloader_thread()
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/utils/autoreload.py", line 277, in reloader_thread
    change = fn()
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/utils/autoreload.py", line 206, in code_changed
    for filename in gen_filenames():
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/utils/autoreload.py", line 104, in gen_filenames
    [filename.__file__ for filename in new_modules
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/django/utils/autoreload.py", line 105, in <listcomp>
    if hasattr(filename, '__file__')])
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/tensorflow/__init__.py", line 50, in __getattr__
    module = self._load()
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/site-packages/tensorflow/__init__.py", line 44, in _load
    module = _importlib.import_module(self.__name__)
  File "/opt/anaconda2/envs/ocr_ws_dev/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tensorflow_core.keras'

Which is super strange, because when I call the import directly from a python interpreter in terminal - it works:
from tensorflow import keras

Even loading a model works.

I has a similar problem while integrating keras model to django framework.
Using TensorFlow backend.
Traceback (most recent call last):
File "manage.py", line 21, in
main()
File "manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "C:\Users\pc\Anaconda3\envs\kr\lib\site-packages\django\core\management_init_.py", line 381, in execute
from_command_line
utility.execute()
File "C:\Users\pc\Anaconda3\envs\kr\lib\site-packages\django\core\management_init.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)

File "C:\Users\pc\Anaconda3\envs\kr\lib\site-packages\django\core\management\base.py", line 316, in run_from_ar
gv
self.execute(*args, **cmd_options)
File "C:\Users\pc\Anaconda3\envs\kr\lib\site-packages\django\core\management\commands\runserver.py", line 60, i
n execute
super().execute(*args, **options)
File "C:\Users\pc\Anaconda3\envs\kr\lib\site-packages\django\core\management\base.py", line 353, in execute
output = self.handle(*args, **options)
File "C:\Users\pc\Anaconda3\envs\kr\lib\site-packages\django\core\management\commands\runserver.py", line 95, i
n handle
self.run(**options)
File "C:\Users\pc\Anaconda3\envs\kr\lib\site-packages\django\core\management\commands\runserver.py", line 102,
in run
autoreload.main(self.inner_run, None, options)
File "C:\Users\pc\Anaconda3\envs\kr\lib\site-packages\django\utils\autoreload.py", line 323, in main
python_reloader(wrapped_main_func, args, kwargs)
File "C:\Users\pc\Anaconda3\envs\kr\lib\site-packages\django\utils\autoreload.py", line 302, in python_reloader
reloader_thread()

File "C:\Users\pc\Anaconda3\envs\kr\lib\site-packages\django\utils\autoreload.py", line 274, in reloader_thread
change = fn()

File "C:\Users\pc\Anaconda3\envs\kr\lib\site-packages\django\utils\autoreload.py", line 203, in code_changed
for filename in gen_filenames():
File "C:\Users\pc\Anaconda3\envs\kr\lib\site-packages\django\utils\autoreload.py", line 101, in gen_filenames
[filename.file for filename in new_modules
File "C:\Users\pc\Anaconda3\envs\kr\lib\site-packages\django\utils\autoreload.py", line 102, in
if hasattr(filename, 'file')])
File "C:\Users\pc\Anaconda3\envs\kr\lib\site-packages\tensorflow_init_.py", line 50, in getattr
module = self.load()
File "C:\Users\pc\Anaconda3\envs\kr\lib\site-packages\tensorflow_init.py", line 44, in _load
module = importlib.import_module(self.name)
File "C:\Users\pc\Anaconda3\envs\kr\lib\importlib_init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tensorflow_core.keras'
But I don't know how to fix it. Longing
for your reply!

@TDYe123 solution was mentioned 1 and 2 comments above yours. Either downgrade to 1.14 (not recommended) or upgrade to 2.2 release candidate (final to be released soon)

@mihaimaruseac I upgraded to 2.2.0-rc3 but I'm running into the same issue
Traceback (most recent call last):   File "/miniconda/envs/custom_env/lib/python3.7/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker     worker.init_process()   File "/miniconda/envs/custom_env/lib/python3.7/site-packages/gunicorn/workers/ggevent.py", line 162, in init_process     super().init_process()   File "/miniconda/envs/custom_env/lib/python3.7/site-packages/gunicorn/workers/base.py", line 119, in init_process     self.load_wsgi()   File "/miniconda/envs/custom_env/lib/python3.7/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi     self.wsgi = self.app.wsgi()   File "/miniconda/envs/custom_env/lib/python3.7/site-packages/gunicorn/app/base.py", line 67, in wsgi     self.callable = self.load()   File "/miniconda/envs/custom_env/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load     return self.load_wsgiapp()   File "/miniconda/envs/custom_env/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp     return util.import_app(self.app_uri)   File "/miniconda/envs/custom_env/lib/python3.7/site-packages/gunicorn/util.py", line 358, in import_app     mod = importlib.import_module(module)   File "/miniconda/envs/custom_env/lib/python3.7/importlib/__init__.py", line 127, in import_module     return _bootstrap._gcd_import(name[level:], package, level)   File "<frozen importlib._bootstrap>", line 1006, in _gcd_import   File "<frozen importlib._bootstrap>", line 983, in _find_and_load   File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked   File "<frozen importlib._bootstrap>", line 677, in _load_unlocked   File "<frozen importlib._bootstrap_external>", line 728, in exec_module   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed   File "/miniconda/envs/custom_env/lib/python3.7/site-packages/mlflow/models/container/scoring_server/wsgi.py", line 3, in <module>     app = scoring_server.init(pyfunc.load_model("/opt/ml/model/"))   File "/miniconda/envs/custom_env/lib/python3.7/site-packages/mlflow/pyfunc/__init__.py", line 292, in load_model     return importlib.import_module(conf[MAIN])._load_pyfunc(data_path)   File "/miniconda/envs/custom_env/lib/python3.7/site-packages/mlflow/keras.py", line 338, in _load_pyfunc     keras_module = importlib.import_module(f.read())   File "/miniconda/envs/custom_env/lib/python3.7/importlib/__init__.py", line 127, in import_module     return _bootstrap._gcd_import(name[level:], package, level)   File "<frozen importlib._bootstrap>", line 1006, in _gcd_import   File "<frozen importlib._bootstrap>", line 983, in _find_and_load   File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed   File "<frozen importlib._bootstrap>", line 1006, in _gcd_import   File "<frozen importlib._bootstrap>", line 983, in _find_and_load   File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked ModuleNotFoundError: No module named 'tensorflow_core'
Trying to deploy a keras model to sagemaker

@Ben-Epstein pip list should not list any packages that depend on TF before 2.2

@MihailSalnikov  Thanks, you're correct in your reply here
I had old dependencies. Uninstalling everything tf and reinstalling with 2.2.0rc3 fixed my problem. Thank you

Closing this issue as it is solved in 2.2

Ran into the same issue using docker container and I have solved it. The problem was caused when my ENTRYPOINT in the dockerfile was:
FLASK_APP=api.py  FLASK_ENV=development flask run --host=<IP_ADDRESS>
I have salved the issue (running in development) by simply just setting the entrypoint to ["python", "api.py"]


Node Red not  working, no clue

Wen I try to open  the we ui  I got the message mi  HA localIp:1880  refuse a conection
Nod Red Log:
[INFO] Disabling SSL
[INFO] Updating IDE Users
[INFO] Adding IDE User Devuser
[INFO] Updating HTTP Node User
[INFO] Adding HTTP Node User Devuser
[INFO] Disabling Projects
[INFO] Attempting to install/update nodes: node-red-contrib-home-assistant
npm info it worked if it ends with ok
npm info using<EMAIL_ADDRESS>npm info using<EMAIL_ADDRESS>npm http fetch GET 200 https://registry.npmjs.org/node-red-contrib-home-assistant 452ms
npm http fetch GET 200 https://registry.npmjs.org/node-red-contrib-home-assistant/-/node-red-contrib-home-assistant-0.3.2.tgz 250ms
npm info lifecycle<EMAIL_ADDRESS><EMAIL_ADDRESS>npm info lifecycle<EMAIL_ADDRESS><EMAIL_ADDRESS>npm info lifecycle<EMAIL_ADDRESS><EMAIL_ADDRESS>npm info lifecycle<EMAIL_ADDRESS><EMAIL_ADDRESS>npm info linkStuff<EMAIL_ADDRESS>npm info lifecycle<EMAIL_ADDRESS><EMAIL_ADDRESS>npm info lifecycle<EMAIL_ADDRESS><EMAIL_ADDRESS>npm info lifecycle undefined~preshrinkwrap: undefined
npm info lifecycle undefined~shrinkwrap: undefined
npm info lifecycle undefined~postshrinkwrap: undefined
npm WARN<EMAIL_ADDRESS>No repository field.
npm WARN<EMAIL_ADDRESS>No license field.
npm info ok
npm info it worked if it ends with ok
npm info using<EMAIL_ADDRESS>npm info using<EMAIL_ADDRESS>npm info lifecycle<EMAIL_ADDRESS><EMAIL_ADDRESS>npm info lifecycle<EMAIL_ADDRESS><EMAIL_ADDRESS>
<EMAIL_ADDRESS>start /usr/src/node-red
node $NODE_OPTIONS node_modules/node-red/red.js -v $FLOWS "--userDir" "/share/node-red"
Error loading settings file: /share/node-red/settings.js
/share/node-red/settings.js:3
users: [
^
SyntaxError: Unexpected token :
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Module._compile (module.js:533:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object. (/usr/src/node-red/node_modules/node-red/red.js:115:20)
npm info lifecycle<EMAIL_ADDRESS><EMAIL_ADDRESS>npm info ok

configuration.yaml:
nodered_flows:
title: 'Node-RED Flows'
url: 'http://hassio.local:1880'
icon: mdi:nodejs

Try deleting /share/node-red/settings.js then restarting the addon.

There is no /share/node-red/settings.js then restarting the add on in config file.
"{
"ssl": false,
"certfile": "fullchain.pem",
"keyfile": "privkey.pem",
"users": [
{
"username": "Devuser",
"password": "senha12",
"permissions": "*"
}
],
"http_node_user": [
{
"username": "Devuser",
"password": "senha12"
}
],
"projects": false,
"install_packages": [],
"install_nodes": [
"node-red-contrib-home-assistant"
],
"uninstall_nodes": []
}"

Can you check again?  That error suggests the file is there and it's just malformed.  Deleting it and allowing the addon to recreate it should fix things.
Also, if that's your actual password, I recommend changing it ASAP.


[MINOR] Change Livy commit message style from LIVY-xxx. to [LIVY-xxx]

According to discussion, changing the commit message style from LIVY-xxx. to [LIVY-xxx].

Codecov Report

Merging #17 into master will increase coverage by 0.11%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master      #17      +/-   ##
============================================
+ Coverage     70.17%   70.29%   +0.11%
- Complexity      730      734       +4
============================================
  Files            96       96
  Lines          5201     5201
  Branches        785      785
============================================
+ Hits           3650     3656       +6
+ Misses         1027     1023       -4
+ Partials        524      522       -2

Impacted Files
Coverage Δ
Complexity Δ

...main/scala/org/apache/livy/server/LivyServer.scala
34.91% <0%> (-0.6%)
9% <0%> (ø)

...in/java/org/apache/livy/rsc/driver/JobWrapper.java
80.64% <0%> (ø)
8% <0%> (+1%)
:arrow_up:

...ain/java/org/apache/livy/rsc/driver/RSCDriver.java
78.87% <0%> (+2.58%)
42% <0%> (+3%)
:arrow_up:

...cala/org/apache/livy/scalaapi/ScalaJobHandle.scala
55.88% <0%> (+2.94%)
0% <0%> (ø)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 27625a0...d3ef2c7. Read the comment docs.

I'm going to merge this, since it is already verified in incubator-livy-website repo.


lightgbm.cv() issue with lightgbm.LGBMRegressor()

I am trying to use lightGBM's cv() function for tuning my model for a regression problem. My main model is lightgbm.LGBMRegressor(). However, I am encountering the errors which is a bit confusing given that I am in a regression mode and NOT classification mode. Below are the code snippet and part of the trace.
param_grid = {
    'class_weight': [None, 'balanced'],
    'num_leaves': list(range(30, 150)),
    'learning_rate': list(np.logspace(np.log(0.005), np.log(0.2), base = np.exp(1), num = 1000)),
    'subsample_for_bin': list(range(20000, 300000, 20000)),
    'min_child_samples': list(range(20, 500, 5)),
    'reg_alpha': list(np.linspace(0, 1)),
    'reg_lambda': list(np.linspace(0, 1)),
    'colsample_bytree': list(np.linspace(0.6, 1, 10)),
    'objective': 'regression'
 }
lgb_train = lgb.Dataset(X_train,y_train)
cv_results = lgb.cv(params, lgb_train, num_boost_round = 10000, nfold = 10, metrics = 'rmse', shuffle=False,
           early_stopping_rounds = 100, verbose_eval = False, seed = 50 )

For convenience, below is the trace from the error output.
---------------------------------------------------------------------------
LightGBMError                             Traceback (most recent call last)
<ipython-input-84-3f76f5345fda> in <module>
      1 # Perform cross validation with 10 folds
      2 cv_results = lgb.cv(params, lgb_train, num_boost_round = 10000, nfold = 10, metrics = 'rmse', shuffle=False,
----> 3            early_stopping_rounds = 100, verbose_eval = False, seed = 50, )

/anaconda3/envs/py36/lib/python3.6/site-packages/lightgbm/engine.py in cv(params, train_set, num_boost_round, folds, nfold, stratified, shuffle, metrics, fobj, feval, init_model, feature_name, categorical_feature, early_stopping_rounds, fpreproc, verbose_eval, show_stdv, seed, callbacks)
    456     cvfolds = _make_n_folds(train_set, folds=folds, nfold=nfold,
    457                             params=params, seed=seed, fpreproc=fpreproc,
--> 458                             stratified=stratified, shuffle=shuffle)
    459
    460     # setup callbacks

/anaconda3/envs/py36/lib/python3.6/site-packages/lightgbm/engine.py in _make_n_folds(full_data, folds, nfold, params, seed, fpreproc, stratified, shuffle)
    315         else:
    316             tparam = params
--> 317         cvbooster = Booster(tparam, train_set)
    318         cvbooster.add_valid(valid_set, 'valid')
    319         ret.append(cvbooster)

/anaconda3/envs/py36/lib/python3.6/site-packages/lightgbm/basic.py in __init__(self, params, train_set, model_file, silent)
   1552                 train_set.construct().handle,
   1553                 c_str(params_str),
-> 1554                 ctypes.byref(self.handle)))
   1555             # save reference to data
   1556             self.train_set = train_set

/anaconda3/envs/py36/lib/python3.6/site-packages/lightgbm/basic.py in _safe_call(ret)
     44     """
     45     if ret != 0:
---> 46         raise LightGBMError(decode_string(_LIB.LGBM_GetLastError()))
     47
     48

LightGBMError: Unknown objective type name: r

If I remove the 'objective:regression' from the params, we get the error which says y has only 1 class which refers to classification. I am not sure how to fix this.

@scigeek72 Post your params here.

ping @scigeek72

params are posted above in the question. The problem seems to arise from the fact objective takes a list of values and not just values. By putting regression in list, the problem disappeared.

@scigeek72 I still can't find params argument from this line
lgb.cv(params, ...

in your snippet. param_grid is a collection of params and cannot be passed in lgv.cv() function, if you mean this.
objective param can be a single string value, e.g.
https://github.com/Microsoft/LightGBM/blob/611cf5d414a8273dfdd261651e2f127322a3db89/examples/python-guide/advanced_example.py#L38
However, glad that your problem has gone!


TRex GLB causes console error related to ModelKernel.deserialize

Description
Use the tester (https://modelviewer.dev/examples/tester.html), then drag this GLB into it: https://github.com/toji/xr-dinosaurs/blob/master/media/models/tyrannosaurus/compressed.glb
The model displays fine, but there are errors in the console. When loading this GLB into space-opera, it seems to break material editing (which is likely related to the errors?)
Here is the console error:
space-opera.js:108917 Uncaught TypeError: Cannot destructure property 'id' of 'serialized' as it is undefined.     at ModelKernel.deserialize (space-opera.js:108917)     at new Material$2 (space-opera.js:108464)     at ModelKernel.deserialize (space-opera.js:108927)     at new Model$1 (space-opera.js:108531)     at ModelKernel.deserialize (space-opera.js:108927)     at new ModelKernel (space-opera.js:108869)     at MessagePort.SceneGraphModelViewerElement.<computed> (space-opera.js:162091)
Browser Affected

[x] Chrome
[ ] Edge
[ ] Firefox
[ ] Helios
[ ] IE
[ ] Safari

OS

[ ] Android
[ ] iOS
[ ] Linux
[ ] MacOS
[x] Windows

Versions
modelviewer.dev as of Jul 13, 2020

That file has 16,000 some errors in the gltf-validator. If we can find a model that repros this while passing validation, I'll investigate.

@elalish The file attached here passes validation but experiences the same issue. It also includes materials that use the KHR_materials_pbrSpecularGlossiness extension, which is supported by other ThreeJS viewers, but doesn't appear to be in model-viewer. The line that the error stems from is attempting to deserialize a meterial's pbr-metallic-roughness property.
Tailored shirt_Light Grey.zip

@jeff-chamberlain-vntana Ah, I see; I think this is because our scene-graph API doesn't support spec-gloss materials yet (though the renderer does). Is this causing any noticeable pain besides the console error?

@elalish Well, we're seeing the same (or a very similar) error even when rendering with just the <model-viewer> tag and no scene graph. The resulting view appears to have materials rendering without their diffuse textures. This is the error that is output in that situation:
Uncaught TypeError: Cannot destructure property 'id' of 't' as it is undefined.     at Ib.deserialize (model-viewer.js:20)     at new material (model-viewer.js:1538)     at Ib.deserialize (model-viewer.js:20)     at new model (model-viewer.js:1538)     at Ib.deserialize (model-viewer.js:20)     at new Ib (model-viewer.js:20)     at MessagePort.<computed> (model-viewer.js:1774)

@jeff-chamberlain-vntana Ah, that's much more serious! Can you show side-by-side screenshots of model-viewer and something like the babylon sandbox, so I can see the problem?

Sure, here is the same model in Babylon vs model-viewer

I will see if I can find a model where the difference is more pronounced, but you can see the coloring (provided by a texture) in Babylon while in model-viewer the shirt looks completely white

Wow, I'm getting a much worse result on my macbook with a chrome collar:

@jeff-chamberlain-vntana This is definitely a bug, but what I can say is that the spec-gloss extension is a bit iffy on support. I've seen a bunch of strange driver bugs with it in three.js and glTF is busy with new specular extensions to replace this because it's pretty non-physical. I'd recommend converting to the metallic-roughness workflow if at all possible.

@elalish Yeah, I was actually using model-viewer v1.1. I just upgraded to v1.2.1 and I see the same thing you posted above. We have several models with similar issues where it appears to be forcing met/rough, resulting in lots of "shininess" with default metallic values of 1.
Thanks for the explanation. We unfortunately don't have control over the workflow, but maybe we can convert the models to met/rough

@jeff-chamberlain-vntana The shiny shirt looks to be fixed by #1574. The colors are still slightly different compared to Babylon, but I'm guessing that's just differences in lighting or tone mapping.


Incentive for the whisteblower of valid CustodySlashing

Updated: rewrite the issue
Issue
Currently, the CustodySlashing whistleblower rewards are given to

Block proposer
Other attesters of the given committee.

        # Slash the malefactor, reward the other committee members
        slash_validator(state, custody_slashing.malefactor_index)
        others_count = len(committee) - 1
        whistleblower_reward = Gwei(malefactor.effective_balance // WHISTLEBLOWER_REWARD_QUOTIENT // others_count)
        for attester_index in attesters:
            if attester_index != custody_slashing.malefactor_index:
                increase_balance(state, attester_index, whistleblower_reward)
        # No special whisteblower reward: it is expected to be an attester. Others are free to slash too however.

It looks like it should be:
slash_validator(state, custody_slashing.malefactor_index, custody_slashing.whistleblower_index)?
Proposed solution
Use slash_validator(state, custody_slashing.malefactor_index, custody_slashing.whistleblower_index)

False alarm: the block proposer got rewards from slash_validator and it's intentionally giving all attesters instead of whisteblower_index.


TabView attempts to set its width to an absurdly small number, excepts

Describe the bug
https://github.com/microsoft/microsoft-ui-xaml/blob/65414302161b532f59a06c7c8105ca1e8638c809/dev/TabView/TabView.cpp#L314-L326
Stepping through these three conditionals during Windows Terminal startup (MUX package version 2.2.190702001-prerelease) shows that each column is "2147000000 pixels wide". When we attempt to derive an availableWidth from the width taken and set it, regardless of the TabWidthMode, we get an "invalid argument" HRESULT.
| Name | Value | Type
-- | -- | -- | --
  | availableWidth | -6442450453.0000000 | double
  | widthTaken |<PHONE_NUMBER>.0000000 | double
Steps to reproduce the bug
This reproduces in a local dev build of Windows Terminal. I'm not sure how to reproduce it elsewhere.
Expected behavior
Doesn't crash.
Version Info
NuGet package version:
2.2.190702001-prerelease
Additional context
We're not inserting content into any of the TabView's left/add/right columns.
Xaml islands? We've got a window with xaml content in it, so I believe that it's already laid itself out correctly (ActualWidth is 491.00 on line 330 where availableWidth is calculated.)

Thanks, @DHowett-MSFT , can you share a branch/commitSha to check out for a build of terminal that repros this? That would help us debug locally.
I'm assigning to @teaP -- she'll be back on wednesday.

Sure: microsoft/terminal@cc45a50c, branch dev/duhowett/nuget_updates
Incidentally, would the change from is-a ListView to has-a ListView changing the return type of Items from IObservableVector to IVector warrant me filing another issue? Relevant here.

Incidentally, would the change from is-a ListView to has-a ListView changing the return type of Items from IObservableVector to IVector warrant me filing another issue? Relevant here.

Yes, if only so that we don't lose track of it. It should be straightforward to do so.

Done; #1021. Thanks!

I'm not seeing this any more.

A lot has changed since this bug was filed so if you're not seeing it anymore -- awesome. Let me know if it comes back!


find module references

VSCode builtin ts plugin support find function refferences, so it should not diffcult to support find module references?

Do you mean to find references in imports to current file e.g. import './foo.ts'?
Try builtin vscode command typescript.findAllFileReferences (TypeScript: Find File References)

you are right.


CPS: Bug in assignment propagation of loop variables

Assignment propagation assumes the tree is in SSA form, but this is not entirely true, because phi assignments have already been linearized. It will occasionally propagate a loop variable past one of its phi assignments.
E.g.
InvokeContinuation k (x1,y1)
Might linearize to:
x2 = x1
y2 = y1
break L
If this definition of y1 is in scope, it will erroneously propagate it into its use above:
y1 = x2 + 1
Yielding this:
x2 = x1
y2 = x2 + 1 (reads wrong value of x2)
(x2 can only be in scope here when the invocation was recursive)
Can be reproduced in dart2js_extra/for_test with this CL patched in https://codereview.chromium.org/1197673003/
@kmillikin

Btw I am working on a solution.

Obsolete


Could you make a tutorial?

I can't do it, I'm still inexperienced. How do I convert the file 89bb4eb5637df3cd96c463a795005065 into UTF-8 so I can edit the lines?

yeah sorry for the late response.. ill make one soon!


Error acces oasis wallet

Thank you for reporting this issue. We have updated our Oasis Wallet with bug fixes and new features which should also solve mentioned issue above.
If you still encounter same or similar issue, please check our FAQ or send an email to our support team at<EMAIL_ADDRESS>


Support reproducible builds (except packages)

Background:

docker-library/official-images#16044

Alternative to:

#248

ARG SOURCE_DATE_EPOCH is added. The argument value is consumed by the build scripts to make the httpd binary reproducible.

GNU implementation of wget is executed with --no-hsts to disable creating /root/.wget-hsts

For Debian, /var/log/* is removed as they contain timestamps

For Debian, /var/cache/ldconfig/aux-cache is removed as they contain inode numbers, etc.

For Alpine, virtual package versions are pinned to "0" to eliminate the timestamp-based version numbers that appear in /etc/apk/world and /lib/apk/db/installed

The following topics are NOT covered by this commit:

To reproduce file timestamps in layers, BuildKit has to be executed with --output type=<TYPE>,rewrite-timestamp=true. Needs BuildKit v0.13.0-beta1 or later.

To reproduce the base image by the hash, reproducers may:

modify the FROM instruction in Dockerfile manually
or, use the CONVERT action of source policies to replace the base image. https://github.com/moby/buildkit/blob/v0.13.0-beta1/docs/build-repro.md

To reproduce Debian packages, reproducers may:

modify the RUN instructions in the Dockerfile to rewrite /etc/apt/sources.list to use http://snapshot.debian.org, and restore /etc/apt/sources.list at the end of the instruction (See the rejected PR #248)
or, specify a custom Dockerfile frontend implementation that rewrites/restores /etc/apt/sources.list
or, specify a custom HTTP_PROXY that redirects HTTP requests for http://deb.debian.org to http://snapshot.debian.org. This is less reliable in long-term due to Acquire::Check-Valid-Until.

@tianon @yosifkit PTAL 🙏

@tianon @yosifkit
I think this is good to merge.
Unlike https://github.com/docker-library/httpd/pull/248 , this does not suffer from the slow apt-get.


Condition retrieve with filter on category not working

A Condition retrieve with a filter on category, like the following, results in an exception - "Error: CodeableConcept incompatible with org.opencds.cqf.cql.engine.runtime.Code":
[Condition: category in Common."US Core Condition Category Codes"] C
Repro is attached.
condition-category-retrieve.zip

Closing and moving this issue to the org.opencds.cqf.cds project.


"Hisory" tab?

Just a small thing I noticed: There is a tab titled "Hisory" which seems like it is a typo of "History". Not like it changes anything usage-wise one way or another, but I thought it might be good to bring it up.

Thanks :)
On Fri, 23 Oct 2020 at 00:25, LoquaciousLynx<EMAIL_ADDRESS>wrote:

Just a small thing I noticed: There is a tab titled "Hisory" which seems
like it is a typo of "History". Not like it changes anything usage-wise one
way or another, but I thought it might be good to bring it up.
[image: Screen Shot 2020-10-22 at 2 20 22 PM]
https://user-images.githubusercontent.com/67295371/96931472-38667c80-1472-11eb-91d0-b45ff2020642.png
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ofekmiz/Habitica-Pomodoro-SiteKeeper/issues/25, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AJOEOFSFBV67E7NR6NIWWWDSMCPM3ANCNFSM4S3X22FQ
.


Disable frustum culling

There are some bugs with the mod. Will try to see how many can be tackled with medium effort.
Harder bugs may be turned into their own separate issues.

World will load in chunks. I see this as a configure toggle that the player can choose. Use render far to disable culling


Issue with cluster

Hi, everybody
I have 2 hosts, at the first I have installed shipyard  with this script:
curl -sSL https://shipyard-project.com/deploy | bash -s
at the second with this:
curl -sSL https://shipyard-project.com/deploy | ACTION=node DISCOVERY=etcd://"ip of my first node":4001 bash -s
and now i have 2 nodes in the web interface
But when i do this command "sudo docker -H tcp://<IP_ADDRESS>:2375 info", I don not see any information about cluster
sudo docker -H tcp://<IP_ADDRESS>:2375 info
Containers: 14
Running: 13
Paused: 0
Stopped: 1
Images: 8
Server Version: 1.10.2
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 73
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Plugins:
Volume: local
Network: bridge null host
Kernel Version: 4.2.0-16-generic
Operating System: Ubuntu 15.10
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 3.859 GiB
Name: nod1
ID: WLN6:D5KJ:K5C5:YR4Z:CGLK:4MAI:RH6X:YQZ5:5QIY:KCQ3:2FEZ:NXV4
WARNING: No swap limit support
What a did wrong?
Can I manage all my nodes from one master?
And in future I want to use docker multi network between nodes. Is this possible with shipyard?

@mrsanuk
Port 2375 is the docker proxy port for the hosts themselves. What you want to do is actually hit the swarm manager port.
From that deploy script, you'll need to hit port 3376
SWARM_PORT=3376

This will show you what you want.
docker -H :3376 info

@pgporada
docker -H tcp://<IP_ADDRESS>:3376 info
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
and i don't see 3376 port
shipyard/shipyard:latest        <IP_ADDRESS>:8080->8080/tcp                           shipyard-controller
swarm:latest                                   2375/tcp                                         shipyard-swarm-agent
swarm:latest                                   2375/tcp                                         shipyard-swarm-manager
shipyard/docker-proxy          <IP_ADDRESS>:2375->2375/tcp                           shipyard-proxy
alpine                                                                                shipyard-certs
microbox/etcd:latest  <IP_ADDRESS>:4001->4001/tcp, <IP_ADDRESS>:7001->7001/tcp   shipyard-discovery
rethinkdb                           8080/tcp, 28015/tcp, 29015/tcp                   shipyard-rethinkdb

By default the Swarm port is 3375.  Try it as docker -H tcp://<host>:3375 ps

$docker -H tcp://localhost:3375 ps
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
when i added this "-H tcp://<IP_ADDRESS>:3375 -H unix:///var/run/docker.sock" I had this:
:~# docker -H tcp://localhost:3375 ps
CONTAINER ID        IMAGE                          COMMAND                  CREATED             STATUS              PORTS                                            NAMES
3206c3ad1d70        shipyard/shipyard:latest       "/bin/controller --de"   42 minutes ago      Up About a minute   <IP_ADDRESS>:8080->8080/tcp                           shipyard-controller
265e1362e8df        swarm:latest                   "/swarm j --addr 192."   43 minutes ago      Up About a minute   2375/tcp                                         shipyard-swarm-agent
191a446015e5        swarm:latest                   "/swarm m --replicati"   43 minutes ago      Up About a minute   2375/tcp                                         shipyard-swarm-manager
0e91be97452b        shipyard/docker-proxy:latest   "/usr/local/bin/run"     43 minutes ago      Up About a minute   <IP_ADDRESS>:2375->2375/tcp                           shipyard-proxy
8394bd43b4ca        alpine                         "sh"                     43 minutes ago      Up About a minute                                                    shipyard-certs
d2fa21a7775e        microbox/etcd:latest           "/bin/etcd -addr 192."   43 minutes ago      Up About a minute   <IP_ADDRESS>:4001->4001/tcp, <IP_ADDRESS>:7001->7001/tcp   shipyard-discovery
a608bbd48a6d        rethinkdb                      "rethinkdb --bind all"   43 minutes ago      Up About a minute   8080/tcp, 28015/tcp, 29015/tcp                   shipyard-rethinkd
~# docker -H tcp://localhost:3375 info
Containers: 12
Running: 7
Paused: 0
Stopped: 5
Images: 13
Server Version: 1.10.2
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 126
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Plugins:
Volume: local
Network: bridge null host
Kernel Version: 4.2.0-16-generic
Operating System: Ubuntu 15.10
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 3.859 GiB
Name: nod1
ID: WLN6:D5KJ:K5C5:YR4Z:CGLK:4MAI:RH6X:YQZ5:5QIY:KCQ3:2FEZ:NXV4
WARNING: No swap limit support
I don't understand how manage cluster from console(for example: I give command to run the container and cluster manager have to decide on  which node start it)
Should I write down something in /etc/default/docker?

HI
Use this implementation , it's works fine
[http://darrellbreeden.kinja.com/building-docker-the-scale-of-enterprise-1751723343]

I don't think there is an issue here @ehazlett. Worked for me multiple times with the exact commands with a multiple members cluster. Red Hat 7.2 with latest Docker Upstream Packages installed.

@marsmensch thanks!  i'm not able to reproduce either.

I also had this problem on RHEL 7.
My workaround was to specify the swarm manager container's ip:
docker -H <ip_swarm_manager>:3375 info


model problem

Thank you very much for sharing
i run the code python run_kgrec.py --dataset last-fm to process the dataset
When I ran it(python run_kgrec.py --dataset last-fm) the second time to train
i get this error
NameError: name 'test_user_set' is not defined

after i run the code python run_kgrec.py --dataset ailibaba-fashion
i run the code again
i get this running report
And then I got the above error.Unable to obtain results
Requesting Your Help

 在我的运行代码 python run_kgrec.py --dataset ailibaba-fashion 之后， 我再次运行代码， 我得到了这个运行报告 ，然后我得到了这个错误。 无法获取结果 NameError: name 'test_user_set' is not Defined 请求您的帮助

我也出现了这个问题，请问您解决了吗

Hi,
Can you post the error stack track so that I can better help?
为什么会出现上述情况呀，为什么train_cf_triples：那个进度条不动，和楼上情况一样

看起来只是因为打印了std值，截断了一次tqdm progress bar的打印而已，运行时有error吗？

@Pursuerwener
it's strange since test_user_set  should be globalized at line 117 global train_user_set, test_user_set .
Would you provide full script for evaluate_kgsr.py?

Thanks for your reply
yes，I noticed your code global train_user_set, test_user_set as soon as I started reproducing it.
This error also exists in the evaluate.py when i run the run_kgin.py
Fortunately,the running of KGCL is no problem
code.zip

That's because KGCL uses a class-based evaluator. I guess the problem lies in multiprocessing on Windows. Plz try any of the potential solutions:

use Linux
use KGCL's class-based evaluator for KGIN and KGRec
stop using multiprocessing for test_one_user

i use your second method
i get this error
Traceback (most recent call last):   File "run_kgin.py", line 126, in <module>     ret = Evaluator.test(model, user_dict, n_params) TypeError: test() missing 1 required positional argument: 'n_params'
running the run_kgrec.pyis the same as above
but i checked the evaluator.py,it' no problem
i think that the problem is processing on Windows

You have to modify your codes to pass n_params to Evaluator.test()


Update create-recovery-partition-installer to 1.1

After making all changes to the cask:

[x] brew cask audit --download {{cask_file}} is error-free.
[x] brew cask style --fix {{cask_file}} left no offenses.
[x] The commit message includes the cask’s name and version.

Thank you for the contribution. It was merged directly as a42e4bf5cb055f057caeb644454dfc988f14e9e8. Your contribution is still credited to you.


2 initial documentation

Added the documentation for the first initiative

Opened this pull request accidentally and closing it. Apologies for the inconvenience


Error: java.io.IOException: read failed, socket might closed or timeout, read ret: -1

=

Device: Android 11
React Native version: 0.64.1
RN Bluetooth Classic version:1.60.0-rc.21

Describe the bug
when i try to connect device, it throw error:  java.io.IOException: read failed, socket might closed or timeout, read ret: -1
the follow is my code:
 const [devices, setDevices] = useState([]);

  const getBondedDevices = async unloading => {
    try {
      let bonded = await RNBluetoothClassic.getBondedDevices();
      console.log('DeviceListScreen::getBondedDevices found', bonded);
      setDevices(bonded);
    } catch (error) {
      console.log('get devices error:', error);
    }
  };

const connect = async device => {
    try {
      let connection = await device.isConnected();
      console.log('是否连接：', connection);
      // 未连接
      if (!connection) {
        await device.connect({delimiter: '\r'});
        console.log('连接结果：', connection);
      } else {
        device.disconnect();
      }
    } catch (error) {
      console.log('连接过程错误：', error);
    }
  };

const renderItem = device => {
    return (
      <TouchableOpacity onPress={() => connect(device)}>
        <View style={[styles.item]}>
          <View>
            <Text style={styles.name}>{device.name}</Text>
            <Text style={styles.itemId}>{device.address}</Text>
          </View>
        </View>
      </TouchableOpacity>
    );
  };

<FlatList
        data={devices}
        renderItem={({item}) => renderItem(item)}
        keyExtractor={item => item.address}
      />

Hey, need a little more details on what you're attemtping to do:

What type of device are you attempting to connect with?
Can you confirm that the other device is actively waiting for a connection? If you're doing this manually you need to ensure a BluetoothServerSocket has been started.

Othwerise you may need to perform some debugging yourself and supply the results here.  It's very difficult to assist with these errors are they are generally very device/custom code specific.

Thank you for your reply.

I am attempting to connnect a bluetooth speaker which can dicovery with the function startDiscovery.
I confirm that my bluetooth speaker is waitting for a connection.
I also try to copy the react-native-bluetooth-classic-app demo, it run with the same error.

can you give me the right step process for a connection between phone and a bluetooth device, thank you very much.

Sure, for the most part (at a high level) you need to:

Scan for the device
Pair the device
Turn the device on
Turn the device into paring mode (some are automatic, some need to be done manually).  Since I have no idea what device you're using I can't give more details.
device.connect()

This should get you connected.  If you're getting the connection error you are, I would expect that:

The device isn't on (hopefully unlikeliy)
The device isn't in pairing mode
The device has another device connected?  Some devices will automatically drop when a new request comes in, some will not.

Bluetooth speakers don't generally allow for RFCOMM communication, they either use:

L2CAP (which this library doesn't support)
The Bluetooth Audio Profile (which this library doesn't support)

So you need to make absolutely sure that your speaker supports the RFCOMM connection method.  Which is unlikely.  You'll find some other attempts to connect to things like:

speakers
headsets
etc

which have not been possible.


Disable disk check utility on startup

S/N Ticket: INC0316962
Some nodes would cause the Gnome desktop to display a disk error notification as observed below:

Systems has informed us that this is just a warning and users do not need to be made aware of this issue. So we need to disable this disk check on startup.

Fixed here: 1e737624b8e012ec20e297c7526bb6c490781950


Error: execution of an external program failed if callJs in thread.

So, I need threadpool for my current project.
So, I need to access callJs from spawned procedure.
So, it fails miserably.
Is it ever possible to use that library with multithreading ?

Can you elaborate more on what you're trying to do?
And could you upload code examples or your project code?

Well, I wanted to implement this util with Neel.
Ended up using niup due to aforementioned mutithreading troubles.

Handling threaded projects is something we're exploring after implementing Native Webview, closing this one out for now


Fix compiler warning about no await operators

Fix #1042.
This PR fixes the compiler warning "This async method lacks 'await' operators and will run synchronously" by changing the foreach (var foo in SomeEnumerable) yield return new Foo { ... } code to use LINQ instead, i.e. SomeEnumerable.ToAsyncEnumerable().Select(foo => new Foo { ... }.

There's one question I could not make up my mind about: after running .OrderBy on the sync enumerable, is it better to do .ToAsyncEnumerable().Select(item => new Foo { ... })? Or should the .Select be done on the sync enumrable, and then the final result converted to an async enumerable, i.e. .Select(item => new Foo { ... }).ToAsyncEnumerable()? Or (as I think is correct) does it not actually matter at all?

I don't think it matters


[AP] Reverse Proxy empty bucket testing for staging

Description
The goal of this ticket is to properly test changes to the reverse proxy via our test plan on staging.va.gov.
When testing a thread should be started in the #accelerated-publishing slack channel to keep the team updated with passing or failing test. All findings should be recorded with this ticket.
Acceptance Criteria

[x] Results of each test added to this ticket
[x] Team informed of passing or failing test

Test Results

Passed

Passed

Passed

Passed

Passed

N/A (Dev only test)
7.. N/A (Dev only test)

Passed

Passed


Task Force Proposal: Badging/Lifecycle

Introduction/background material
Today's Hyperledger Project Lifecycle, represents a lifecycle in which projects only move forward through the different stages. In past TOCs, we have talked about whether this should change and whether we should instead represent the state of a project with some form of badging to allow people to be able to quickly determine the health and status of a project. In addition, the Governing Board has requested that we take another look at how best to represent the current status of project's within Hyperledger. There are a couple of different options that this task force might consider:

Modify the current project lifecycle to have an annual review process to verify that a project's current status meets the criteria for its current state. This change may require renaming the "Graduated" state to reflect that this stage is not an achieved and done stage. This change may also require updating the lifecycle to ensure that each of the states and the criteria for each state is documented to ensure the annual review process can objectively determine the correct state based on the project status.
Look to implement objective badges for Hyperledger projects that can replace the current lifecycle that can be updated in during the quarterly reporting step so that people will understand the current project status.

Background Material:

Hyperledger Project Lifecycle
Previous Badging Proposal and Discussion
Previously Proposed Badges
LF Networking Project Lifecycle (contains an incubation reversal review)

Task to be completed
Determine how to update the project lifecycle and whether that will involve the introduction of badging.
List of deliverables or work products

[ ] Updated project lifecycle
[ ] Badges and badging process (optional)

Time to complete (no more than 6 months)
TBD
Leader
Rama
Initial participant list
Venkatraman Ramakrishna (Rama)
Bobbi Muscara

The pre-read, and the related issue #24

Wiki page on Badging/Lifecycle Task Force

Wiki link above is out of date. New link is https://lf-hyperledger.atlassian.net/wiki/spaces/TF/pages/21011272/Badging+Lifecycle+Task+Force.


Shrink output Vec to fit contents

Minified output should be smaller than input, so reclaim some memory.

Thanks @RealOrangeOne


Make certain the job will fail if there are test failures recorded

Related to #10007 uncaught error.

Can one of the admins verify this patch?


consider changing multiline constant defs with hierarchical brackets

currently a less nice solution for
constant C_DUT_IF_FIELD_CONFIG_DIRECTION_ARRAY : t_dut_if_field_config_direction_array(TRANSMIT to RECEIVE)(0 to 5) :=
(TRANSMIT => (
0         => (dut_address => C_ETH_ADDR_INVALID, dut_address_increment => 0, data_width => C_SBI_DATA_WIDTH, use_field => false, field_description => "TX Preamble and SFD"),
1         => (dut_address => C_ETH_ADDR_MAC_DEST, dut_address_increment => 0, data_width => C_SBI_DATA_WIDTH, use_field => true, field_description => "TX MAC destination "),
2         => (dut_address => C_ETH_ADDR_MAC_SRC, dut_address_increment => 0, data_width => C_SBI_DATA_WIDTH, use_field => true, field_description => "TX MAC source      "),
3         => (dut_address => C_ETH_ADDR_PAY_LEN, dut_address_increment => 0, data_width => C_SBI_DATA_WIDTH, use_field => true, field_description => "TX payload length  "),
4         => (dut_address => C_ETH_ADDR_PAYLOAD, dut_address_increment => 0, data_width => C_SBI_DATA_WIDTH, use_field => true, field_description => "TX payload         "),
5         => (dut_address => C_ETH_ADDR_INVALID, dut_address_increment => 0, data_width => C_SBI_DATA_WIDTH, use_field => false, field_description => "TX FCS             ")
),
RECEIVE => (
0       => (dut_address => C_ETH_ADDR_INVALID, dut_address_increment => 0, data_width => C_SBI_DATA_WIDTH, use_field => true, field_description => "RX NOT USING ADDR  "),
1       => (dut_address => C_ETH_ADDR_INVALID, dut_address_increment => 0, data_width => C_SBI_DATA_WIDTH, use_field => true, field_description => "RX NOT USING ADDR  "),
2       => (dut_address => C_ETH_ADDR_INVALID, dut_address_increment => 0, data_width => C_SBI_DATA_WIDTH, use_field => true, field_description => "RX NOT USING ADDR  "),
3       => (dut_address => C_ETH_ADDR_INVALID, dut_address_increment => 0, data_width => C_SBI_DATA_WIDTH, use_field => true, field_description => "RX NOT USING ADDR  "),
4       => (dut_address => C_ETH_ADDR_INVALID, dut_address_increment => 0, data_width => C_SBI_DATA_WIDTH, use_field => true, field_description => "RX NOT USING ADDR  "),
5       => (dut_address => C_ETH_ADDR_INVALID, dut_address_increment => 0, data_width => C_SBI_DATA_WIDTH, use_field => true, field_description => "RX NOT USING ADDR  ")
)
);

solved


When Trying to Deploy I'm receiving the following error

!     No default language could be detected for this app.
HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
See https://devcenter.heroku.com/articles/buildpacks
!     Push failed
I've set the buildpack to be nodejs and it still is not working

I forgot to run git init 😃

i need help. where is git.ini i'm stuck with this error

@GamingPilot2 run git init on your terminal.

git init didnt solve this for me, im still stuck with the error

No default language could be detected for this app.
HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
See https://devcenter.heroku.com/articles/buildpacks
!     Push failed
i get this error whenever i push files to heroku

I am facing the same issue my code is:
https://github.com/sushen/formalin

same issue for me
git init didn't help

@sushen that's not a code that was generated with this repo
cna you show us the code you're trying to push @Oswaldgerald @uchedotphp @arfankhan77  ?

I forgot to actually COMMIT the requirements.txt file after creating it!

after getting this error and adding requirements.txt file you have commit this file again in following way.
git commit -m "requirements.txt"
git init
git add -A
git push heroku master

just git commit -m "comment" requirements.txt ...that's it

No default language could be detected for this app.
HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
See https://devcenter.heroku.com/articles/buildpacks
!     Push failed

heroku create myapp --buildpack heroku/python

According to official docs:

Heroku automatically recognizes your app as a Python app if it includes a requirements.txt or setup.py file in its root directory.

In my case the requirements file was named as requirement.txt instead of requirements.txt (note the s at end) ... and after fixing this the deployment worked just fine 😛

According to official docs:

Heroku automatically recognizes your app as a Python app if it includes a requirements.txt or setup.py file in its root directory.

In my case the requirements file was named as requirement.txt instead of requirements.txt (note the s at end) ... and after fixing this the deployment worked just fine 😛

thank you buddy. Same in my case

I  done the following to fix the problem for python language. Run the command
heroku buildpacks:set heroku/python
Than i run the command.  git push heroku master.
I get another error. Using buildpack: heroku/python
remote: -----> App not compatible with buildpack:
The problem i fix by running the following command.
pip3 freeze > requirements.txt
heroku buildpacks:set heroku/python
git add .; git commit -m "add requirements.txt"; git push heroku master

Here we go, it solve the problem.

@kupan31 I'm making a discord bot, and what do you put inside the requirements.txt?

I had the same issue but this article saved me:)

According to official docs:

Heroku automatically recognizes your app as a Python app if it includes a requirements.txt or setup.py file in its root directory.

In my case the requirements file was named as requirement.txt instead of requirements.txt (note the s at end) ... and after fixing this the deployment worked just fine stuck_out_tongue

for me it was opposite, I had to put requirements.txt instead requirement.txt.

According to official docs:

Heroku automatically recognizes your app as a Python app if it includes a requirements.txt or setup.py file in its root directory.

In my case the requirements file was named as requirement.txt instead of requirements.txt (note the s at end) ... and after fixing this the deployment worked just fine 😛

thank you buddy. Same in my case

thanks bro I am also facing same issue

probably missing composer.json file


Update copyright headers to 2016

Like #245, but into the future. :)

The easy cases:
for f in `git ls-tree -r --name-only HEAD`; do perl -p -i -e 's/2010-2015, MIT Probabilistic Computing Project/2010-2016, MIT Probabilistic Computing Project/' $f; done

Then git grep '[- ]201[012345] ' revealed:
external/weakprng/COPYING:Copyright (c) 2015 Taylor R. Campbell
external/weakprng/dist/chacha.py:# Copyright (c) 2015 Taylor R. Campbell
external/weakprng/dist/weakprng.py:# Copyright (c) 2015 Taylor R. Campbell

which I think are correctly not covered by this change. @riastradh-probcomp let me know if I'm wrong.

Date: Fri, 05 Feb 2016 14:42:36 -0800
From: Gregory Marton<EMAIL_ADDRESS>The easy cases:
for f in `git ls-tree -r --name-only HEAD`; do perl -p -i -e 's/2010-2015, MIT Probabilistic Computing Project/2010-2016, MIT Probabilistic Computing Project/' $f; done

Then git grep '[- ]201[012345] ' revealed:
external/weakprng/COPYING:Copyright (c) 2015 Taylor R. Campbell
external/weakprng/dist/chacha.py:# Copyright (c) 2015 Taylor R. Campbell
external/weakprng/dist/weakprng.py:# Copyright (c) 2015 Taylor R. Campbell

which I think are correctly not covered by this change. @riastradh-probcomp let me know if I'm wrong.
Looks right to me.


Breaking changes and errors

The output from this script gives a lot of these errors: WARNING: Get-AzureRmSnapshot: A property of the output of this cmdlet will change in an upcoming breaking change release.
And ends in the error: Changing property 'osDisk.osType' is not allowed

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 04f5da69-0386-feb0-469a-788ae89d3a3d
Version Independent ID: 27031537-f436-7252-b73c-7f8edbc176cc
Content: Azure PowerShell Script Sample - Create a VM from a snapshot
Content Source: articles/virtual-machines/scripts/virtual-machines-windows-powershell-sample-create-vm-from-snapshot.md
Service: virtual-machines-windows
GitHub Login: @ramankum
Microsoft Alias: ramankum

Ok. Found the reason for the error:
Original Code
#Use the Managed Disk Resource Id to attach it to the virtual machine. Please change the OS type to linux if OS disk has linux OS
$VirtualMachine = Set-AzureRmVMOSDisk -VM $VirtualMachine -ManagedDiskId $disk.Id -CreateOption Attach -Linux
This sets the OS Type to Linux (which the comment says you should change to if you are attaching a Linux Snapshot). The error then came from me wanting to attach a Windows Snapshot.

Thanks for the feedback! We are currently investigating and will update you shortly.

@mikaelsand thanks for the update! Glad to hear you were able to get it to work. I will close this for now.


Concierge: Tier based support

HI is available at Tier 3 only. Chat on Tier 2 (the text input field). Tier 1 only content prompts and selection.

Closing as out of date


Sniper rifle style override doesn't work

Fedoraware Version Date:
Latest version
Config used:
https://files.catbox.moe/4jd8qs.fed
Description:
style override doesn't work on the sniper rifle
Steps to reproduce:

[x] I am able to consistently reproduce this error

Steps to reproduce the behavior:

Enable style override (no sheen, no unusual effects)
apply
nothing

Additional context
it doesn't work on casual or bot matches. The style override works for other weapons, even with sheens and unusual effects. But not for the sniper rifle

[x] I have included the steps to reproduce to the best I am able to share.

Sheen, unusual effects dont work either

Can confirm this is happening, but I frankly have zero (0) idea why. It works for every weapon except specifically the sniper rifle...

I'm sorry, but what is style override supposed to do?

It's supposed to enable the Australium effect, or something else on other weapons

It's referring to the attribute "item style override" specifically

(in the item schema)

yeh alr, seems kind of weird that it doesn't work since i cant see anything that would stop it :/

Yeah I said that 24 days ago

I still have no idea why this doesn't work but to be honest I don't care


type and namespace no longer appear as global keyword completion

TypeScript Version:  3.6.2

Search Terms:
keyword, completion, global, namespace
Code
n

Expected behavior:
Completion gives namespace.
Actual behavior:
Completion does not give namespace.
Playground Link:  N/A
Related Issues:
Broken by https://github.com/microsoft/TypeScript/pull/32474
See https://developercommunity.visualstudio.com/content/problem/749982/typescript-intellisense-is-incorrect-for-namespace.html for report.

Uh, should the type keyword be included too? Seems that list was too eager.

@sandersn Can I try working on this?

Sure! I re-reviewed the change and I think it was the drive-by fix in getTypescriptKeywordCompletions that made this happen; the code was clearly not operating as intended since it was truthy-checking a kind property. But I don't think the code that was there was correct either.
I noticed that I added declare,module and functionlike-body-keyword to the existing code. So probably you have to add namespace to the list plus any other keyword that got removed that you want to put back.
Ping me @DanielRosenwasser and @andrewbranch on the review when it's ready.

@simplywondrous since the beta ends next Monday, I'm going to go ahead and do this.