UQLab 2.0 and UQCloud: open-source vs. cloud-based uncertainty quantification - Research Collection

Page created by Rick Peters
 
CONTINUE READING
UQLab 2.0 and UQCloud: open-source vs. cloud-based uncertainty quantification - Research Collection
ETH Library

UQLab 2.0 and UQCloud: open-
source vs. cloud-based uncertainty
quantification

 Other Conference Item

 Author(s):
 Lataniotis, Christos   ; Marelli, Stefano   ; Sudret, Bruno

 Publication date:
 2022-04-14

 Permanent link:
 https://doi.org/10.3929/ethz-b-000544670

 Rights / license:
 Creative Commons Attribution 4.0 International

 This page was generated automatically upon download from the ETH Zurich Research Collection.
 For more information, please consult the Terms of use.
UQLab 2.0 and UQCloud: open-source vs. cloud-based uncertainty quantification - Research Collection
UQL AB 2.0 and UQC LOUD: Open-Source Vs. Cloud-Based Uncertainty
Quantification
SIAM UQ 2022, April 13 2022

C. Lataniotis, S. Marelli, B. Sudret

Chair of Risk, Safety and Uncertainty Quantification
                                                                   SIAM UQ 2022
UQLab 2.0 and UQCloud: open-source vs. cloud-based uncertainty quantification - Research Collection
How to cite?

          This presentation was given at the SIAM UQ2022 Conference, Atlanta, April 14, 2022 (online).

How to cite
    Lataniotis, C., Marelli, S. and Sudret, B. UQL AB 2.0 and UQC LOUD: Open-Source Vs. Cloud-Based Uncertainty
    Quantification, SIAM Conf. on Uncertainty Quantification, Atlanta, GA (USA), April 12-15.

                                                    UQ in the cloud           SIAM UQ 2022   C. Lataniotis, S. Marelli, B. Sudret   1 / 17
UQLab 2.0 and UQCloud: open-source vs. cloud-based uncertainty quantification - Research Collection
A few words about the UQL AB project

Our mission: Make uncertainty quantification available for anybody, in any field of applied
                               science and engineering

Our goals:
  • Disseminate a general purpose,
    non-intrusive, black-box UQ mindset
  • Provide a software to quickly deploy it
  • Appeal to both academia and industry
  • Address an audience of non-specialists

                                              UQ in the cloud   SIAM UQ 2022   C. Lataniotis, S. Marelli, B. Sudret   2 / 17
UQLab 2.0 and UQCloud: open-source vs. cloud-based uncertainty quantification - Research Collection
The UQLab ecosystem

                 UQL AB                                                      UQW ORLD
 • General purpose software for UQ                             • Open to anyone (not just UQL AB users!)
 • Close to 4,500 users from 90+ countries                     • Plenty of topics
 • Over 100,000 lines of code                                  • Hundreds of registered users
 • Written in M ATLAB                                          • User-to-user interactions
               www.uqlab.com                                                 www.uqworld.org

                                             UQ in the cloud                 SIAM UQ 2022   C. Lataniotis, S. Marelli, B. Sudret   3 / 17
UQLab 2.0 and UQCloud: open-source vs. cloud-based uncertainty quantification - Research Collection
A quick look at the UQL AB software in 2021

                 Original goals:                                                  Status in 2021:

• Highly modular, seamlessly integrated design                     19 integrated modules

• Very fast learning curve for non-specialists                     Used in ∼600 scientific works

• Unique documentation model                                       Hundreds of citations

• Open source scientific algorithms                                BSD 3-clause license only on the modules

• Portability on windows/linux/mac systems                         M ATLAB-based

                                                 UQ in the cloud                 SIAM UQ 2022   C. Lataniotis, S. Marelli, B. Sudret   4 / 17
UQLab 2.0 and UQCloud: open-source vs. cloud-based uncertainty quantification - Research Collection
A mixed licensing model
Rationale: all the scientific content needs to be publicly available, but its commercial exploitation should support the
development of the software

                            Our solution (2017–2021): two separate software packages1

UQLabCore                                                                UQLabModules
  • A domain specific language (DSL) made for UQ                             • A collection of algorithms for UQ (probabilistic
  • Handles bookkeeping, memory, updating,                                     modelling, surrogate models, reliability analysis, etc)
    content-management, etc                                                  • Extensive documentation
  • Contains no science/algorithms                                           • Open source (BSD 3-clause license)
  • Handles user licenses                                                    • Can be modified and extended by the user
  • Closed source, requires registration                                     • Requires UQLabCore to be used out-of-the-box

                 Free for academic users, non-free licensing options available for commercial/private use

  1
      https://uqworld.org/t/why-a-licensing-system-is-uqlab-really-open-source/143
                                                                 UQ in the cloud               SIAM UQ 2022   C. Lataniotis, S. Marelli, B. Sudret   5 / 17
UQLab 2.0 and UQCloud: open-source vs. cloud-based uncertainty quantification - Research Collection
Almost 5 years after: did it work?

