Info | Value |
---|---|
Package | mvnc |
Module | mvncapi |
Version | 2.0 |
See also | Graph, GraphOption, Graph.get_option() |
This method sets an option for the graph. The available options and possible values can be found in the GraphOption enumeration.
graph.set_option(option, value)
Parameter | Type | Description |
---|---|---|
option | int | A member of the GraphOption enumeration that specifies which graph option to set. |
value | varies | The new value to which the graph option will be set. The type to pass for this parameter depends on which option is being set. See the GraphOption enumeration for the type that corresponds to each option. |
None
Exception with a Status.INVALID_PARAMETERS code if an invalid option is passed or Exception with a status code from Status if underlying function calls return a status other than Status.OK.
from mvnc import mvncapi
# Create a Graph
graph = mvncapi.Graph('mygraph')
# Set the RW_EXECUTORS_NUM for the Graph
graph.set_option(mvncapi.GraphOption.RW_EXECUTORS_NUM, 2)
# Destroy the Graph when done using it
graph.destroy()