Display tqdm in AWS Sagemaker's jupyterlab - amazon-sagemaker

Does anyone nows how can we have python tqdm progress bar working on a Sagemaker Jupyterlab Noteook ? The tqdm progress bar is never displayed, components are displayed as their code.
Example :
HBox(children=(FloatProgress(value=0.0, max=5234.0), HTML(value='')))
I'm aware of the usual fix describe here, but It does not work since trying to executing jupyter lab build will results in the issue describe here
Many thanks.

Thanks for using Sagemaker Notebooks!
I got this working by following the instructions in your links.
Note: I had to use the Jupyter terminal instead of using a magic ! from the notebook. There was a lot of output during the installation which slowed Jupyter down too much.
So in the terminal:
jupyter labextension install #jupyter-widgets/jupyterlab-manager > /dev/null
then:
jupyter nbextension enable --py widgetsnbextension
At this point you need to reload Jupyterlab in your browser. This is because the labextension build generates a new javascript bundle that you must reload to get.
Finally in the notebook:
!pip install tqdm
and then the example worked:
import time
from tqdm import tqdm_notebook
example_iter = [1,2,3,4,5]
for rec in tqdm_notebook(example_iter):
time.sleep(.1)
Hope this helps!
You should also try in a new notebook instance to ensure you are on the latest version of Jupyterlab.

Related

ModuleNotFoundError: no module named 'transformers'

this is my first post and I am very new to coding so please let me know if you need more information. I have been running some AI to generate artwork and it has been working but when I reloaded it the script won't work and it is now saying "No module named 'transformers'". Can anyone help me out? It was when I upgraded to google colab pro that I started to encounter issues although I am not sure why that would make a difference
ModuleNotFoundError
Probably it is because you have not installed in your (new, since you've upgraded to colabs pro) session the library transformers. Try to run as first cell the following: !pip install transformers (the "!" at the beginning of the instruction is needed to go into "terminal mode" ). This will download the transformers package into the session's environment.
assuming you are referring to the module here: https://pypi.org/project/transformers/
you need to install transformers with pip
after you install transformers, make sure to import it , and import the Module youre gonna use

i have this error when when i try to build my app in flutter

enter image description here
Error: Type 'AssetBundle' not found.
AssetBundle? bundle
I don't think the problem is related to your database. The error comes from flutter_svg. Did you add a proper asset route in the end of your pubspec?
Like this:
flutter:
uses-material-design: true
assets:
- assets/images/intro/
This problem is not related to your persistant database, it's an error coming from the flutter_svg package you have installed. According to the issue #610, all you have to do is update Flutter to at least 2.5.0, to do this, run the following command in your terminal:
flutter upgrade
This is a very difficult problem. Barely solved it. I found only one solution to it, no one showed anything sensible.
In the Terminal in Android Studio (Android Studio: View -> Tool Windows -> Terminal. Old: Go to Tools -> Open Terminal, or see at the bottom of the Android Studio path "Terminal") you need to write just upgrade --force
This removes all issues under clean and reinstalls Flutter. Better than this way to solve the problem - it is impossible.

How to setup OHIF on windows

Please what is the correct way to have this Running
i am trying to install this and get it running on windows using this documentation.
i have installed Meteor , and then navigated to the folder and typed meteor, as talked about from here and here
I am getting this as Error
run: You're not in a Meteor project directory.
To create a new Meteor project:
meteor create <project name>
For example:
meteor create myapp
For more help, see 'meteor --help'.
Please what am I not doing correctly.
If you want to use OHIF I suggest you upgrade to Version 3.
The setup is easier (with good documentation) and the code is more tidy: https://github.com/OHIF/Viewers
I would also suggest to use docker.
This project helped me a lot setting up my instance: https://github.com/trypag/ohif-orthanc-postgres-docker/blob/master/docker-compose.yml

White Screen - App content failed to load after launch released iOS app

I installed my application play store seamlessly. However, when I tried to install the App Store, the application was rejected and I received the following message.
Guideline 2.1 - Performance - App Completeness
We discovered one or more bugs in your app when reviewed on iPad running iOS 12.3.1 on Wi-Fi.
When we launched the app, app displayed a splash screen and no further action occurred in the app during the review.
Next Steps
To resolve this issue, please run your app on a device to identify any issues, then revise and resubmit your app for review.
If we misunderstood the intended behavior of your app, please reply to this message in Resolution Center to provide information on how these features were intended to work.
For new apps, uninstall all previous versions of your app from a device, then install and follow the steps to reproduce the issue. For updates, install the new version as an update to the previous version, then follow the steps to reproduce the issue.
Resources
For information about testing your app and preparing it for review, please see Technical Note TN2431: App Testing Guide.
For a networking overview, please review About Networking.
Please see attached screenshots for details.
When I write flutter doctor there is no problem.
I tried the application on the real device again no problem.
But the app store made such a turn. Does anyone know the reason or are having the same problem?
i faced same problem with android version of flutter app, when testers install app from google play, the white screen appear, but when test direct apk on device the app not installed appear.
That problem happen after i update android sdk tool to version 30
after long search, i solved the problem with step:
in dependences in android\build.gradle downgrade gradle from 4.0.0 to 3.5.0 as the default value new flutter app determined
in app\build.gradle downgrade compileSdkVersion to 29 and so targetSdkVersion to 29 too
run the flutter clean command
Resolved
https://www.flutterforum.org/d/97-white-screen-app-content-failed-to-load-after-launch-released-ios-app
Thank you!
It took me three days. But solved ...
Make sure you followed the developer guidelines carefully here at this link:
https://flutter.dev/docs/deployment/ios#create-a-build-archive
Steps to generate ipa:
Execute the following command flutter build ios --release
To ensure that Xcode refreshes the release mode configuration, close and re-open your Xcode workspace. For Xcode 8.3 and later, this step is not required. Finally Select Product > Archive to produce a build archive.
Hope this helps :)

qpython not able to download requests module

I am using qpython for programming python on android.In my script I am importing requests module and so I have tp install requests module from pip.When I run pip install requests command I get the following error:
error build/lib.linux-armv71-2.7/requests/auth.py:operation not permitted qpython
I get this error twice while installing requests and so I am not being able to run my script.
You might need to manually download requests, extract and move it to your Lib/site-packages/Requests/ folder, from there python should be able to import from it. I don't see that package available for qpython, it might work out of the box or it might still need to be ported.
After installing qpython on my current device I was able to open the app, go to My QPython ->Scripts and use pip_console.py to try to install it but as you said it fails. I'm going to test later my above recommendation. My install directory is /sdcard/com.hipipal.qpyplus/lib/python2.7/site-packages/ and that is where I'm going to drop the requests library.
To run pip on qpython just use the steps below:
import pip
pip.main(['install', 'bs4'])
The above is to install bs4 for BeautifulSoup. Worked for me :)
The newest version ( 1.3.1 ) from google play has fixed this issue.
This solution did not work or me...but I did resolve it by downloading the new beta v2.1 from
https://github.com/qpython-android/qpython/releases
Google play did not give me the latest version (I had 1.xx)
I was able to use QPYPY to install requests and it automatically installed the required library urllib3.

Resources