set the hostname appropriately dep on learning or training