Wrap the sweet potato(es) in a damp paper towel and microwave until soft, 4 to 6 minutes, depending on your microwave. Let cool enough to handle (remember, it's called hot potato for a reason), and peel as best as you can. Pass it into a large bowl through a food mill or potato ricer, or in a pinch, grate it on the large holes of a box grater. You'll have about 3 loosely packed cups potato, but don't get too fussy about measuring; this recipe is forgiving in either direction.
Add the ricotta, Parmigiano, salt, and garam masala (if using) to the bowl and stir to combine. Add 1 cup of the flour and stir until a ball of dough forms. Add the remaining flour a little at a time, pulling the dough away from the sides of the bowl.
When the dough is no longer tacky, turn it out onto a floured surface and knead gently into a ball, adding flour as needed to keep the dough from sticking to the surface. Knead for about 2 minutes, until the dough is uniform. Do not overknead or the gnocchi will be tough.
Cut the dough into eight pieces and roll each piece into a snake that is 2/3 inch in diameter. When you're rolling the snakes, keep in mind that they will roll more uniformly if you can use as little flour as possible, but you'll want to roll quickly back and forth so that the snakes don't stick to the surface.
Line four snakes up next to one another and flour them so they don't stick together. Using a pastry cutter, cut the snakes into 1/2-inch pieces. Repeat with the remaining four snakes. Toss the gnocchi in flour.
If you would like grooves in your gnocchi, place either a silicone sushi mat or a gnocchi board in front of you with the grooves running perpendicular to the edge of the counter closest to you. Set a gnocco parallel to the counter on the mat or board and use you thumb to roll it against the mat or board, pushing the grooves away from you. Press firmly enough to imprint grooves but gently enough that you don't squish the shape. Repeat to imprint the entire batch.
Line a sheet pan (or two) with parchment paper and lightly dust it with flour. Arrange the gnocchi on the sheet pan so that they are not touching. Refrigerate, uncovered, for at least 30 minutes or up to 2 hours.
Preheat the oven to 425 degrees F and bring a large pot of salted water to boil. Working in batches of fifteen or so at a time, boil the gnocchi until they float to the top of the pot. 1 to 3 minutes. Test the gnocchi for doneness by removing one with a slotted spoon and cutting it in half. If it looks (and tastes) cooked through, they are done.
Meanwhile, put the butter and oil in a 9 by 13-inch baking dish.
Remove the gnocchi from the water with a slotted spoon or spider and put them in the baking dish. Repeat to cook the rest of the gnocchi. Stir to coat well with the butter and oil, then bake for 10 minutes, gently stirring once after 5 minutes. Sauce and serve immediately.