Preheat the oven to 400°F Put the pumpkin into a roasting tin with the rosemary, drizzle with the olive oil and season well with salt and freshly ground pepper. Toss to coat and roast for 25-30min or until tender.
Meanwhile, melt the cheese in a pan with the milk. Add the chopped walnuts.
Cook the gnocchi according to packet instructions, then stir through the sauce and pumpkin. Season and serve immediately.