Hello Orbit example¶
After completing the start-up section, follow the next few steps to launch your first Orbit Monitor:
- Navigate to where you'd like to create your Orbit project directory (e.g, your
workspacedirectory). - Ensure that you are in the environment that was used during installation.
- Create a directory called
hello-orbit. - Navigate into the newly created
hello-orbitdirectory. - Create a python file call
hello-orbit.py - Put the following code in
hello-orbit.pyimport foundations print("hello orbit")
- Run
foundations monitor create . hello-orbit.pyto create a monitor within thehello-orbitproject - Head to the GUI to see your project
- On the GUI, click on the
hello-orbitproject, it should lead you to theMonitor Schedulestab - In the
Monitor Schedulestab, you should see a monitor calledhello-orbit. Click on the monitor will show you details about this monitor - Under
Schedule Details, set the schedule to run the monitor (e.g. let's run it every minute at the 10th second) - Under
Schedule Details, set the "Ending on" date and time to a future time - Once you click "Save", the Monitor's status will becomes
Activeand times inNext Runwill get updated - At the scheduled times (shown under
Next Run), you can see list of jobs under theMonitor Jobssection (you will need to click the refresh button) - When a job is being executed, under
statusit will show a blinking green circle - When a job is done, under
statusit will show a solid green circle. Click the button on the right hand side of the table, a modal will pop up and display the messagehello orbit
Note
When you run a job for the first time, it will download the appropriate worker image needed.
This will take roughly 2 to 3 minutes.
There you go, you just created your first Orbit Monitor and schedule it to run periodically. The Monitor is created from our hello-orbit.py script, which doesn't do much except printing out "hello orbit" everytime it is run.
Next, let's do something more interesting: using Orbit Monitor to monitor data quality, input and concept drifts.