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
spektral
spektral-master/tests/test_layers/convolutional/test_gtv_conv.py
from core import MODES, run_layer from spektral import layers config = { "layer": layers.GTVConv, "modes": [MODES["SINGLE"], MODES["BATCH"]], "kwargs": { "channels": 8, "delta_coeff": 1.0, "epsilon": 0.001, "activation": "relu", }, "dense": True, "sparse": True,...
385
16.545455
47
py
spektral
spektral-master/tests/test_layers/convolutional/test_general_conv.py
from core import MODES, run_layer from spektral import layers config = { "layer": layers.GeneralConv, "modes": [MODES["SINGLE"], MODES["MIXED"]], "kwargs": {"channels": 256}, "dense": False, "sparse": True, "edges": False, } def test_layer(): run_layer(config) config["kwargs"]["activ...
359
17.947368
47
py
spektral
spektral-master/tests/test_layers/convolutional/test_agnn_conv.py
from core import MODES, run_layer from spektral import layers config = { "layer": layers.AGNNConv, "modes": [MODES["SINGLE"], MODES["MIXED"]], "kwargs": {"channels": 7, "trainable": True}, "dense": False, "sparse": True, "edges": False, } def test_layer(): run_layer(config) config["k...
371
18.578947
49
py
spektral
spektral-master/tests/test_layers/convolutional/test_arma_conv.py
from core import MODES, run_layer from spektral import layers config = { "layer": layers.ARMAConv, "modes": [MODES["SINGLE"], MODES["BATCH"], MODES["MIXED"]], "kwargs": { "channels": 8, "activation": "relu", "order": 2, "iterations": 2, "share_weights": True, ...
552
19.481481
63
py
spektral
spektral-master/tests/test_layers/convolutional/test_gat_conv.py
from core import MODES, run_layer from spektral import layers config = { "layer": layers.GATConv, "modes": [MODES["SINGLE"], MODES["BATCH"], MODES["MIXED"]], "kwargs": { "channels": 8, "attn_heads": 2, "concat_heads": False, "activation": "relu", "attn_kernel_initia...
653
21.551724
86
py
spektral
spektral-master/tests/test_models/core.py
import numpy as np import scipy.sparse as sp import tensorflow as tf from spektral.data import Dataset, Graph, loaders tf.keras.backend.set_floatx("float64") MODES = {"SINGLE": 0, "BATCH": 1, "MIXED": 2, "DISJOINT": 3} batch_size = 16 n_nodes = 11 n_node_features = 7 n_edge_features = 3 def _get_graph(n_nodes, n_f...
6,747
28.858407
87
py
spektral
spektral-master/tests/test_models/test_general_gnn.py
from spektral import models from tests.test_models.core import MODES, run_model config = { "model": models.GeneralGNN, "modes": [MODES["SINGLE"], MODES["DISJOINT"], MODES["MIXED"]], "kwargs": {"output": 32, "connectivity": "cat", "pool": "sum"}, "edges": False, "dense": False, "sparse": True, }...
557
21.32
67
py
spektral
spektral-master/tests/test_models/test_gcn.py
from spektral import models from tests.test_models.core import MODES, run_model config = { "model": models.GCN, "modes": [MODES["SINGLE"], MODES["DISJOINT"], MODES["MIXED"], MODES["BATCH"]], "kwargs": {"n_labels": 32}, "edges": False, "dense": True, "sparse": True, } def test_model(): run...
335
20
82
py
spektral
spektral-master/tests/test_data/test_dataset.py
import numpy as np from spektral import transforms from spektral.data.dataset import Dataset from spektral.data.graph import Graph n_graphs = 10 Ns = np.random.randint(3, 8, n_graphs) f = 3 s = 3 def test_dataset(): class TestDataset(Dataset): def read(self): return [ Graph( ...
2,067
21
81
py
spektral
spektral-master/tests/test_data/test_loaders.py
import numpy as np import scipy.sparse as sp from spektral.data import BatchLoader, DisjointLoader from spektral.data.dataset import Dataset from spektral.data.graph import Graph from spektral.data.loaders import MixedLoader, PackedBatchLoader, SingleLoader n_graphs = 10 ns = np.random.randint(3, 8, n_graphs) f = 3 s...
5,352
26.880208
85
py
spektral
spektral-master/tests/test_data/test_graph.py
import numpy as np from spektral.data.graph import Graph n_nodes = 5 n_node_features = 4 n_edge_features = 3 n_out = 2 def _check_graph(x, a, e, y): g = Graph() # Empty graph g = Graph(x=x) # Only node features g = Graph(a=a) # Only adjacency g = Graph(x=x, a=a, e=e, y=y, extra=1) # Complete gra...
1,085
22.608696
81
py
spektral
spektral-master/tests/test_data/test_utils.py
import numpy as np import scipy.sparse as sp from spektral.data import Dataset, Graph from spektral.data.utils import batch_generator, to_batch, to_disjoint ns = np.random.randint(3, 10, 10) f = 3 a_list = [sp.csr_matrix(np.ones((n, n))) for n in ns] x_list = [np.random.rand(n, f) for n in ns] y = [[0, 1]] * len(ns) ...
1,521
24.79661
74
py
spektral
spektral-master/tests/test_utils/test_logging.py
import shutil from spektral.models import GCN from spektral.utils import logging def test_logging_functions(): log_dir = logging.init_logging() logging.log("test") logging.tic(message="test") logging.toc(message="test") model = GCN(1) model.build([(10, 2), (10, 10)]) logging.model_to_str...
356
18.833333
36
py
spektral
spektral-master/tests/test_utils/test_misc.py
from spektral.utils import misc def test_misc(): l = [1, [2, 3], [4]] flattened = misc.flatten_list(l) assert flattened == [1, 2, 3, 4]
150
17.875
36
py
spektral
spektral-master/tests/test_utils/test_convolution.py
import networkx as nx import numpy as np import pytest import scipy.sparse as sp from spektral.utils import convolution g = nx.generators.erdos_renyi_graph(10, 0.2) adj_sp = nx.adjacency_matrix(g).astype("f") adj = adj_sp.A.astype("f") degree = np.diag([d[1] for d in nx.degree(g)]) tol = 1e-6 def _run_dense_op(op, ...
7,195
30.423581
84
py
spektral
spektral-master/tests/test_transforms/test_transforms.py
import numpy as np import scipy.sparse as sp from spektral import transforms as tr from spektral.data import Graph N = 10 F = 3 S = 4 n_labels = 2 x = np.ones((N, F)) a = sp.csr_matrix(np.ones((N, N))) e = np.ones((N * N, S)) y_gl = np.ones(n_labels) y_nl = np.ones((N, n_labels)) y_sc = 1 g_gl = Graph(x=x, a=a, e=e...
2,444
17.807692
39
py
spektral
spektral-master/docs/autogen.py
from __future__ import print_function, unicode_literals import glob import inspect import os import re import shutil from spektral import data, datasets, layers, models, transforms, utils EXCLUDE = {} # For each class to document, it is possible to: # 1) Document only the class: [classA, classB, ...] # 2) Document ...
20,229
32.438017
87
py
blockchain-satellite
blockchain-satellite-master/DDL/mongodb/script_extractor/bulk_blockchain.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Install pymongo library version 3.5.1: pip install pymongo=3.5.1 # Install Cursor : https://github.com/GijsTimmers/cursor # pip install --user cursor #import traceback from pymongo import MongoClient from Crypto.Cipher import AES from os.path import expanduser from da...
9,013
30.62807
136
py
NLI4CT
NLI4CT-main/pipeline/prepare_data.py
import json import pandas as pd TRAIN_PATH = "data/train.json" DEV_PATH = "data/dev.json" TEST_PATH = "data/test.json" ###TASK 1 def generate_nli_data(file_path): ''' Generates data from clinical trials for Task 1: Textual entailment (NLI). Parameters: file_path (str): Path to the JSON of the dat...
5,392
34.248366
98
py
NLI4CT
NLI4CT-main/pipeline/task1_entailment.py
import torch from sklearn.metrics import accuracy_score, f1_score, precision_score, recall_score from transformers import Trainer, TrainingArguments from transformers import AutoTokenizer, AutoModelForSequenceClassification from prepare_data import generate_nli_data TRAIN_PATH = "data/train.json" DEV_PATH = "data/dev...
4,407
39.814815
97
py
NLI4CT
NLI4CT-main/pipeline/task2_evidence.py
import torch from sklearn.metrics import accuracy_score, f1_score, precision_score, recall_score from transformers import Trainer, TrainingArguments from transformers import AutoTokenizer, AutoModelForSequenceClassification from prepare_data import generate_evidence_data TRAIN_PATH = "data/train.json" DEV_PATH = "dat...
4,437
40.092593
97
py
NLI4CT
NLI4CT-main/joint/main.py
import torch import torch.nn as nn from sklearn.metrics import f1_score, precision_score, recall_score from tqdm import tqdm from torch.utils.data import DataLoader from transformers import AutoModel, AutoTokenizer, get_cosine_schedule_with_warmup, AdamW from model import ModelForSequenceClassification from prepare_j...
11,141
39.369565
142
py
NLI4CT
NLI4CT-main/joint/prepare_joint.py
import json import pandas as pd TRAIN_DATA = "data/train.json" def generate_multi_data(file_path): df = pd.read_json(file_path) df = df.transpose() #Extract the claims and NLI labels (Entailment/Contradiction). claims = df.Statement.tolist() nli_labels = df.Label.tolist() primary_indices = ...
3,410
36.076087
94
py
NLI4CT
NLI4CT-main/joint/model.py
import torch import torch.nn as nn import torch.nn.functional as F class ClassificationHead(nn.Module): """Head for sentence-level classification tasks.""" def __init__(self, hidden_dim, n_labels, hidden_dropout_prob = 0.1): super().__init__() self.dense = nn.Linear(hidden_dim, hidden_dim) ...
9,675
42.390135
136
py
lm-evaluation-harness
lm-evaluation-harness-master/main.py
import argparse import datetime import json import logging import os import lm_eval.evaluator as evaluator from lm_eval.api import utils logger = logging.getLogger("main") def parse_args(): parser = argparse.ArgumentParser() parser.add_argument( "--model_api_name", required=True, he...
7,346
33.013889
105
py
lm-evaluation-harness
lm-evaluation-harness-master/setup.py
from setuptools import setup, find_packages from setuptools.command.install import install with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() dev_requires = (["black<=21.12b0", "coverage<=6.2", "mock>=4.0.3", "pytest"],) install_requires = [ "datasets>=2.0.0", "codecarbon"...
1,863
27.676923
90
py
lm-evaluation-harness
lm-evaluation-harness-master/templates/new_prompt_source_task.py
# TODO: Remove all TODO comments once the implementation is complete. """ TODO: Add the Paper Title on this line. TODO: Add the paper's PDF URL (preferably from arXiv) on this line. TODO: Write a Short Description of the task. Homepage: TODO: Add the URL to the task's Homepage here. """ from lm_eval.api.task import P...
5,870
41.854015
106
py
lm-evaluation-harness
lm-evaluation-harness-master/scripts/make_table_tasks.py
from lm_eval import tasks from pytablewriter import MarkdownTableWriter writer = MarkdownTableWriter() writer.headers = ["Task Name", "Train", "Val", "Test", "Val/Test Docs", "Metrics"] values = [] def chk(tf): if tf: return "✓" else: return " " for tname, Task in tasks.TASK_REGISTRY.items...
711
19.941176
88
py
lm-evaluation-harness
lm-evaluation-harness-master/scripts/print_table.py
import json import sys from pytablewriter import MarkdownTableWriter json_file = json.load(open(sys.argv[1])) results = [] for r in json_file["results"]: metric = [k[:-7] for k in r.keys() if "_stderr" in k][0] results.append( [ r["prompt_name"], metric, "{0:.5g}...
710
21.21875
87
py
lm-evaluation-harness
lm-evaluation-harness-master/scripts/cost_estimate.py
import random import transformers from typing import List, Tuple import lm_eval from lm_eval.api.model import LM class DryrunLM(LM): def __init__(self): self.tokencost = 0 self.tokenizer = transformers.GPT2TokenizerFast.from_pretrained("gpt2") self.tokenizer.pad_token = "<|endoftext|>" ...
2,547
27.629213
229
py
lm-evaluation-harness
lm-evaluation-harness-master/scripts/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/scripts/make_gpt2_test_cases.py
import transformers import torch import torch.nn.functional as F import random from lm_eval.api.utils import set_seed data = [ "A multilayer perceptron (MLP) is a class of feedforward artificial neural network (ANN)", "The term MLP is used ambiguously, sometimes loosely to any feedforward ANN, sometimes stri...
3,587
78.733333
1,100
py
lm-evaluation-harness
lm-evaluation-harness-master/scripts/get_prompts.py
from itertools import islice from lm_eval import tasks ct = 3 for ( tname, Task, ) in tasks.TASK_REGISTRY.items(): # [('record', tasks.superglue.ReCoRD)]:# task = Task() print("#", tname) docs = islice( task.validation_docs() if task.has_validation_docs() else task.test_docs(), ct )...
585
22.44
86
py
lm-evaluation-harness
lm-evaluation-harness-master/scripts/write_out.py
import argparse import os import numpy as np import lm_eval from lm_eval.api import utils EXAMPLE_DIVIDER = "!!@@##@@!! -- Example {i}\n" def parse_args(): parser = argparse.ArgumentParser() parser.add_argument("--output_base_path", required=True) parser.add_argument("--task_name", type=str, required=T...
2,123
33.258065
87
py
lm-evaluation-harness
lm-evaluation-harness-master/scripts/agg2slim.py
import glob import json import os import logging logger = logging.getLogger(__name__) def agg2slim(data): """Maps results data to a simpler dictionary. `data` is expected to have a `results` and `config` fields. The results should be a list of dictionaries. This function filters out some of that in...
1,679
27
84
py
lm-evaluation-harness
lm-evaluation-harness-master/tests/test_version_stable.py
import random import pytest import os import json import hashlib import collections import lm_eval from lm_eval.api.utils import DEFAULT_SEED, set_seed def _assert_target(name, ob): fname = f"tests/testdata/{name}.json" if os.path.exists(fname): with open(fname) as fh: # Use relative tole...
3,646
27.271318
92
py
lm-evaluation-harness
lm-evaluation-harness-master/tests/test_evaluator.py
import os import random import pytest import lm_eval import lm_eval.tasks as tasks import lm_eval.api.model as model import lm_eval.models as models import lm_eval.evaluator as evaluator from lm_eval.api.utils import DEFAULT_SEED, set_seed # TODO: More fine grained unit tests rather than this big honking integration...
1,876
25.069444
77
py
lm-evaluation-harness
lm-evaluation-harness-master/tests/test_models_huggingface.py
import unittest.mock as mock import logging import pytest import lm_eval.models from lm_eval.api.utils import set_seed logger = logging.getLogger(__name__) # Only use cpu to avoid non-deterministic CUDA settings. # See: https://pytorch.org/docs/stable/notes/randomness.html _DEVICE = "cpu" @pytest.mark.parametriz...
14,178
42.360856
1,045
py
lm-evaluation-harness
lm-evaluation-harness-master/tests/test_misc.py
import pytest import random import lm_eval.api.metric as metrics from lm_eval.api.utils import DEFAULT_SEED def test_bootstrapping(): random.seed(DEFAULT_SEED) arr = [random.random() for _ in range(1000)] expected = metrics.mean_stderr(arr) bootstrapped = metrics.bootstrap_stderr(metrics.mean, arr, i...
395
25.4
76
py
lm-evaluation-harness
lm-evaluation-harness-master/tests/test_models_openai_completions.py
import pytest import os import json import openai import mock import pickle import hashlib import logging import lm_eval.models as models from lm_eval.api.utils import set_seed logger = logging.getLogger(__name__) def _mock_completion(**kwargs): # Mock completion function # Loads from a cached+pickled resp...
7,258
44.654088
1,045
py
lm-evaluation-harness
lm-evaluation-harness-master/tests/test_tasks.py
import logging import pytest import numpy as np from typing import Optional, Tuple from itertools import islice from promptsource.templates import Template import lm_eval.tasks as tasks from lm_eval.api.task import Task from lm_eval.api.request import Request from lm_eval.api.utils import set_seed, DEFAULT_SEED logg...
7,964
33.331897
127
py
lm-evaluation-harness
lm-evaluation-harness-master/tests/test_utils.py
import torch from lm_eval.api.utils import ( get_rolling_token_windows, make_disjoint_window, select_continuation_from_batch_left_padding, split_and_pad_windows, ) # noinspection DuplicatedCode def test_get_rolling_token_windows_v1(): gold = [ ([-100, 0, 1, 2, 3, 4, 5, 6, 7, 8], [0, 1, 2,...
9,180
31.101399
87
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/evaluator.py
import collections import itertools import json import logging import sys import numpy as np from tqdm import tqdm from typing import List, Optional import lm_eval.models import lm_eval.tasks import lm_eval.api.metric import lm_eval.api.model from lm_eval.api.utils import DEFAULT_SEED, set_seed from lm_eval.api.task i...
13,546
37.485795
120
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/__init__.py
from .evaluator import evaluate from .models import get_model, list_model_apis from .tasks import get_task, get_task_list, list_tasks, get_templates, list_templates
165
40.5
85
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/api/task.py
import abc import logging import re from abc import abstractmethod from typing import Callable, List, Mapping, Optional, Tuple, Union import datasets import numpy as np import promptsource.templates from lm_eval.api import utils from lm_eval.api.metric import ( bits_per_byte, bleu, mean, rouge, sa...
30,786
36.915025
110
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/api/utils.py
import collections import pathlib import re import sys import torch from typing import Callable, Final, Iterable, List, Optional, Tuple, Union from collections.abc import MutableMapping from transformers import set_seed as transformers_set_seed # General Utils class ExitCodeError(Exception): pass # Reproducib...
10,944
29.572626
116
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/api/model.py
import abc import hashlib import json import os import torch import torch.nn.functional as F from tqdm import tqdm from typing import Iterable, List, Optional, Tuple, Union from transformers import BatchEncoding from lm_eval.api import utils class LM(abc.ABC): def __init__(self): self.cache_hook = CacheH...
17,599
37.681319
119
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/api/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/api/request.py
from typing import Any, Optional REQUEST_RETURN_LENGTHS = { "loglikelihood": 2, "greedy_until": None, "loglikelihood_rolling": None, } class Request: def __init__( self, request_type: str, args: Optional[Any] = None, index: Optional[int] = None ): if request_type not in REQUEST_R...
1,564
27.981481
88
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/api/metric.py
import logging import math import random import numpy as np import sacrebleu import sklearn.metrics from collections.abc import Iterable from rouge_score import rouge_scorer from typing import List, Mapping, Optional from lm_eval.metrics import sari as sari_impl logger = logging.getLogger(__name__) def mean(arr): ...
11,731
30.537634
115
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/models/huggingface.py
import math import torch import torch.nn.functional as F import transformers from typing import List, Mapping, NewType, Optional, Tuple, Union from tqdm import tqdm from lm_eval.api import utils from lm_eval.api.model import TokenLM, TokenSequence _DeviceMapping = NewType("DeviceMapping", Mapping[str, Union[int, str...
26,068
39.860502
120
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/models/__init__.py
import logging from typing import List, Mapping, Optional, Type import lm_eval.api.utils from lm_eval.api.model import LM from . import dummy from . import openai_completions from . import huggingface logger = logging.getLogger(__name__) MODEL_API_REGISTRY = { "hf-causal": huggingface.AutoCausalLM, "hf-se...
2,481
32.093333
94
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/models/openai_completions.py
import logging import os import time import transformers from typing import Iterable, List, Optional, Tuple, Union from tqdm import tqdm from lm_eval.api import utils from lm_eval.api.model import TokenLM, TokenSequence logging.getLogger("openai").setLevel(logging.WARNING) def get_result(response: dict, ctxlen: in...
9,423
33.774908
114
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/models/dummy.py
import random from typing import List, Tuple from lm_eval.api.model import LM class DummyLM(LM): def __init__(self): super().__init__() def loglikelihood( self, requests: List[Tuple[str, str]] ) -> List[Tuple[float, bool]]: res = [] for _ in requests: res.appe...
771
23.903226
84
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/metrics/sari.py
# ======================================================= # SARI -- Text Simplification Tunable Evaluation Metric # ======================================================= # # SOURCE: https://github.com/cocoxu/simplification/blob/master/SARI.py # This is the implementation provided by the author. # # Author: Wei Xu (U...
8,048
33.693966
115
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/metrics/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/quac/quac.py
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
4,434
36.584746
144
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/quac/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/lambada/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/lambada/lambada.py
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
4,594
34.076336
198
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/mutual/mutual.py
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
4,963
35.233577
120
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/mutual/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/drop/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/drop/drop.py
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
7,469
37.704663
116
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/arithmetic/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/arithmetic/arithmetic.py
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
8,537
38.345622
604
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/jigsaw_unintended_bias/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/jigsaw_unintended_bias/jigsaw_unintended_bias.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/wikitext/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/wikitext/wikitext.py
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
10,731
41.418972
119
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/coqa/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/coqa/coqa.py
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
9,080
35.914634
95
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/logiqa/logiqa.py
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
4,508
35.072
98
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/logiqa/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/truthfulqa/truthfulqa.py
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
6,617
37.929412
130
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/truthfulqa/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/asdiv/asdiv.py
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
4,102
35.633929
108
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/asdiv/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/triviaqa/triviaqa.py
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
6,110
38.681818
124
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/triviaqa/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/sat_analogies/sat_analogies.py
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
4,495
33.852713
231
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/sat_analogies/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/pile/pile.py
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
4,556
34.88189
221
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/pile/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/headqa/headqa.py
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
6,506
38.920245
579
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/headqa/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/hendrycks_ethics/hendrycks_ethics.py
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
8,975
38.026087
173
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/hendrycks_ethics/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/unscramble/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/unscramble/unscramble.py
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
4,419
38.81982
604
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/hendrycks_math/hendrycks_math.py
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
3,968
31.268293
144
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/hendrycks_math/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/gsm8k/gsm8k.py
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
3,825
34.100917
146
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/datasets/gsm8k/__init__.py
0
0
0
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/tasks/anli.py
""" Adversarial NLI: A New Benchmark for Natural Language Understanding https://arxiv.org/pdf/1910.14599.pdf Adversarial NLI (ANLI) is a dataset collected via an iterative, adversarial human-and-model-in-the-loop procedure. It consists of three rounds that progressively increase in difficulty and complexity, and each ...
1,761
24.536232
106
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/tasks/superglue.py
""" SuperGLUE: A Stickier Benchmark for General-Purpose Language Understanding Systems https://w4ngatang.github.io/static/papers/superglue.pdf SuperGLUE is a benchmark styled after GLUE with a new set of more difficult language understanding tasks. Homepage: https://super.gluebenchmark.com/ TODO: WSC requires free-f...
9,836
26.174033
160
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/tasks/lince.py
""" LinCE: A Centralized Benchmark for Linguistic Code-switching Evaluation https://aclanthology.org/2020.lrec-1.223.pdf A centralized benchmark for Linguistic Code-switching Evaluation (LinCE) which contains tasks for different code-switched language pairs. The code below contains evaluation for sentiment analysis ta...
3,131
50.344262
1,482
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/tasks/glue.py
""" GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understanding https://openreview.net/pdf?id=rJ4km2R5t7 The General Language Understanding Evaluation (GLUE) benchmark is a collection of resources for training, evaluating, and analyzing natural language understanding systems. GLUE consists of...
8,977
29.127517
1,597
py
lm-evaluation-harness
lm-evaluation-harness-master/lm_eval/tasks/wmt.py
""" WMT: Workshop on Statistical Machine Translation WMT is the main event for machine translation and machine translation research. The conference is held annually in connection with larger conferences on natural language processing. Homepage: https://machinetranslate.org/wmt """ import promptsource.utils from typin...
2,904
28.948454
108
py