text
stringlengths
5
22M
id
stringlengths
12
177
metadata
dict
__index_level_0__
int64
0
1.37k
resource "azurerm_network_interface" "internal" { name = "internal-nic-${local.service_resource_name_suffix}" location = data.azurerm_resource_group.ws.location resource_group_name = data.azurerm_resource_group.ws.name tags = local.tre_user_resources_tags ip_configura...
AzureTRE/templates/workspace_services/guacamole/user_resources/guacamole-azure-import-reviewvm/terraform/windowsvm.tf/0
{ "file_path": "AzureTRE/templates/workspace_services/guacamole/user_resources/guacamole-azure-import-reviewvm/terraform/windowsvm.tf", "repo_id": "AzureTRE", "token_count": 1531 }
124
output "ip" { value = azurerm_network_interface.internal.private_ip_address } output "hostname" { value = azurerm_linux_virtual_machine.linuxvm.name } output "azure_resource_id" { value = azurerm_linux_virtual_machine.linuxvm.id } output "connection_uri" { value = "https://${data.azurerm_linux_web_app.guacam...
AzureTRE/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/outputs.tf/0
{ "file_path": "AzureTRE/templates/workspace_services/guacamole/user_resources/guacamole-azure-linuxvm/terraform/outputs.tf", "repo_id": "AzureTRE", "token_count": 245 }
125
#!/bin/bash set -e eval "$(jq -r '@sh "firewall_name=\(.firewall_name) resource_group_name=\(.resource_group_name) collection_name_suffix=\(.collection_name_suffix)"')" if NETWORK_RULES=$(az network firewall network-rule list -g $resource_group_name -f $firewall_name --collection-name "nrc-$collection_name_suffix" ...
AzureTRE/templates/workspace_services/innereye/terraform/get_firewall_priorities.sh/0
{ "file_path": "AzureTRE/templates/workspace_services/innereye/terraform/get_firewall_priorities.sh", "repo_id": "AzureTRE", "token_count": 518 }
126
[Environment]::SetEnvironmentVariable("AZURE_STORAGE_CONNECTION_STRING", "${MLFlow_Connection_String}", "Machine") pip install mlflow==1.24.0 pip install azure-storage-blob==12.10.0 pip install azure-identity==1.8.0
AzureTRE/templates/workspace_services/mlflow/mlflow-vm-config/windows/template_config.ps1/0
{ "file_path": "AzureTRE/templates/workspace_services/mlflow/mlflow-vm-config/windows/template_config.ps1", "repo_id": "AzureTRE", "token_count": 81 }
127
#!/bin/bash set -o errexit set -o pipefail set -o nounset function build_daimon_object() { local DAIMON_TYPE=$1 local VALUE=$2 echo '{ "tableQualifier": "'"$VALUE"'", "priority": 0, "sourceDaimonId": null, "daimonType": "'"$DAIMON_TYPE"'" }' } # Login login_response=$(curl "https://${OHDSI_W...
AzureTRE/templates/workspace_services/ohdsi/scripts/add_data_source.sh/0
{ "file_path": "AzureTRE/templates/workspace_services/ohdsi/scripts/add_data_source.sh", "repo_id": "AzureTRE", "token_count": 1329 }
128
define([], function () { var configLocal = {}; // clearing local storage otherwise source cache will obscure the override settings localStorage.clear(); // WebAPI configLocal.api = { name: 'OHDSI', url: "${OHDSI_WEBAPI_URL}" }; configLocal.cohortComparisonResultsEnabled = false; configLocal.userAuthentic...
AzureTRE/templates/workspace_services/ohdsi/terraform/config_local.tftpl/0
{ "file_path": "AzureTRE/templates/workspace_services/ohdsi/terraform/config_local.tftpl", "repo_id": "AzureTRE", "token_count": 290 }
129
{ "$schema": "http://json-schema.org/draft-07/schema", "$id": "https://github.com/microsoft/AzureTRE/templates/workspaces/airlock_import_review/template_schema.json", "type": "object", "title": "Airlock Import Review Workspace", "description": "This workspace template is intended to conduct Airlock Data Impor...
AzureTRE/templates/workspaces/airlock-import-review/template_schema.json/0
{ "file_path": "AzureTRE/templates/workspaces/airlock-import-review/template_schema.json", "repo_id": "AzureTRE", "token_count": 2550 }
130
locals { core_resource_group_name = "rg-${var.tre_id}" workspace_resource_name_suffix = "${var.tre_id}-ws-${var.short_workspace_id}" import_approved_sys_topic_name = "evgt-airlock-import-approved-${local.workspace_resource_name_suffix}" export_inprogress_sys_topic_name = "evgt-airlock-export-inprog-${l...
AzureTRE/templates/workspaces/base/terraform/airlock/locals.tf/0
{ "file_path": "AzureTRE/templates/workspaces/base/terraform/airlock/locals.tf", "repo_id": "AzureTRE", "token_count": 724 }
131
# For recommended Azure private DNS zone names see https://docs.microsoft.com/azure/private-link/private-endpoint-dns#azure-services-dns-zone-configuration # To enable connecting to Azure Monitor from within a workspace VNET (where traffic is restricted), we need to have an Azure Monitor Private Link Scope (AMPLS) tha...
AzureTRE/templates/workspaces/base/terraform/network/dns_zones.tf/0
{ "file_path": "AzureTRE/templates/workspaces/base/terraform/network/dns_zones.tf", "repo_id": "AzureTRE", "token_count": 1721 }
132
# syntax=docker/dockerfile-upstream:1.4.0 FROM --platform=linux/amd64 debian:bullseye-slim # PORTER_INIT RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache # Git is required for terraform_azurerm_environment_configuration RUN --mount...
AzureTRE/templates/workspaces/unrestricted/Dockerfile.tmpl/0
{ "file_path": "AzureTRE/templates/workspaces/unrestricted/Dockerfile.tmpl", "repo_id": "AzureTRE", "token_count": 403 }
133
import React, { useEffect, useState } from 'react'; import { DefaultPalette, IStackStyles, MessageBar, MessageBarType, Stack } from '@fluentui/react'; import './App.scss'; import { TopNav } from './components/shared/TopNav'; import { Routes, Route } from 'react-router-dom'; import { RootLayout } from './components/root...
AzureTRE/ui/app/src/App.tsx/0
{ "file_path": "AzureTRE/ui/app/src/App.tsx", "repo_id": "AzureTRE", "token_count": 2860 }
134
import React from 'react'; import { VMPowerStates } from '../../models/resource'; interface PowerStateBadgeProps { state: VMPowerStates } export const PowerStateBadge: React.FunctionComponent<PowerStateBadgeProps> = (props: PowerStateBadgeProps) => { let stateClass = "tre-power-off"; if (props.state === VMPower...
AzureTRE/ui/app/src/components/shared/PowerStateBadge.tsx/0
{ "file_path": "AzureTRE/ui/app/src/components/shared/PowerStateBadge.tsx", "repo_id": "AzureTRE", "token_count": 236 }
135
import { Stack, FontWeights, Text, Spinner, FontIcon, mergeStyles, getTheme, SpinnerSize, TooltipHost, ITooltipProps } from '@fluentui/react'; import React from 'react'; import { awaitingStates, failedStates, inProgressStates } from '../../models/operation'; import { Resource } from '../../models/resource'; interface ...
AzureTRE/ui/app/src/components/shared/StatusBadge.tsx/0
{ "file_path": "AzureTRE/ui/app/src/components/shared/StatusBadge.tsx", "repo_id": "AzureTRE", "token_count": 1267 }
136
import { createSlice, PayloadAction } from '@reduxjs/toolkit'; import { completedStates, Operation } from '../../../models/operation'; interface OperationsState { items: Array<Operation> } const initialState: OperationsState = { items: [] }; // note - we can write what looks like state mutations here because the...
AzureTRE/ui/app/src/components/shared/notifications/operationsSlice.ts/0
{ "file_path": "AzureTRE/ui/app/src/components/shared/notifications/operationsSlice.ts", "repo_id": "AzureTRE", "token_count": 433 }
137
import { useContext, useEffect, useState } from "react"; import { WorkspaceContext } from "../contexts/WorkspaceContext"; import { completedStates, inProgressStates, Operation } from "../models/operation"; import { ResourceUpdate, ComponentAction, getResourceFromResult, Resource } from "../models/resource"; import { Re...
AzureTRE/ui/app/src/hooks/useComponentManager.ts/0
{ "file_path": "AzureTRE/ui/app/src/hooks/useComponentManager.ts", "repo_id": "AzureTRE", "token_count": 1053 }
138
import { Resource } from "./resource"; export interface Workspace extends Resource { workspaceURL: string }
AzureTRE/ui/app/src/models/workspace.ts/0
{ "file_path": "AzureTRE/ui/app/src/models/workspace.ts", "repo_id": "AzureTRE", "token_count": 28 }
139
# Relation Extraction on BC5CDR ## Data You can process the data by: ``` bash bash preprocess.sh ``` ## Training You can fine-tune the pre-trained BioGPT on the task by: ``` bash bash train.sh ``` ## Model Checkpoint We provide our fine-tuned model on the task. See [here](../../README.md#pre-trained-models) ## Infe...
BioGPT/examples/RE-BC5CDR/README.md/0
{ "file_path": "BioGPT/examples/RE-BC5CDR/README.md", "repo_id": "BioGPT", "token_count": 142 }
140
recursive-include 3rdparty/tvm * recursive-exclude 3rdparty/tvm/build * recursive-exclude 3rdparty/clang* * recursive-exclude 3rdparty/llvm* *
BitBLAS/MANIFEST.in/0
{ "file_path": "BitBLAS/MANIFEST.in", "repo_id": "BitBLAS", "token_count": 56 }
141
### Using BitBLAS from DSL ```python from bitblas.base.roller.policy import TensorCorePolicy, DefaultPolicy from bitblas.base.roller.arch import CUDA from bitblas.base.utils import apply_and_build @tvm.script.ir_module class MatmulNT: @T.prim_func def main(a: T.handle, b: T.handle, c: T.handle): T.func_...
BitBLAS/docs/ExtendOperatorsWithDSL.md/0
{ "file_path": "BitBLAS/docs/ExtendOperatorsWithDSL.md", "repo_id": "BitBLAS", "token_count": 3492 }
142
# coding=utf-8 # Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved. # # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX # and OPT implementations in this library. It has been modified from its # original forms to accommodate minor architectural differences compared # to G...
BitBLAS/integration/BitNet/configuration_bitnet.py/0
{ "file_path": "BitBLAS/integration/BitNet/configuration_bitnet.py", "repo_id": "BitBLAS", "token_count": 3674 }
143
please checkout https://github.com/kaleid-liner/fastertransformer_backend
BitBLAS/integration/fastertransformer/README.md/0
{ "file_path": "BitBLAS/integration/fastertransformer/README.md", "repo_id": "BitBLAS", "token_count": 21 }
144
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. from .default import DefaultPolicy from .tensorcore import TensorCorePolicy
BitBLAS/python/bitblas/base/roller/policy/__init__.py/0
{ "file_path": "BitBLAS/python/bitblas/base/roller/policy/__init__.py", "repo_id": "BitBLAS", "token_count": 36 }
145
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # pylint: disable=missing-docstring """A fallback schedule rule for GPU operators.""" from typing import List from tvm import tir from ..base import ScheduleRule, normalize_prim_func, try_inline class ElementWise(ScheduleRule): """ An...
BitBLAS/python/bitblas/gpu/element_wise.py/0
{ "file_path": "BitBLAS/python/bitblas/gpu/element_wise.py", "repo_id": "BitBLAS", "token_count": 1757 }
146
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import ctypes import operator from functools import reduce from logging import getLogger import torch import torch.nn as nn logger = getLogger(__name__) from typing import List, Union from bitblas.cache import global_operator_cache, get_datab...
BitBLAS/python/bitblas/module/__init__.py/0
{ "file_path": "BitBLAS/python/bitblas/module/__init__.py", "repo_id": "BitBLAS", "token_count": 5723 }
147
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. from .quantization import ( _tir_packed_int_to_int_convert, # noqa: F401 _tir_packed_to_signed_convert, # noqa: F401 _tir_packed_to_unsigned_convert, # noqa: F401 _tir_u32_to_f4_to_f16, # noqa: F401 _tir_packed_to_unsigned_...
BitBLAS/python/bitblas/quantization/__init__.py/0
{ "file_path": "BitBLAS/python/bitblas/quantization/__init__.py", "repo_id": "BitBLAS", "token_count": 179 }
148
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import pytest import bitblas from bitblas.ops.matmul import Matmul, MatmulConfig from bitblas.utils import auto_detect_nvidia_target target = auto_detect_nvidia_target() def get_codegen_result(ops, target): code = ops.get_source(target=targ...
BitBLAS/testing/python/operators/test_matmul_ops.py/0
{ "file_path": "BitBLAS/testing/python/operators/test_matmul_ops.py", "repo_id": "BitBLAS", "token_count": 3626 }
149
import os import copy import pytorch_lightning as pl import wandb import torch import time from pytorch_lightning.loggers import WandbLogger import os os.environ["NCCL_DEBUG"] = "INFO" from src.config import ex from src.modules import METERTransformerSS from src.modules import BTTransformer from src.datamodules.multit...
BridgeTower/run.py/0
{ "file_path": "BridgeTower/run.py", "repo_id": "BridgeTower", "token_count": 2024 }
150
date ; hostname ; pwd EXP_IS=288 EXP_PGB=32 EXP_PGEB=128 EXP_LR=1e-5 export MASTER_ADDR=node-0 export MASTER_PORT=19800 export NODE_RANK=$1 PREFIX_NAME="pt" echo $MASTER_ADDR, $MASTER_PORT, $NODE_RANK, $EXP_IS, $EXP_PGB, $EXP_PGEB, $EXP_LR TIME=$(date "+%Y%m%d%H%M") RUN_NAME=""$PREFIX_NAME"_"$EXP_IS"_"$EXP_PGB"_"...
BridgeTower/scripts/pre_train.sh/0
{ "file_path": "BridgeTower/scripts/pre_train.sh", "repo_id": "BridgeTower", "token_count": 299 }
151
from .vg_caption_dataset import VisualGenomeCaptionDataset from .coco_caption_karpathy_dataset import CocoCaptionKarpathyDataset from .f30k_caption_karpathy_dataset import F30KCaptionKarpathyDataset from .conceptual_caption_dataset import ConceptualCaptionDataset from .sbu_caption_dataset import SBUCaptionDataset from ...
BridgeTower/src/datasets/__init__.py/0
{ "file_path": "BridgeTower/src/datasets/__init__.py", "repo_id": "BridgeTower", "token_count": 168 }
152
# Copyright (c) Facebook, Inc. and its affiliates. # From https://github.com/facebookresearch/detectron2/blob/main/detectron2/utils/comm.py """ This file contains primitives for multi-gpu communication. This is useful when doing distributed training. """ import functools import numpy as np import torch import torch.d...
BridgeTower/src/modules/dist_utils.py/0
{ "file_path": "BridgeTower/src/modules/dist_utils.py", "repo_id": "BridgeTower", "token_count": 2222 }
153
import json import os import pandas as pd import pyarrow as pa import random from tqdm import tqdm from glob import glob from collections import defaultdict def path2rest(path, iid2captions, iid2split): name = path.split("/")[-1] with open(path, "rb") as fp: binary = fp.read() captions = iid2capt...
BridgeTower/src/utils/write_coco_karpathy.py/0
{ "file_path": "BridgeTower/src/utils/write_coco_karpathy.py", "repo_id": "BridgeTower", "token_count": 887 }
154
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import os import ntpath import time from . import util import scipy.misc try: from StringIO import StringIO # Python 2.7 except ImportError: from io import BytesIO # Python 3.x import torchvision.utils as vutils from tensorboardX impor...
Bringing-Old-Photos-Back-to-Life/Face_Enhancement/util/visualizer.py/0
{ "file_path": "Bringing-Old-Photos-Back-to-Life/Face_Enhancement/util/visualizer.py", "repo_id": "Bringing-Old-Photos-Back-to-Life", "token_count": 2392 }
155
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import os import functools from torch.autograd import Variable from util.image_pool import ImagePool from .base_model import BaseModel from . import networks im...
Bringing-Old-Photos-Back-to-Life/Global/models/NonLocal_feature_mapping_model.py/0
{ "file_path": "Bringing-Old-Photos-Back-to-Life/Global/models/NonLocal_feature_mapping_model.py", "repo_id": "Bringing-Old-Photos-Back-to-Life", "token_count": 3615 }
156
from . import clap from . import audio from . import htsat from . import config from . import pytorch_utils from . import htsat
CLAP/msclap/models/__init__.py/0
{ "file_path": "CLAP/msclap/models/__init__.py", "repo_id": "CLAP", "token_count": 39 }
157
.. role:: hidden :class: hidden-section .. module:: fairseq.data Data Loading and Utilities ========================== .. _datasets: Datasets -------- **Datasets** define the data format and provide helpers for creating mini-batches. .. autoclass:: fairseq.data.FairseqDataset :members: .. autoclass:: fair...
COCO-LM/fairseq/docs/data.rst/0
{ "file_path": "COCO-LM/fairseq/docs/data.rst", "repo_id": "COCO-LM", "token_count": 419 }
158
Tutorial: Simple LSTM ===================== In this tutorial we will extend fairseq by adding a new :class:`~fairseq.models.FairseqEncoderDecoderModel` that encodes a source sentence with an LSTM and then passes the final hidden state to a second LSTM that decodes the target sentence (without attention). This tutoria...
COCO-LM/fairseq/docs/tutorial_simple_lstm.rst/0
{ "file_path": "COCO-LM/fairseq/docs/tutorial_simple_lstm.rst", "repo_id": "COCO-LM", "token_count": 8622 }
159
#!/bin/bash # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. SPM_ENCODE=flores/scripts/spm_encode.py DATA=data_tmp SPM_MODEL=criss_checkpoints/sentence.bpe.model DICT=criss...
COCO-LM/fairseq/examples/criss/download_and_preprocess_tatoeba.sh/0
{ "file_path": "COCO-LM/fairseq/examples/criss/download_and_preprocess_tatoeba.sh", "repo_id": "COCO-LM", "token_count": 758 }
160
#!/bin/bash # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. echo 'Cloning Moses github repository (for tokenization scripts)...' git clone https://github.com/moses-smt/mosesdecoder.git SCR...
COCO-LM/fairseq/examples/joint_alignment_translation/prepare-wmt18en2de_no_norm_no_escape_no_agressive.sh/0
{ "file_path": "COCO-LM/fairseq/examples/joint_alignment_translation/prepare-wmt18en2de_no_norm_no_escape_no_agressive.sh", "repo_id": "COCO-LM", "token_count": 1526 }
161
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from fairseq.models import register_model, register_model_architecture from fairseq.models.multilingual_transformer import MultilingualTransfo...
COCO-LM/fairseq/examples/latent_depth/latent_depth_src/models/latent_multilingual_transformer.py/0
{ "file_path": "COCO-LM/fairseq/examples/latent_depth/latent_depth_src/models/latent_multilingual_transformer.py", "repo_id": "COCO-LM", "token_count": 1294 }
162
import argparse parser = argparse.ArgumentParser() parser.add_argument('--src', type=str, help='Source language') parser.add_argument('--tgt', type=str, help='Target language') parser.add_argument('--src-file', type=str, help='Input source file') parser.add_argument('--tgt-file', type=str, help='Input target file') pa...
COCO-LM/fairseq/examples/m2m_100/process_data/clean_histogram.py/0
{ "file_path": "COCO-LM/fairseq/examples/m2m_100/process_data/clean_histogram.py", "repo_id": "COCO-LM", "token_count": 846 }
163
# Multilingual Translation [[Multilingual Translation with Extensible Multilingual Pretraining and Finetuning, https://arxiv.org/abs/2008.00401]](https://arxiv.org/abs/2008.00401) ## Introduction This work is for training multilingual translation models with multiple bitext datasets. This multilingual translation fr...
COCO-LM/fairseq/examples/multilingual/README.md/0
{ "file_path": "COCO-LM/fairseq/examples/multilingual/README.md", "repo_id": "COCO-LM", "token_count": 2561 }
164
#!/bin/bash # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. if [ -z $WORKDIR_ROOT ] ; then echo "please specify your working directory root in environment variable...
COCO-LM/fairseq/examples/multilingual/data_scripts/download_wmt20.sh/0
{ "file_path": "COCO-LM/fairseq/examples/multilingual/data_scripts/download_wmt20.sh", "repo_id": "COCO-LM", "token_count": 11121 }
165
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os from fairseq import options from examples.noisychannel import rerank_options, rerank_utils def score_lm(args): using_nbest =...
COCO-LM/fairseq/examples/noisychannel/rerank_score_lm.py/0
{ "file_path": "COCO-LM/fairseq/examples/noisychannel/rerank_score_lm.py", "repo_id": "COCO-LM", "token_count": 1096 }
166
# Finetuning RoBERTa on a custom classification task This example shows how to finetune RoBERTa on the IMDB dataset, but should illustrate the process for most classification tasks. ### 1) Get the data ```bash wget http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz tar zxvf aclImdb_v1.tar.gz ``` ### 2)...
COCO-LM/fairseq/examples/roberta/README.custom_classification.md/0
{ "file_path": "COCO-LM/fairseq/examples/roberta/README.custom_classification.md", "repo_id": "COCO-LM", "token_count": 2196 }
167
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import json import os import tempfile import numpy as np import torch import torch.nn.functional as F from fairseq import utils from fairseq....
COCO-LM/fairseq/examples/roberta/wsc/wsc_task.py/0
{ "file_path": "COCO-LM/fairseq/examples/roberta/wsc/wsc_task.py", "repo_id": "COCO-LM", "token_count": 6705 }
168
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import Optional import requests from scorers import build_scorer class SimulSTEvaluationService(object): DEFAULT_HOSTNAME =...
COCO-LM/fairseq/examples/simultaneous_translation/eval/client.py/0
{ "file_path": "COCO-LM/fairseq/examples/simultaneous_translation/eval/client.py", "repo_id": "COCO-LM", "token_count": 1349 }
169
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import torch def exclusive_cumprod(tensor, dim: int, eps: float = 1e-10): """ Implementing exclusive cumprod. There is cumprod i...
COCO-LM/fairseq/examples/simultaneous_translation/utils/functions.py/0
{ "file_path": "COCO-LM/fairseq/examples/simultaneous_translation/utils/functions.py", "repo_id": "COCO-LM", "token_count": 1936 }
170
# @package _group_ defaults: - task: null - model: null hydra: run: dir: ${common_eval.results_path}/${dataset.gen_subset} sweep: dir: ${common_eval.results_path} subdir: ${dataset.gen_subset} common_eval: results_path: ${decoding.exp_dir}/decode/${decoding.decoder.name} path: ${decoding.e...
COCO-LM/fairseq/examples/speech_recognition/hydra/conf/infer.yaml/0
{ "file_path": "COCO-LM/fairseq/examples/speech_recognition/hydra/conf/infer.yaml", "repo_id": "COCO-LM", "token_count": 194 }
171
[[Back]](..) # S2T Example: Speech Translation (ST) on MuST-C [MuST-C](https://www.aclweb.org/anthology/N19-1202) is multilingual speech-to-text translation corpus with 8-language translations on English TED talks. We match the state-of-the-art performance in [ESPNet-ST](https://arxiv.org/pdf/2004.10234.pdf) with a s...
COCO-LM/fairseq/examples/speech_to_text/docs/mustc_example.md/0
{ "file_path": "COCO-LM/fairseq/examples/speech_to_text/docs/mustc_example.md", "repo_id": "COCO-LM", "token_count": 4426 }
172
# WMT 20 This page provides pointers to the models of Facebook-FAIR's WMT'20 news translation task submission [(Chen et al., 2020)](https://arxiv.org/abs/2011.08298). ## Single best MT models (after finetuning on part of WMT20 news dev set) Model | Description | Download ---|---|--- `transformer.wmt20.ta-en` | Ta->E...
COCO-LM/fairseq/examples/wmt20/README.md/0
{ "file_path": "COCO-LM/fairseq/examples/wmt20/README.md", "repo_id": "COCO-LM", "token_count": 2042 }
173
/** * Copyright 2017-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the license found in the * LICENSE file in the root directory of this source tree. */ #include "edit_dist.h" #include <THC/THC.h> #include <cuda.h> #include <cuda_runtime.h> #include <device_launch_parameters.h> ...
COCO-LM/fairseq/fairseq/clib/libnat_cuda/edit_dist.cu/0
{ "file_path": "COCO-LM/fairseq/fairseq/clib/libnat_cuda/edit_dist.cu", "repo_id": "COCO-LM", "token_count": 5172 }
174
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """isort:skip_file""" import importlib import os from fairseq import registry from fairseq.criterions.fairseq_criterion import ( # noqa ...
COCO-LM/fairseq/fairseq/criterions/__init__.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/criterions/__init__.py", "repo_id": "COCO-LM", "token_count": 351 }
175
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import math from dataclasses import dataclass, field from typing import List, Optional import torch import torch.nn.functional as F from fair...
COCO-LM/fairseq/fairseq/criterions/wav2vec_criterion.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/criterions/wav2vec_criterion.py", "repo_id": "COCO-LM", "token_count": 4184 }
176
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import bisect import numpy as np from torch.utils.data.dataloader import default_collate from . import FairseqDataset class ConcatDataset(...
COCO-LM/fairseq/fairseq/data/concat_dataset.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/data/concat_dataset.py", "repo_id": "COCO-LM", "token_count": 2203 }
177
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from dataclasses import dataclass, field from fairseq.data.encoders import register_bpe from fairseq.dataclass import FairseqDataclass from f...
COCO-LM/fairseq/fairseq/data/encoders/hf_byte_bpe.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/data/encoders/hf_byte_bpe.py", "repo_id": "COCO-LM", "token_count": 723 }
178
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from fairseq.data import Dictionary class MaskedLMDictionary(Dictionary): """ Dictionary for Masked Language Modelling tasks. This e...
COCO-LM/fairseq/fairseq/data/legacy/masked_lm_dictionary.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/data/legacy/masked_lm_dictionary.py", "repo_id": "COCO-LM", "token_count": 699 }
179
# 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 ...
COCO-LM/fairseq/fairseq/data/squad/basic_tokenizer.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/data/squad/basic_tokenizer.py", "repo_id": "COCO-LM", "token_count": 2029 }
180
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import logging import os import signal import threading from torch import nn logger = logging.getLogger(__name__) class DistributedTimeou...
COCO-LM/fairseq/fairseq/distributed/distributed_timeout_wrapper.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/distributed/distributed_timeout_wrapper.py", "repo_id": "COCO-LM", "token_count": 1304 }
181
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import copy import logging from typing import Dict, List import numpy as np import torch import torch.nn as nn import torch.nn.functional as ...
COCO-LM/fairseq/fairseq/models/bart/hub_interface.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/models/bart/hub_interface.py", "repo_id": "COCO-LM", "token_count": 3628 }
182
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from fairseq import utils from fairseq.models import ( FairseqLanguageModel, register_model, register_model_architecture, ) from f...
COCO-LM/fairseq/fairseq/models/lightconv_lm.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/models/lightconv_lm.py", "repo_id": "COCO-LM", "token_count": 5387 }
183
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import math from typing import Any, Dict, List, Optional, Tuple import torch import torch.nn as nn from fairseq import utils from fairseq.dis...
COCO-LM/fairseq/fairseq/models/transformer.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/models/transformer.py", "repo_id": "COCO-LM", "token_count": 23740 }
184
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ template <typename U, typename V> constexpr __host__ __device__ auto divUp(U a, V b) -> decltype(a + b) { return (a + b - 1)...
COCO-LM/fairseq/fairseq/modules/cuda_utils.cu/0
{ "file_path": "COCO-LM/fairseq/fairseq/modules/cuda_utils.cu", "repo_id": "COCO-LM", "token_count": 2367 }
185
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import torch import torch.nn as nn import torch.nn.functional as F class GumbelVectorQuantizer(nn.Module): def __init__( self, ...
COCO-LM/fairseq/fairseq/modules/gumbel_vector_quantizer.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/modules/gumbel_vector_quantizer.py", "repo_id": "COCO-LM", "token_count": 3467 }
186
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import torch import torch.nn as nn def quant_noise(module, p, block_size): """ Wraps modules and applies quantization noise to the w...
COCO-LM/fairseq/fairseq/modules/quant_noise.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/modules/quant_noise.py", "repo_id": "COCO-LM", "token_count": 1844 }
187
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import torch import torch.nn as nn import torch.nn.functional as F from ..ops import emulate_int class IntLinear(nn.Module): """ Qu...
COCO-LM/fairseq/fairseq/modules/quantization/scalar/modules/qlinear.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/modules/quantization/scalar/modules/qlinear.py", "repo_id": "COCO-LM", "token_count": 1588 }
188
# Originally from Microsoft Corporation. # Licensed under the MIT License. """ Wrapper for ngram_repeat_block cuda extension """ import torch from torch import nn import math from typing import Dict, List, Optional import warnings try: from fairseq import ngram_repeat_block_cuda EXTENSION_BUILT = True excep...
COCO-LM/fairseq/fairseq/ngram_repeat_block.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/ngram_repeat_block.py", "repo_id": "COCO-LM", "token_count": 2626 }
189
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import math from collections.abc import Collection from dataclasses import dataclass, field from typing import List from omegaconf import II ...
COCO-LM/fairseq/fairseq/optim/lr_scheduler/cosine_lr_scheduler.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/optim/lr_scheduler/cosine_lr_scheduler.py", "repo_id": "COCO-LM", "token_count": 2432 }
190
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from argparse import Namespace from typing import Union from fairseq.dataclass import FairseqDataclass from fairseq.dataclass.utils import po...
COCO-LM/fairseq/fairseq/registry.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/registry.py", "repo_id": "COCO-LM", "token_count": 1659 }
191
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import logging import os import numpy as np from fairseq import utils from fairseq.data import ( Dictionary, IdDataset, MaskToken...
COCO-LM/fairseq/fairseq/tasks/masked_lm.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/tasks/masked_lm.py", "repo_id": "COCO-LM", "token_count": 4534 }
192
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Train a network across multiple GPUs. """ import contextlib import logging import sys import time from argparse import Namespace from ite...
COCO-LM/fairseq/fairseq/trainer.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/trainer.py", "repo_id": "COCO-LM", "token_count": 26727 }
193
#include <torch/extension.h> #include <vector> #include <cassert> #include "compat.h" namespace { void compute_n1_n2( at::Tensor input, #ifdef VERSION_GE_1_1 at::IntArrayRef normalized_shape, #else at::IntList normalized_shape, #endif int& n1, int& n2) { int idiff = input.ndimension...
COCO-LM/fairseq/fused_ops/csrc/layernorm/interface.cpp/0
{ "file_path": "COCO-LM/fairseq/fused_ops/csrc/layernorm/interface.cpp", "repo_id": "COCO-LM", "token_count": 2939 }
194
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import argparse import contextlib import sys from collections import Counter from multiprocessing im...
COCO-LM/fairseq/preprocess/glue/multiprocessing_sp_encoder.py/0
{ "file_path": "COCO-LM/fairseq/preprocess/glue/multiprocessing_sp_encoder.py", "repo_id": "COCO-LM", "token_count": 482 }
195
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Count the number of documents and average number of lines and tokens per document in a large file. Documents should ...
COCO-LM/fairseq/scripts/count_docs.py/0
{ "file_path": "COCO-LM/fairseq/scripts/count_docs.py", "repo_id": "COCO-LM", "token_count": 803 }
196
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import functools import sys import unittest import torch from fairseq.distributed import utils as dist_utils from .utils import objects_are...
COCO-LM/fairseq/tests/distributed/test_utils.py/0
{ "file_path": "COCO-LM/fairseq/tests/distributed/test_utils.py", "repo_id": "COCO-LM", "token_count": 1912 }
197
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import contextlib import logging import os import tempfile import unittest from io import StringIO from unittest.mock import patch from fairs...
COCO-LM/fairseq/tests/test_checkpoint_utils.py/0
{ "file_path": "COCO-LM/fairseq/tests/test_checkpoint_utils.py", "repo_id": "COCO-LM", "token_count": 1976 }
198
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import argparse import logging import unittest import torch from fairseq.optim.adam import FairseqAdam from fairseq.optim.fp16_optimizer impo...
COCO-LM/fairseq/tests/test_memory_efficient_fp16.py/0
{ "file_path": "COCO-LM/fairseq/tests/test_memory_efficient_fp16.py", "repo_id": "COCO-LM", "token_count": 1313 }
199
datadir: /data/CMIP6/AWI-ESM name: 2m_temperature cmip_name: tas era_name: t2m run: r1i1p1f1 res: - 1.40625 # - 5.625
ClimaX/snakemake_configs/AWI-ESM/config_2m_temperature.yml/0
{ "file_path": "ClimaX/snakemake_configs/AWI-ESM/config_2m_temperature.yml", "repo_id": "ClimaX", "token_count": 68 }
200
datadir: /data/CMIP6/HAMMOZ name: specific_humidity cmip_name: hus era_name: q run: r1i1p1f1 version: v20190628 res: - 1.40625 # - 5.625
ClimaX/snakemake_configs/HAMMOZ/config_specific_humidity.yml/0
{ "file_path": "ClimaX/snakemake_configs/HAMMOZ/config_specific_humidity.yml", "repo_id": "ClimaX", "token_count": 70 }
201
datadir: /data/CMIP6/TaiESM1 server_prefix: https://esgf.ceda.ac.uk/thredds/fileServer/esg_cmip6/CMIP6/CMIP name: specific_humidity cmip_name: hus era_name: q run: r1i1p1f1 res: - 1.40625 # - 5.625
ClimaX/snakemake_configs/TaiESM1/config_specific_humidity.yml/0
{ "file_path": "ClimaX/snakemake_configs/TaiESM1/config_specific_humidity.yml", "repo_id": "ClimaX", "token_count": 102 }
202
import math import torch import torch.nn.functional as F from timm.models.layers.helpers import to_2tuple from torch import nn def _get_conv2d_weights( in_channels, out_channels, kernel_size, ): weight = torch.empty(out_channels, in_channels, *kernel_size) return weight def _get_conv2d_biases(o...
ClimaX/src/climax/parallelpatchembed.py/0
{ "file_path": "ClimaX/src/climax/parallelpatchembed.py", "repo_id": "ClimaX", "token_count": 1257 }
203
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import glob import os import click import numpy as np import xarray as xr from tqdm import tqdm from climax.utils.data_utils import DEFAULT_PRESSURE_LEVELS, NAME_TO_VAR HOURS_PER_YEAR = 8760 # 365-day year def nc2np(path, variables, years, ...
ClimaX/src/data_preprocessing/nc2np_equally_era5.py/0
{ "file_path": "ClimaX/src/data_preprocessing/nc2np_equally_era5.py", "repo_id": "ClimaX", "token_count": 3951 }
204
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import torch.nn as nn import torch.nn.functional as F import torch.nn.utils.spectral_norm as spectral_norm from models.networks.normalization import SPADE from util.util import vgg_preprocess class ResidualBlock(nn.Module): def __init__(sel...
CoCosNet-v2/models/networks/architecture.py/0
{ "file_path": "CoCosNet-v2/models/networks/architecture.py", "repo_id": "CoCosNet-v2", "token_count": 3586 }
205
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import torch from torchvision.utils import save_image import os import imageio import numpy as np import data from util.util import mkdir from options.test_options import TestOptions from models.pix2pix_model import Pix2PixModel if __name__ == ...
CoCosNet-v2/test.py/0
{ "file_path": "CoCosNet-v2/test.py", "repo_id": "CoCosNet-v2", "token_count": 802 }
206
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import os from data.pix2pix_dataset import Pix2pixDataset class FlickrDataset(Pix2pixDataset): @staticmethod def modify_commandline_options(parser, is_train): parser = Pix2pixDataset.modify_commandline_options(parser, is_train) ...
CoCosNet/data/flickr_dataset.py/0
{ "file_path": "CoCosNet/data/flickr_dataset.py", "repo_id": "CoCosNet", "token_count": 1203 }
207
# Code Documentation Generation This repo provides the code for reproducing the experiments on [CodeSearchNet](https://arxiv.org/abs/1909.09436) dataset for code document generation tasks in six programming languages. **!News: We release a new pipeline for this task. The new pipeline only needs 2 p100 GPUs and less t...
CodeBERT/CodeBERT/code2nl/README.md/0
{ "file_path": "CodeBERT/CodeBERT/code2nl/README.md", "repo_id": "CodeBERT", "token_count": 1583 }
208
# 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...
CodeBERT/CodeExecutor/inference/run.py/0
{ "file_path": "CodeBERT/CodeExecutor/inference/run.py", "repo_id": "CodeBERT", "token_count": 5702 }
209
git clone https://github.com/tree-sitter/tree-sitter-c git clone https://github.com/tree-sitter/tree-sitter-cpp git clone https://github.com/tree-sitter/tree-sitter-typescript git clone https://github.com/tree-sitter/tree-sitter-go git clone https://github.com/tree-sitter/tree-sitter-javascript git clone https://github...
CodeBERT/LongCoder/parser/build.sh/0
{ "file_path": "CodeBERT/LongCoder/parser/build.sh", "repo_id": "CodeBERT", "token_count": 209 }
210
# 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...
CodeBERT/UniXcoder/downstream-tasks/clone-detection/POJ-104/run.py/0
{ "file_path": "CodeBERT/UniXcoder/downstream-tasks/clone-detection/POJ-104/run.py", "repo_id": "CodeBERT", "token_count": 6739 }
211
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import os import glob import pickle import json import tiktoken from transformers import AutoTokenizer class CONSTANTS: # regular version for Codex api_benchmark = 'random_api' line_benchmark = 'random_line' # short version for C...
CodeT/RepoCoder/utils.py/0
{ "file_path": "CodeT/RepoCoder/utils.py", "repo_id": "CodeT", "token_count": 2719 }
212
# Codex CLI - Natural Language Command Line Interface This project uses [GPT-3 Codex](https://openai.com/blog/openai-codex/) to convert natural language commands into commands in PowerShell, Z shell and Bash. ![Codex Cli GIF](codex_cli.gif) The Command Line Interface (CLI) was the first major User Interface we used...
Codex-CLI/README.md/0
{ "file_path": "Codex-CLI/README.md", "repo_id": "Codex-CLI", "token_count": 2674 }
213
################################################ ## *** Codex CLI plugin function for Bash *** ## ## loaded by $HOME/.codexclirc ## ################################################ create_completion() { # Check settings in case the CLI has just been uninstalled # Note: CODEX_CLI_PATH is defined ...
Codex-CLI/scripts/bash_plugin.sh/0
{ "file_path": "Codex-CLI/scripts/bash_plugin.sh", "repo_id": "Codex-CLI", "token_count": 363 }
214
#!/usr/bin/env python # -*- coding: utf-8 -*- """ File: __init__.py Description: Python SDK of the Cognitive Face API. """ from . import face from . import face_list from . import large_face_list from . import large_face_list_face from . import large_person_group from . import large_person_group_person from . import l...
Cognitive-Face-Python/cognitive_face/__init__.py/0
{ "file_path": "Cognitive-Face-Python/cognitive_face/__init__.py", "repo_id": "Cognitive-Face-Python", "token_count": 150 }
215
#!/usr/bin/env python # -*- coding: utf-8 -*- """ File: test_large_person_group.py Description: Unittests for Large Person Group section of the Cognitive Face API. """ import uuid import unittest import cognitive_face as CF from . import util class TestLargePersonGroup(unittest.TestCase): """Unittests for ...
Cognitive-Face-Python/cognitive_face/tests/test_large_person_group.py/0
{ "file_path": "Cognitive-Face-Python/cognitive_face/tests/test_large_person_group.py", "repo_id": "Cognitive-Face-Python", "token_count": 1025 }
216
#!/usr/bin/env python # -*- coding: utf-8 -*- """ File: panel_group.py Description: Group Panel for Python SDK sample. """ import os import wx import wx.lib.scrolledpanel as scrolled import util import model from view import base class GroupPanel(base.MyPanel): """Group Panel.""" def __init__(self, parent...
Cognitive-Face-Python/sample/view/panel_group.py/0
{ "file_path": "Cognitive-Face-Python/sample/view/panel_group.py", "repo_id": "Cognitive-Face-Python", "token_count": 2168 }
217
export CUDA_VISIBLE_DEVICES=6 python t5_run_eval.py \ --model_name_or_path ./checkpoint/Mod/ContrastExp_finetune_set1_seed1/checkpoint-50000 \ --subtask Mod \ --validation_file test \ --ebatch_size 16 \ --set set1
ContextualSP/abstraction_probing/code/t5_code/Mod_ContrastExp_test.sh/0
{ "file_path": "ContextualSP/abstraction_probing/code/t5_code/Mod_ContrastExp_test.sh", "repo_id": "ContextualSP", "token_count": 85 }
218
import json import numpy as np from data_utils.task_def import TaskType, DataFormat import tasks def load_data(file_path, task_def): data_format = task_def.data_type task_type = task_def.task_type label_dict = task_def.label_vocab if task_type == TaskType.Ranking: assert data_format == DataFo...
ContextualSP/adaptershare/data_utils/__init__.py/0
{ "file_path": "ContextualSP/adaptershare/data_utils/__init__.py", "repo_id": "ContextualSP", "token_count": 1767 }
219
#!/usr/bin/env bash ############################### # Batch training script for domain adaptation. # Xiaodong ############################### declare -a SCITAIL=('scitail_001' 'scitail_01' 'scitail_1' 'scitail') ## Scitail for split in "${SCITAIL[@]}" do export CUDA_VISIBLE_DEVICES=0 if [ ${split} == "scit...
ContextualSP/adaptershare/experiments/domain_adaptation/run_batch.sh/0
{ "file_path": "ContextualSP/adaptershare/experiments/domain_adaptation/run_batch.sh", "repo_id": "ContextualSP", "token_count": 430 }
220
import os from sys import path path.append(os.getcwd()) from data_utils.task_def import DataFormat def load_conll_ner(file, is_train=True): rows = [] cnt = 0 sentence = [] label = [] with open(file, encoding="utf8") as f: for line in f: line = line.strip() if len(l...
ContextualSP/adaptershare/experiments/ner/ner_utils.py/0
{ "file_path": "ContextualSP/adaptershare/experiments/ner/ner_utils.py", "repo_id": "ContextualSP", "token_count": 1318 }
221
import torch.nn as nn from module.common import activation from module.dropout_wrapper import DropoutWrapper class Pooler(nn.Module): def __init__(self, hidden_size, dropout_p=0.1, actf="tanh"): super(Pooler, self).__init__() self.dense = nn.Linear(hidden_size, hidden_size) self.activation...
ContextualSP/adaptershare/module/pooler.py/0
{ "file_path": "ContextualSP/adaptershare/module/pooler.py", "repo_id": "ContextualSP", "token_count": 279 }
222
# coding=utf-8 # Copyright (c) Microsoft. All rights reserved. import yaml import os import numpy as np import argparse import json import sys from data_utils import load_data from data_utils.task_def import TaskType, DataFormat from data_utils.log_wrapper import create_logger from experiments.exp_def import TaskDefs f...
ContextualSP/adaptershare/prepro_std.py/0
{ "file_path": "ContextualSP/adaptershare/prepro_std.py", "repo_id": "ContextualSP", "token_count": 4224 }
223