A bug happened when inspecting/debugging a model:
'NoneType' object has no attribute 'client'
AttributeError
Traceback (most recent call last):
File "/Users/***/Builds/giskard/python-client/giskard/ml_worker/utils/request_interceptor.py", line 50, in wrapper
res = await loop.run_in_executor(pool, behavior, request, context)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/Users/***/Builds/giskard/python-client/giskard/ml_worker/server/ml_worker_service.py", line 432, in runModel
self.ml_worker.tunnel.client.log_artifact(
AttributeError: 'NoneType' object has no attribute 'client'
### Standalone code OR list down the steps to reproduce the issue
```shell
Worker related issue:
1. Create a project that would be run by the internal worker (`mlWorkerType == MLWorkerType.INTERNAL`).
2. Upload the models and the datasets.
3. Inspect/Debug a dataset on a model.
4. Get an exception from the internal worker.
Relevant log output
2023-06-30 10:19:49,283 pid:2142 MainThread giskard.commands.cli_worker INFO Starting ML Worker server
2023-06-30 10:19:49,283 pid:2142 MainThread giskard.commands.cli_worker INFO Python: /Users/***/Builds/giskard/python-client/.venv/bin/python3.9 (3.9.6)
2023-06-30 10:19:49,283 pid:2142 MainThread giskard.commands.cli_worker INFO Giskard Home: /Users/***/giskard-home
2023-06-30 10:19:54,135 pid:2142 MainThread giskard.ml_worker.ml_worker INFO Started ML Worker server on localhost:50051
2023-06-30 10:21:52,661 pid:2142 ml_worker_thread_0 giskard.ml_worker.server.ml_worker_service INFO Collecting ML Worker info
2023-06-30 10:22:14,166 pid:2142 ml_worker_thread_0 giskard.ml_worker.server.ml_worker_service INFO Collecting ML Worker info
2023-06-30 10:24:39,087 pid:2142 ml_worker_thread_0 giskard.datasets.base INFO Casting dataframe columns from {'account_check_status': 'object', 'duration_in_month': 'int64', 'credit_history': 'object', 'purpose': 'object', 'credit_amount': 'int64', 'savings': 'object', 'present_employment_since': 'object', 'installment_as_income_perc': 'int64', 'sex': 'object', 'personal_status': 'object', 'other_debtors': 'object', 'present_residence_since': 'int64', 'property': 'object', 'age': 'int64', 'other_installment_plans': 'object', 'housing': 'object', 'credits_this_bank': 'int64', 'job': 'object', 'people_under_maintenance': 'int64', 'telephone': 'object', 'foreign_worker': 'object', 'default': 'object'} to {'account_check_status': 'object', 'age': 'int64', 'credit_amount': 'int64', 'credit_history': 'object', 'credits_this_bank': 'int64', 'default': 'object', 'duration_in_month': 'int64', 'foreign_worker': 'object', 'housing': 'object', 'installment_as_income_perc': 'int64', 'job': 'object', 'other_debtors': 'object', 'other_installment_plans': 'object', 'people_under_maintenance': 'int64', 'personal_status': 'object', 'present_employment_since': 'object', 'present_residence_since': 'int64', 'property': 'object', 'purpose': 'object', 'savings': 'object', 'sex': 'object', 'telephone': 'object'}
Feature 'people_under_maintenance' is declared as 'numeric' but has 2 (<= category_threshold=2) distinct values. Are you sure it is not a 'category' feature?
2023-06-30 10:24:39,422 pid:2142 ml_worker_thread_0 giskard.datasets.base INFO Your 'pandas.DataFrame' is successfully wrapped by Giskard's 'Dataset' wrapper class.
2023-06-30 10:24:39,432 pid:2142 ml_worker_thread_0 giskard.datasets.base INFO Your 'pandas.DataFrame' is successfully wrapped by Giskard's 'Dataset' wrapper class.
2023-06-30 10:27:19,831 pid:2142 ml_worker_thread_1 giskard.datasets.base INFO Casting dataframe columns from {'account_check_status': 'object', 'duration_in_month': 'int64', 'credit_history': 'object', 'purpose': 'object', 'credit_amount': 'int64', 'savings': 'object', 'present_employment_since': 'object', 'installment_as_income_perc': 'int64', 'sex': 'object', 'personal_status': 'object', 'other_debtors': 'object', 'present_residence_since': 'int64', 'property': 'object', 'age': 'int64', 'other_installment_plans': 'object', 'housing': 'object', 'credits_this_bank': 'int64', 'job': 'object', 'people_under_maintenance': 'int64', 'telephone': 'object', 'foreign_worker': 'object', 'default': 'object'} to {'account_check_status': 'object', 'age': 'int64', 'credit_amount': 'int64', 'credit_history': 'object', 'credits_this_bank': 'int64', 'default': 'object', 'duration_in_month': 'int64', 'foreign_worker': 'object', 'housing': 'object', 'installment_as_income_perc': 'int64', 'job': 'object', 'other_debtors': 'object', 'other_installment_plans': 'object', 'people_under_maintenance': 'int64', 'personal_status': 'object', 'present_employment_since': 'object', 'present_residence_since': 'int64', 'property': 'object', 'purpose': 'object', 'savings': 'object', 'sex': 'object', 'telephone': 'object'}
Feature 'people_under_maintenance' is declared as 'numeric' but has 2 (<= category_threshold=2) distinct values. Are you sure it is not a 'category' feature?
2023-06-30 10:27:19,997 pid:2142 ml_worker_thread_1 giskard.datasets.base INFO Your 'pandas.DataFrame' is successfully wrapped by Giskard's 'Dataset' wrapper class.
2023-06-30 10:27:19,999 pid:2142 ml_worker_thread_1 giskard.datasets.base INFO Your 'pandas.DataFrame' is successfully wrapped by Giskard's 'Dataset' wrapper class.
2023-06-30 10:29:55,958 pid:2142 ml_worker_thread_1 giskard.datasets.base INFO Casting dataframe columns from {'account_check_status': 'object', 'duration_in_month': 'int64', 'credit_history': 'object', 'purpose': 'object', 'credit_amount': 'int64', 'savings': 'object', 'present_employment_since': 'object', 'installment_as_income_perc': 'int64', 'sex': 'object', 'personal_status': 'object', 'other_debtors': 'object', 'present_residence_since': 'int64', 'property': 'object', 'age': 'int64', 'other_installment_plans': 'object', 'housing': 'object', 'credits_this_bank': 'int64', 'job': 'object', 'people_under_maintenance': 'int64', 'telephone': 'object', 'foreign_worker': 'object', 'default': 'object'} to {'account_check_status': 'object', 'age': 'int64', 'credit_amount': 'int64', 'credit_history': 'object', 'credits_this_bank': 'int64', 'default': 'object', 'duration_in_month': 'int64', 'foreign_worker': 'object', 'housing': 'object', 'installment_as_income_perc': 'int64', 'job': 'object', 'other_debtors': 'object', 'other_installment_plans': 'object', 'people_under_maintenance': 'int64', 'personal_status': 'object', 'present_employment_since': 'object', 'present_residence_since': 'int64', 'property': 'object', 'purpose': 'object', 'savings': 'object', 'sex': 'object', 'telephone': 'object'}
Feature 'people_under_maintenance' is declared as 'numeric' but has 2 (<= category_threshold=2) distinct values. Are you sure it is not a 'category' feature?
2023-06-30 10:29:56,057 pid:2142 ml_worker_thread_1 giskard.datasets.base INFO Your 'pandas.DataFrame' is successfully wrapped by Giskard's 'Dataset' wrapper class.
2023-06-30 10:29:56,119 pid:2142 ml_worker_thread_1 giskard.datasets.base INFO Your 'pandas.DataFrame' is successfully wrapped by Giskard's 'Dataset' wrapper class.
2023-06-30 10:29:56,122 pid:2142 ml_worker_thread_1 giskard.datasets.base INFO Your 'pandas.DataFrame' is successfully wrapped by Giskard's 'Dataset' wrapper class.
2023-06-30 10:29:56,127 pid:2142 ml_worker_thread_1 giskard.datasets.base INFO Casting dataframe columns from {'account_check_status': 'object', 'duration_in_month': 'int64', 'credit_history': 'object', 'purpose': 'object', 'credit_amount': 'int64', 'savings': 'object', 'present_employment_since': 'object', 'installment_as_income_perc': 'int64', 'sex': 'object', 'personal_status': 'object', 'other_debtors': 'object', 'present_residence_since': 'int64', 'property': 'object', 'age': 'int64', 'other_installment_plans': 'object', 'housing': 'object', 'credits_this_bank': 'int64', 'job': 'object', 'people_under_maintenance': 'int64', 'telephone': 'object', 'foreign_worker': 'object'} to {'account_check_status': 'object', 'duration_in_month': 'int64', 'credit_history': 'object', 'purpose': 'object', 'credit_amount': 'int64', 'savings': 'object', 'present_employment_since': 'object', 'installment_as_income_perc': 'int64', 'sex': 'object', 'personal_status': 'object', 'other_debtors': 'object', 'present_residence_since': 'int64', 'property': 'object', 'age': 'int64', 'other_installment_plans': 'object', 'housing': 'object', 'credits_this_bank': 'int64', 'job': 'object', 'people_under_maintenance': 'int64', 'telephone': 'object', 'foreign_worker': 'object'}
2023-06-30 10:29:56,131 pid:2142 ml_worker_thread_1 giskard.ml_worker.utils.logging INFO Predicted dataset with shape (200, 22) executed in 0:00:00.072331
2023-06-30 10:29:56,169 pid:2142 MainThread giskard.ml_worker.utils.request_interceptor ERROR 'NoneType' object has no attribute 'client'
Traceback (most recent call last):
File "/Users/***/Builds/giskard/python-client/giskard/ml_worker/utils/request_interceptor.py", line 50, in wrapper
res = await loop.run_in_executor(pool, behavior, request, context)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/Users/***/Builds/giskard/python-client/giskard/ml_worker/server/ml_worker_service.py", line 432, in runModel
self.ml_worker.tunnel.client.log_artifact(
AttributeError: 'NoneType' object has no attribute 'client'
Issue Type
Bug
Source
source
Giskard Library Version
2.0.0b10
Giskard Server Version
2.0.0b10
OS Platform and Distribution
macOS 13.4.1
Python version
3.9.6
Installed python packages
Current Behaviour?
Relevant log output
GSK-1384