ModelCI v1.x.x, CUDA Version vx.x.x, GPU device used...
There is always pymongo Authentication failure when I run the pytest, here is part of the error message
__________________________________________ test_delete_model ___________________________________________
def test_delete_model():
> model = ModelService.get_models('ResNet50')[0]
tests/test_model_service.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
modelci/persistence/service.py:45: in get_models
model_pos = cls.__model_DAO.get_models(**kwargs)
modelci/persistence/model_dao.py:66: in get_models
return ModelDO.objects(**kwargs).order_by('name', 'framework', 'engine', '-version')
../../../miniconda3/envs/modelci/lib/python3.7/site-packages/mongoengine/queryset/manager.py:37: in __get__
queryset = queryset_class(owner, owner._get_collection())
../../../miniconda3/envs/modelci/lib/python3.7/site-packages/mongoengine/document.py:211: in _get_collection
db = cls._get_db()
../../../miniconda3/envs/modelci/lib/python3.7/site-packages/mongoengine/document.py:189: in _get_db
return get_db(cls._meta.get("db_alias", DEFAULT_CONNECTION_NAME))
../../../miniconda3/envs/modelci/lib/python3.7/site-packages/mongoengine/connection.py:369: in get_db
conn_settings["username"], conn_settings["password"], **auth_kwargs
../../../miniconda3/envs/modelci/lib/python3.7/site-packages/pymongo/database.py:1495: in authenticate
connect=True)
../../../miniconda3/envs/modelci/lib/python3.7/site-packages/pymongo/mongo_client.py:781: in _cache_credentials
sock_info.authenticate(credentials)
../../../miniconda3/envs/modelci/lib/python3.7/site-packages/pymongo/pool.py:810: in authenticate
auth.authenticate(credentials, self)
../../../miniconda3/envs/modelci/lib/python3.7/site-packages/pymongo/auth.py:673: in authenticate
auth_func(credentials, sock_info)
../../../miniconda3/envs/modelci/lib/python3.7/site-packages/pymongo/auth.py:589: in _authenticate_default
return _authenticate_scram(credentials, sock_info, 'SCRAM-SHA-256')
../../../miniconda3/envs/modelci/lib/python3.7/site-packages/pymongo/auth.py:333: in _authenticate_scram
res = sock_info.command(source, cmd)
../../../miniconda3/envs/modelci/lib/python3.7/site-packages/pymongo/pool.py:694: in command
exhaust_allowed=exhaust_allowed)
../../../miniconda3/envs/modelci/lib/python3.7/site-packages/pymongo/network.py:162: in command
parse_write_concern_error=parse_write_concern_error)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
response = {'code': 18, 'codeName': 'AuthenticationFailed', 'errmsg': 'Authentication failed.', 'ok': 0.0}
max_wire_version = 9, msg = '%s', allowable_errors = None, parse_write_concern_error = False
def _check_command_response(response, max_wire_version, msg=None,
allowable_errors=None,
parse_write_concern_error=False):
"""Check the response to a command for errors.
"""
if "ok" not in response:
# Server didn't recognize our message as a command.
raise OperationFailure(response.get("$err"),
response.get("code"),
response,
max_wire_version)
if parse_write_concern_error and 'writeConcernError' in response:
_raise_write_concern_error(response['writeConcernError'])
if not response["ok"]:
details = response
# Mongos returns the error details in a 'raw' object
# for some errors.
if "raw" in response:
for shard in itervalues(response["raw"]):
# Grab the first non-empty raw error from a shard.
if shard.get("errmsg") and not shard.get("ok"):
details = shard
break
errmsg = details["errmsg"]
if (allowable_errors is None
or (errmsg not in allowable_errors
and details.get("code") not in allowable_errors)):
code = details.get("code")
# Server is "not master" or "recovering"
if code in _NOT_MASTER_CODES:
raise NotMasterError(errmsg, response)
elif ("not master" in errmsg
or "node is recovering" in errmsg):
raise NotMasterError(errmsg, response)
# Server assertion failures
if errmsg == "db assertion failure":
errmsg = ("db assertion failure, assertion: '%s'" %
details.get("assertion", ""))
raise OperationFailure(errmsg,
details.get("assertionCode"),
response,
max_wire_version)
# Other errors
# findAndModify with upsert can raise duplicate key error
if code in (11000, 11001, 12582):
raise DuplicateKeyError(errmsg, code, response,
max_wire_version)
elif code == 50:
raise ExecutionTimeout(errmsg, code, response,
max_wire_version)
elif code == 43:
raise CursorNotFound(errmsg, code, response,
max_wire_version)
msg = msg or "%s"
raise OperationFailure(msg % errmsg, code, response,
> max_wire_version)
E pymongo.errors.OperationFailure: Authentication failed., full error: {'ok': 0.0, 'errmsg': 'Authentication failed.', 'code': 18, 'codeName': 'AuthenticationFailed'}
../../../miniconda3/envs/modelci/lib/python3.7/site-packages/pymongo/helpers.py:168: OperationFailure
=========================================== warnings summary ===========================================
../../../miniconda3/envs/modelci/lib/python3.7/site-packages/tensorflow_core/python/pywrap_tensorflow_internal.py:15
~/miniconda3/envs/modelci/lib/python3.7/site-packages/tensorflow_core/python/pywrap_tensorflow_internal.py:15: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
../../../miniconda3/envs/modelci/lib/python3.7/site-packages/h5py/_hl/base.py:19
../../../miniconda3/envs/modelci/lib/python3.7/site-packages/h5py/_hl/base.py:19
../../../miniconda3/envs/modelci/lib/python3.7/site-packages/h5py/_hl/base.py:19
../../../miniconda3/envs/modelci/lib/python3.7/site-packages/h5py/_hl/base.py:19
../../../miniconda3/envs/modelci/lib/python3.7/site-packages/h5py/_hl/base.py:19
~/miniconda3/envs/modelci/lib/python3.7/site-packages/h5py/_hl/base.py:19: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
from collections import (Mapping, MutableMapping, KeysView,
test_converter.py::test_xgboost_to_onnx
~/miniconda3/envs/modelci/lib/python3.7/site-packages/onnx/helper.py:220: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
is_iterable = isinstance(value, collections.Iterable)
test_converter.py::test_xgboost_to_torch
test_converter.py::test_onnx_to_pytorch
~/miniconda3/envs/modelci/lib/python3.7/site-packages/torch/nn/modules/container.py:434: UserWarning: Setting attributes on ParameterList is not supported.
warnings.warn("Setting attributes on ParameterList is not supported.")
-- Docs: https://docs.pytest.org/en/stable/warnings.html
======================================= short test summary info ========================================
FAILED tests/test_model_service.py::test_register_model - pymongo.errors.OperationFailure: Authentica...
FAILED tests/test_model_service.py::test_get_model_by_name - pymongo.errors.OperationFailure: Authent...
FAILED tests/test_model_service.py::test_get_model_by_task - pymongo.errors.OperationFailure: Authent...
FAILED tests/test_model_service.py::test_get_model_by_id - pymongo.errors.OperationFailure: Authentic...
FAILED tests/test_model_service.py::test_update_model - pymongo.errors.OperationFailure: Authenticati...
FAILED tests/test_model_service.py::test_register_static_profiling_result - pymongo.errors.OperationF...
FAILED tests/test_model_service.py::test_register_dynamic_profiling_result - pymongo.errors.Operation...
FAILED tests/test_model_service.py::test_update_dynamic_profiling_result - pymongo.errors.OperationFa...
FAILED tests/test_model_service.py::test_delete_dynamic_profiling_result - pymongo.errors.OperationFa...
FAILED tests/test_model_service.py::test_delete_model - pymongo.errors.OperationFailure: Authenticati...
============================== 10 failed, 9 passed, 9 warnings in 20.78s ===============================
Things you tried, stack traces, related issues, suggestions on how to fix it...
Actually, some MongoDB connection tests are passed, but I cannot locate the database connect part in ModelDAO
class, so I'm still stuck on it