|
12 | 12 | }, |
13 | 13 | { |
14 | 14 | "cell_type": "code", |
15 | | - "execution_count": 1, |
| 15 | + "execution_count": 2, |
16 | 16 | "metadata": {}, |
17 | 17 | "outputs": [ |
18 | 18 | { |
|
26 | 26 | "name": "stderr", |
27 | 27 | "output_type": "stream", |
28 | 28 | "text": [ |
29 | | - "2026-06-27 20:18:39.864582: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n", |
30 | | - "2026-06-27 20:18:39.887405: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:467] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n", |
| 29 | + "/reef/lyk25/ConvoKit/dist/.venv/lib/python3.12/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", |
| 30 | + " from .autonotebook import tqdm as notebook_tqdm\n", |
31 | 31 | "WARNING: All log messages before absl::InitializeLog() is called are written to STDERR\n", |
32 | | - "E0000 00:00:1782591519.912052 859600 cuda_dnn.cc:8579] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n", |
33 | | - "E0000 00:00:1782591519.919822 859600 cuda_blas.cc:1407] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n", |
34 | | - "W0000 00:00:1782591519.938735 859600 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n", |
35 | | - "W0000 00:00:1782591519.938755 859600 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n", |
36 | | - "W0000 00:00:1782591519.938757 859600 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n", |
37 | | - "W0000 00:00:1782591519.938760 859600 computation_placer.cc:177] computation placer already registered. Please check linkage and avoid linking the same target more than once.\n", |
38 | | - "2026-06-27 20:18:39.944875: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n", |
39 | | - "To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n" |
| 32 | + "I0000 00:00:1782619476.409075 1013993 port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n", |
| 33 | + "I0000 00:00:1782619476.481779 1013993 cpu_feature_guard.cc:227] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n", |
| 34 | + "To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n", |
| 35 | + "WARNING: All log messages before absl::InitializeLog() is called are written to STDERR\n", |
| 36 | + "I0000 00:00:1782619477.990444 1013993 port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n" |
40 | 37 | ] |
41 | 38 | }, |
42 | 39 | { |
43 | 40 | "name": "stdout", |
44 | 41 | "output_type": "stream", |
45 | 42 | "text": [ |
46 | | - "INFO 06-27 20:18:48 [__init__.py:216] Automatically detected platform cuda.\n", |
47 | 43 | "🦥 Unsloth Zoo will now patch everything to make training faster!\n" |
48 | 44 | ] |
| 45 | + }, |
| 46 | + { |
| 47 | + "name": "stderr", |
| 48 | + "output_type": "stream", |
| 49 | + "text": [ |
| 50 | + "Unable to import `torchao` Tensor objects. This may affect loading checkpoints serialized with `torchao`\n" |
| 51 | + ] |
49 | 52 | } |
50 | 53 | ], |
51 | 54 | "source": [ |
|
78 | 81 | }, |
79 | 82 | { |
80 | 83 | "cell_type": "code", |
81 | | - "execution_count": null, |
| 84 | + "execution_count": 3, |
82 | 85 | "metadata": {}, |
83 | 86 | "outputs": [], |
84 | 87 | "source": [ |
85 | 88 | "# CPU mode (noting that it will be slower)\n", |
86 | 89 | "DEVICE = \"cuda\"\n", |
87 | 90 | "\n", |
88 | | - "corpus_name = \"cga-wikiconv\"\n", |
| 91 | + "# corpus_name = \"cga-wikiconv\"\n", |
89 | 92 | "# corpus_name = \"cga-cmv-legacy\"\n", |
90 | | - "# corpus_name = \"cga-cmv-large\"\n", |
| 93 | + "corpus_name = \"cga-cmv-large\"\n", |
91 | 94 | "label_metadata = \"has_removed_comment\" if 'cmv' in corpus_name else 'conversation_has_personal_attack'\n", |
92 | 95 | "\n", |
93 | 96 | "YOUR_MODEL_DIRECTORY = \"YOUR_MODEL_DIRECTORY\"\n", |
|
96 | 99 | }, |
97 | 100 | { |
98 | 101 | "cell_type": "code", |
99 | | - "execution_count": 3, |
| 102 | + "execution_count": 4, |
100 | 103 | "metadata": {}, |
101 | 104 | "outputs": [ |
102 | 105 | { |
|
125 | 128 | }, |
126 | 129 | { |
127 | 130 | "cell_type": "code", |
128 | | - "execution_count": 8, |
| 131 | + "execution_count": 7, |
129 | 132 | "metadata": {}, |
130 | 133 | "outputs": [], |
131 | 134 | "source": [ |
|
223 | 226 | }, |
224 | 227 | { |
225 | 228 | "cell_type": "code", |
226 | | - "execution_count": 17, |
| 229 | + "execution_count": 13, |
227 | 230 | "metadata": {}, |
228 | 231 | "outputs": [], |
229 | 232 | "source": [ |
230 | | - "def transform_selector(context_tuple, corpus_name):\n", |
| 233 | + "def transform_selector(context_tuple):\n", |
231 | 234 | " \"\"\"\n", |
232 | 235 | " For transform we only need to check that the conversation is in the test split\n", |
233 | 236 | " \"\"\"\n", |
|
238 | 241 | " matches_split = (context_tuple.current_utterance.get_conversation().meta[\"split\"] == \"test\")\n", |
239 | 242 | " is_end = (len(context_tuple.context) == convo_length)\n", |
240 | 243 | "\n", |
241 | | - " if corpus_name.contains(\"cmv\"):\n", |
| 244 | + " if \"cmv\" in corpus_name:\n", |
242 | 245 | " return (matches_split)\n", |
243 | 246 | " else:\n", |
244 | 247 | " return (matches_split and not is_end)\n", |
|
505 | 508 | }, |
506 | 509 | { |
507 | 510 | "cell_type": "code", |
508 | | - "execution_count": 6, |
| 511 | + "execution_count": 8, |
509 | 512 | "metadata": {}, |
510 | 513 | "outputs": [ |
511 | 514 | { |
|
813 | 816 | ], |
814 | 817 | "metadata": { |
815 | 818 | "kernelspec": { |
816 | | - "display_name": "Python 3 (ipykernel)", |
| 819 | + "display_name": ".venv", |
817 | 820 | "language": "python", |
818 | 821 | "name": "python3" |
819 | 822 | }, |
|
827 | 830 | "name": "python", |
828 | 831 | "nbconvert_exporter": "python", |
829 | 832 | "pygments_lexer": "ipython3", |
830 | | - "version": "3.11.11" |
| 833 | + "version": "3.12.4" |
831 | 834 | } |
832 | 835 | }, |
833 | 836 | "nbformat": 4, |
|
0 commit comments