Preheat oven to 375° F.
In a large skillet, melt butter over medium heat. Add onion and cook until slightly brown and caramelized, about 12-15 minutes. Add chipotle pepper, salt, pepper and optional rosemary; mix well.
Layer half of Sweet Potato “Fettuccine” in a 9×9” baking dish. Place the chipotle-onion mixture on top of the potatoes. Top with the rest of the potatoes. Pour milk or cream over sweet potatoes; using a spatula or spoon, push sweet potatoes into milk so they get moistened by milk. Bake for 55 minutes; remove gratin from oven and top with cheese. Return to oven and bake for an additional 5-10 minutes until cheese melts and sweet potatoes are tender.