Skip to content

Commit 1aa5494

Browse files
authored
remove output (#5689)
Signed-off-by: ericharper <[email protected]> Signed-off-by: ericharper <[email protected]>
1 parent 1d39d5c commit 1aa5494

File tree

1 file changed

+34
-145
lines changed

1 file changed

+34
-145
lines changed

Diff for: tutorials/nlp/Token_Classification-BioMegatron.ipynb

+34-145
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 19,
5+
"execution_count": null,
66
"id": "b7a434f4",
77
"metadata": {},
88
"outputs": [],
@@ -34,7 +34,7 @@
3434
},
3535
{
3636
"cell_type": "code",
37-
"execution_count": 20,
37+
"execution_count": null,
3838
"id": "challenging-pioneer",
3939
"metadata": {},
4040
"outputs": [],
@@ -95,7 +95,7 @@
9595
},
9696
{
9797
"cell_type": "code",
98-
"execution_count": 21,
98+
"execution_count": null,
9999
"id": "federal-beads",
100100
"metadata": {},
101101
"outputs": [],
@@ -107,22 +107,10 @@
107107
},
108108
{
109109
"cell_type": "code",
110-
"execution_count": 22,
110+
"execution_count": null,
111111
"id": "relevant-juvenile",
112112
"metadata": {},
113-
"outputs": [
114-
{
115-
"name": "stdout",
116-
"output_type": "stream",
117-
"text": [
118-
"Downloading NCBI data...\n",
119-
"Archive: DATA_DIR/NCBI_corpus.zip\n",
120-
" inflating: DATA_DIR/NCBI_corpus_development.txt \n",
121-
" inflating: DATA_DIR/NCBI_corpus_testing.txt \n",
122-
" inflating: DATA_DIR/NCBI_corpus_training.txt \n"
123-
]
124-
}
125-
],
113+
"outputs": [],
126114
"source": [
127115
"print('Downloading NCBI data...')\n",
128116
"wget.download('https://www.ncbi.nlm.nih.gov/CBBresearch/Dogan/DISEASE/NCBI_corpus.zip', DATA_DIR)\n",
@@ -131,18 +119,10 @@
131119
},
132120
{
133121
"cell_type": "code",
134-
"execution_count": 23,
122+
"execution_count": null,
135123
"id": "radical-castle",
136124
"metadata": {},
137-
"outputs": [
138-
{
139-
"name": "stdout",
140-
"output_type": "stream",
141-
"text": [
142-
"9288106\tClustering of missense mutations in the <category=\"Modifier\">ataxia-telangiectasia</category> gene in a <category=\"SpecificDisease\">sporadic T-cell leukaemia</category>.\t<category=\"SpecificDisease\">Ataxia-telangiectasia</category> ( <category=\"SpecificDisease\">A-T</category> ) is a <category=\"DiseaseClass\">recessive multi-system disorder</category> caused by mutations in the ATM gene at 11q22-q23 ( ref . 3 ) . The risk of <category=\"DiseaseClass\">cancer</category> , especially <category=\"DiseaseClass\">lymphoid neoplasias</category> , is substantially elevated in <category=\"Modifier\">A-T</category> patients and has long been associated with chromosomal instability . By analysing <category=\"Modifier\">tumour</category> DNA from patients with <category=\"SpecificDisease\">sporadic T-cell prolymphocytic leukaemia</category> ( <category=\"SpecificDisease\">T-PLL</category> ) , a rare <category=\"DiseaseClass\">clonal malignancy</category> with similarities to a <category=\"SpecificDisease\">mature T-cell leukaemia</category> seen in <category=\"SpecificDisease\">A-T</category> , we demonstrate a high frequency of ATM mutations in <category=\"SpecificDisease\">T-PLL</category> . In marked contrast to the ATM mutation pattern in <category=\"SpecificDisease\">A-T</category> , the most frequent nucleotide changes in this <category=\"DiseaseClass\">leukaemia</category> were missense mutations . These clustered in the region corresponding to the kinase domain , which is highly conserved in ATM-related proteins in mouse , yeast and Drosophila . The resulting amino-acid substitutions are predicted to interfere with ATP binding or substrate recognition . Two of seventeen mutated <category=\"SpecificDisease\">T-PLL</category> samples had a previously reported <category=\"Modifier\">A-T</category> allele . In contrast , no mutations were detected in the p53 gene , suggesting that this <category=\"Modifier\">tumour</category> suppressor is not frequently altered in this <category=\"DiseaseClass\">leukaemia</category> . Occasional missense mutations in ATM were also found in <category=\"Modifier\">tumour</category> DNA from patients with <category=\"SpecificDisease\">B-cell non-Hodgkins lymphomas</category> ( <category=\"SpecificDisease\">B-NHL</category> ) and a <category=\"Modifier\">B-NHL</category> cell line . The evidence of a significant proportion of loss-of-function mutations and a complete absence of the normal copy of ATM in the majority of mutated <category=\"DiseaseClass\">tumours</category> establishes somatic inactivation of this gene in the pathogenesis of <category=\"SpecificDisease\">sporadic T-PLL</category> and suggests that ATM acts as a <category=\"Modifier\">tumour</category> suppressor . As constitutional DNA was not available , a putative hereditary predisposition to <category=\"SpecificDisease\">T-PLL</category> will require further investigation . . \n"
143-
]
144-
}
145-
],
125+
"outputs": [],
146126
"source": [
147127
"# If you want to see more examples, you can explore the text of the corpus using the file browser to the left, or open files directly, for example typing a command like the following in a code-cell:\n",
148128
"\n",
@@ -169,21 +149,10 @@
169149
},
170150
{
171151
"cell_type": "code",
172-
"execution_count": 24,
152+
"execution_count": null,
173153
"id": "present-interference",
174154
"metadata": {},
175-
"outputs": [
176-
{
177-
"data": {
178-
"text/plain": [
179-
"'DATA_DIR/NER/test.tsv'"
180-
]
181-
},
182-
"execution_count": 24,
183-
"metadata": {},
184-
"output_type": "execute_result"
185-
}
186-
],
155+
"outputs": [],
187156
"source": [
188157
"NER_DATA_DIR = f'{DATA_DIR}/NER'\n",
189158
"wget.download('https://raw.githubusercontent.com/spyysalo/ncbi-disease/master/conll/train.tsv', NER_DATA_DIR)\n",
@@ -193,21 +162,10 @@
193162
},
194163
{
195164
"cell_type": "code",
196-
"execution_count": 25,
165+
"execution_count": null,
197166
"id": "identical-figure",
198167
"metadata": {},
199-
"outputs": [
200-
{
201-
"name": "stdout",
202-
"output_type": "stream",
203-
"text": [
204-
"total 1.5M\n",
205-
"-rw-r--r-- 1 root root 196K Apr 8 00:56 devel.tsv\n",
206-
"-rw-r--r-- 1 root root 201K Apr 8 00:56 test.tsv\n",
207-
"-rw-r--r-- 1 root root 1.1M Apr 8 00:56 train.tsv\n"
208-
]
209-
}
210-
],
168+
"outputs": [],
211169
"source": [
212170
"!ls -lh $NER_DATA_DIR"
213171
]
@@ -222,7 +180,7 @@
222180
},
223181
{
224182
"cell_type": "code",
225-
"execution_count": 26,
183+
"execution_count": null,
226184
"id": "utility-wesley",
227185
"metadata": {},
228186
"outputs": [],
@@ -232,44 +190,20 @@
232190
},
233191
{
234192
"cell_type": "code",
235-
"execution_count": 27,
193+
"execution_count": null,
236194
"id": "suited-jenny",
237195
"metadata": {},
238-
"outputs": [
239-
{
240-
"data": {
241-
"text/plain": [
242-
"'import_from_iob_format (2).py'"
243-
]
244-
},
245-
"execution_count": 27,
246-
"metadata": {},
247-
"output_type": "execute_result"
248-
}
249-
],
196+
"outputs": [],
250197
"source": [
251198
"wget.download(f'https://raw.githubusercontent.com/NVIDIA/NeMo/{BRANCH}/examples/nlp/token_classification/data/import_from_iob_format.py')"
252199
]
253200
},
254201
{
255202
"cell_type": "code",
256-
"execution_count": 28,
203+
"execution_count": null,
257204
"id": "sensitive-victoria",
258205
"metadata": {},
259-
"outputs": [
260-
{
261-
"name": "stdout",
262-
"output_type": "stream",
263-
"text": [
264-
"[NeMo I 2022-04-08 00:57:03 import_from_iob_format:119] Processing DATA_DIR/NER/train.tsv\n",
265-
"[NeMo I 2022-04-08 00:57:03 import_from_iob_format:124] Processing of the DATA_DIR/NER/train.tsv is complete\n",
266-
"[NeMo I 2022-04-08 00:57:06 import_from_iob_format:119] Processing DATA_DIR/NER/dev.tsv\n",
267-
"[NeMo I 2022-04-08 00:57:06 import_from_iob_format:124] Processing of the DATA_DIR/NER/dev.tsv is complete\n",
268-
"[NeMo I 2022-04-08 00:57:08 import_from_iob_format:119] Processing DATA_DIR/NER/test.tsv\n",
269-
"[NeMo I 2022-04-08 00:57:08 import_from_iob_format:124] Processing of the DATA_DIR/NER/test.tsv is complete\n"
270-
]
271-
}
272-
],
206+
"outputs": [],
273207
"source": [
274208
"! python import_from_iob_format.py --data_file=$NER_DATA_DIR/train.tsv\n",
275209
"! python import_from_iob_format.py --data_file=$NER_DATA_DIR/dev.tsv\n",
@@ -286,54 +220,20 @@
286220
},
287221
{
288222
"cell_type": "code",
289-
"execution_count": 29,
223+
"execution_count": null,
290224
"id": "sound-surgeon",
291225
"metadata": {},
292-
"outputs": [
293-
{
294-
"name": "stdout",
295-
"output_type": "stream",
296-
"text": [
297-
"Identification of APC2 , a homologue of the adenomatous polyposis coli tumour suppressor . \n",
298-
"The adenomatous polyposis coli ( APC ) tumour - suppressor protein controls the Wnt signalling pathway by forming a complex with glycogen synthase kinase 3beta ( GSK - 3beta ) , axin / conductin and betacatenin . \n",
299-
"Complex formation induces the rapid degradation of betacatenin . \n",
300-
"In colon carcinoma cells , loss of APC leads to the accumulation of betacatenin in the nucleus , where it binds to and activates the Tcf - 4 transcription factor ( reviewed in [ 1 ] [ 2 ] ) . \n",
301-
"Here , we report the identification and genomic structure of APC homologues . \n",
302-
"Mammalian APC2 , which closely resembles APC in overall domain structure , was functionally analyzed and shown to contain two SAMP domains , both of which are required for binding to conductin . \n",
303-
"Like APC , APC2 regulates the formation of active betacatenin - Tcf complexes , as demonstrated using transient transcriptional activation assays in APC - / - colon carcinoma cells . \n",
304-
"Human APC2 maps to chromosome 19p13 . \n",
305-
"3 . \n",
306-
"APC and APC2 may therefore have comparable functions in development and cancer . \n"
307-
]
308-
}
309-
],
226+
"outputs": [],
310227
"source": [
311228
"!head $NER_DATA_DIR/text_train.txt"
312229
]
313230
},
314231
{
315232
"cell_type": "code",
316-
"execution_count": 30,
233+
"execution_count": null,
317234
"id": "spectacular-strain",
318235
"metadata": {},
319-
"outputs": [
320-
{
321-
"name": "stdout",
322-
"output_type": "stream",
323-
"text": [
324-
"O O O O O O O O B-Disease I-Disease I-Disease I-Disease O O \n",
325-
"O B-Disease I-Disease I-Disease I-Disease I-Disease I-Disease I-Disease O O O O O O O O O O O O O O O O O O O O O O O O O O O O O \n",
326-
"O O O O O O O O O \n",
327-
"O B-Disease I-Disease O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O \n",
328-
"O O O O O O O O O O O O O \n",
329-
"O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O \n",
330-
"O O O O O O O O O O O O O O O O O O O O O O O O O O B-Disease I-Disease O O \n",
331-
"O O O O O O O \n",
332-
"O O \n",
333-
"O O O O O O O O O O O B-Disease O \n"
334-
]
335-
}
336-
],
236+
"outputs": [],
337237
"source": [
338238
"!head $NER_DATA_DIR/labels_train.txt"
339239
]
@@ -377,7 +277,7 @@
377277
},
378278
{
379279
"cell_type": "code",
380-
"execution_count": 31,
280+
"execution_count": null,
381281
"id": "speaking-grant",
382282
"metadata": {},
383283
"outputs": [],
@@ -389,18 +289,10 @@
389289
},
390290
{
391291
"cell_type": "code",
392-
"execution_count": 32,
292+
"execution_count": null,
393293
"id": "demanding-ballet",
394294
"metadata": {},
395-
"outputs": [
396-
{
397-
"name": "stdout",
398-
"output_type": "stream",
399-
"text": [
400-
"config file is already exists\n"
401-
]
402-
}
403-
],
295+
"outputs": [],
404296
"source": [
405297
"# download the model's configuration file \n",
406298
"config_dir = WORK_DIR + '/configs/'\n",
@@ -414,18 +306,10 @@
414306
},
415307
{
416308
"cell_type": "code",
417-
"execution_count": 33,
309+
"execution_count": null,
418310
"id": "criminal-outdoors",
419311
"metadata": {},
420-
"outputs": [
421-
{
422-
"name": "stdout",
423-
"output_type": "stream",
424-
"text": [
425-
"WORK_DIR/configs/token_classification_config.yaml\n"
426-
]
427-
}
428-
],
312+
"outputs": [],
429313
"source": [
430314
"# this line will print the entire config of the model\n",
431315
"config_path = f'{WORK_DIR}/configs/{MODEL_CONFIG}'\n",
@@ -438,7 +322,7 @@
438322
},
439323
{
440324
"cell_type": "code",
441-
"execution_count": 34,
325+
"execution_count": null,
442326
"id": "informed-purse",
443327
"metadata": {},
444328
"outputs": [],
@@ -784,7 +668,7 @@
784668
],
785669
"metadata": {
786670
"kernelspec": {
787-
"display_name": "Python 3 (ipykernel)",
671+
"display_name": "Python 3.8.0 ('test_r1.10.0_pip')",
788672
"language": "python",
789673
"name": "python3"
790674
},
@@ -798,9 +682,14 @@
798682
"name": "python",
799683
"nbconvert_exporter": "python",
800684
"pygments_lexer": "ipython3",
801-
"version": "3.8.12"
685+
"version": "3.8.0"
686+
},
687+
"vscode": {
688+
"interpreter": {
689+
"hash": "30504a7d8129b3c45f1978a1de0804c162ca7894685891a914c7f1dc31e854c4"
690+
}
802691
}
803692
},
804693
"nbformat": 4,
805694
"nbformat_minor": 5
806-
}
695+
}

0 commit comments

Comments
 (0)