Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Nowlan__Andrew
Beginner
271 Views

Reset NSC2 Each time network is loaded with Python API

Hi,

I'm trying to reset the MYRIDA NSC2 each time a network is loaded. That is, i'm trying to set  MYRIAD_FORCE_RESET = YES using the Python API.  The docs say it must be set using the set_config() method, but i have been ubale to do this after reading the docs.  Would you be able to provide a python example of how this should be done? Or point to an example?

Thanks in advance.

 

 

 

 

 

 

 

https://docs.openvinotoolkit.org/latest/_docs_IE_DG_supported_plugins_MYRIAD.html#MYRIAD_DEVICE_ALLO...;

 

 

0 Kudos
4 Replies
Iffa_Intel
Moderator
271 Views

Greetings,

You can use netiface, https://github.com/raphdg/netifaces

import netifaces,

#This function returns returns True when an IP address is associated to a given interface(connected to internet)

def is_interface_up(interface):

                   addr = netifaces.ifaddresses(interface)

                   return netifaces.AF_INET in addr

if addr ==1 : do_something

else: do_something()

You can check this out too:  https://medium.com/@f.i.rabby/python-network-manager-tutorial-c504cdb8fc76

Hope my answer helps!

Sincerely,

Iffa

Nowlan__Andrew
Beginner
271 Views

I think you have misunderstood me. I mean each i want to enable the force reset of all booted devices when new ExecutableNetwork is created with the python API as metioned here .
 

https://docs.openvinotoolkit.org/latest/_docs_IE_DG_supported_plugins_MYRIAD.html

Iffa_Intel
Moderator
271 Views

try to run python sample &  omit the KEY_ prefix

This part is specifying key values as raw strings (that is, when using Python API)                This part is Omit Key_prefix                    

./decemberpei/openvino-ncs2-python-samples/blob/master/async_api_multi-processes.py KEY_VPU_MYRIAD_FORCE_RESET=YES

 

 

Sincerely,

Iffa

Iffa_Intel
Moderator
271 Views

Hi,

Im closing this case. If there are any other inquiries please help to create a new thread.

Thanks & have a great day ahead!.

Sincerely,

Iffa

Reply