mljar / mercury

Convert Jupyter Notebooks to Web Apps

Home Page:https://RunMercury.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with displaying large output

fightpf opened this issue · comments

I am using docker-compose build a https version mercury server.
Run Following code occure this error, y_columns is predicted target in my dataset :
when exceed y5, error occur, but y1 to y4 is normal.

result = []
y_columns = ["y1","y2","y3","y4","y5",....]

for y_column in y_columns:
    automl = AutoML(mode="Explain",results_path=y_column+"_Explain") 
    automl.fit(df[x_columns.value], df[y_column])
    result.append(automl.report())


for htmlprint in result :
    display(htmlprint)

Are there any length or size limitations for the output of a cell in Jupyter Notebook?

Hi @fightpf,

This might be caused with limit of message that is send with websocket rather than with cell output limit.

Anyway, maybe there is a better way to display all content to the user?

Finally, i solve this issue by following 2 steps:

  1. file : mercury/apps/nbworker/rest.py
    line 174: {"state": new_state, "machine_id": machine_uuid()}, timeout=50
    add timeout parameters
  2. file : mercury/apps/nbwoker/nb.py
    line 46: self.ws.run_forever(ping_interval=60, ping_timeout=50)
    set timeout as a larger number(interval must be > timeout).

THX all