h2oai / h2o-3

H2O is an Open Source, Distributed, Fast & Scalable Machine Learning Platform: Deep Learning, Gradient Boosting (GBM) & XGBoost, Random Forest, Generalized Linear Modeling (GLM with Elastic Net), K-Means, PCA, Generalized Additive Models (GAM), RuleFit, Support Vector Machine (SVM), Stacked Ensembles, Automatic Machine Learning (AutoML), etc.
http://h2o.ai
Apache License 2.0
6.92k stars 2k forks source link

pca: cancel not working #14575

Closed exalate-issue-sync[bot] closed 1 year ago

exalate-issue-sync[bot] commented 1 year ago

data attached

buildModel 'pca', {"model_id":"pca-0ff9a569-fdd2-40d2-ac46-7ffde30d324d","training_frame":"msq","ignored_columns":[],"ignore_const_cols":true,"transform":"STANDARDIZE","pca_method":"GramSVD","k":"10","max_iterations":1000,"seed":1435870264442972000,"loading_name":"PCALoading__b342b54cd99912cf43e1a4ef1af44424","use_all_factor_levels":false,"score_each_iteration":false}

cancel job after say 1 min; it still keeps running in the background till you kill the cloud screenshot attached

exalate-issue-sync[bot] commented 1 year ago

Former user commented: Nothing I can do about this. GramSVD is stuck in the JAMA SVD function call, and we cannot cancel that since JAMA doesn't support asynchronous calls.

exalate-issue-sync[bot] commented 1 year ago

Raymond Peck commented: [~accountid:557058:5bcbac08-75cf-4c6b-b4d2-294f7c0fe9b8]: can we resolve this? [~accountid:557058:c11ce0b4-c61e-40c8-a345-a7813b230b71]: it needs to be documented.

exalate-issue-sync[bot] commented 1 year ago

Neeraja Madabhushi commented: Ray : can we have better solution to this, as its highly unlikely, user would go and check documentation.

exalate-issue-sync[bot] commented 1 year ago

Former user commented: [~accountid:557058:389d9607-5bd8-4611-8c6a-755fe9295223] [~accountid:557058:abbecef9-9266-49cd-a13f-d0c5d27cb5da] Any ideas? Short of copy-pasting the JAMA SVD code into our own, I can't think of a solution.

exalate-issue-sync[bot] commented 1 year ago

Michal Malohlava commented: Please do no copy paste - it would be another code to maintain.

Simple solution is to fix [pubdev-1467], it is on my list in sprint 17 - we will signal that cancelation was requested and user has to wait.

exalate-issue-sync[bot] commented 1 year ago

Michal Malohlava commented: We can try to call Thread.interupt() on JAMA computation thread, but i do not expect they are handling it correctly.

exalate-issue-sync[bot] commented 1 year ago

Cliff Click commented: Pick one....

(1) "user deals with it" - Cancel button switches to "cancel in progress" and stays grayed out until the SVD returns, seconds (minutes?) later. (2) "Kill JAMA" - Smash the thread, tossing Thread.KillMyJamaNowException at it. Catch that exception in a wrapper (with appropriate locking to avoid throwing the exception when it's not in Jama). Hopefully Jama recovers from this enough to allow future SVD work. (3) "Open 'er up for surgery" - move JAMA into our source base, open up the SVD code and insert a poll for Job cancel

Cliff

DinukaH2O commented 1 year ago

JIRA Issue Migration Info

Jira Issue: PUBDEV-1605 Assignee: Raymond Peck Reporter: Nidhi Mehta State: Reopened Fix Version: N/A Attachments: Available (Count: 2) Development PRs: N/A

Attachments From Jira

Attachment Name: cancle_pca.png Attached By: Nidhi Mehta File Link:https://h2o-3-jira-github-migration.s3.amazonaws.com/PUBDEV-1605/cancle_pca.png

Attachment Name: msq.csv Attached By: Nidhi Mehta File Link:https://h2o-3-jira-github-migration.s3.amazonaws.com/PUBDEV-1605/msq.csv

wendycwong commented 1 year ago

Calling other toolboxes that do not have stop request. This cannot be done. Choose other PCA methods.