Novice investor here so keep that in mind, but I had the same dilemma in the beginning of the year. I had a sum to invest and had planned to dollar-cost average over a few months, but quickly after the first purchase my stocks rose quite a bit and I ended up investing the rest of the sum a couple weeks later. The market still went up after that but not investing the entire sum the first time cost me a few %.
Long story short, the next lump sum I have will be invested immediately, unless the P/E ratio is over 40 or something.