gui
Automatically generated README for this automation recipe: gui
Category: GUI
License: Apache 2.0
Developers: Grigori Fursin
This CM script provides a unified GUI to run CM scripts using Streamlit library.
If you want to run it in a cloud (Azure, AWS, GCP), you need to open some port and test that you can reach it from outside.
By default, streamlit uses port 8501 but you can change it as follows:
cm run script "cm gui" --port 80
If you have troubles accessing this port, use this simple python module to test if your port is open:
python3 -m http.server 80
- CM meta description for this script: _cm.yaml
- Output cached? False
Reuse this script in your project
Install MLCommons CM automation meta-framework
Pull CM repository with this automation recipe (CM script)
cm pull repo mlcommons@cm4mlops
Print CM help from the command line
cmr "cm gui cm-gui script-gui cm-script-gui streamlit" --help
Run this script
Run this script via CLI
cm run script --tags=cm,gui,cm-gui,script-gui,cm-script-gui,streamlit[,variations] [--input_flags]
Run this script via CLI (alternative)
cmr "cm gui cm-gui script-gui cm-script-gui streamlit [variations]" [--input_flags]
Run this script from Python
import cmind
r = cmind.access({'action':'run'
'automation':'script',
'tags':'cm,gui,cm-gui,script-gui,cm-script-gui,streamlit'
'out':'con',
...
(other input keys for this script)
...
})
if r['return']>0:
print (r['error'])
Run this script via Docker (beta)
cm docker script "cm gui cm-gui script-gui cm-script-gui streamlit[variations]" [--input_flags]
Variations
-
Group "app"
Click here to expand this section.
_chatgpt
- ENV variables:
- CM_GUI_APP:
chatgpt
- CM_GUI_APP:
- ENV variables:
_graph
- ENV variables:
- CM_GUI_APP:
graph
- CM_GUI_APP:
- ENV variables:
_main
- ENV variables:
- CM_GUI_APP:
app
- CM_GUI_APP:
- ENV variables:
_playground
- ENV variables:
- CM_GUI_APP:
playground
- CM_GUI_APP:
- ENV variables:
Input Flags
- --script: script tags
- --app: gui app
Script flags mapped to environment
--address=value
→CM_GUI_ADDRESS=value
--app=value
→CM_GUI_APP=value
--exp_key_c=value
→CM_GUI_GRAPH_EXPERIMENT_AXIS_KEY_C=value
--exp_key_s=value
→CM_GUI_GRAPH_EXPERIMENT_AXIS_KEY_S=value
--exp_key_x=value
→CM_GUI_GRAPH_EXPERIMENT_AXIS_KEY_X=value
--exp_key_y=value
→CM_GUI_GRAPH_EXPERIMENT_AXIS_KEY_Y=value
--exp_max_results=value
→CM_GUI_GRAPH_EXPERIMENT_MAX_RESULTS=value
--exp_name=value
→CM_GUI_GRAPH_EXPERIMENT_NAME=value
--exp_tags=value
→CM_GUI_GRAPH_EXPERIMENT_TAGS=value
--exp_title=value
→CM_GUI_GRAPH_EXPERIMENT_TITLE=value
--exp_uid=value
→CM_GUI_GRAPH_EXPERIMENT_RESULT_UID=value
--no_browser=value
→CM_GUI_NO_BROWSER=value
--no_run=value
→CM_GUI_NO_RUN=value
--port=value
→CM_GUI_PORT=value
--prefix=value
→CM_GUI_SCRIPT_PREFIX_LINUX=value
--script=value
→CM_GUI_SCRIPT_TAGS=value
--title=value
→CM_GUI_TITLE=value
Default environment
These keys can be updated via --env.KEY=VALUE
or env
dictionary in @input.json
or using script flags.
- CM_GUI_EXTRA_CMD: ``
- CM_GUI_SCRIPT_PREFIX_LINUX:
gnome-terminal --
- CM_GUI_APP:
app
Native script being run
Script output
cmr "cm gui cm-gui script-gui cm-script-gui streamlit [variations]" [--input_flags] -j