{ "cells": [ { "cell_type": "code", "execution_count": 4, "id": "31484e86", "metadata": {}, "outputs": [], "source": [ "import os\n", "import pickle" ] }, { "cell_type": "code", "execution_count": 5, "id": "1a364ed9", "metadata": {}, "outputs": [], "source": [ "project_dir = '/Users/katemarg/PycharmProjects/temporal_robustness_evaluation'\n", "templama_docker_dir = '/Users/katemarg/PycharmProjects/temporal_robustness_evaluation/templama_docker'\n", "out_dir =os.path.join(templama_docker_dir, 'extracted_facts')\n", "qids_pickle = os.path.join(out_dir, 'my_qids.pkl')\n", "all_facts_pickle = os.path.join(out_dir, 'my_all_facts.pkl')" ] }, { "cell_type": "code", "execution_count": 7, "id": "bfe28b09", "metadata": {}, "outputs": [ { "ename": "UnpicklingError", "evalue": "pickle data was truncated", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mUnpicklingError\u001b[0m Traceback (most recent call last)", "Input \u001b[0;32mIn [7]\u001b[0m, in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m \u001b[38;5;28mopen\u001b[39m(qids_pickle, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mrb\u001b[39m\u001b[38;5;124m'\u001b[39m) \u001b[38;5;28;01mas\u001b[39;00m f:\n\u001b[0;32m----> 2\u001b[0m all_facts \u001b[38;5;241m=\u001b[39m \u001b[43mpickle\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mload\u001b[49m\u001b[43m(\u001b[49m\u001b[43mf\u001b[49m\u001b[43m)\u001b[49m\n", "\u001b[0;31mUnpicklingError\u001b[0m: pickle data was truncated" ] } ], "source": [ "with open(qids_pickle, 'rb') as f:\n", " all_facts = pickle.load(f)" ] }, { "cell_type": "code", "execution_count": 8, "id": "fb73b12f", "metadata": {}, "outputs": [ { "ename": "UnpicklingError", "evalue": "pickle data was truncated", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mUnpicklingError\u001b[0m Traceback (most recent call last)", "Input \u001b[0;32mIn [8]\u001b[0m, in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m \u001b[38;5;28mopen\u001b[39m(qids_pickle, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mrb\u001b[39m\u001b[38;5;124m'\u001b[39m) \u001b[38;5;28;01mas\u001b[39;00m f:\n\u001b[0;32m----> 2\u001b[0m qid_names, qid_mapping, qid_numfacts \u001b[38;5;241m=\u001b[39m \u001b[43mpickle\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mload\u001b[49m\u001b[43m(\u001b[49m\u001b[43mf\u001b[49m\u001b[43m)\u001b[49m\n", "\u001b[0;31mUnpicklingError\u001b[0m: pickle data was truncated" ] } ], "source": [ "with open(qids_pickle, 'rb') as f:\n", " qid_names, qid_mapping, qid_numfacts = pickle.load(f)" ] }, { "cell_type": "code", "execution_count": null, "id": "db59ede7", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.11" } }, "nbformat": 4, "nbformat_minor": 5 }