“And now, O inhabitants of Jerusalem and men of Judah, judge between Me and My vineyard. 4“What more was there to do for My vineyard that I have not done in it? Why, when I expected it to produce good grapes did it produce worthless ones? 5“So now let Me tell you what I am going to do to My vineyard: I will remove its hedge and it will be consumed; I will break down its wall and it will become trampled ground. 6“And I will lay it waste; it will not be pruned or hoed, but briars and thorns will come up. I will also charge the clouds to rain no rain on it.” 7For the vineyard of the Lord of hosts is the house of Israel, and the men of Judah His delightful plant. Thus He looked for justice, but behold, bloodshed; for righteousness, but behold, a cry of distress," (Isaiah 5:3-7).
Here is a perfect example of anthropomorphism where God speaks in human terms. God expects one thing and gets another. Is this an example of God being surprised and learning? No, it is not.
First of all, it is a parable in the form of a song. A parable is meant to illustrate a point, not expound doctrine, and a song takes much liberty with its words and phrases. Therefore, the poetic license taken in this song need not be construed as God actually being surprised, especially when we realize that God speaks to us in reference to our time frame and uses human emotions and conditions.
We know that from all eternity God has known all things (1 John 3:20). He is not surprised by anything. So, what we have here is a song using poetic license to convey meaning.