This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
save_path = "tfrecord:/content/pegasus/pegasus/data/testdata/test_pattern_1.tfrecord" | |
@registry.register("reddit_tifu_long_transformer") | |
def reddit_tifu_long_transformer(param_overrides): | |
return transformer_params( | |
{ | |
"train_pattern": save_path, | |
"dev_pattern": save_path, | |
"test_pattern": save_path, | |
"max_input_len": 1024, | |
"max_output_len": 128, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import tensorflow as tf | |
input_dict = dict( | |
inputs=[inp], | |
targets=[""] | |
) | |
save_path = "pegasus/data/testdata/test_pattern_1.tfrecord" | |
data = pd.DataFrame(input_dict) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!git clone https://github.com/google-research/pegasus | |
%cd pegasus | |
!export PYTHONPATH=. | |
!pip3 install -r requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!sudo apt-get install gcc python-dev python-setuptools libffi-dev | |
!sudo apt-get install python-pip | |
!sudo pip install gsutil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!mkdir ckpt | |
!gsutil cp -r gs://pegasus_ckpt ckpt/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!pip3 install -e pegasus | |
%cd /content/pegasus/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer