No, traditionally, you keep them in. However, if you'd prefer not to bite into whole spices, you can place them in a little muslin cloth parcel or tea bag to infuse the flavors into the dish. Alternatively, you can use garam masala powder and skip the whole spices altogether.