Basically, you are committed to one year unless you get into a graduate school program. Then if you can show them documentation, you can leave as early as you need for school. Also, it is somewhat PI dependent-- ie my PI said its fine if I want to leave at the begining of the summer to take time off if my school starts in the fall.
The PI's deal with this all the time and it is not an issue at all.