Yu Yuphoria YU5010 is stuck in "Optimize apps # of #" loop. Need to recover data
My daughter's Wileyfox Swift has the same issue...Wileyfox tech support have informed me that it was caused by an incompatibility between a Facebook update and the cyanogen OS. They have sent me files and instructions on force loading OS updates from CM12 to CM13 and from CM13 to Android 7 by forcing reboot with the files on a microSD card. (one reason why I would think twice about buying a device without additional storage). 
 I don't know whether Yu will be equally as accommodating.
Has the phone had USB debugging enabled? If so, then there are several PC apps you might try to get the files you need off. Otherwise, without tech support you stand a good chance that recovering your phone - e.g. using fastboot to flash the apps partition will lose you your user files.