I would not recommend it, as it's not an easy swap since sweet potato has more starch than pumpkin. The cake will not turn out quite the same!