It's wise that you are first posing this question before upgrading. Many folks just go ahead and upgrade "in place", without a good plan, and subsequently run into problems.
OK, need to ask a couple of questions, and then provide one possible strategy:
1. Have you ever done an disk cleanup/maintenance/repairs, from a software perspective? By that I mean have you ever run any disk-related software to help with those tasks? There are some excellent products available (both free and commercial) that can help you with that.
2. This is
critical: are you making backups to an external device? If you are, what software are you using for that?
3. One of the things you need to consider is that all your third party software (ie, non-Apple) is compatible with whatever OS you plan on upgrading to. This site can help you with that:
https://roaringapps.com/apps
Not sure how you do your backups, but given the need to "protect" all your keynote files, it might be best to use a backup/cloning program like SuperDuper! or Carbon Copy Cloner before you upgrade. It would be good if you first read this thread I started back in November about backups:
https://www.mac-help.com/threads/backups-backups-backups.223959/
There are a number of useful comments made by others to that discussion also.
So, here is a possible strahegy:
1. Download the "Install macOS Sierra" file from the App store (for now, stay away from High Sierra. A number of folks are having various issues with it (not me, by the way)). When that is done, DO NOT proceed with the installation. Quit that process. There will be a file entitled "Install macOS Sierra" inside your Applications. IMMEDIATELY make a copy of that file to another location on your internal drive.
2. If you need to download and install any third party software updates for Sierra compatibility, do that now. Make sure to save those update files.
3. Do as much disk cleanup/maintenance/repairs as you can. If you want, I can recommend some excellent products for you.
4. Do a SuperDuper! or Carbon Copy Cloner backup to your external drive (or partition on that drive). Remember, using either of those products will make a
bootable backup.
5. Restart your Mac from that bootable backup. Use Disk Utility there to Erase and Format your internal drive.
6. Navigate to the file "Install macOS Sierra". Launch it, and point to your internal drive for the installation. Proceed with the installation. The result will be a clean, fresh, "virgin" installation of OS 10.12.6, Sierra.
7. At then end of that, you'll be offered to opportunity to "migrate"/copy all your needed "stuff" from the backup. Do that.
8. Restart your Mac. Hopefully, that will be successful.
OK, when all that is completed, launch Keynote, and see if it can "correctly" process all your keynote files. If it can, great! If instead there are issues, and there is no "easy" solution, remember that you still have everything in tact on the (Yosemite) backup. You can restart your Mac from that backup, and work on it (it will be the same as you are presently doing).