Package: seeq-azureml
Introductionseeq-azuremlprovides an example framework that allows a data scientist working in Azure ML Studio and a plant
engineer or subject matter expert (SME) working in Seeq to collaborate and develop an effective, sustainable solution
for high value problems in manufacturing.This python module integrates with Microsoft Azure Machine Learning (AML) models as a web service and can be installed
as a Seeq Add-on in Seeq Workbench. The plant engineer and/or SME interacts with the module through an easy to use UI
from which they can accomplish critical activities such as ad hoc/historical evaluations, model deployment in real time,
scaling to other assets, etc.The Seeq Add-on is distributed as an example of a collaborative workflow between data scientists (model builders) and
plant engineers/SMEs (model consumers). Users are encouraged to fork the repo and make the necessary
modifications/enhancements that addresses the specific needs/workflows of their organization.Important Note:Theseeq-azuremladd-on is meant to be used for proof-of-concept models only. There are four significant caveats
that users should be aware of when using this add-on:A new Azure app registration must be set up to provide the identity to Seeq via OIDC (Open ID Connect).The Azure app registration needs contributor access to the AzureML Studio workspace.A secret needs to be generated and configured in an ini file as per the instructions on the Seeq Add-on Installation
section of the documentation.This add-on has very limited capability for scalability to multiple assets.DocumentationThe documentation forseeq-azuremlcan be foundhere.User Guideseeq-azuremlUser Guideprovides a more in-depth
explanation of how this Seeq Add-on enables engineers and SMEs in OT to directly interface with models built by data
science teams in Azure ML Studio and that have been registered and deployed in an AML endpoint as a cloud service.For additional details on the Data Scientist workflow, take a look atthis video.For additional details on the Engineering workflow, take a look atthis video.InstallationThe backend ofseeq-azuremlrequiresPython >3.7or later.DependenciesSeerequirements.txtfile for a list of
dependencies and versions. Additionally, you will need to install theseeqmodule with the appropriate version that
matches your Seeq server. For more information on theseeqmodule seeseeq at pypiUser Installation Requirements (Seeq Data Lab)If you want to installseeq-azuremlas a Seeq Add-on Tool, you will need:Seeq Data Lab (> R50.5.0, >R51.1.0, >R52.1.0, or >=R53)seeqmodule whose version matches the Seeq server version, and the version of SPy >= 182.25Seeq server admin accessEnable Add-on Tools in the Seeq serverUser Installation (Seeq Data Lab)The latest build of the project can be foundhereas a wheel file. The file is published as a courtesy and does not imply any guarantee or obligation for support from the
publisher.Pre-requisitesBefore installing theseeq-azuremlSeeq Add-on, you will have to create anAzure applicationandservice
principal. Follow the steps
inhereto
create your application, and
chooseOption 2for theAuthenticationmethod.Seeq Add-on InstallationOnce theAzure applicationandservice principalhave been created. Follow these steps to install the Seeq
Add-on:Create anewSeeq Data Lab project and open theTerminalwindowRunpip install seeq-azuremlRunpython -m seeq.addons.azureml [--users <users_list> --groups <groups_list>]Create anaml_config.inifile in the~/.seeqfolder of the Seeq Data Lab Project with the information required to
connect to the Azure ML services. The following steps summarized how to create theaml_config.inifile in the
correct Seeq Data Lab location and where to get the values required for the configuration.Download theaml_config.iniconfiguration file
fromhereUpload the file to the Seeq Data Lab project using theUploadbutton located in the top-right corner of the home
page of the project.From the Seeq Data Lab project home page, open the uploaded file and modify the fields appropriately:TheSUBSCRIPTION_ID,RESOURCE_GROUP, andWORKSPACE_NAMEcan be obtained by logging into the Azure portal
and clicking on
theMachine Learning service. Once in the Machine Learning service, click on the desiredWORKSPACE_NAMEfrom the list. TheOverviewtab will show a list ofEssentialsfrom which you can take the values forSUBSCRIPTION_IDandRESOURCE_GROUP.TheTENANT_ID,APP_ID, andAPP_SECRETare obtained when creating the Azure application in the
sectionGet tenant and app ID values for signing in,Option 2.Save theaml_config.inifile.Back to theTerminalwindow from Steps 1 and 2, run the commandmv aml_config.ini .seeq/to move
theaml_config.inifile to the appropriate folder.Note: If Step 3 gives an error make sure that the seeq module is >= a.b.c.182.25where a.b.c are explainedhereDevelopmentWe welcome new contributors of all experience levels.Important linksOfficial source code repo:https://github.com/seeq12/seeq-azuremlIssue tracker:https://github.com/seeq12/seeq-azureml/issuesSource codeYou can get started by cloning the repository with the command:gitclonegit@github.com:seeq12/seeq-azureml.gitInstallation from sourceFor development work, it is highly recommended creating a python virtual environment and install the package in that
working environment. If you are not familiar with python virtual environments, you can take a
lookhereOnce your virtual environment is activated, you can installseeq-azuremlfrom source with:pythonsetup.pyinstallTestingThere are two main ways to testseeq-azureml:automatic testingmainly for the backend, anduser interface
testing.Automatic TestingAfter installing from source, you can launch the test suite from the root directory of the project (i.e.seeq-azuremldirectory). There are two types of automatic tests set up: 1)unit testandsystem test. The system and unit tests
can be run at the same time or independently. Use the pytest markers defined inpytest.inito run only one set of
tests at a time.For example, to run only the unit tests:pytest-v-munitThe system tests require a connection to both a Seeq server and Azure ML Studio. Before running system tests, you will
have to provide the required variables intests/test_config.ini.Please be careful not to commit your credentials in
the configuration file back into the repository. To avoid committing changes in the configuration file, run the
following command in the root directory of the project before modifying the configuration file.git update-index --assume-unchanged tests/test_config.iniThen, you can fill out the configuration file and use it for the tests. Lastly, make sure that theseeqmodule version
in your local environment should match the Seeq server version.To run only the system tests (after modifying tests/test_config.ini):pytest-v-msystemTo run all tests (both unit and system tests):pytest-vUser Interface TestingTo test the UI, use thedeveloper_notebook.ipynbin thedevelopmentfolder of the project. This notebook can also be
used while debugging from your IDE. You can also create a whl first, install it on your virtual environment, and then
rundeveloper_notebook.ipynbnotebook there.ChangelogThe changelog can be foundhereSupportCode related issues (e.g. bugs, feature requests) can be created in theissue trackerMaintainer: SeeqCitationPlease cite this work as:seeq-azureml
SeeqCorporation,2021https://github.com/seeq12/seeq-azureml