Preheat the oven to 350 degrees Fahrenheit.
In a large bowl, combine 1 cup all-purpose flour with the spices (1 tsp nutmeg, 1 tsp cinnamon, ¼ tsp ginger, and 1 tsp salt). Whisk to combine.
In a separate bowl, combine 2 cups coconut milk, 2 tsp vanilla, and 1 cup brown sugar.
Add the liquid ingredients into the dry ingredients and mix to combine.
Then, add the 2 lbs grated sweet potatoes into the bowl and mix again.
Grease a large springform pan with the margarine and pour the batter into the pan. Bake for about 60 minutes until the pudding is set.
While pudding is baking, whisk the custard topping ingredients together in a small bowl.
When the 60 minutes has passed and the pudding is set (a knife or toothpick inserted comes out clean), remove it from the oven. Pour the custard mixture over the top of the pudding.
Place the pan back in the oven and bake for an additional 20 minutes until the custard topping is set.
Remove and allow the pudding to cool and set completely before cutting into it. Enjoy!