Add missing InferenceIds to toString (#6320)