We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
To Repro:
{code:Python} from h2o.estimators.coxph import H2OCoxProportionalHazardsEstimator
heart = h2o.import_file("http://s3.amazonaws.com/h2o-public-test-data/smalldata/coxph_test/heart.csv")
train, test = heart.split_frame(ratios = [.8], seed = 1234)
heart_coxph = H2OCoxProportionalHazardsEstimator(start_column="start", stop_column="stop", ties="breslow") heart_coxph.train(x="age", y="event", training_frame=train)
mojo_file = heart_coxph.download_mojo(path="~", get_genmodel_jar=False)
h2o.import_mojo(mojo_file) {code}
Stacktrace
Call: --------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-6-1b205ea30ce6> in <module> ----> 1 h2o.import_mojo(mojo_file) 2 #"/Users/nmashayekhi/Desktop/Tickets/99941 - OSS StateFarm - CoxPH/CoxPH_model_python_1626274849054_1.zip" ~/anaconda3/envs/py_36/lib/python3.6/site-packages/h2o/h2o.py in import_mojo(mojo_path) 2251 raise TypeError("MOJO path may not be None") 2252 mojo_estimator = H2OGenericEstimator.from_file(mojo_path) -> 2253 print(mojo_estimator) 2254 return mojo_estimator 2255 ~/anaconda3/envs/py_36/lib/python3.6/site-packages/h2o/model/model_base.py in __repr__(self) 136 stk = traceback.extract_stack() 137 if not ("IPython" in stk[-2][0] and "info" == stk[-2][2]): --> 138 self.show() 139 return "" 140 ~/anaconda3/envs/py_36/lib/python3.6/site-packages/h2o/model/model_base.py in show(self) 537 print() 538 --> 539 summary = self.summary() 540 if summary is not None: 541 print(summary) ~/anaconda3/envs/py_36/lib/python3.6/site-packages/h2o/model/coxph.py in summary(self) 22 """Prints summary information about this model.""" 23 print("Call: ") ---> 24 print(self.formula()) 25 print(self.coefficients_table()) 26 output = self._model_json["output"] ~/anaconda3/envs/py_36/lib/python3.6/site-packages/h2o/model/coxph.py in formula(self) 9 def formula(self): 10 """Survival formula.""" ---> 11 return self._model_json["output"]["formula"] 12 13 def concordance(self): KeyError: 'formula'
The text was updated successfully, but these errors were encountered:
JIRA Issue Details
Jira Issue: PUBDEV-8244 Assignee: Michal Kurka Reporter: Neema Mashayekhi State: Resolved Fix Version: 3.32.1.5 Attachments: N/A Development PRs: Available
Sorry, something went wrong.
Linked PRs from JIRA
#5580
No branches or pull requests
To Repro:
{code:Python}
from h2o.estimators.coxph import H2OCoxProportionalHazardsEstimator
Import the heart dataset into H2O:
heart = h2o.import_file("http://s3.amazonaws.com/h2o-public-test-data/smalldata/coxph_test/heart.csv")
Split the dataset into a train and test set:
train, test = heart.split_frame(ratios = [.8], seed = 1234)
Build and train the model:
heart_coxph = H2OCoxProportionalHazardsEstimator(start_column="start",
stop_column="stop",
ties="breslow")
heart_coxph.train(x="age",
y="event",
training_frame=train)
mojo_file = heart_coxph.download_mojo(path="~", get_genmodel_jar=False)
h2o.import_mojo(mojo_file)
{code}
Stacktrace
The text was updated successfully, but these errors were encountered: