It sounds like you are trying to protect your baby's health, and this is important. Any questions like this should always be discussed with your baby's pediatrician
who will want to work with you to help make sure you are both healthy. There are no very clear data about exactly for how long the active metabolites of marijuana will be secreted in breastmilk. We do know that marijuana metabolites can remain in an adult's system for a wide range of time, from a few days to a few weeks, depending on factors such as how much they smoked, body size, body habitus etc. "Pump and dump' is a good idea to keep your milk supply going, and in the meantime you could use formula for your baby. However, it would be a good idea to discuss this with either your baby's pediatrician or your OB or primary care physician
to make sure that there aren't any other factors in your health history or regular medications that might affect whether or not it is safe for you to continue breastfeeding.