mathworks / jupyter-matlab-proxy

MATLAB Integration for Jupyter enables you to run MATLAB code in Jupyter Notebooks and other Jupyter environments. You can also open MATLAB in a browser directly from your Jupyter environment to use more MATLAB features.
Other
282 stars 36 forks source link

Worse Features in Latest Version #101

Closed fcyang58 closed 4 weeks ago

fcyang58 commented 1 month ago

Summary

I have used MATLAB on jupyterlab for two years. Recently, I moved to a new server, and I install jupyter-matlab-proxy on it. I have no trouble to run MATLAB through jupyter notebook but the behavior becomes terrible compared with previous versions.

How do I install and work on new server?

  1. I create a new environment via: conda create -n "py39" python=3.9
  2. In this environment, I install jupyterlab and jupyter-matlab-proxy via: pip install xxx
  3. I already have MATLAB R2022b on this server
  4. I run jupyterlab and use MATLAB kernel via: jupyter lab --no-browser --port=2345 --notebook-dir /xxx

What do I mean by 'worse features'?

  1. If a piece of MATLAB code written in the notebook cell runs for over 5 minutes, I will get an error and MATLAB will be shut down. In the server I previously used, I did not have such error.
  2. The results output to the screen in a strange way. For example, for a simple loop: for m=1:3 pause(3) m end I will expect to see numbers '1', '2', and '3' every 3 seconds. However, in the new server, all three numbers are output together after the loop finished.
  3. When I open multiple notebooks with MATLAB kernel, all these notebooks will share the memory space. For example, if I define aa1=1 in notebook1 and then open a new notebook2, I can see variable aa1 by whos in notebook2. In my previous experience, notebooks will not share memory.

I installed matlab proxy two years ago on both my local computer and the old server. These features are not found in both of them. Are these problem due to the new server or matlab proxy? Could anyone help me?

Here attached pip list on the new server and my local computer.

local_MacOS.txt new_server.txt

Browser(s) used

Chrome

Issue found in

MATLAB Kernel

Script output

No response

prabhakk-mw commented 4 weeks ago

Dear @fcyang58

Thank you for using the MATLAB Integration for Jupyter and for the detailed explanations in the issue!

Based on the shared local_MacOS.txt file and the description of the issues, its evident that you have been using the MATLAB Kernel coming from the matlab-kernel package, and have only just started using the jupyter-matlab-proxy package that this repository ships on the "new server".

All the three issues listed above, have been a part of this package from the day it shipped in 2020.

Fortunately, we have been working behind the scenes on improvements to the package which should address all your concerns in the near future.

  1. The issue related to cell time out has been captured in mathworks/jupyter-matlab-proxy#77, and we are actively working on infrastructure to avoid this issue.
  2. The support for streaming outputs is currently under development, and #102 has been created for you to track its progress.
  3. The behavior related to the shared MATLAB workspace amongst kernels is documented here and we do have plans of releasing a MAGIC command to change this behavior in the near future. Please use #103 / #44 to track the progress of this feature.

Kindly accept my apologies for any inconvenience that these issues have caused and we hope to meet your expectations soon!

fcyang58 commented 3 weeks ago

Yes. I just found that I was using matlab-kernel. It is very good and probably your team can work with their team to improve matlab proxy.