Shut the gas off. Wait until the pilot assembly cools(couple of minutes). Get your vacume cleaner or shop vac. Use a paper clip or if you have it a can of air like the kind you'd use to clean a key board. Follow the pilot from the end where the flame comes out back about 1 1/2. You may need to remove the logs for better access. You'll find a secondary air hole. Blow out the pilot assembly by sticking the air can nozzle tube in their and blow back from where the flame comes out. If you don't have air can, use paperclip by bending a 90 degree angle about 1/4 inch. Poke that into the secondary air hole and wiggle it around to losen any dog/cat hair or dust while sucking with the vac from the other end. Use the straight end of paperclip to poke into the end where the flame comes out and vac. Relight and see if that clears up the problem. Could also have a dirty air shutter on the main burner. Clean both while you're there. Keep cleaning till it stops. Get a carbon monoxide detector for that kavorkian heater you have if you don't already have one. Remember, the ODS works when there isn't enough air to support the pilot flame and if there isn't enough air for pilot, there is not enough air for life.
It might have something blocking or clogging the sparking element. You should look and see if it is that, and if not, then you should call a repairman. Hope this helps.