The good...                                                 ...the bad
  • Thousands of unique users from Academia                      • Requires maintenance of a complex licensing
                                                                   high-availability backend infrastructure
  • Highly cited manuals
                                                                 • Requires live internet connectivity during startup
  • Lots of collaborations started with groups worldwide
                                                                 • Requires a valid M ATLAB license ($$$!)
  • Contributed to widespread adoption of many niche
    UQ tools in applied research, such as PCE and active         • Perceived as closed-source due to obscured
    learning-based reliability                                     UQLabCore code

...and the ugly

  • Commercial licensing extremely complex and time-consuming
  • Very little commercial interest for general-purpose UQ software

                                                So... what now??

                                                      UQ in the cloud               SIAM UQ 2022   C. Lataniotis, S. Marelli, B. Sudret   6 / 17
UQLab 2.0 and UQCloud: open-source vs. cloud-based uncertainty quantification - Research Collection
UQL AB 2.0
                               We went fully open source!
                                    • Released Feb. 1st, 2022
                                    • UQLabCore and UQLabModules are now merged in
                                      the single UQL AB software
                                    • No more internet connectivity required
                                    • All licensing code stripped from the core (now also
                                      open-source)
                                    • BSD 3-clause license: commercial exploitation now
                                      allowed for everyone, with attribution
                                    • Registration still required, but automatic and open to
                                      everyone (only used to communicate with the
                                      userbase)

             Go ahead and try it out now!

                       UQ in the cloud               SIAM UQ 2022   C. Lataniotis, S. Marelli, B. Sudret   7 / 17
Ok but why M ATLAB then2
        Our requirements back in 2013
          • Interpreted language (no compilation)
          • High-level pre-existing objects and built-in functions
          • Mature environment for easy install
          • Well-known in academia AND in the industry
          • Designed for scientific programming

Pros                                                              Cons
  • Quick learning curve                                              • Paying licenses (expensive for industry)
  • Standard in academia and industry, well supported                 • High-level libraries not part of basic M ATLAB
  • Object-oriented and fast                                            (toolboxes)

  • Portable (Win, MacOS, Linux)                                      • Perceived as not-open-source

  • Powerful debugging-profiling
  2
      https://uqworld.org/t/matlab-but-but-python-r-c-cobol/147
                                                          UQ in the cloud               SIAM UQ 2022   C. Lataniotis, S. Marelli, B. Sudret   8 / 17
And in 2021 ?

Some limitations
  • Standalone, local software is “old style”, gradually disappearing
  • M ATLAB is not the ideal language for machine learning, integration is limited
  • Different communities and companies use different toolkits, languages and tech stacks

           How can we work around these without rewriting UQL AB in python, R, Julia, etc. ?

                                                  UQ in the cloud         SIAM UQ 2022   C. Lataniotis, S. Marelli, B. Sudret   9 / 17
Let’s put it in the cloud! – The UQC LOUD project

Introducing UQC LOUD

  • Platform-independent SaaS
  • Matlab-based, following the UQLab roadmap
  • Deployed on a modern, scalable cloud-based infrastructure
  • Platform- and language- independent

                                                    UQ in the cloud   SIAM UQ 2022   C. Lataniotis, S. Marelli, B. Sudret   10 / 17
The UQC LOUD architecture

UQC LOUD is a Software-as-a-Service (SaaS) solution for UQ computations powered by UQL AB

  • UQC LOUD provides a secure REST API service that handles
    JSON requests and produces JSON responses
  • Software bindings
       – Open source wrapper software for different languages
       – Distributed on standard repositories (PyPI, CRAN, Julia...)
       – Only O(102 ) lines of code vs O(105 ) of the full UQL AB
         source
       – Provide similar user experience to UQL AB

Advantages

  • No Matlab license needed
  • Continuous integration with UQL AB

                                                       UQ in the cloud     SIAM UQ 2022   C. Lataniotis, S. Marelli, B. Sudret   11 / 17
UQLab vs. UQCloud

               UQCloud goal: provide on-demand UQLab computations via API calls

UQL AB                                                     UQC LOUD
 • Installed by user on their machine                            • UQLab is pre-"installed" on the cloud
 • User-defined models (e.g. FEM) can be                         • UQCloud covers most of the computational
   connected in a straightforward manner (UQ                       cost
   MODEL, UQLink)                                                • UQCloud must "remember" the previous
 • User covers the computational cost                              calls made by the user (stateful API)
 • Running a UQLab session per user is                           • Sanity requirement: users run their
   almost trivial                                                  computational models locally
 • Matlab license fees covered by the user                       • No Matlab fees for users!

                                               UQ in the cloud                SIAM UQ 2022   C. Lataniotis, S. Marelli, B. Sudret   12 / 17
First set of bindings: UQ[py]Lab!!

Coming [very] soon
  • Fully functional python-bindings for UQC LOUD
  • Beta testing phase almost complete
  • Finalizing and documenting production version
  • Release 1.0 expected Summer 2022
  • Public free instance available to all academic users
    (with some load limitations)

              Beta registrations are still open for a short time!          https://uqpylab.uq-cloud.io

                             Volunteers welcome to write R / Julia / C++ bindings !

                                                         UQ in the cloud             SIAM UQ 2022   C. Lataniotis, S. Marelli, B. Sudret   13 / 17
