Can I display cell running time in Jupyter Lab? - jupyter

I have this installed: https://github.com/deshaw/jupyterlab-execute-time
While the cell runs it displays Execution started at 2022-09-20 16:57:19
So you can calculate how long the cell is running by looking at the wall clock.
However its not exactly convenient especially if run time is hours.
Is there a plugin for JupyterLab which displays actual running time once a second for example or even minute would be nice?
Or share an idea how to implement it in a custom plugin..

Related

Pyscipopt (in Google Collab) does not show/print any output for the large-size network optimization problem in Google Collab

I am working on a non-linear network-optimization problem. When I run a large problem instance on the lab high-performance computers (imposing the time limit of 1 or 2 hours), those computers give me the output when the time is exhausted.
I wanted to use Google Collab to run the same code and to share it with my supervisors (they don't have Pyscipopt installed on their computers). However, when the problem size is small – all is good, but when the problem size is large, it says that the execution is completed (on the bottom of the screen) along with the time it took and a small red exclamation mark BUT it does not show any output for the large-size network optimization problems (neither it prints the solution nor it explains what is the reason/error of this behaviour).
Again, the same code works perfectly fine on high-performance computers, so I do not think there are any problems with syntax.
Please let me know if there are any solutions to the problem described.
Kind regards,
Lidiia
I tried to change "None" in the hardware accelerator to GPU and CPU. I tried to proofread the code in order to find any mistakes. I tried to not leave the Google Collab to run the code at night (I read somewhere that kernel stops working if there is inactivity) so I tried to click on something there to prevent the execution from stopping. Nothing worked.

How do I get transformers' .from_pretrained("model") to consistently show download progress in a Jupyter Notebook?

I'm running a Jupyter Lab instance on a remote server which I access through my browser
I'm working with a notebook from a venv kernel that imports the AutoTokenizer and AutoModelForCausalLM classes from transformers, then downloads the elements for each from a model we'll call "model", using each class' .from_pretrained method.
the actual importing and downloading works fine; however, the first time I ran the cells containing AutoTokenizer.from_pretrained("model") and AutoModelForCausalLM.from_pretrained("model"), a text-based download progress bar appeared in the output text. this went through each file download until the kernel crashed (for reasons that I am yet to troubleshoot, but I suspect are related to storage allocations).
when I ran the code again, everything worked the same, but the progress bars never reappeared. the same thing happened a few weeks ago when I tried this the first time with a different model and slightly different environment
What I've tried:
I've tried creating a new kernel from a new venv. I've tried restarting jupyter. neither made a difference
there was a warning that appeared underneath the transformers import that suggested I should install ipywidgets. this was there the first time when the progress bar did appear, and again when it didn't, but somewhere online suggested that ipywidgets and progress bars could be linked, so I imported it to the venv anyway. this unsurprisingly did not help
I've tested whether I get output at all: I do. if I enter 1+1, "2" outputs. I also still got the ipywidgets a warning a few times before I installed it
I made sure that the output is not just being collapsed. View -> Menu -> Collapse/Expand all Outputs does not make anything new appear, besides some ellipses.
I tried doing pip install --upgrade jupyter_client, but it basically said there's nothing further to upgrade.
I tried a browser based on a different engine (chromium instead of ff). I tried with my adblocker on and off
if I download a different model, that does seem to work, once, but then as soon as the kernel crashes a single time trying to download that model, it will never show them again, even when it's clearly actually downloading them

Why is Eclipse constantly searching for main types and how do I stop it?

How do I stop Eclipse from searching for main types every time I run a Java application I have written? Doesn't matter which file it is or how big it is, every time I run it I get the following (sorry I can't embed the image, you'll have to use the link):
Searching for main types
It ALWAYS takes ages to do this, which means that I have a LONG delay before I can run programs. It's frustrating as I teach Java and my students are always left wondering what's going on....
I've looked at other Stack Overflow questions in which people suggested setting up a run configuration, but when I do that I get the same problem.

Selenium IDE Log Page Load Times

I would like to get a high-level view of load page performance. How can I get Selenium IDE to log time whilst my Test Case is running and store time at each step. Any suggestions on how to do this?

Apache Spark running slower when IntelliJ not in focus

I am running Apache Spark in IntelliJ, using the console to send requests to my application.
I have noticed something I find quite strange. On my Mac, when running my program and having IntelliJ as the selected window i.e. full screen and visible; I get through 1000 iterations in ~5 minutes. When I start the application in IntelliJ and then make the visible screen another application, but do nothing with it - literally just leave the Mac alone, when I go back to the Scala Console after ~5 minutes it has only performed 300 iterations! Similarly, if the app starts and then the screens turns off (but my Mac doesn't sleep - I made sure of that) I get the same issue: only 300 iterations.
Is there any explanation for this?