<jupyter_start><jupyter_text>SPERT modelThis is a short notebook showing how to utilize the pre-trained SPERT model (i.e. on the adverse drugs events dataset) for relation extraction on COVID-19 dataset.<jupyter_code>import os 
!git clone https://github.com/markus-eberts/spert 

os.chdir('spert')
!bash ./scripts/fetch_datasets.sh 
!bash ./scripts/fetch_models.sh
!pip install -r requirements.txt

!python ./spert.py eval --config configs/example_eval.conf
!wget -O ade_eval.conf https://gist.githubusercontent.com/isaacmg/d1f26259eff607a474b8069d96fae753/raw/4c3d193c65fa83e0609e64e7623a87d866743368/ade_eval.conf
!python ./spert.py eval --config ade_eval.conf
from google.colab import auth
from datetime import datetime
auth.authenticate_user()
!gsutil cp -r data/log/conll04_eval/2020-04-05_18:55:01.502487 gs://coronavirusqa/re/results<jupyter_output>Copying file://data/log/conll04_eval/2020-04-05_18:55:01.502487/all.log [Content-Type=application/octet-stream]...
Copying file://data/log/conll04_eval/2020-04-05_18:55:01.502487/examples_rel_sorted_test_epoch_0.html [Content-Type=text/html]...
Copying file://data/log/conll04_eval/2020-04-05_18:55:01.502487/examples_entities_sorted_test_epoch_0.html [Content-Type=text/html]...
Copying file://data/log/conll04_eval/2020-04-05_18:55:01.502487/args.txt [Content-Type=text/plain]...
\ [4 files][  3.1 MiB/  3.1 MiB]                                                
==> NOTE: You are performing a sequence of gsutil operations that may
run significantly faster if you instead use gsutil -m cp ... Please
see the -m section under "gsutil help options" for further information
about when gsutil -m can be advantageous.

Copying file://data/log/conll04_eval/2020-04-05_18:55:01.502487/events.out.tfevents.1586112901.fd764eacfb87 [Content-Type=application/octet-stream]...
Copying file://data/log/conll04_ev[...]<jupyter_text>Continuing to train SPERTWe might also want to continue to train SPERT on either the ADE or the COVID-19 data.<jupyter_code>!wget -O scibert_scivocab_uncased.tar  https://s3-us-west-2.amazonaws.com/ai2-s2-research/scibert/huggingface_pytorch/scibert_scivocab_uncased.tar
!tar -xvf scibert_scivocab_uncased.tar<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup