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

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

Related

Issue with errors in Unity on launch

I am having an issue in Unity where every time I launch the editor it asks me to enter in safe mode because there are a lot of errors and when I press ignore it launches and I can see in the console a lot of errors with the UI and I found out that I cant create UI elements directly in the hierarchy. I tried to update from 2020.3.13f1 to 2020.3.14f1 and for the first launch everything was fine, with no errors, and I could create UI elements but then when I restarted to make sure everything was actually fine, all the errors popped up again and I cant create UI. Why does this happen and does anyone have a fix because I can't find it anywhere online.
Try not to enter Safe Mode. Enter the editable project. There go to Assets-Reimport All.
It did it to me too, it's probably a Unity bug, this method fixes it. Practically it reimports the whole project by itself, avoiding that the bug gives you problems (such as those like UnityEngine.UI does not exist or Monobehavior does not exist, etc.)
Obviously you will not lose any assets and everything will be fine as before receiving the errors.
Have this issue with any template 2020+ versions
Always shows 2 empty errors on console at first run ,even on an empty project
Will try to install 2019 and hopefully work again
in my case some side app ran caused some error in the installation of Unity.
Nothing amid aboves helped.
Thus I decided to fully reinstall it from scratch to default one.
Now it worksok. But before that . To wipe out the Unity thorowly you need in:
uninstalling Unity and UnityHub in windows' settings
remove all related/remained folders in "C:\Program Files"
remove related/remained folders in "C:\Users\myname\AppData\Local "
in Register Editor go to clean unity like folders in "Computer\HKEY_CURRENT_USER\SOFTWARE"
optionally, remove sample projects in "C:\Users\myname"
You're very likely simply opening the wrong folder, it's a common mistake
Or, you have possibly moved around the folders that you cannot move
Also - it's a nuisance but it's best to install the "hub"

Unity machine learning using internal brain for pre-trained networks results in crash

I try to get the machine learning project of Unity running. The project can be found here: https://github.com/Unity-Technologies/ml-agents
Following all the necessary steps to set everything up, everything works fine until I try to use a pre-trained model in an internal brain, e.g in the 3D-Ball example. On pressing play in the editor, it says to have stopped working and the editor crashes. Same goes for a successfully compiled executable.
Since I can't find any crash logs, I absolutely don't know what's the cause to this. Anybody had the same issue and solved it, or any ideas on this?
I'll just add the steps I made to set my project up, in case somebody wants to reproduce or check for mistakes I made:
Download zipped project from github
Open project with Unity 2018.1.1f1
Add ENABLE_TENSORFLOW to predefined symbols
Download and install TensorflowSharp Plugin
In the 3DBall Scene select the brain and switch BrainType to Internal
Run in editor or compile and run, results both times in a crash
EDIT
What's making me wonder is that I got it working just fine training an external brain in python using a compiled executable. So my thoughts were it should be much more easy to just forward pass a trained net, if it's working doing forward pass and back propagation. But it says though that external brain still is experimental, so not sure if that just will not work until some future patches.
EDIT 2
So I tried using an internal brain in an older version of the githubs project, which then worked quite fine. Also I used an older version of the TensforflowSharp Plugin. I'll try to figure out, which version still works and gonna post my results here ;)
To conclude, the problem was actually the recent version of the TensorflowSharp Plugin. Using an older version, which I found somewhere worked fine. I don't have the link to that version anymore, but in case someone experiences the exact same problem, I could search for it or upload it somewhere.

Matlab - import data tool

i have got a problem with the import data tool in matlab.
I just installed matlab this morning, at first it worked. However after shutting down the computer once, it doesn't work anymore.
More specifically, it opens and load data from .txt or spreadsheet, but when i click to import data to my workspace, instead of showing the progress in the waitbar it shows an error message:
IMPORT TOOL - couldn't find waitbar handles
any suggestion?
Sounds like the import tool works as intended until it cannot find the wait bar. A waitbar is a loading progress bar, which is available every basic installation of MATLAB (no toolbox required). Either the waitbar is created (do you see it?), but somehow not passed correctly through a broken connection between the import tool and the waitbar, or the waitbar function wasn't installed correctly.
I conclude your installation wasn't finished properly, so: uninstall MATLAB and reinstall it in one go (without pausing the installation).
You could also provide the system details you're installing on and the MATLAB version. Maybe someone knows of a certain condition of your particular setup that might cause the problem.

Flash not running debugger any more. Possible socket issue in Windows-10?

Bounty Update
I am leaving the question essentially the same, but I just want to point out at the beginning here that I'm most interested in help trying to get the socket between flash (Adobe Animate) and the native debugger working again, as I believe that is the issue I'm having. Or is it a socket between flash and Windows?
Original Question
I've apparently turned something off? Even when I write really bad code (like trying to call a function that isn't there or divide an integer into a fraction), the flash player boots, shows a background color and stops there. No messages in the output window or compiler errors window. If I fix my code, it all runs fine, but for about 30 minutes (ever since I started trying to work with bitmaps for a sprite sheet) I get no runtime errors no matter what kind of mistake I type in my code. Anyone know how to turn it back on?
I've checked my actionscript settings and I have both warning mode and strict mode checked on.
Could it be a socket issue? I admit I have little to no experience working with sockets and only a surface understanding of what that even means. I've added the socket tag. If someone can see that this is clearly nothing to do with sockets, by all means, I'll remove the tag.
UPDATE: 6/22/16
I just reinstalled Adobe Animate CC 2015.2 and no change. I'll try compiling it in flash builder when I get a chance to help pigeon hole the problem. (Edit 6/24: flash builder worked! But my trial version expired the next day so is no longer a viable option).
And I just tried something in the command prompt in Windows 10 as an administrator:
netsh winsock reset catalog
netsh int ip reset reset.log hit
which I found another user on flashdevelop.org used to fix a similar issue, but no change.
And I just tried debugging in Flash Builder. It worked fine (debugger caught bugs) but my trial version expired the next day.
update 6/24
I've tried launching debugger for AIR from within the Adobe Animate CC IDE and it works fine if there are no bugs; it fails to do anything visible (no Iphone emulator, no swf window) if I put a typo or error in the code.
I also just deleted winsock and winsock2, rebooted Windows, then reinstalled winsock and winsock2. No change.
update 6/25
Just tried a system restore in Windows to set all my files and settings and drivers etc. to the way it was a week and a half ago... Also completely uninstalled all Adobe products and reinstalled. No change. I can only imagine that wiping my hard drive and reinstalling Windows would do the trick, but come on, it hasn't come to that has it?
As VC.One suggested, I checked the compile error window (cannot believe I didn't check before! Maybe when I checked before there were no compile errors... Only runtime errors?) and the errors are showing up there. Does this mean that it's catching compile errors but just not runtime errors?
When you force/test a runtime error... make sure you check
Compiler Errors (ALT+F2) and also Output (F2). By Output I mean the window that shows traces (and runtime issues). One of those two should have some feedback for you.
A possible solution is to save a new Workspace. So with those windows for Compiler Errors and Output both open (or tabbed, I tab them next to my Timeline) go to Window (in top options like File/Edit/Debug etc) and choose Workspace, then into that you choose New Workspace. Give it a name in the pop-up and okay everything.
Flash should always load that current workspace (next time, go to Workspace option again, check that your specified workspace [by name] has a tick next to it...).
Possible pitfalls:
1 - Use the debug player
2 - Make sure there isn't somewhere a try/catch enclosing the portion of code that triggers the event that may lead to an error
3 - Socket issue: may be exported in debug mode but swf cannot connect to debugger (it waits in a blank state for 60 seconds I guess)
4 - Does it compile ok? If there are compilation errors you may get an SWF anyway but then it will not start
...

MonoDevelop: Autocomplete not showing all members?

Linux Mint 17.2 64x
MonoDevelop 5.9.5, writing a D application with D language binding
I've been having a problem with Monodevelop for a long time where it'll just stop showing relevant autocomplete entires. I'll write a class or have one from from a library and sometimes I'll get what's in the class and sometimes I'll only gent entries like sizeof (which I think apply to everything). Occasionally I'll get nothing at all.
Like this.
I've tried uninstalling and reinstalling, I've tried deleting project files, and these solutions work in some cases until I start adding more code and then at some point they break again and I get nothing relevant in my autocomplete pop-ups. I've even tried deleting Monodevelop folders in .local .cache and .config on my system, but the problem persists.
I've been trying to ignore it, and when I had a duel monitor setup it wasn't so bad because I could have references to what I'm working on in another window... but right now I'm this close to having zero monitors from getting so frustrated with having to tab around back and forth every 2.5 seconds, I'm just going to lose it and embed my mouse in the screen.
I'd switch to another IDE but I haven't been able to get most of my other options working with D/Dub...