3052e961e54ead28c717b6bbf5c785946e727fa9,finetune/input_pipeline.py,BasePipeline,get_target_input_fn,#BasePipeline#Any#Any#,316
Before Change
}
if self.config.base_model in [GPTModel, GPTModelSmall]:
output_types = {"features":tf.float32, "sequence_features":tf.float32, "attention_weights":tf.float32}
else:
output_types = (tf.float32, tf.float32)
tf_dataset = lambda: tf.data.Dataset.from_generator(dataset_encoded,output_types=output_types).batch(batch_size)
After Change
def get_target_input_fn(self, features, batch_size=None):
batch_size = min(len(features),64)
features = pd.DataFrame(features).to_dict("list")
for key in features:
features[key] = np.array(features[key])
tf_dataset = lambda: tf.data.Dataset.from_tensor_slices(dict(features)).batch(batch_size)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: IndicoDataSolutions/finetune
Commit Name: 3052e961e54ead28c717b6bbf5c785946e727fa9
Time: 2019-06-20
Author: matthew.bayer@indico.io
File Name: finetune/input_pipeline.py
Class Name: BasePipeline
Method Name: get_target_input_fn
Project Name: okfn-brasil/serenata-de-amor
Commit Name: d63ba5da75ece96bce58645408f41be07495813f
Time: 2017-11-01
Author: felipejpa15@gmail.com
File Name: rosie/chamber_of_deputies/tests/test_election_expenses_classifier.py
Class Name: TestElectionExpensesClassifier
Method Name: test_legal_entity_is_a_election_company
Project Name: okfn-brasil/serenata-de-amor
Commit Name: d63ba5da75ece96bce58645408f41be07495813f
Time: 2017-11-01
Author: felipejpa15@gmail.com
File Name: rosie/chamber_of_deputies/tests/test_election_expenses_classifier.py
Class Name: TestElectionExpensesClassifier
Method Name: test_legal_entity_is_not_election_company
Project Name: IndicoDataSolutions/finetune
Commit Name: bb8cf918f0a6b0f63db15c2fd34f5d314ff51b02
Time: 2019-06-20
Author: matthew.bayer@indico.io
File Name: finetune/input_pipeline.py
Class Name: BasePipeline
Method Name: get_target_input_fn