I'm approaching week 4 of flower, and I'm fighting them right now myself. I can't tell you if this will work for you, and I haven't been able to get rid of them yet, but they haven't gotten out of control either.
- Mosquito Dunks contain a bacteria that attacks the gnats. Dissolve some in your water when feeding. Maybe let it dissolve for a day or so in advance.
- sticky traps for whiteflys and stuff to grab the adults
- diatamacious earth will work, but I hate using it because it's really bad to breathe, so use sparingly and breathe with caution
- a small container of wine/beer/apple cidar vinegar will attract them, and they will fall in and get trapped = die
- sand or perlite on the surface of the soil, the adults don't like. I'm using both currently.
- let containers dry as much as reasonable
- spray any you see with insecticidal soap