repo stringlengths 2 99 | file stringlengths 13 225 | code stringlengths 0 18.3M | file_length int64 0 18.3M | avg_line_length float64 0 1.36M | max_line_length int64 0 4.26M | extension_type stringclasses 1
value |
|---|---|---|---|---|---|---|
fat-albert | fat-albert-master/bert/transformers/tests/modeling_ctrl_test.py | # coding=utf-8
# Copyright 2018 Salesforce and HuggingFace Inc. team.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | 8,667 | 39.12963 | 135 | py |
fat-albert | fat-albert-master/bert/transformers/tests/modeling_tf_xlnet_test.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 13,322 | 42.256494 | 127 | py |
fat-albert | fat-albert-master/bert/transformers/tests/modeling_tf_roberta_test.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 11,158 | 41.591603 | 161 | py |
fat-albert | fat-albert-master/bert/transformers/tests/tokenization_openai_test.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 2,648 | 35.287671 | 90 | py |
fat-albert | fat-albert-master/bert/transformers/tests/tokenization_distilbert_test.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 1,915 | 36.568627 | 93 | py |
fat-albert | fat-albert-master/bert/transformers/data/__init__.py | from .processors import InputExample, InputFeatures, DataProcessor
from .processors import glue_output_modes, glue_processors, glue_tasks_num_labels, glue_convert_examples_to_features
from .processors import xnli_output_modes, xnli_processors, xnli_tasks_num_labels
from .metrics import is_sklearn_available
if is_sklea... | 404 | 49.625 | 116 | py |
fat-albert | fat-albert-master/bert/transformers/data/metrics/__init__.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 3,112 | 32.836957 | 117 | py |
fat-albert | fat-albert-master/bert/transformers/data/processors/glue.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 20,708 | 36.448463 | 130 | py |
fat-albert | fat-albert-master/bert/transformers/data/processors/utils.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 4,706 | 35.773438 | 99 | py |
fat-albert | fat-albert-master/bert/transformers/data/processors/__init__.py | from .utils import InputExample, InputFeatures, DataProcessor
from .glue import glue_output_modes, glue_processors, glue_tasks_num_labels, glue_convert_examples_to_features
from .xnli import xnli_output_modes, xnli_processors, xnli_tasks_num_labels
| 249 | 61.5 | 110 | py |
fat-albert | fat-albert-master/bert/transformers/data/processors/xnli.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 3,069 | 34.697674 | 128 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_encoder_decoder.py | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 15,827 | 49.893891 | 472 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/tokenization_roberta.py | # coding=utf-8
# Copyright 2018 The Open AI Team Authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | 7,300 | 47.673333 | 120 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_tf_albert.py | # coding=utf-8
# Copyright 2018 The OpenAI Team Authors and HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License... | 39,735 | 48.732165 | 193 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/configuration_xlm.py | # coding=utf-8
# Copyright 2019-present, Facebook, Inc and the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | 8,112 | 43.576923 | 121 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/optimization.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICEN... | 7,658 | 44.052941 | 134 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/configuration_xlnet.py | # coding=utf-8
# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Lice... | 6,805 | 38.80117 | 110 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/__main__.py | # coding: utf8
def main():
import sys
if (len(sys.argv) < 4 or len(sys.argv) > 6) or sys.argv[1] not in ["bert", "gpt", "transfo_xl", "gpt2", "xlnet", "xlm"]:
print(
"This command line utility let you convert original (author released) model checkpoint to pytorch.\n"
"It should be used a... | 7,085 | 53.507692 | 135 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/configuration_utils.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 11,152 | 51.116822 | 296 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_tf_pytorch_utils.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 12,465 | 41.546075 | 166 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_distilbert.py | # coding=utf-8
# Copyright 2019-present, the HuggingFace Inc. team, The Google AI Language Team and Facebook, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | 39,603 | 49.839538 | 201 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/configuration_camembert.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 1,222 | 34.970588 | 103 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/tokenization_xlm.py | # coding=utf-8
# Copyright 2019 The Open AI Team Authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | 37,134 | 43.526379 | 185 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/tokenization_ctrl.py | # coding=utf-8
# Copyright 2018 Salesforce and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 7,964 | 31.777778 | 133 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_tf_gpt2.py | # coding=utf-8
# Copyright 2018 The OpenAI Team Authors and HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License... | 32,228 | 49.834385 | 193 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_tf_transfo_xl.py | # coding=utf-8
# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Lice... | 36,425 | 45.820051 | 193 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/tokenization_camembert.py | # coding=utf-8
# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://ww... | 7,409 | 45.898734 | 124 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_tf_auto.py | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 37,420 | 70.687739 | 472 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/configuration_bert.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 6,684 | 56.62931 | 181 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_utils.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 45,511 | 51.798144 | 472 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_tf_openai.py | # coding=utf-8
# Copyright 2018 The OpenAI Team Authors and HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License... | 30,118 | 49.535235 | 193 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_bert.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 68,217 | 52.212168 | 187 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/tokenization_auto.py | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 8,056 | 59.578947 | 372 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/configuration_distilbert.py | # coding=utf-8
# Copyright 2019-present, the HuggingFace Inc. team, The Google AI Language Team and Facebook, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | 3,713 | 39.813187 | 153 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_gpt2.py | # coding=utf-8
# Copyright 2018 The OpenAI Team Authors and HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License... | 34,421 | 49.920118 | 148 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/convert_albert_original_tf_checkpoint_to_pytorch.py | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 2,597 | 37.776119 | 103 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_openai.py | # coding=utf-8
# Copyright 2018 The OpenAI Team Authors and HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License... | 31,203 | 48.687898 | 148 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/convert_gpt2_original_tf_checkpoint_to_pytorch.py | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 3,074 | 39.460526 | 111 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_tf_roberta.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 22,329 | 51.789598 | 193 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/configuration_auto.py | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 8,647 | 58.232877 | 296 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/convert_roberta_original_pytorch_checkpoint_to_pytorch.py | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 8,486 | 45.889503 | 188 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/configuration_albert.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 5,105 | 50.06 | 109 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/tokenization_bert.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICEN... | 22,451 | 43.636183 | 183 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/convert_transfo_xl_original_tf_checkpoint_to_pytorch.py | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 5,518 | 45.771186 | 121 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/configuration_ctrl.py | # coding=utf-8
# Copyright 2018 Salesforce and HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# htt... | 5,775 | 39.111111 | 120 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_tf_transfo_xl_utilities.py | # coding=utf-8
# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Lice... | 8,325 | 46.306818 | 110 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_auto.py | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 38,635 | 72.592381 | 472 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_tf_xlnet.py | # coding=utf-8
# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Lice... | 57,790 | 50.92363 | 193 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/convert_openai_original_tf_checkpoint_to_pytorch.py | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 3,161 | 40.605263 | 118 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_camembert.py | # coding=utf-8
# Copyright 2019 Inria, Facebook AI Research and the HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the... | 17,760 | 59.411565 | 217 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/tokenization_xlnet.py | # coding=utf-8
# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://ww... | 10,321 | 39.637795 | 125 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/tokenization_distilbert.py | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 2,625 | 39.4 | 144 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/convert_xlm_original_pytorch_checkpoint_to_pytorch.py | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 3,235 | 37.52381 | 117 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_tf_xlm.py | # coding=utf-8
# Copyright 2019-present, Facebook, Inc and the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | 39,276 | 49.942931 | 193 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_beam_search.py | # coding=utf-8
# Copyright (c) 2019 Yang Liu
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publi... | 10,385 | 37.183824 | 100 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/configuration_transfo_xl.py | # coding=utf-8
# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Lice... | 6,819 | 39.35503 | 125 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/file_utils.py | """
Utilities for working with the local dataset cache.
This file is adapted from the AllenNLP library at https://github.com/allenai/allennlp
Copyright by the AllenNLP authors.
"""
from __future__ import (absolute_import, division, print_function, unicode_literals)
import sys
import json
import logging
import os
impor... | 12,856 | 35.734286 | 144 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_tf_ctrl.py | # coding=utf-8
# Copyright 2018 Salesforce and HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# h... | 24,528 | 47.380671 | 151 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/__init__.py | __version__ = "2.2.0"
# Work around to update TensorFlow's absl.logging threshold which alters the
# default Python logging output behavior when present.
# see: https://github.com/abseil/abseil-py/issues/99
# and: https://github.com/tensorflow/tensorflow/issues/26691#issuecomment-500369493
try:
import absl.logging... | 11,398 | 59.312169 | 128 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/tokenization_albert.py | # coding=utf-8
# Copyright 2018 Google AI, Google Brain and the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | 10,800 | 41.6917 | 126 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/configuration_gpt2.py | # coding=utf-8
# Copyright 2018 The OpenAI Team Authors and HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License... | 6,177 | 41.315068 | 131 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/tokenization_gpt2.py | # coding=utf-8
# Copyright 2018 The Open AI Team Authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | 10,026 | 41.308017 | 182 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_tf_bert.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 55,995 | 51.283847 | 193 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/configuration_roberta.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 1,793 | 45 | 133 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/configuration_openai.py | # coding=utf-8
# Copyright 2018 The OpenAI Team Authors and HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License... | 5,100 | 36.785185 | 121 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/convert_bert_original_tf_checkpoint_to_pytorch.py | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 2,577 | 38.060606 | 101 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_tf_distilbert.py | # coding=utf-8
# Copyright 2019-present, the HuggingFace Inc. team, The Google AI Language Team and Facebook, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | 37,652 | 48.674142 | 201 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/convert_bert_pytorch_checkpoint_to_original_tf.py | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 4,478 | 33.19084 | 115 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_transfo_xl.py | # coding=utf-8
# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Lice... | 41,005 | 44.012075 | 157 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/convert_xlnet_original_tf_checkpoint_to_pytorch.py | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 4,334 | 40.285714 | 126 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_albert.py |
# coding=utf-8
# Copyright 2018 Google AI, Google Brain and the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | 38,405 | 49.203922 | 171 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_xlnet.py | # coding=utf-8
# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Lice... | 74,020 | 52.252518 | 169 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_xlm.py | # coding=utf-8
# Copyright 2019-present, Facebook, Inc and the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | 46,645 | 50.542541 | 163 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_tf_utils.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 26,887 | 51.929134 | 472 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_ctrl.py | # coding=utf-8
# Copyright 2018 Salesforce and HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# h... | 24,794 | 48.294235 | 146 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/tokenization_transfo_xl.py | # coding=utf-8
# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Lice... | 21,824 | 36.62931 | 133 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/tokenization_openai.py | # coding=utf-8
# Copyright 2018 The Open AI Team Authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | 7,784 | 36.248804 | 133 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_transfo_xl_utilities.py | # coding=utf-8
# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Lice... | 13,568 | 39.747748 | 132 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/convert_pytorch_checkpoint_to_tf2.py | # coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 15,559 | 61.48996 | 215 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/modeling_roberta.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 30,485 | 53.634409 | 151 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/tokenization_utils.py | # coding=utf-8
# Copyright 2018 The Open AI Team Authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | 58,960 | 51.177876 | 372 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/data/__init__.py | from .processors import InputExample, InputFeatures, DataProcessor
from .processors import glue_output_modes, glue_processors, glue_tasks_num_labels, glue_convert_examples_to_features
from .processors import xnli_output_modes, xnli_processors, xnli_tasks_num_labels
from .metrics import is_sklearn_available
if is_sklea... | 404 | 49.625 | 116 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/data/metrics/__init__.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 3,112 | 32.836957 | 117 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/data/processors/glue.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 20,708 | 36.448463 | 130 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/data/processors/utils.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 4,706 | 35.773438 | 99 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/data/processors/__init__.py | from .utils import InputExample, InputFeatures, DataProcessor
from .glue import glue_output_modes, glue_processors, glue_tasks_num_labels, glue_convert_examples_to_features
from .xnli import xnli_output_modes, xnli_processors, xnli_tasks_num_labels
| 249 | 61.5 | 110 | py |
fat-albert | fat-albert-master/bert/build/lib/transformers/data/processors/xnli.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | 3,069 | 34.697674 | 128 | py |
aodisaggregation | aodisaggregation-main/aggregate_results.py | """
Description : Aggregate together in dataframe outputs from multiple runs.
Usage: aggregate_results.py [options] --i=<input_dir> --o=<output_dir>
Options:
--i=<input_dir> Path to directory where grid search outputs are saved.
--o=<output_dir> Output directory.
--tex ... | 1,897 | 28.65625 | 89 | py |
aodisaggregation | aodisaggregation-main/run_ideal_vertical_profile.py | """
Description : Runs idealized exponential aerosol vertical profile reconstruction
Usage: run_ideal_vertical_profile.py [options] --cfg=<path_to_config> --o=<output_dir>
Options:
--cfg=<path_to_config> Path to YAML configuration file to use.
--o=<output_dir> Output directory.
--devi... | 4,252 | 33.577236 | 137 | py |
aodisaggregation | aodisaggregation-main/run_svgp_vertical_profile.py | """
Description : Runs sparse variational GP aerosol vertical profile reconstruction
Usage: run_svgp_vertical_profile.py [options] --cfg=<path_to_config> --o=<output_dir>
Options:
--cfg=<path_to_config> Path to YAML configuration file to use.
--o=<output_dir> Output directory.
--devic... | 10,673 | 36.584507 | 150 | py |
aodisaggregation | aodisaggregation-main/src/evaluation/scripts.py | import os
import yaml
import torch
import numpy as np
import matplotlib.pyplot as plt
from src.evaluation import metrics
from src.evaluation import visualization
def dump_scores(cfg, prediction_3d_dist, bext_dist, groundtruth_3d, output_dir, ideal=False):
scores = metrics.compute_scores(prediction_3d_dist=predict... | 6,508 | 60.990476 | 144 | py |
aodisaggregation | aodisaggregation-main/src/evaluation/visualization.py | import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable
params = {
'text.latex.preamble': ['\\usepackage{gensymb}'],
'text.usetex': False,
'font.family': 'serif',
}
matplotlib.rcParams.update(params)
def colorbar(mappable):
"""
S... | 13,751 | 40.297297 | 151 | py |
aodisaggregation | aodisaggregation-main/src/evaluation/metrics.py | import torch
import numpy as np
from scipy.stats import pearsonr
def compute_scores(prediction_3d_dist, bext_dist, groundtruth_3d, calibration_seed, n_test_samples, ideal):
"""Computes prediction scores
Args:
prediction_3d_dist (torch.distributions.Distribution): (time * lat * lon, lev)
bext_... | 6,515 | 38.731707 | 145 | py |
aodisaggregation | aodisaggregation-main/src/evaluation/__init__.py | from .metrics import *
from .visualization import *
from .scripts import *
| 75 | 18 | 28 | py |
aodisaggregation | aodisaggregation-main/src/models/lognormal_regression.py | import torch
import torch.nn as nn
from gpytorch import means, distributions
from gpytorch.models import ApproximateGP
from gpytorch import variational
class AggregateLogNormalSVGP(ApproximateGP):
"""Sparse Variational GP model that aggregates into the mean of a LogNormal likelihood
Args:
inducing_po... | 3,934 | 39.153061 | 123 | py |
aodisaggregation | aodisaggregation-main/src/models/__init__.py | from .lognormal_regression import AggregateLogNormalSVGP, LinearModel
__all__ = ['AggregateLogNormalSVGP', 'LinearModel']
| 123 | 30 | 69 | py |
aodisaggregation | aodisaggregation-main/src/preprocessing/preprocess_model_data.py | import xarray as xr
standardize = lambda x: (x - x.mean()) / x.std()
def load_dataset(file_path):
# Load dataset
dataset = xr.open_dataset(file_path)
return dataset
| 180 | 17.1 | 48 | py |
aodisaggregation | aodisaggregation-main/src/preprocessing/make_data.py | """
Variables naming conventions:
- `dataset` : original xarray dataset
- `standard_dataset` : standardized xarray dataset (i.e. all variables have mean 0 and variance 1)
- `x_<whatever>` : 3D covariates
- `τ_<whatever>` : aggregate targets
- `gt_<whatever>` : 3D groundtruth
- `h_<whatever>` : ... | 7,889 | 34.223214 | 117 | py |
aodisaggregation | aodisaggregation-main/src/preprocessing/__init__.py | from .tensors import *
from .preprocess_model_data import *
from .make_data import make_data
| 93 | 22.5 | 36 | py |
aodisaggregation | aodisaggregation-main/src/preprocessing/tensors.py | import numpy as np
import torch
standardize = lambda x: (x - x.mean()) / x.std()
def make_grid_tensor(field, coords_keys, standardize=True):
"""Makes ND tensor grid corresponding to
provided xarray dataarray coordinates
"""
coords = []
for key in coords_keys:
coord = torch.from_numpy(fiel... | 2,513 | 28.576471 | 91 | py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.