Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GSK-1426] Use WebSocket to replace GRPC for worker-backend communication #1238

Merged
merged 168 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
168 commits
Select commit Hold shift + click to select a range
0b8f56b
Open WebSocket connections from workers to server
Inokinoki Jul 6, 2023
15b0793
Add basic WebSocket-based worker-backend comm
Inokinoki Jul 6, 2023
9a97e08
Separate one- and multi-shot messages in WS Worker
Inokinoki Jul 7, 2023
178fe0b
Allow to observe connectivities of ML Workers
Inokinoki Jul 7, 2023
045416f
Add basic definitions for WebSocket ML Worker DTO
Inokinoki Jul 7, 2023
6ac6092
Add WebSocket comm service for ML Workers
Inokinoki Jul 7, 2023
bd64bfd
Migrate ML Worker getInfo method to WebSocket
Inokinoki Jul 7, 2023
881c1bc
Separate listener code from MLWorker definitions
Inokinoki Jul 7, 2023
fe39dd3
Add websocket_actor decorator to register handler
Inokinoki Jul 7, 2023
118731b
Fix getInfo error due to too many arguments
Inokinoki Jul 7, 2023
d28986e
Migrate ML Worker stopWorker method to WebSocket
Inokinoki Jul 7, 2023
12a0c76
Add client to MLWorker to prepare removing tunnel
Inokinoki Jul 10, 2023
33345f9
Migrate ML Worker runModel method to WebSocket
Inokinoki Jul 10, 2023
5dc8528
Migrate runModelForDataFrame method to WebSocket
Inokinoki Jul 10, 2023
0b0c7a8
Migrate ML Worker explain method to WebSocket
Inokinoki Jul 10, 2023
f523e47
Migrate ML Worker explainText method to WebSocket
Inokinoki Jul 11, 2023
1e4755e
Migrate ML Worker getCatalog method to WebSocket
Inokinoki Jul 11, 2023
598ed02
Migrate ML Worker datasetProcesing to WebSocket
Inokinoki Jul 11, 2023
04cace1
Migrate ML Worker runAdHocTest method to WebSocket
Inokinoki Jul 11, 2023
6cc8d71
Migrate ML Worker runTestSuite method to WebSocket
Inokinoki Jul 11, 2023
038683f
Migrate ML Worker generateTestSuite to WebSocket
Inokinoki Jul 11, 2023
063d355
Fix runAdHocTest return value
Inokinoki Jul 11, 2023
a5facf1
Migrate ML Worker echo method to WebSocket
Inokinoki Jul 11, 2023
b0cd8cd
Remove wrong return-value annotations for actors
Inokinoki Jul 11, 2023
deb73c1
Merge branch 'main' into feature/websocket-replacing-grpc
Inokinoki Jul 12, 2023
5d71ed5
Fix missing parameter in datasetProcessing and explainText
Inokinoki Jul 12, 2023
5ed7e3b
Use builder to build parameters in Java WebSocket
Inokinoki Jul 12, 2023
c841385
Fix args type in process function meta information
Inokinoki Jul 12, 2023
b860faa
Fix filteredRows in data processing actor
Inokinoki Jul 12, 2023
14908f3
Return callback properly in websocket_actor
Inokinoki Jul 13, 2023
8a0263c
Fix raw prediction field name in Java
Inokinoki Jul 13, 2023
80afa07
Add Python dataclass defs for WebSocket comm
Inokinoki Jul 13, 2023
4c2c7d3
Use BaseModel for all to fix pydantic validation
Inokinoki Jul 13, 2023
002b49b
Use WorkerReply to mark WebSocket worker replies
Inokinoki Jul 13, 2023
f181a80
Fix TestMessageType in WebSocket to match Giskard
Inokinoki Jul 13, 2023
ac8c4a1
Fix name, type and opt/oneof fields in WebSocket
Inokinoki Jul 17, 2023
69f9a47
Overload `performAction` to allow to set timeout
Inokinoki Jul 17, 2023
fabc795
Merge branch 'main' of https://github.com/Giskard-AI/giskard into fea…
Inokinoki Jul 17, 2023
897c190
Fix DataFrame predict in non-classification model
Inokinoki Jul 17, 2023
148094b
Mark all List with optional to avoid empty list
Inokinoki Jul 17, 2023
d9a6434
Add a simple error handler from Python to Java
Inokinoki Jul 17, 2023
0fe296c
Refactor ML Worker to allow reconnect in WebSocket
Inokinoki Jul 18, 2023
a3ee8bb
Add WebSocket error handlers in Java backend
Inokinoki Jul 18, 2023
b7bb745
Fix TestSuiteExecution action due to missing args
Inokinoki Jul 18, 2023
7a4e554
Merge branch 'main' of https://github.com/Giskard-AI/giskard into fea…
Inokinoki Jul 18, 2023
deafc25
Fix Enum value in WebSocket TestMessageType
Inokinoki Jul 18, 2023
77f36b0
Merge branch 'main' into feature/websocket-replacing-grpc
andreybavt Jul 18, 2023
223a47e
External ML worker status from `MLWorkerWSService`
Inokinoki Jul 19, 2023
ea170c7
Merge branch 'feature/websocket-replacing-grpc' of https://github.com…
Inokinoki Jul 19, 2023
79696d8
Clean up code by following Sonar analysis
Inokinoki Jul 19, 2023
0982572
Merge branch 'main' into feature/websocket-replacing-grpc
andreybavt Jul 20, 2023
14678c9
Improve WebSocket connection, remove MLWorker GRPC
Inokinoki Jul 20, 2023
1e6abdf
Merge branch 'feature/websocket-replacing-grpc' of https://github.com…
Inokinoki Jul 20, 2023
5b71c11
Handle TypeError during connection closing
Inokinoki Jul 20, 2023
7db2a9d
Generate and validate token for internal ML Worker
Inokinoki Jul 20, 2023
8133a1d
Fix access modifier and empty lines in Java DTOs
Inokinoki Jul 20, 2023
e51d88d
Merge branch 'main' into feature/websocket-replacing-grpc
andreybavt Jul 20, 2023
d27b51a
Improve importing of WebSocket actors in ML Worker
Inokinoki Jul 20, 2023
18cd800
Merge branch 'feature/websocket-replacing-grpc' of https://github.com…
Inokinoki Jul 20, 2023
9cc3add
Revert "Disable external worker detail in HF Spaces"
Inokinoki Jul 20, 2023
40d5c18
Revert "Force to use internal worker in HF Spaces"
Inokinoki Jul 20, 2023
e67b526
Enable TLS/SSL for https URL in external worker
Inokinoki Jul 21, 2023
9ad280a
added stomp.py
andreybavt Jul 21, 2023
eb9efe4
Move WebSocket actors to websocket.listener
Inokinoki Jul 21, 2023
c32000d
Merge branch 'feature/websocket-replacing-grpc' of https://github.com…
Inokinoki Jul 21, 2023
183f70b
Perform action in thread, avoid slowing down loop
Inokinoki Jul 21, 2023
93abd83
Add HF Spaces token option in ML Worker
Inokinoki Jul 24, 2023
b9572b8
Remove `async` to properly stop worker by Ctrl+C
Inokinoki Jul 24, 2023
2281b5f
Temporarily set buffer of STOMP to 64MB in Java
Inokinoki Jul 24, 2023
cc07896
Add a simple fragmentation for WebSocket reply
Inokinoki Jul 25, 2023
b32da49
Add config topic to set fragmented payload size
Inokinoki Jul 25, 2023
1a4eaaf
Extract sync WebSocket action code and add async
Inokinoki Jul 25, 2023
7081f1f
Use async and await approche to execute test suite
Inokinoki Jul 25, 2023
7f914a5
Add processing of `UPDATE` type reply in WebSocket ML Worker
Inokinoki Jul 26, 2023
6ff4935
removed grpc/protobuf dependencies and bumped python version
andreybavt Jul 26, 2023
8e06372
Merge remote-tracking branch 'origin/feature/websocket-replacing-grpc…
andreybavt Jul 26, 2023
7082074
Polish WebSocket `UPDATE` message processing and sync action replies
Inokinoki Jul 26, 2023
7f6b437
Handle exceptions in `performAction` level
Inokinoki Jul 26, 2023
671dc0c
Improve WebSocket MLWorker code based on SonarLint
Inokinoki Jul 26, 2023
bcb16bc
Mark `performAction` with no database transaction
Inokinoki Jul 26, 2023
450e948
Extract parameter parsing and reply fragmentation in WebSocket
Inokinoki Jul 26, 2023
c1deda5
Merge branch 'main' of https://github.com/Giskard-AI/giskard into fea…
Inokinoki Jul 26, 2023
678a018
Fix after merging main to WebSocket MLWorker
Inokinoki Jul 27, 2023
df6a121
Polish worker removing by determining in/external
Inokinoki Jul 27, 2023
85ea997
Add stomp message conf in `ApplicationProperties`
Inokinoki Jul 27, 2023
dda8d72
Use worker IllegalReply, NotConnected exceptions
Inokinoki Jul 27, 2023
03909e5
Add debug feature to WebSocket runAdHocTest action
Inokinoki Jul 27, 2023
45ad6cf
Add a popover for input of HF access token
Inokinoki Jul 28, 2023
7900fdb
Fix pdm lock file after merging from main
Inokinoki Jul 27, 2023
0d42eda
Remove GRPC build step in python client
Inokinoki Jul 27, 2023
8d475c1
Retrieve and store of HF access and spaces tokens
Inokinoki Jul 28, 2023
1145119
Retrieve Hugging Face tokens via popover if needed
Inokinoki Jul 28, 2023
d447ae8
Use popover to input HF access token in TestSuites instructions
Inokinoki Jul 28, 2023
0750678
Polish ML Worker instructions for connecting, remove port description
Inokinoki Jul 28, 2023
0409154
Fix typo in `DatasetProcessingParam`
Inokinoki Jul 28, 2023
20f75e2
Fix extract_debug_info in WebSocket MLWorker
Inokinoki Jul 29, 2023
caa1ff3
Migrate unittest for debug feature to WebSocket
Inokinoki Jul 29, 2023
62af257
Add @Jacksonized to @Builder annotated DTO in Java
Inokinoki Jul 31, 2023
4a10274
Fix Python built-in type names in `FuncArgument`
Inokinoki Jul 31, 2023
39a0f86
Update `runTestSuite` action to sync with GSK1157
Inokinoki Jul 31, 2023
144ce65
fixed issue in rewrite_prompt
rabah-khalek Jul 27, 2023
daa413f
Small doc polish: Why Giskard + emojis in the README (#1260)
alexcombessie Jul 27, 2023
77d08d4
Fixed issue where datasets catalog was not refreshed after deleting a…
kevinmessiaen Jul 28, 2023
c447711
Fixed issue with model and dataset selector not resetting
kevinmessiaen Jul 28, 2023
eef7996
Fixed issue with variable scope overriding suite result (#1264)
kevinmessiaen Jul 28, 2023
3c446ff
Refactored example amazon notebook by improving model to work better …
AbSsEnT Jul 28, 2023
ddaf8da
Made model more generalizable by increasing training dataset size.
AbSsEnT Jul 28, 2023
5cf246a
Removed comment.
AbSsEnT Jul 28, 2023
75d0b23
Update enron_email_classification_sklearn.ipynb
mathieuroques Jul 27, 2023
7930781
Enforce quoting on text value to prevent issues with `comment` charac…
kevinmessiaen Jul 31, 2023
1b1978d
added watch option to sphinx_autobuild in gradle.kts
rabah-khalek Jul 31, 2023
df8a908
Added wage classification notebook to the docs. (#1274)
AbSsEnT Jul 31, 2023
31d93e1
updated doc
rabah-khalek Jul 31, 2023
aa150fa
Update `runTestSuite` action to sync with #1264
Inokinoki Jul 31, 2023
3ef495b
Fix null arguments in `MLWorkerWSFuncArgumentDTO`
Inokinoki Jul 31, 2023
271064e
Add and fix type annotations in WebSocket actions
Inokinoki Aug 1, 2023
925a3f9
Merge branch 'main' of https://github.com/Giskard-AI/giskard into fea…
Inokinoki Aug 1, 2023
2bdc70a
Force to provide rows in DataFrame
Inokinoki Aug 1, 2023
557076a
Remove duplicated TestFunctionArgument
Inokinoki Aug 1, 2023
1b6ff76
Allow all fields in FunctionMeta to be None
Inokinoki Aug 1, 2023
aabd051
Cleanup GRPC generated SingleTestResult in Python
Inokinoki Aug 2, 2023
ae14370
Allow to provide HF Spaces token in `restart_command`
Inokinoki Aug 1, 2023
a5f744b
Replace StatusCode from GRPC by an Enum
Inokinoki Aug 2, 2023
9739ff7
Remove n_samples in ExplainTextParam
Inokinoki Aug 2, 2023
fe75675
Rename args to arguments to avoid reassignment
Inokinoki Aug 2, 2023
a2a5bce
Fix words field in ExplainText action
Inokinoki Aug 2, 2023
4ac7ceb
Merge branch 'main' into feature/websocket-replacing-grpc
andreybavt Aug 2, 2023
1cc15ba
Add MLWorker WS endpoint for version detecting
Inokinoki Aug 3, 2023
4e27c61
Add error handling for invalid WebSocket endpoint
Inokinoki Aug 4, 2023
9ec8edd
Merge branch 'main' into feature/websocket-replacing-grpc
andreybavt Aug 7, 2023
41c1bfc
Expose /ml-worker WebSocket endpoint
Inokinoki Aug 8, 2023
9dfc470
Use `logger.warning` instead of `logger.warn`
Inokinoki Aug 8, 2023
185109a
Separate types, utils from WebSocket listener impl
Inokinoki Aug 8, 2023
da8fc30
Remove unused functions for intermediate replies
Inokinoki Aug 8, 2023
27a25e6
Use threaded decorator for WebSocket actions
Inokinoki Aug 8, 2023
f52fc76
Use noqa NOSONAR for non-crucial security issues
Inokinoki Aug 8, 2023
db4c0f2
Use async for getCatalog and sync for runTestSuite
Inokinoki Aug 8, 2023
ec03394
Polish code in MLWorker association and reply
Inokinoki Aug 8, 2023
014cff2
Distinguish result waiter preparation and getting
Inokinoki Aug 8, 2023
495aedb
Refactor parseReplyDTO to separate error parsing
Inokinoki Aug 8, 2023
f920edc
Refactor action-related functions in MLWorkerWSCommService
Inokinoki Aug 8, 2023
e0c8dea
Merge branch 'main' of https://github.com/Giskard-AI/giskard into fea…
Inokinoki Aug 8, 2023
3cdf87d
Attemp to remove GRPC server code
Inokinoki Aug 8, 2023
cee6178
Add detail in ErrorReply and format them in exception
Inokinoki Aug 9, 2023
28ef9fb
Fix bug due to `False` bool function argument
Inokinoki Aug 9, 2023
b7d5ad5
Allow `project_key` to be `None` in `ArtifactRef`
Inokinoki Aug 9, 2023
6a27b1a
Rename `potentialInternalWorkerId` to `pending...`
Inokinoki Aug 9, 2023
5d2898c
Polish HF access token acquirement
Inokinoki Aug 9, 2023
0f4e298
Change `--token` arg to `--hf-token` in worker cli
Inokinoki Aug 9, 2023
f8fcfb7
Fix StartWorkerInstructions state in non HFSpaces
Inokinoki Aug 9, 2023
21a4e6a
Extract HF access token acquirement common code
Inokinoki Aug 10, 2023
af13782
Polish HF access token input by user test feedback
Inokinoki Aug 10, 2023
d5d3eba
Merge branch 'main' into feature/websocket-replacing-grpc
Inokinoki Aug 10, 2023
f48ba9f
Merge branch 'main' of https://github.com/Giskard-AI/giskard into fea…
Inokinoki Aug 14, 2023
088c7e0
Polish Java Backend based on SonarLint scan
Inokinoki Aug 14, 2023
7dbfff5
Fix sonar lint in Python
Inokinoki Aug 15, 2023
7dbfafc
Polish Java code in WebSocket ML Worker
Inokinoki Aug 15, 2023
181f323
Remove `model` parameter in `run_other_model`
Inokinoki Aug 16, 2023
3e93085
Merge branch 'main' of https://github.com/Giskard-AI/giskard into fea…
Inokinoki Aug 16, 2023
3db3af9
Remove duplicated code detected by SonarLint
Inokinoki Aug 16, 2023
28ba7de
fixed the lockfile
andreybavt Aug 16, 2023
15758e2
fix build
andreybavt Aug 16, 2023
74b9dc6
Sync `certifi` with pdm resolved one in lockfile
Inokinoki Aug 16, 2023
e3c4b45
Use `isinstance` instead of type comparison
Inokinoki Aug 16, 2023
bdb08d1
get rid of grpc and jhipster
andreybavt Aug 17, 2023
e5f2294
fix tests
andreybavt Aug 17, 2023
77061b6
restored /ml-worker-connect
andreybavt Aug 17, 2023
b0b2dc7
Sonar
andreybavt Aug 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix sonar lint in Python
  • Loading branch information
Inokinoki committed Aug 15, 2023
commit 7dbfff5080b317b0efeb7b3088d3552fafe9dbca
1 change: 0 additions & 1 deletion python-client/giskard/ml_worker/ml_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ def _connect_websocket_client(self, is_server=False):
logger.error(
f"Please make sure that the version of Giskard server is above '{giskard.__version__}'"
)
# TODO: Update instructions
else:
logger.error(
f"WebSocket connection error {e.status_code}: "
Expand Down
123 changes: 65 additions & 58 deletions python-client/giskard/ml_worker/websocket/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ def dispatch_action(callback, ml_worker, action, req):
params = parse_action_param(action, params)
# Call the function and get the response
info: websocket.WorkerReply = callback(ml_worker=ml_worker, action=action.name, params=params)
# TODO: Allow to reply multiple messages for multiple shot

except Exception as e:
info: websocket.WorkerReply = websocket.ErrorReply(
error_str=str(e), error_type=type(e).__name__, detail=traceback.format_exc()
Expand All @@ -90,7 +88,6 @@ def dispatch_action(callback, ml_worker, action, req):

if rep_id:
# Reply if there is an ID
# TODO: multiple shot
logger.debug(
f"[WRAPPED_CALLBACK] replying {len(info.json(by_alias=True))} {info.json(by_alias=True)} for {action.name}"
)
Expand Down Expand Up @@ -217,6 +214,61 @@ def on_ml_worker_stop_worker(ml_worker: MLWorker, *args, **kwargs) -> websocket.
return websocket.Empty()


def run_classification_mode(model, dataset, prediction_results):
results = prediction_results.all_predictions
labels = {k: v for k, v in enumerate(model.meta.classification_labels)}
label_serie = dataset.df[dataset.target] if dataset.target else None
if len(model.meta.classification_labels) > 2 or model.meta.classification_threshold is None:
preds_serie = prediction_results.all_predictions.idxmax(axis="columns")
sorted_predictions = np.sort(prediction_results.all_predictions.values)
abs_diff = pd.Series(
sorted_predictions[:, -1] - sorted_predictions[:, -2],
name="absDiff",
)
else:
diff = prediction_results.all_predictions.iloc[:, 1] - model.meta.classification_threshold
preds_serie = (diff >= 0).astype(int).map(labels).rename("predictions")
abs_diff = pd.Series(diff.abs(), name="absDiff")
calculated = pd.concat([preds_serie, label_serie, abs_diff], axis=1)
return results, calculated


def run_other_model(model, dataset, prediction_results):
results = pd.Series(prediction_results.prediction)
preds_serie = results
if dataset.target and dataset.target in dataset.df.columns:
target_serie = dataset.df[dataset.target]
diff = preds_serie - target_serie
diff_percent = pd.Series(
diff / target_serie,
name="diffPercent",
dtype=np.float64,
).replace([np.inf, -np.inf], np.nan)
abs_diff = pd.Series(
diff.abs(),
name="absDiff",
dtype=np.float64,
)
abs_diff_percent = pd.Series(
abs_diff / target_serie,
name="absDiffPercent",
dtype=np.float64,
).replace([np.inf, -np.inf], np.nan)
calculated = pd.concat(
[
preds_serie,
target_serie,
abs_diff,
abs_diff_percent,
diff_percent,
],
axis=1,
)
else:
calculated = pd.concat([preds_serie], axis=1)
return results, calculated


@websocket_actor(MLWorkerAction.runModel)
def run_model(ml_worker: MLWorker, params: websocket.RunModelParam, *args, **kwargs) -> websocket.Empty:
try:
Expand Down Expand Up @@ -245,80 +297,35 @@ def run_model(ml_worker: MLWorker, params: websocket.RunModelParam, *args, **kwa
prediction_results = model.predict(dataset)

if model.is_classification:
results = prediction_results.all_predictions
labels = {k: v for k, v in enumerate(model.meta.classification_labels)}
label_serie = dataset.df[dataset.target] if dataset.target else None
if len(model.meta.classification_labels) > 2 or model.meta.classification_threshold is None:
preds_serie = prediction_results.all_predictions.idxmax(axis="columns")
sorted_predictions = np.sort(prediction_results.all_predictions.values)
abs_diff = pd.Series(
sorted_predictions[:, -1] - sorted_predictions[:, -2],
name="absDiff",
)
else:
diff = prediction_results.all_predictions.iloc[:, 1] - model.meta.classification_threshold
preds_serie = (diff >= 0).astype(int).map(labels).rename("predictions")
abs_diff = pd.Series(diff.abs(), name="absDiff")
calculated = pd.concat([preds_serie, label_serie, abs_diff], axis=1)
results, calculated = run_classification_mode(model, dataset, prediction_results)
else:
results = pd.Series(prediction_results.prediction)
preds_serie = results
if dataset.target and dataset.target in dataset.df.columns:
target_serie = dataset.df[dataset.target]
diff = preds_serie - target_serie
diff_percent = pd.Series(
diff / target_serie,
name="diffPercent",
dtype=np.float64,
).replace([np.inf, -np.inf], np.nan)
abs_diff = pd.Series(
diff.abs(),
name="absDiff",
dtype=np.float64,
)
abs_diff_percent = pd.Series(
abs_diff / target_serie,
name="absDiffPercent",
dtype=np.float64,
).replace([np.inf, -np.inf], np.nan)
calculated = pd.concat(
[
preds_serie,
target_serie,
abs_diff,
abs_diff_percent,
diff_percent,
],
axis=1,
)
else:
calculated = pd.concat([preds_serie], axis=1)
results, calculated = run_other_model(model, dataset, prediction_results)

with tempfile.TemporaryDirectory(prefix="giskard-") as f:
dir = Path(f)
tmp_dir = Path(f)
predictions_csv = get_file_name("predictions", "csv", params.dataset.sample)
results.to_csv(index=False, path_or_buf=dir / predictions_csv)
results.to_csv(index=False, path_or_buf=tmp_dir / predictions_csv)
if ml_worker.client:
ml_worker.client.log_artifact(
dir / predictions_csv,
tmp_dir / predictions_csv,
f"{params.project_key}/models/inspections/{params.inspectionId}",
)
else:
log_artifact_local(
dir / predictions_csv,
tmp_dir / predictions_csv,
f"{params.project_key}/models/inspections/{params.inspectionId}",
)

calculated_csv = get_file_name("calculated", "csv", params.dataset.sample)
calculated.to_csv(index=False, path_or_buf=dir / calculated_csv)
calculated.to_csv(index=False, path_or_buf=tmp_dir / calculated_csv)
if ml_worker.client:
ml_worker.client.log_artifact(
dir / calculated_csv,
tmp_dir / calculated_csv,
f"{params.project_key}/models/inspections/{params.inspectionId}",
)
else:
log_artifact_local(
dir / calculated_csv,
tmp_dir / calculated_csv,
f"{params.project_key}/models/inspections/{params.inspectionId}",
)
return websocket.Empty()
Expand Down Expand Up @@ -427,7 +434,7 @@ def dataset_processing(
modifications={
key: str(value)
for key, value in row[1].items()
if not type(value) == float or not math.isnan(value)
if isinstance(value, float) or not math.isnan(value)
},
)
for row in modified_rows.iterrows()
Expand Down
5 changes: 3 additions & 2 deletions python-client/giskard/ml_worker/websocket/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@


def parse_action_param(action, params):
# TODO: Sort by usage frequency
# TODO: Sort by usage frequency from future MixPanel metrics #NOSONAR
if action == MLWorkerAction.getInfo:
return GetInfoParam.parse_obj(params)
elif action == MLWorkerAction.runAdHocTest:
Expand Down Expand Up @@ -250,7 +250,8 @@ def do_run_adhoc_test(client, arguments, test, debug_info=None):

if debug_info is None:
raise ValueError(
"You have requested to debug the test, " "but extract_debug_info did not return the information needed."
"You have requested to debug the test, "
+ "but extract_debug_info did not return the information needed."
)

test_result.output_df.name += debug_info["suffix"]
Expand Down