Machine learning assisted control of integrated optical phased arrays