Preheat oven to 350 degrees F (175 degrees C). Lightly grease a 9x13 inch baking dish.
In a large mixing bowl, combine sweet potatoes, white sugar, 1/4 cup margarine, vanilla, milk, and beaten eggs. Mix well. Pour mixture into prepared baking dish.
In a medium mixing bowl, combine brown sugar, chopped pecans, flour, and 1/4 cup margarine. Mix well. Sprinkle over sweet potato mixture.