Please make sure that you have access to a UQCloud endpoint.
To do so, navigate to the "Profile" section and below the section "UQCloud access", note the endpoint URL and your personal access Token.
Those are necessary for UQ[py]Lab to successfully perform UQ computations on the cloud.
During this beta testing phase, the UQ[py]Lab package is hosted on a private PyPi server.
To install the package in your local Python environment, execute the following command:
The following minimal example can be used to quickly test UQ[py]Lab after installation.
Create a new python script, say draw_samples.py and add the following contents:
Notice that in the quick start example one has to explicitly specify the UQCloud endpoint URL and their token in order to gain access to the UQCloud API. You can follow the steps below to store your credentials locally and simplify the UQCloud session starting process in your python scripts.
Start an interactive python session
sessions from the
Start a new UQCloud session using the standard procedure:
Make sure that your session has successfully started, i.e. your credentials are correct. Then execute the following command to store your credentials locally:
You are all set! From now on, you can start a new UQCloud session in any of your scripts by simply executing:
Your credentials will be stored within a directory in your user's home that depends on your operating system. The actual path that they are stored is reported after calling the
In the following short video we showcase how a simple UQLab workflow can be translated into a UQ[py]Lab one.
Some users may experience the following error when they try to start a new session:
The underlying cause is rather operating system related and this error is typically appearing and disappearing as the operating system updates. The following workaround can be used to bypass this error:
Notice that the difference compared to the standard way of starting a new session is that we set the flag
False . This will bypass the SSL certificate validation steps that are taking place during connection. This is done by disabling the host's SSL certificate check while using the urllib.request library, which is handling all calls to the UQCloud API.
Note: Please make sure that you understand the potential risks of resorting to this workaround before using it!