Ultrafast photoelectron spectroscopy of non-adiabatic dynamics in gas and liquid phases