Preheat oven to 350F/180c/gas mark 4. Grease an oven proof dish and line it with the sweet potato slices. Pour in just enough water or stock to coat the base of the dish evenly and then dot with margarine amongst the layers of potato. Arrange the onion circles on top of the the sweet potato and finish up with the cheese. Sprinkle on the chili powder, salt & pepper.
Cover the dish and cook for 1 hour, removing the lid for the last 15 minutes to brown. Serve hot as a main dish.