Cut the pumpkin into small cubes, about the size of a pea. Put in a baking dish, season with salt and pepper, drizzle with vegetable oil, put the onion cut into half rings, garlic cloves whole, thyme. Sprinkle with 1 teaspoon of sugar. Bake the pumpkin at 220 degrees for 20 minutes.