UQ[Py]Lab in a notebook

                          UQ in the cloud   SIAM UQ 2022   C. Lataniotis, S. Marelli, B. Sudret   14 / 17
See it in action: reliability analysis of a truss structure in Matlab and python
               Truss structure:                             UQLab (Matlab) code:                            UQ[py]Lab (Python) code:
                                                       InputOpts . Marginals (1) . Name = ' E1 ';          InputOpts = {
                                                       InputOpts . Marginals (1) . Type = '                  ' Marginals ' : [
                                                             Lognormal ';                                    { ' Name ' : ' E1 ' ,
                                                       InputOpts . Marginals (1) . Moments = [2.1            ' Type ' : ' Lognormal ' ,
                                                             e11 , 2.1 e10 ];                                ' Moments ': [2.1 e11 , 2.1 e10 ]} ,
                                                       InputOpts . Marginals (2) . Name = ' E2 ';            { ' Name ' : ' E2 ' ,
                                                       ...                                                   ...
                                                                                                             ]}
                                                       myInput = uq_cr eateInpu t ( InputOpts )            myInput = uq . createInput ( InputOpts )

    Parameter distributions:                           ModelOpts . mFile = ' truss_model ';                ModelOpts = {
                                                                                                             ' Type ': ' Model ' ,
 Name                     Type          µ        σ/µ                                                         ' ModelFun ': ' truss . model '
                                                                                                           }
 E1 ,E2 (P a)           Lognormal   2.1 × 1011   10%
                                                       myModel = uq_cr eateMode l ( ModelOpts ) ;          myModel = uq . createModel ( ModelOpts )
 A1 (m2 )               Lognormal   2.0 × 10−3   10%
         2                                  −3
 A2 (m )                Lognormal   1.0 × 10     10%   AnalysisOpts . Type = ' Reliability ';              AnalysisOpts = {
 P1 , . . . , P6 (N )    Gumbel     5.0 × 104    15%   AnalysisOpts . LimitState . Threshold =               ' Type ' : ' Reliability ' ,
                                                             0.13;                                           ' LimitState ':
                                                       AnalysisOpts . Method = ' IS ';                          { ' Threshold ': 0.13 } ,
                                                       AnalysisOpts . MaxSamples = 1 e4 ;                    ' Method ': ' IS ' ,
Matlab-Python workflow comparison:                                                                           ' MaxSamples ': 1 e4
                                                                                                           }
https://youtu.be/2Q_6zxtj7O0                           myAnalysis = u q _ c r e a t e A n a l y s i s (    myAnalysis = uq . createAn alysis (
                                                             AnalysisOpts )                                       AnalysisOpts )

                                                                               UQ in the cloud            SIAM UQ 2022   C. Lataniotis, S. Marelli, B. Sudret   15 / 17
Active learning on the 2D hat function
g(x1 , x2 ) = 20 − (x1 − x2 )2 − 8 (x1 + x2 − 4)3        Xi ∼ N (0.25, 1) , i = 1, 2            Under the hood:
 InputOpts = {                                      uq . print ( AKMCSAnalysis )
   " Marginals " : [
        { " Name " : " R " ,
          " Type " : " Gaussian " ,
          " Moments " : [5.0 , 0.8]} ,
        { " Name " : " S " ,
          " Type " : " Gaussian " ,
          " Moments " : [2.0 , 0.6]}
   ]}
 myInput = uq . createInput ( InputOpts )

 ModelOpts = { ' Type ': ' Model ' ,
            ' ModelFun ': ' Hat . model '}          uq . display ( AKMCSAnalysis )
 myModel = uq . createModel ( ModelOpts )                                              Features
 AKMCSOpts = {                                                                           • Full bi-directional communication
   " Type " : " Reliability " ,
   " Method " : " AKMCS "                                                                • Model evaluations are executed locally
   }
 AKMCSAnalysis = uq . crea teAnaly sis (
                                                                                         • Minimal communications
        AKMCSOpts )

                                                                     UQ in the cloud    SIAM UQ 2022   C. Lataniotis, S. Marelli, B. Sudret   16 / 17
Summary & Outlook

Summary

 • UQL AB has been a successful project, yet with some limitations
 • Version 2.0 is now fully open-source to feed both industrial and private users’ needs
 • To tap into different communities that use different languages/tech stacks, we introduced the UQCloud project
 • We gave a brief demonstration/example of UQ[Py]lab, the first set of software bindings, that allows full access to the
   functionality within the python language
 • Release of UQ[py]Lab 1.0 in Summer 2022!

                                                        UQ in the cloud           SIAM UQ 2022   C. Lataniotis, S. Marelli, B. Sudret   17 / 17
Questions ?
                                                               The Uncertainty Quantification
                                                                         Software
                                                                          www.uqlab.com

                                                               The Uncertainty Quantification
                                                                       Community
                                                                        www.uqworld.org
   Chair of Risk, Safety & Uncertainty Quantification
                    www.rsuq.ethz.ch

                                             UQ in the cloud      SIAM UQ 2022   C. Lataniotis, S. Marelli, B. Sudret   17 / 17
You can also read