code
stringlengths
114
1.05M
path
stringlengths
3
312
quality_prob
float64
0.5
0.99
learning_prob
float64
0.2
1
filename
stringlengths
3
168
kind
stringclasses
1 value
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from parlai.core.teachers...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/opensubtitles/agents.py
0.763528
0.222954
agents.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from parlai.core.teachers...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/squad2/agents.py
0.833663
0.23513
agents.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # Download and build the d...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/scan/build.py
0.655115
0.150434
build.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from parlai.core.teachers...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/clevr/agents.py
0.747892
0.184088
agents.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from parlai.core.teachers...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/vqa_v1/agents.py
0.748904
0.16872
agents.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # Download and build the d...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/visdial/build.py
0.720565
0.169028
build.py
pypi
# Copyright (c) 2017-present, Moscow Institute of Physics and Technology. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same director...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/convai_chitchat/agents.py
0.713931
0.179674
agents.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from parlai.core.teachers...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/convai2/agents.py
0.747984
0.184437
agents.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # Download and build the d...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/twitter/build.py
0.643553
0.184473
build.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. ''' Provides a dump of...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/wikipedia/agents.py
0.716516
0.222954
agents.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from parlai.core.agents i...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/taskntalk/agents.py
0.722331
0.276993
agents.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import itertools import j...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/taskntalk/build.py
0.83612
0.275813
build.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from parlai.core.teachers...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/squad/agents.py
0.744656
0.194387
agents.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # Download and build the d...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/coco_caption/build_2014.py
0.639286
0.166066
build_2014.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # Download and build the d...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/coco_caption/build_2017.py
0.631935
0.173078
build_2017.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from parlai.core.teachers...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/coco_caption/agents.py
0.794544
0.296896
agents.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from parlai.core.teachers...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/qangaroo/agents.py
0.727201
0.201636
agents.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from parlai.core.teachers...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/tasks/flickr30k/agents.py
0.720762
0.249739
agents.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import parlai.core.build_...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/core/image_featurizers.py
0.793106
0.195287
image_featurizers.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """Provides utilities usef...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/core/thread_utils.py
0.832713
0.227523
thread_utils.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """Provides standard metri...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/core/metrics.py
0.844553
0.328745
metrics.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """Basic example which ite...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/scripts/detect_offensive_language.py
0.748904
0.181209
detect_offensive_language.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """Convert a dataset into ...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/scripts/convert_data_to_parlai_format.py
0.646572
0.217784
convert_data_to_parlai_format.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """Basic example which it...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/scripts/eval_model.py
0.814901
0.211173
eval_model.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """ This helper script can...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/scripts/eval_wordstat.py
0.76207
0.298773
eval_wordstat.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """Basic example which ite...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/scripts/display_data.py
0.700383
0.267537
display_data.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """Basic example which all...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/scripts/interactive.py
0.754825
0.167559
interactive.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """Verify data doesn't hav...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/scripts/verify_data.py
0.68616
0.210888
verify_data.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """Basic example which it...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/scripts/extract_image_feature.py
0.815049
0.30948
extract_image_feature.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """Run the python or pytor...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/scripts/profile_train.py
0.779196
0.202759
profile_train.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """This file contains a li...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/zoo/model_list.py
0.886236
0.527317
model_list.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """ Simple IR baselines. ...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/ir_baseline/ir_baseline.py
0.927458
0.369514
ir_baseline.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """Simple agent which repe...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/repeat_label/repeat_label.py
0.844553
0.223864
repeat_label.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """ Baseline model which ...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/unigram/unigram.py
0.882352
0.217857
unigram.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """Various retriever util...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/tfidf_retriever/utils.py
0.87864
0.364042
utils.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """Rank documents with TF-...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/tfidf_retriever/tfidf_doc_ranker.py
0.883751
0.296109
tfidf_doc_ranker.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """Regex based tokenizer ...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/tfidf_retriever/tokenizers/regexp_tokenizer.py
0.684264
0.290547
regexp_tokenizer.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """Base tokenizer/tokens ...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/tfidf_retriever/tokenizers/tokenizer.py
0.910708
0.430925
tokenizer.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """Simple wrapper around t...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/tfidf_retriever/tokenizers/corenlp_tokenizer.py
0.83825
0.213254
corenlp_tokenizer.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """Tokenizer that is back...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/tfidf_retriever/tokenizers/spacy_tokenizer.py
0.735737
0.156943
spacy_tokenizer.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from parlai.core.torch_ag...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/vsepp_caption/vsepp_caption.py
0.931142
0.297559
vsepp_caption.py
pypi
# This file is covered under the Apache 2.0 License listed here # <https://github.com/fartashf/vsepp/blob/master/LICENSE> as it is a # Derivative Work of the repo. import torch from torch import optim from torch.nn.utils.rnn import pack_padded_sequence import torch.nn as nn import torchvision.models as models import...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/vsepp_caption/modules.py
0.952783
0.485295
modules.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import torch import torch...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/memnn/modules.py
0.909398
0.269121
modules.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import math import torch ...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/starspace/modules.py
0.913527
0.170508
modules.py
pypi
# This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import torch.nn as nn import torch.nn.functional as F import torch from .gru import Bayesian...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/mlb_vqa/mlb_modules.py
0.942738
0.288707
mlb_modules.py
pypi
# This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import os import numpy import torch from collections import OrderedDict urls = {} urls['di...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/mlb_vqa/loadstates.py
0.638948
0.255672
loadstates.py
pypi
# This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import torch import torch.nn as nn import torch.nn.functional as F from .dropout import Seque...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/mlb_vqa/gru.py
0.945045
0.436322
gru.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import math import torch ...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/coopgame_agent/modules.py
0.964178
0.452838
modules.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from parlai.core.torch_ge...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/seq2seq/seq2seq.py
0.948567
0.362885
seq2seq.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import torch import torch...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/legacy_agents/memnn/modules_v0.py
0.957833
0.257269
modules_v0.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import torch import torch....
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/drqa/layers.py
0.953351
0.352843
layers.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import torch import unicod...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/drqa/utils.py
0.893524
0.358157
utils.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import torch import torch....
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/drqa/model.py
0.889518
0.227448
model.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import torch import torch....
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/parlai/agents/drqa/rnn_reader.py
0.951182
0.229039
rnn_reader.py
pypi
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from torch import nn impo...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/projects/mastering_the_dungeon/agents/graph_world2/models.py
0.931936
0.440409
models.py
pypi
# Copyright (c) 2017-present, Moscow Institute of Physics and Technology. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same director...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/projects/convai/convai_world.py
0.88377
0.20264
convai_world.py
pypi
# Copyright (c) 2017-present, Moscow Institute of Physics and Technology. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same director...
/roboy_parlai-0.1.post3.tar.gz/roboy_parlai-0.1.post3/projects/convai/convai_bot.py
0.746693
0.169853
convai_bot.py
pypi
from inspect import getmembers from typing import Any from pytest import MonkeyPatch import functools import io import os import socket from .pytest_sandbox import MockOsModule import builtins import math from dataclasses import is_dataclass, fields from typing import Tuple class MockedModule: pass class Prohib...
/robust_ai_utils-0.0.4.tar.gz/robust_ai_utils-0.0.4/robust_ai_utils/assert_utils.py
0.689619
0.15511
assert_utils.py
pypi
Robust ATD CLI tools ================ [![GitHub release](https://img.shields.io/github/release/shadowbq/robust-atd.svg?style=for-the-badge)](https://github.com/shadowbq/robust-atd/releases) [![license](https://img.shields.io/github/license/shadowbq/robust-atd.svg?style=for-the-badge)](/LICENSE) [![GitHub Release Date...
/robust-atd-0.5.2.tar.gz/robust-atd-0.5.2/README.md
0.450359
0.858778
README.md
pypi
import argparse import ConfigParser import os.path import ratd import ratd.utils as utils def check_md5(value): if len(value) != 32: raise argparse.ArgumentTypeError("%s is an invalid md5 hash value" % value) return value def slash_dir(value): if value[len(value)-1] != "/": raise argpars...
/robust-atd-0.5.2.tar.gz/robust-atd-0.5.2/ratd/cliargs/__init__.py
0.537041
0.224331
__init__.py
pypi
import numpy as np from scipy.special import softmax class CELoss(object): def compute_bin_boundaries(self, probabilities = np.array([])): #uniform bin spacing if probabilities.size == 0: bin_boundaries = np.linspace(0, 1, self.n_bins + 1) self.bin_lowers = bin_boundari...
/robust_deep_learning-0.5.0-py3-none-any.whl/robust_deep_learning/uncertainty.py
0.709422
0.336059
uncertainty.py
pypi
import torch.nn as nn import torch import math class SoftMaxLossFirstPart(nn.Module): def __init__(self, num_features, num_classes, temperature=1.0): super(SoftMaxLossFirstPart, self).__init__() self.num_features = num_features self.num_classes = num_classes self.temperature = nn.P...
/robust_deep_learning-0.5.0-py3-none-any.whl/robust_deep_learning/softmax.py
0.943204
0.536313
softmax.py
pypi
import numpy as np from .scores import get_scores import sklearn.metrics from .general import get_outputs_labels_and_metrics def find_index_of_nearest(value, array): array = np.asarray(array) idx = (np.abs(array - value)).argmin() return idx def get_ood_metrics_from_scores(in_data_scores, out_data_sco...
/robust_deep_learning-0.5.0-py3-none-any.whl/robust_deep_learning/detection.py
0.560493
0.349422
detection.py
pypi
# Robust DeID: De-Identification of Medical Notes using Transformer Architectures [![DOI](https://zenodo.org/badge/458346577.svg)](https://zenodo.org/badge/latestdoi/458346577) This repository was used to train and evaluate various de-identification models and strategies on medical notes from the I2B2-DEID dataset ...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/README.md
0.667906
0.986507
README.md
pypi
import json import random from argparse import ArgumentParser from typing import Union, NoReturn, Iterable, Dict, List random.seed(41) class SpanValidation(object): """ This class is used to build a mapping between the note id and the annotated spans in that note. This will be used during the evalua...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/ner_datasets/span_validation.py
0.851891
0.353177
span_validation.py
pypi
import re import json from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter from typing import Iterable, Dict, List, Sequence, Union, Mapping, Tuple, NoReturn from .preprocessing import PreprocessingLoader class SpanFixer(object): """ The tokens and spans may not align depending on the tokenizer...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/ner_datasets/span_fixer.py
0.885656
0.616128
span_fixer.py
pypi
import json import random from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter from typing import Iterable, Dict, List, Union, Optional, Sequence, NoReturn from .dataset_builder import Dataset, SentenceDataset from .preprocessing import PreprocessingLoader random.seed(41) class DatasetCreator(object):...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/ner_datasets/dataset_creator.py
0.885928
0.62223
dataset_creator.py
pypi
import json import random from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter from collections import Counter from typing import NoReturn, List from .distribution import NERDistribution, DatasetSplits, PrintDistribution random.seed(41) class DatasetSplitter(object): """ Prepare dataset splits...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/ner_datasets/dataset_splitter.py
0.890948
0.585753
dataset_splitter.py
pypi
from collections import deque from typing import Deque, List, Sequence, Iterable, Optional, NoReturn, Dict, Mapping, Union, Tuple class SentenceDataset(object): """ When we mention previous sentence and next sentence, we don't mean exactly one sentence but rather a previous chunk and a next chunk. This ca...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/ner_datasets/dataset_builder/sentence_dataset.py
0.927256
0.833663
sentence_dataset.py
pypi
import random import re from typing import Iterable, Dict, Sequence, Union, Mapping, Optional, List from .labels import NERTokenLabels, NERPredictTokenLabels, MismatchError random.seed(41) class Dataset(object): """ Build a NER token classification dataset. Each token should have a corresponding label b...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/ner_datasets/dataset_builder/dataset.py
0.869632
0.783864
dataset.py
pypi
from typing import Mapping, Union, Sequence, List from .mismatch_error import MismatchError class NERTokenLabels(object): """ This class is used to align tokens with the spans Each token is assigned one of the following labels 'B-LABEL', 'I-LABEL', 'O'. For example the text 360 Longwood Avenue is ...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/ner_datasets/dataset_builder/labels/ner_token_labels.py
0.902191
0.59884
ner_token_labels.py
pypi
from collections import Counter from typing import Sequence, NoReturn from .ner_distribution import NERDistribution class PrintDistribution(object): """ This class is used to print the distribution of NER types """ def __init__(self, ner_distribution: NERDistribution, key_counts: Counter) -> NoRetur...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/ner_datasets/distribution/print_distribution.py
0.925222
0.232495
print_distribution.py
pypi
from collections import Counter, defaultdict from typing import Sequence, Mapping, NoReturn class NERDistribution(object): """ Store the distribution of ner types based on some key. That is we store the NER type distribution for some given key value and we update the distribution when spans related to...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/ner_datasets/distribution/ner_distribution.py
0.918013
0.42662
ner_distribution.py
pypi
from typing import Union, Optional, Sequence from .sentencizers import SpacySentencizer, NoteSentencizer from .tokenizers import ClinicalSpacyTokenizer, SpacyTokenizer, CoreNLPTokenizer class PreprocessingLoader(object): @staticmethod def get_sentencizer(sentencizer: str) -> Union[SpacySentencizer, NoteSent...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/ner_datasets/preprocessing/preprocessing_loader.py
0.923708
0.178633
preprocessing_loader.py
pypi
import re import spacy from spacy.symbols import ORTH from .spacy_tokenizer import SpacyTokenizer from .utils import DateRegex, CleanRegex, ClinicalRegex def read_abbreviations(): import importlib.resources as pkg_resources from . import abbreviations abbrevs = [] with pkg_resources.open_text(abbreviat...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/ner_datasets/preprocessing/tokenizers/clinical_spacy_tokenizer.py
0.514888
0.214465
clinical_spacy_tokenizer.py
pypi
import json from typing import Iterable, Mapping, Dict, Union from pycorenlp import StanfordCoreNLP class CoreNLPTokenizer(object): """ This class is used to read text and return the tokens present in the text (and their start and end positions) using core nlp tokenization """ def __init__(s...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/ner_datasets/preprocessing/tokenizers/core_nlp_tokenizer.py
0.830732
0.355691
core_nlp_tokenizer.py
pypi
from typing import List class CleanRegex(object): """ This class is used to define the regexes that will be used by the spacy tokenizer rules. Mainly the regexes are used to clean up tokens that have unwanted characters (e.g extra hyphens). """ #Staff - 3 #Hosp - 4, 5 #Loc - 2 @stati...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/ner_datasets/preprocessing/tokenizers/utils/clean_regex.py
0.778818
0.589391
clean_regex.py
pypi
import json import numpy as np from scipy.special import softmax from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter from typing import NoReturn from sklearn.metrics import precision_recall_curve from .dataset_builder import NERLabels class RecallThresholder(object): def __init__(self, ner_types, ...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/sequence_tagging/recall_thresholder.py
0.772702
0.19235
recall_thresholder.py
pypi
from typing import Optional from dataclasses import dataclass, field @dataclass class DataTrainingArguments: """ Arguments pertaining to what data we are going to input our model for training and eval. """ task_name: Optional[str] = field( default="ner", metadata={"help": "The name of t...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/sequence_tagging/arguments/data_training_arguments.py
0.940415
0.50177
data_training_arguments.py
pypi
from collections import defaultdict from typing import Sequence, Mapping, NoReturn, List, Union class NoteLevelAggregator(object): """ The input while training the model is at a sentence level. What happens is we have a bunch of notes (say 20) which we split into sentences and tokenize, so we end up w...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/sequence_tagging/note_aggregate/note_level_aggregator.py
0.915157
0.837487
note_level_aggregator.py
pypi
from typing import Sequence, NoReturn import torch from .utils import check_consistent_length class CRFProcess(object): def __init__( self, label_list: Sequence[str], top_k: int ) -> NoReturn: """ Initialize a label list where the position corresponds to ...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/sequence_tagging/post_process/model_outputs/crf_process.py
0.95452
0.619443
crf_process.py
pypi
from typing import Sequence, NoReturn, Tuple import numpy as np from scipy.special import softmax from .utils import check_consistent_length class ThresholdProcessMax(object): """ """ def __init__(self, label_list: Sequence[str], threshold: float) -> NoReturn: """ Initialize a label lis...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/sequence_tagging/post_process/model_outputs/threshold_process_max.py
0.95202
0.473596
threshold_process_max.py
pypi
from typing import Sequence, NoReturn, Tuple class LogitsProcess(object): """ Process the output of the model forward pass. The forward pass will return the predictions (e.g the logits), labels if present. We process the output and return the processed values based on the application. This script we r...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/sequence_tagging/post_process/model_outputs/logits_process.py
0.947588
0.8308
logits_process.py
pypi
from typing import Sequence from .argmax_process import ArgmaxProcess from .crf_argmax_process import CRFArgmaxProcess from .logits_process import LogitsProcess from .threshold_process_max import ThresholdProcessMax from .threshold_process_sum import ThresholdProcessSum class PostProcessPicker(object): """ T...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/sequence_tagging/post_process/model_outputs/post_process_picker.py
0.941419
0.31883
post_process_picker.py
pypi
from typing import Sequence, NoReturn, Tuple import numpy as np from scipy.special import softmax from .utils import check_consistent_length class ThresholdProcessSum(object): """ """ def __init__(self, label_list: Sequence[str], threshold: float) -> NoReturn: """ Initialize a label lis...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/sequence_tagging/post_process/model_outputs/threshold_process_sum.py
0.951165
0.468912
threshold_process_sum.py
pypi
import numpy as np from typing import Sequence, NoReturn, Tuple from .utils import check_consistent_length class ArgmaxProcess(object): """ Process the output of the model forward pass. The forward pass will return the predictions (e.g the logits), labels if present. We process the output and return the ...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/sequence_tagging/post_process/model_outputs/argmax_process.py
0.933119
0.723725
argmax_process.py
pypi
from typing import Mapping, Sequence, List, Union, Optional, NoReturn from datasets import Dataset from transformers import PreTrainedTokenizerFast, PreTrainedTokenizer class DatasetTokenizer(object): """ The main goal of this class is to solve the problem described below. Most of the comments have been c...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/sequence_tagging/dataset_builder/dataset_tokenizer.py
0.944087
0.856032
dataset_tokenizer.py
pypi
from typing import List, Sequence, Mapping, Optional, NoReturn, Dict, Union from .ner_labels import NERLabels class LabelMapper(object): """ This class is used to map one set of NER labels to another set of NER labels For example we might want to map all NER labels to Binary HIPAA labels. E.g: We ...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/sequence_tagging/dataset_builder/label_mapper.py
0.935817
0.696541
label_mapper.py
pypi
from typing import Sequence, List, NoReturn, Dict class NERLabels(object): """ Prepare the labels that will be used by the model. Parse the NER types and prepare the NER labels. For example - NER Types: [AGE, DATE], it will create a list like this (for BIO notation) [B-AGE, I-AGE, B-DATE, I-DATE, O] ...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/sequence_tagging/dataset_builder/ner_labels.py
0.904695
0.680049
ner_labels.py
pypi
from typing import Sequence, Optional, NoReturn from datasets import load_dataset, Dataset class NERDataset(object): """ This class is a wrapper around the huggingface datasets library It maintains the train, validation and test datasets based on the train, validation and test files passed by loading...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/sequence_tagging/dataset_builder/ner_dataset.py
0.936641
0.830388
ner_dataset.py
pypi
from typing import Dict, NoReturn from transformers import AutoConfig, AutoModelForTokenClassification class ModelPicker(object): """ This class is used to pick the model we are using to train. The class provides functions that returns the desired model objects i.e get the desired model for training ...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/sequence_tagging/models/hf/model_picker.py
0.916463
0.374848
model_picker.py
pypi
from typing import Sequence, Tuple, Dict, NoReturn, Mapping, Union, Type from seqeval.scheme import IOB1, IOB2, IOBES, BILOU class MetricsCompute(object): """ This is the evaluation script which is passed to the huggingface trainer - specifically the compute_metrics function. The trainer uses this fu...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/sequence_tagging/evaluation/metrics_compute.py
0.945286
0.643609
metrics_compute.py
pypi
from typing import Sequence, List, Optional, Type, Union, Mapping, Dict # This script uses the two other scripts note_sequence_evaluation.py # and note_token_evalaution.py to gather the span level and token # level metrics during the evaluation phase in the huggingface # training process. More information on how this ...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/sequence_tagging/evaluation/note_evaluation/note_evaluation.py
0.959126
0.682402
note_evaluation.py
pypi
from collections import Counter from typing import Sequence, List, Tuple, Union, Type, Optional from seqeval.reporters import DictReporter from sklearn.metrics import precision_score, recall_score, f1_score, confusion_matrix class NoteTokenEvaluation(object): """ This class is used to evaluate token level pr...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/sequence_tagging/evaluation/note_evaluation/note_token_evaluation.py
0.953977
0.664418
note_token_evaluation.py
pypi
import re import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.metrics import ConfusionMatrixDisplay class ResultsFormatter(object): @staticmethod def get_results_df(results): def change_column_names(group): group.rename(columns=lambda name: re.sub('(.*_)...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/sequence_tagging/evaluation/results/results_formatter.py
0.722625
0.28452
results_formatter.py
pypi
import json import re from argparse import ArgumentParser from typing import Sequence, List, Tuple, Mapping, Union, Any, Type import regex from seqeval.scheme import IOB1, IOB2, IOBES, BILOU, Entities from .utils import remove, replace_tag_type, replace_informative class TextDeid(object): def __init__(self, no...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/deid/text_deid.py
0.775775
0.257753
text_deid.py
pypi
import json import pandas as pd from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter from typing import Sequence, Dict, Iterable, Union, NoReturn, Optional class DataLoader(object): """ Convert parquet file to jsonl file. While some of the columns in the parquet file will be directly used as...
/robust_deid-0.3.1.tar.gz/robust_deid-0.3.1/src/robust_deid/data_processing/data_loader.py
0.876357
0.656892
data_loader.py
pypi
from urlparse import urljoin from collections import OrderedDict from .http import HttpClient def average(values): return float(sum(values)) / len(values) class GraphiteClient(HttpClient): ''' A simple client for querying Graphite. :param endpoint: the Graphite URL; :param min_queries_range: ...
/robust-graphite-client-1.1.0.tar.gz/robust-graphite-client-1.1.0/robgracli/client.py
0.900026
0.585338
client.py
pypi
# http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing...
/robust_json-1.2.7-py3-none-any.whl/robust_json/ext/get_item_index.py
0.895916
0.60095
get_item_index.py
pypi
import numpy as np from sklearn.utils import resample def RWP(X, orig_cov, with_diag=False): """ Robust Wasserstein Profile function. Parameters ---------- X : ndarray of shape (n_samples, n_features) Data from which to compute the covariance estimate from bootrap sample. orig_cov: ndar...
/robust_selection-0.0.8-py3-none-any.whl/robsel/robsel.py
0.923545
0.769535
robsel.py
pypi