Magister militum (master of soldiers) was a Roman and Byzantine title for a provincial or local military commander, who often had civil duties too.
From 737 to 742 the Duchy of the Venetians wasn’t ruled by dukes, but by military commanders with the Byzantine title of “magister militum”.