text stringlengths 5 22M | id stringlengths 12 177 | metadata dict | __index_level_0__ int64 0 1.37k |
|---|---|---|---|
import unittest
from typing import cast
from injector import Injector
from decai.simulation.data.data_loader import DataLoader
from decai.simulation.data.fitness_data_loader import FitnessDataLoader, FitnessDataModule
from decai.simulation.logging_module import LoggingModule
class TestFitnessDataLoader(unittest.Tes... | 0xDeCA10B/simulation/decai/simulation/data/tests/test_fitness_data_loader.py/0 | {
"file_path": "0xDeCA10B/simulation/decai/simulation/data/tests/test_fitness_data_loader.py",
"repo_id": "0xDeCA10B",
"token_count": 437
} | 7 |
import unittest
from queue import PriorityQueue
from decai.simulation.simulate import Agent
class TestAgent(unittest.TestCase):
def test_queue(self):
q = PriorityQueue()
agents = [
Agent('a1', 10, 1, 1, 1),
Agent('a2', 10, 1, 1, 1),
Agent('a0', 10, 1, 1, 1),
... | 0xDeCA10B/simulation/decai/simulation/tests/test_simulation.py/0 | {
"file_path": "0xDeCA10B/simulation/decai/simulation/tests/test_simulation.py",
"repo_id": "0xDeCA10B",
"token_count": 231
} | 8 |
# Lab 6 - 学习使用调度管理系统
## 实验目的
以 [Microsoft Open Platform for AI (OpenPAI)](https://github.com/microsoft/pai) 为例,学习搭建并使用面向深度学习的异构计算集群调度与资源管理系统。
## 实验环境
本实验为分组实验,3~4 位同学一组,实验内容略有差别, 实验流程中将以 Alice, Bob, Carol, Dan 指代(3人组请忽略 Dan),每位同学的环境均为:
* Ubuntu 18.04 LTS
* NVIDIA GPU (已装好驱动)
* Docker Engine
* nvidia-container-runt... | AI-System/Labs/AdvancedLabs/Lab6/README.md/0 | {
"file_path": "AI-System/Labs/AdvancedLabs/Lab6/README.md",
"repo_id": "AI-System",
"token_count": 11006
} | 9 |
# MIT License
# Copyright (c) Microsoft Corporation.
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | AI-System/Labs/AdvancedLabs/Lab8/hpo/main.py/0 | {
"file_path": "AI-System/Labs/AdvancedLabs/Lab8/hpo/main.py",
"repo_id": "AI-System",
"token_count": 2889
} | 10 |
# Horovod
# Copyright 2018 Uber Technologies, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by ... | AI-System/Labs/BasicLabs/Lab4/pytorch_mnist_compress.py/0 | {
"file_path": "AI-System/Labs/BasicLabs/Lab4/pytorch_mnist_compress.py",
"repo_id": "AI-System",
"token_count": 3810
} | 11 |
# Docker部署PyTorch训练程序
用户使用Docker部署应用程序时,一般要先写Dockerfile,通过Dockerfile构建镜像,通过镜像启动容器。
我们通过以下实例展开以上流程。
## 构建Dockerfile
下面内容为我们所创建的Dockerfile中的内容,Docker会按顺序通过Dockerfile在构建阶段会执行了一系列Docker命令(FROM, RUN, WORKDIR, COPY, EXPOSE, CMD)和Linux Shell命令,我们通过注释介绍相应的命令功能。
```sh
# 继承自哪个基础镜像
FROM nvidia/cuda:10.1-cudnn7-devel
# 创建镜像中的... | AI-System/Labs/BasicLabs/Lab5/train.md/0 | {
"file_path": "AI-System/Labs/BasicLabs/Lab5/train.md",
"repo_id": "AI-System",
"token_count": 3123
} | 12 |
<!--Copyright © Microsoft Corporation. All rights reserved.
适用于[License](https://github.com/microsoft/AI-System/blob/main/LICENSE)版权许可-->
# 人工智能安全与隐私(AI Security and Privacy)
# 简介
随着人工智能系统在自动驾驶、人脸识别、推荐系统等领域的研究与应用,人工智能相关的安全与隐私问题也获得了广泛的关注和研究。一方面,人工智能输出的结果可能非常重要,会影响人身安全、财产安全、社会公平等;另一方面,人工智能系统的涉及到数据可能非常敏感,如人脸、浏览记录、社交... | AI-System/Textbook/第12章-人工智能安全与隐私/12-前言.md/0 | {
"file_path": "AI-System/Textbook/第12章-人工智能安全与隐私/12-前言.md",
"repo_id": "AI-System",
"token_count": 1335
} | 13 |
<!--Copyright © Microsoft Corporation. All rights reserved.
适用于[License](https://github.com/microsoft/AI-System/blob/main/LICENSE)版权许可-->
# 第2章 神经网络基础
## 简介
在本章中,我们将会简要叙述当前无论在学术界还是工业界都非常热门的深度学习的基础 —— 神经网络 —— 的基本知识。
根据读者的不同情况,可能会有以下三种情况:
- 熟悉神经网络的读者可以跳过本章的学习。
- 没有神经网络知识的读者,通过对以下内容的学习,可以了解神经网络的基本脉络。
- 想进一步深入了解更多... | AI-System/Textbook/第2章-神经网络基础/2-前言.md/0 | {
"file_path": "AI-System/Textbook/第2章-神经网络基础/2-前言.md",
"repo_id": "AI-System",
"token_count": 1445
} | 14 |
<!--Copyright © Microsoft Corporation. All rights reserved.
适用于[License](https://github.com/microsoft/AI-System/blob/main/LICENSE)版权许可-->
# 4.2 计算机体系结构与矩阵运算
前面一节我们了解到现在主流深度学习的一个核心计算模式就是矩阵运算,高效地支持矩阵运算便成了深度学习时代体系结构和性能优化的一个重要课题。我们知道,硬件的设计需要针对主流应用的特点仔细的考虑其计算、存储、并行度、功耗等等方面的配比,才能发挥其了优的性能。在本节中,我们以CPU为主来理解其基本体系结构、发展趋势和在支持深... | AI-System/Textbook/第4章-矩阵运算与计算机体系结构/4.2-计算机体系结构与矩阵运算.md/0 | {
"file_path": "AI-System/Textbook/第4章-矩阵运算与计算机体系结构/4.2-计算机体系结构与矩阵运算.md",
"repo_id": "AI-System",
"token_count": 6330
} | 15 |
<!--Copyright © Microsoft Corporation. All rights reserved.
适用于[License](https://github.com/microsoft/AI-System/blob/main/LICENSE)版权许可-->
# 深度学习的编译与优化 (Deep Learning Compliation and Optimization)
# 简介
随着深度学习的应用场景的不断泛化,深度学习计算任务也需要部署在不同的计算设备和硬件架构上;同时,实际部署或训练场景对性能往往也有着更为激进的要求,例如针对硬件特点定制计算代码。这些需求在通用的深度学习计算框架中已经难已得到满... | AI-System/Textbook/第5章-深度学习框架的编译与优化/5-前言.md/0 | {
"file_path": "AI-System/Textbook/第5章-深度学习框架的编译与优化/5-前言.md",
"repo_id": "AI-System",
"token_count": 956
} | 16 |
<!--Copyright © Microsoft Corporation. All rights reserved.
适用于[License](https://github.com/microsoft/AI-System/blob/main/LICENSE)版权许可-->
# 6.1 分布式深度学习计算简介
- [6.1 分布式深度学习计算简介](#61-分布式深度学习计算简介)
- [6.1.1 串行计算到并行计算的演进](#611-串行计算到并行计算的演进)
- [6.1.2 并行计算加速定律](#612-并行计算加速定律)
- [6.1.3 深度学习的并行化训练](#613-深度学习的并行化训练)
-... | AI-System/Textbook/第6章-分布式训练算法与系统/6.1-分布式深度学习计算简介.md/0 | {
"file_path": "AI-System/Textbook/第6章-分布式训练算法与系统/6.1-分布式深度学习计算简介.md",
"repo_id": "AI-System",
"token_count": 9254
} | 17 |
<!--Copyright © Microsoft Corporation. All rights reserved.
适用于[License](https://github.com/microsoft/AI-System/blob/main/LICENSE)版权许可-->
# 7.5 存储
<center> <img src="./img/5/7-5-10-storagerelated.png" /></center>
<center>图 7.5.1 平台存储 </center>
在之前的章节,我们已经介绍面向深度学习的集群管理系统的运行时与调度。如图 7.5.1,本章将围绕平台中的存储,文件系统来展开。计算,存储与网络... | AI-System/Textbook/第7章-异构计算集群调度与资源管理系统/7.5-存储.md/0 | {
"file_path": "AI-System/Textbook/第7章-异构计算集群调度与资源管理系统/7.5-存储.md",
"repo_id": "AI-System",
"token_count": 22868
} | 18 |
param (
[string] $resourceGroupName,
[string] $tagId,
[string] $deploymentId
)
$projectTags = New-Object 'System.Collections.Generic.Dictionary[String,String]'
$projectTags.Add($tagId, $deploymentId)
function UpdateLoop
{
param( [int]$maxIterations, $resource )
$success = $false
$iterator = ... | AI/.ci/scripts/SetResource.ps1/0 | {
"file_path": "AI/.ci/scripts/SetResource.ps1",
"repo_id": "AI",
"token_count": 958
} | 19 |
parameters:
Agent: Hosted Ubuntu 1604
Demands: "python3"
jobTimeoutInMinutes: 180
jobDisplayName: 'defaultDisplayName'
TridentWorkloadTypeShort: #
DeployLocation: #
DefaultWorkingDirectory: #
Template: #
ProjectLocation: #
PythonPath: #
workload_vars: #
doCleanup: True
flighting_release: tru... | AI/.ci/stages/deploy_notebooks_stages_v2.yml/0 | {
"file_path": "AI/.ci/stages/deploy_notebooks_stages_v2.yml",
"repo_id": "AI",
"token_count": 3172
} | 20 |
parameters:
azureSubscription: ''
azure_subscription: ''
location: submodules/DeployMLModelKubernetes/{{cookiecutter.project_name}}
azureresourcegroup: dciborowhp
workspacename: dciborowhpws
azureregion: westus2
aksimagename: dciborowhpaks
aks_name: dciborowhpaks
aks_service_name: myimage
conda: a... | AI/.ci/steps/az-ml-realtime-score.yml/0 | {
"file_path": "AI/.ci/steps/az-ml-realtime-score.yml",
"repo_id": "AI",
"token_count": 638
} | 21 |
parameters:
template: ''
azureSubscription: 'x'
azure_subscription: 'x'
azureresourcegroup: 'x'
workspacename: 'x'
azureregion: 'x'
aksimagename: 'x'
aks_name: "mlaks"
location: "" #Root Dir of Project
python_path: "" #Root Dir of Python Env
cluster_name: "-"
flighting_release: false
flighti... | AI/.ci/steps/deploy_notebook_steps_v2.yml/0 | {
"file_path": "AI/.ci/steps/deploy_notebook_steps_v2.yml",
"repo_id": "AI",
"token_count": 730
} | 22 |
variables:
azure_subscription: 0ca618d2-22a8-413a-96d0-0f1b531129c3
azureSubscription: AG-AzureCAT-AIDevOps-Test-COGSNonProd-IO1685734(0ca618d2-22a8-413a-96d0-0f1b531129c3)
| AI/.ci/vars/agce_devops_sub_vars.yml/0 | {
"file_path": "AI/.ci/vars/agce_devops_sub_vars.yml",
"repo_id": "AI",
"token_count": 98
} | 23 |
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"delegateIdentity": {
"type": "bool",
"defaultValue": false
},
"identityName": {
"type": "string"
},
"location": {
"type": "strin... | AI/AzureDeployment/Identity/Identity.json/0 | {
"file_path": "AI/AzureDeployment/Identity/Identity.json",
"repo_id": "AI",
"token_count": 1090
} | 24 |
import sys
sys.path += ['../']
import torch
import os
import faiss
from utils.util import (
barrier_array_merge,
convert_to_string_id,
is_first_worker,
StreamingDataset,
EmbeddingCache,
get_checkpoint_no,
get_latest_ann_data
)
import csv
import copy
import transformers
from transformers impo... | ANCE/drivers/run_ann_data_gen.py/0 | {
"file_path": "ANCE/drivers/run_ann_data_gen.py",
"repo_id": "ANCE",
"token_count": 10146
} | 25 |
import sys
sys.path += ['../']
import torch
from torch import nn
from transformers import (
RobertaConfig,
RobertaModel,
RobertaForSequenceClassification,
RobertaTokenizer,
BertModel,
BertTokenizer,
BertConfig
)
import torch.nn.functional as F
from data.process_fn import triple_process_fn, t... | ANCE/model/models.py/0 | {
"file_path": "ANCE/model/models.py",
"repo_id": "ANCE",
"token_count": 5742
} | 26 |
"""
Code for self-training with weak supervision.
Author: Giannis Karamanolakis (gkaraman@cs.columbia.edu)
"""
import argparse
import json
import logging
import os
import glob
from os.path import expanduser
from pathlib import Path
import numpy as np
import random
import shutil
import torch
import joblib
from Logger i... | ASTRA/astra/main.py/0 | {
"file_path": "ASTRA/astra/main.py",
"repo_id": "ASTRA",
"token_count": 6404
} | 27 |
[
{
"tripleset": [
[
"Hawaii Five-O",
"NOTES",
"Episode: The Flight of the Jewels"
],
[
"[TABLECONTEXT]",
"[TITLE]",
"Jeff Daniels"
],
[
"[TABLECONTEXT]",
"TITLE",
"Hawaii Five-O"
]
],
"subtree_was_... | AdaMix/NLG/data/dart/dart-v1.1.1-full-test.json/0 | {
"file_path": "AdaMix/NLG/data/dart/dart-v1.1.1-full-test.json",
"repo_id": "AdaMix",
"token_count": 2528812
} | 28 |
# ------------------------------------------------------------------------------------------
# Copyright (c). All rights reserved.
# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
# -----------------------------------------------------------------------------------------... | AdaMix/NLG/src/encoder.py/0 | {
"file_path": "AdaMix/NLG/src/encoder.py",
"repo_id": "AdaMix",
"token_count": 2230
} | 29 |
#version: 0.2
Ġ t
Ġ a
h e
i n
r e
o n
Ġt he
e r
Ġ s
a t
Ġ w
Ġ o
e n
Ġ c
i t
i s
a n
o r
e s
Ġ b
e d
Ġ f
in g
Ġ p
o u
Ġa n
a l
a r
Ġt o
Ġ m
Ġo f
Ġ in
Ġ d
Ġ h
Ġan d
i c
a s
l e
Ġt h
i on
o m
l l
en t
Ġ n
Ġ l
s t
Ġ re
v e
Ġ e
r o
l y
Ġb e
Ġ g
Ġ T
c t
Ġ S
i d
o t
Ġ I
u t
e t
Ġ A
Ġ is
Ġ on
i m
a m
o w
a y
a d
s e
Ġth at
Ġ C... | AdaMix/NLG/vocab/vocab.bpe/0 | {
"file_path": "AdaMix/NLG/vocab/vocab.bpe",
"repo_id": "AdaMix",
"token_count": 246078
} | 30 |
FROM ubuntu:18.04
LABEL maintainer="Hugging Face"
LABEL repository="transformers"
RUN apt update && \
apt install -y bash \
build-essential \
git \
curl \
ca-certificates \
python3 \
python3-pip && \
... | AdaMix/docker/transformers-tensorflow-cpu/Dockerfile/0 | {
"file_path": "AdaMix/docker/transformers-tensorflow-cpu/Dockerfile",
"repo_id": "AdaMix",
"token_count": 303
} | 31 |
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | AdaMix/docs/source/conf.py/0 | {
"file_path": "AdaMix/docs/source/conf.py",
"repo_id": "AdaMix",
"token_count": 1933
} | 32 |
..
Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by ... | AdaMix/docs/source/main_classes/output.rst/0 | {
"file_path": "AdaMix/docs/source/main_classes/output.rst",
"repo_id": "AdaMix",
"token_count": 2514
} | 33 |
..
Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by ... | AdaMix/docs/source/model_doc/camembert.rst/0 | {
"file_path": "AdaMix/docs/source/model_doc/camembert.rst",
"repo_id": "AdaMix",
"token_count": 1336
} | 34 |
..
Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by ... | AdaMix/docs/source/model_doc/ibert.rst/0 | {
"file_path": "AdaMix/docs/source/model_doc/ibert.rst",
"repo_id": "AdaMix",
"token_count": 931
} | 35 |
..
Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by ... | AdaMix/docs/source/model_doc/retribert.rst/0 | {
"file_path": "AdaMix/docs/source/model_doc/retribert.rst",
"repo_id": "AdaMix",
"token_count": 486
} | 36 |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | AdaMix/examples/benchmarking/plot_csv_file.py/0 | {
"file_path": "AdaMix/examples/benchmarking/plot_csv_file.py",
"repo_id": "AdaMix",
"token_count": 2909
} | 37 |
import argparse
import glob
import logging
import os
import time
from argparse import Namespace
import numpy as np
import torch
from torch.utils.data import DataLoader, TensorDataset
from lightning_base import BaseTransformer, add_generic_args, generic_train
from transformers import glue_compute_metrics as compute_me... | AdaMix/examples/legacy/pytorch-lightning/run_glue.py/0 | {
"file_path": "AdaMix/examples/legacy/pytorch-lightning/run_glue.py",
"repo_id": "AdaMix",
"token_count": 3457
} | 38 |
#!/usr/bin/env python
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | AdaMix/examples/legacy/seq2seq/download_wmt.py/0 | {
"file_path": "AdaMix/examples/legacy/seq2seq/download_wmt.py",
"repo_id": "AdaMix",
"token_count": 1020
} | 39 |
#!/usr/bin/env python
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | AdaMix/examples/legacy/seq2seq/run_eval.py/0 | {
"file_path": "AdaMix/examples/legacy/seq2seq/run_eval.py",
"repo_id": "AdaMix",
"token_count": 2757
} | 40 |
<!---
Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ... | AdaMix/examples/multiple-choice/README.md/0 | {
"file_path": "AdaMix/examples/multiple-choice/README.md",
"repo_id": "AdaMix",
"token_count": 641
} | 41 |
# 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... | AdaMix/examples/research_projects/adversarial/utils_hans.py/0 | {
"file_path": "AdaMix/examples/research_projects/adversarial/utils_hans.py",
"repo_id": "AdaMix",
"token_count": 5441
} | 42 |
import os
from collections import deque
import torch
from torch.utils.data import Dataset
# ------------
# Data loading
# ------------
class CNNDMDataset(Dataset):
"""Abstracts the dataset used to train seq2seq models.
The class will process the documents that are located in the specified
folder. The ... | AdaMix/examples/research_projects/bertabs/utils_summarization.py/0 | {
"file_path": "AdaMix/examples/research_projects/bertabs/utils_summarization.py",
"repo_id": "AdaMix",
"token_count": 2180
} | 43 |
# coding=utf-8
# Copyright 2019-present, the HuggingFace Inc. team and Facebook, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | AdaMix/examples/research_projects/distillation/grouped_batch_sampler.py/0 | {
"file_path": "AdaMix/examples/research_projects/distillation/grouped_batch_sampler.py",
"repo_id": "AdaMix",
"token_count": 1759
} | 44 |
import datasets
import numpy as np
import streamlit as st
import torch
from elasticsearch import Elasticsearch
import faiss
import transformers
from eli5_utils import (
embed_questions_for_retrieval,
make_qa_s2s_model,
qa_s2s_generate,
query_es_index,
query_qa_dense_index,
)
from transformers impor... | AdaMix/examples/research_projects/longform-qa/eli5_app.py/0 | {
"file_path": "AdaMix/examples/research_projects/longform-qa/eli5_app.py",
"repo_id": "AdaMix",
"token_count": 5824
} | 45 |
# coding=utf-8
# Copyright (c) Facebook, Inc. and its affiliates.
# Copyright (c) HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | AdaMix/examples/research_projects/mm-imdb/run_mmimdb.py/0 | {
"file_path": "AdaMix/examples/research_projects/mm-imdb/run_mmimdb.py",
"repo_id": "AdaMix",
"token_count": 10080
} | 46 |
"""
A script creating a RAG checkpoint from a generator and a question encoder checkpoints.
"""
import argparse
from pathlib import Path
from transformers import AutoConfig, AutoTokenizer, RagConfig, RagSequenceForGeneration, RagTokenForGeneration
def consolidate(
model_type,
generator_name_or_path: str,
... | AdaMix/examples/research_projects/rag/consolidate_rag_checkpoint.py/0 | {
"file_path": "AdaMix/examples/research_projects/rag/consolidate_rag_checkpoint.py",
"repo_id": "AdaMix",
"token_count": 1389
} | 47 |
import tempfile
import unittest
from make_student import create_student_by_copying_alternating_layers
from transformers import AutoConfig
from transformers.file_utils import cached_property
from transformers.testing_utils import require_torch
TINY_BART = "sshleifer/bart-tiny-random"
TINY_T5 = "patrickvonplaten/t5-ti... | AdaMix/examples/research_projects/seq2seq-distillation/_test_make_student.py/0 | {
"file_path": "AdaMix/examples/research_projects/seq2seq-distillation/_test_make_student.py",
"repo_id": "AdaMix",
"token_count": 659
} | 48 |
### Saved Pseudo-Labels
These are the generations of various large models on various large **training** sets. All in all they took about 200 GPU hours to produce.
### Available Pseudo-labels
| Dataset | Model | Link ... | AdaMix/examples/research_projects/seq2seq-distillation/precomputed_pseudo_labels.md/0 | {
"file_path": "AdaMix/examples/research_projects/seq2seq-distillation/precomputed_pseudo_labels.md",
"repo_id": "AdaMix",
"token_count": 1861
} | 49 |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE... | AdaMix/examples/text-classification/run_tf_text_classification.py/0 | {
"file_path": "AdaMix/examples/text-classification/run_tf_text_classification.py",
"repo_id": "AdaMix",
"token_count": 4473
} | 50 |
#!/usr/bin/env bash
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | AdaMix/scripts/fsmt/convert-allenai-wmt19.sh/0 | {
"file_path": "AdaMix/scripts/fsmt/convert-allenai-wmt19.sh",
"repo_id": "AdaMix",
"token_count": 950
} | 51 |
[isort]
default_section = FIRSTPARTY
ensure_newline_before_comments = True
force_grid_wrap = 0
include_trailing_comma = True
known_first_party = transformers
known_third_party =
absl
conllu
datasets
elasticsearch
fairseq
faiss-cpu
fastprogress
fire
fugashi
git
h5py
matplo... | AdaMix/setup.cfg/0 | {
"file_path": "AdaMix/setup.cfg",
"repo_id": "AdaMix",
"token_count": 355
} | 52 |
"""
Implementation of a custom transfer agent for the transfer type "multipart" for git-lfs.
Inspired by: github.com/cbartz/git-lfs-swift-transfer-agent/blob/master/git_lfs_swift_transfer.py
Spec is: github.com/git-lfs/git-lfs/blob/master/docs/custom-transfers.md
To launch debugger while developing:
``` [lfs "cust... | AdaMix/src/transformers/commands/lfs.py/0 | {
"file_path": "AdaMix/src/transformers/commands/lfs.py",
"repo_id": "AdaMix",
"token_count": 3329
} | 53 |
# 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... | AdaMix/src/transformers/data/processors/xnli.py/0 | {
"file_path": "AdaMix/src/transformers/data/processors/xnli.py",
"repo_id": "AdaMix",
"token_count": 1395
} | 54 |
# coding=utf-8
# Copyright 2018 The Google Flax Team Authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | AdaMix/src/transformers/modeling_flax_utils.py/0 | {
"file_path": "AdaMix/src/transformers/modeling_flax_utils.py",
"repo_id": "AdaMix",
"token_count": 8244
} | 55 |
# coding=utf-8
# Copyright 2018 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | AdaMix/src/transformers/models/auto/tokenization_auto.py/0 | {
"file_path": "AdaMix/src/transformers/models/auto/tokenization_auto.py",
"repo_id": "AdaMix",
"token_count": 7872
} | 56 |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICEN... | AdaMix/src/transformers/models/bert/tokenization_bert.py/0 | {
"file_path": "AdaMix/src/transformers/models/bert/tokenization_bert.py",
"repo_id": "AdaMix",
"token_count": 11112
} | 57 |
# coding=utf-8
# Copyright 2019-present, the HuggingFace Inc. team, The Google AI Language Team and Facebook, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | AdaMix/src/transformers/models/distilbert/configuration_distilbert.py/0 | {
"file_path": "AdaMix/src/transformers/models/distilbert/configuration_distilbert.py",
"repo_id": "AdaMix",
"token_count": 2550
} | 58 |
# coding=utf-8
# Copyright 2020 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | AdaMix/src/transformers/models/funnel/tokenization_funnel.py/0 | {
"file_path": "AdaMix/src/transformers/models/funnel/tokenization_funnel.py",
"repo_id": "AdaMix",
"token_count": 2333
} | 59 |
# coding=utf-8
# Copyright 2021 Iz Beltagy, Matthew E. Peters, Arman Cohan and The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://w... | AdaMix/src/transformers/models/led/tokenization_led_fast.py/0 | {
"file_path": "AdaMix/src/transformers/models/led/tokenization_led_fast.py",
"repo_id": "AdaMix",
"token_count": 715
} | 60 |
# coding=utf-8
# Copyright 2021 The Fairseq Authors and The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/... | AdaMix/src/transformers/models/m2m_100/modeling_m2m_100.py/0 | {
"file_path": "AdaMix/src/transformers/models/m2m_100/modeling_m2m_100.py",
"repo_id": "AdaMix",
"token_count": 26418
} | 61 |
# coding=utf-8
# Copyright (c) Facebook, Inc. and its affiliates.
# Copyright (c) HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | AdaMix/src/transformers/models/mmbt/modeling_mmbt.py/0 | {
"file_path": "AdaMix/src/transformers/models/mmbt/modeling_mmbt.py",
"repo_id": "AdaMix",
"token_count": 7783
} | 62 |
# coding=utf-8
# Copyright 2020 The Microsoft Authors and The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... | AdaMix/src/transformers/models/prophetnet/configuration_prophetnet.py/0 | {
"file_path": "AdaMix/src/transformers/models/prophetnet/configuration_prophetnet.py",
"repo_id": "AdaMix",
"token_count": 3415
} | 63 |
# coding=utf-8
# Copyright 2019-present, the HuggingFace Inc. team, The Google AI Language Team and Facebook, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | AdaMix/src/transformers/models/retribert/configuration_retribert.py/0 | {
"file_path": "AdaMix/src/transformers/models/retribert/configuration_retribert.py",
"repo_id": "AdaMix",
"token_count": 2010
} | 64 |
# coding=utf-8
# Copyright 2018 T5 Authors and HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | AdaMix/src/transformers/models/t5/tokenization_t5.py/0 | {
"file_path": "AdaMix/src/transformers/models/t5/tokenization_t5.py",
"repo_id": "AdaMix",
"token_count": 5328
} | 65 |
# coding=utf-8
# Copyright 2021 The Fairseq Authors and the HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/... | AdaMix/src/transformers/models/wav2vec2/modeling_wav2vec2.py/0 | {
"file_path": "AdaMix/src/transformers/models/wav2vec2/modeling_wav2vec2.py",
"repo_id": "AdaMix",
"token_count": 20094
} | 66 |
# flake8: noqa
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all.
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | AdaMix/src/transformers/models/xlnet/__init__.py/0 | {
"file_path": "AdaMix/src/transformers/models/xlnet/__init__.py",
"repo_id": "AdaMix",
"token_count": 1597
} | 67 |
import uuid
from typing import Any, Dict, List, Optional, Union
from ..file_utils import add_end_docstrings, is_tf_available, is_torch_available
from ..utils import logging
from .base import PIPELINE_INIT_ARGS, Pipeline
if is_tf_available():
import tensorflow as tf
if is_torch_available():
import torch
lo... | AdaMix/src/transformers/pipelines/conversational.py/0 | {
"file_path": "AdaMix/src/transformers/pipelines/conversational.py",
"repo_id": "AdaMix",
"token_count": 6364
} | 68 |
# coding=utf-8
# Copyright 2020 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | AdaMix/src/transformers/tokenization_utils_fast.py/0 | {
"file_path": "AdaMix/src/transformers/tokenization_utils_fast.py",
"repo_id": "AdaMix",
"token_count": 9710
} | 69 |
Currently the following model proposals are available:
- <s>[BigBird (Google)](./ADD_BIG_BIRD.md)</s>
| AdaMix/templates/adding_a_new_model/open_model_proposals/README.md/0 | {
"file_path": "AdaMix/templates/adding_a_new_model/open_model_proposals/README.md",
"repo_id": "AdaMix",
"token_count": 34
} | 70 |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | AdaMix/tests/test_activations.py/0 | {
"file_path": "AdaMix/tests/test_activations.py",
"repo_id": "AdaMix",
"token_count": 573
} | 71 |
import time
import unittest
from transformers import is_torch_available
from transformers.testing_utils import require_torch, torch_device
from .test_modeling_common import ids_tensor
if is_torch_available():
import torch
from transformers.generation_stopping_criteria import (
MaxLengthCriteria,
... | AdaMix/tests/test_generation_stopping_criteria.py/0 | {
"file_path": "AdaMix/tests/test_generation_stopping_criteria.py",
"repo_id": "AdaMix",
"token_count": 1043
} | 72 |
# coding=utf-8
# Copyright 2019 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | AdaMix/tests/test_modeling_common.py/0 | {
"file_path": "AdaMix/tests/test_modeling_common.py",
"repo_id": "AdaMix",
"token_count": 26881
} | 73 |
# coding=utf-8
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | AdaMix/tests/test_modeling_ibert.py/0 | {
"file_path": "AdaMix/tests/test_modeling_ibert.py",
"repo_id": "AdaMix",
"token_count": 14256
} | 74 |
# coding=utf-8
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | AdaMix/tests/test_modeling_roberta.py/0 | {
"file_path": "AdaMix/tests/test_modeling_roberta.py",
"repo_id": "AdaMix",
"token_count": 9523
} | 75 |
# coding=utf-8
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | AdaMix/tests/test_modeling_tf_distilbert.py/0 | {
"file_path": "AdaMix/tests/test_modeling_tf_distilbert.py",
"repo_id": "AdaMix",
"token_count": 4288
} | 76 |
# coding=utf-8
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | AdaMix/tests/test_modeling_tf_pytorch.py/0 | {
"file_path": "AdaMix/tests/test_modeling_tf_pytorch.py",
"repo_id": "AdaMix",
"token_count": 4535
} | 77 |
# coding=utf-8
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | AdaMix/tests/test_optimization.py/0 | {
"file_path": "AdaMix/tests/test_optimization.py",
"repo_id": "AdaMix",
"token_count": 3018
} | 78 |
# Copyright 2021 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | AdaMix/tests/test_processor_wav2vec2.py/0 | {
"file_path": "AdaMix/tests/test_processor_wav2vec2.py",
"repo_id": "AdaMix",
"token_count": 2362
} | 79 |
# coding=utf-8
# Copyright 2018 Microsoft, the Hugging Face Team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | AdaMix/tests/test_tokenization_deberta.py/0 | {
"file_path": "AdaMix/tests/test_tokenization_deberta.py",
"repo_id": "AdaMix",
"token_count": 1171
} | 80 |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | AdaMix/tests/test_tokenization_pegasus.py/0 | {
"file_path": "AdaMix/tests/test_tokenization_pegasus.py",
"repo_id": "AdaMix",
"token_count": 1749
} | 81 |
# coding=utf-8
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | AdaMix/tests/test_tokenization_xlm_roberta.py/0 | {
"file_path": "AdaMix/tests/test_tokenization_xlm_roberta.py",
"repo_id": "AdaMix",
"token_count": 3924
} | 82 |
import os
import sys
import json
import torch
from collections import OrderedDict
if __name__ == "__main__":
input_path = sys.argv[1]
output_path = sys.argv[2]
model = torch.load(input_path)
lora = OrderedDict()
for name, value in model.items():
new_name = name.replace('self.query_lora_a.w... | AdaMix/utils/convert.py/0 | {
"file_path": "AdaMix/utils/convert.py",
"repo_id": "AdaMix",
"token_count": 318
} | 83 |
from argparse import ArgumentParser
import subprocess
class DockerImageBuilder:
def __init__(self, args):
self.args = args
def build_docker_image(self):
# if a base image is not specified, we use the Ubuntu 18, CUDA 10 image from NVIDIA
docker_build_command = [
"docker",
... | AirSim-Drone-Racing-Lab/docker/build_docker_image.py/0 | {
"file_path": "AirSim-Drone-Racing-Lab/docker/build_docker_image.py",
"repo_id": "AirSim-Drone-Racing-Lab",
"token_count": 695
} | 84 |
from __future__ import division
import random
import math
import time
import numpy as np
import threading
import os,sys
import airsimdroneracingvae
import airsimdroneracingvae.types
import airsimdroneracingvae.utils
# import utils
curr_dir = os.path.dirname(os.path.abspath(__file__))
import_path = os.path.join(curr_di... | AirSim-Drone-Racing-VAE-Imitation/datagen/action_generator/soccer_datagen.py/0 | {
"file_path": "AirSim-Drone-Racing-VAE-Imitation/datagen/action_generator/soccer_datagen.py",
"repo_id": "AirSim-Drone-Racing-VAE-Imitation",
"token_count": 8556
} | 85 |
import tensorflow as tf
from tensorflow.keras import Model
from tensorflow.keras.layers import Dense, Flatten, Conv2D, BatchNormalization, Lambda, Concatenate, Conv2DTranspose, Reshape, ReLU
class Dronet(Model):
def __init__(self, num_outputs, include_top=True):
super(Dronet, self).__init__()
self.... | AirSim-Drone-Racing-VAE-Imitation/racing_models/dronet.py/0 | {
"file_path": "AirSim-Drone-Racing-VAE-Imitation/racing_models/dronet.py",
"repo_id": "AirSim-Drone-Racing-VAE-Imitation",
"token_count": 2083
} | 86 |
# Competition Guidelines
The challenge aims to encourage the NeurIPS research community to push the boundaries of building competitive autonomous systems through head-to-head drone races. To broaden the audience and bring people from different disciplines to drones, all racing will be done in simulation.
## Challenge D... | AirSim-NeurIPS2019-Drone-Racing/docs/competition_guidelines.md/0 | {
"file_path": "AirSim-NeurIPS2019-Drone-Racing/docs/competition_guidelines.md",
"repo_id": "AirSim-NeurIPS2019-Drone-Racing",
"token_count": 3194
} | 87 |
# Changelog
## Unreleased
- Initial commit
([#315](https://github.com/microsoft/ApplicationInsights-Python/pull/315))
| ApplicationInsights-Python/azure-monitor-events-extension/CHANGELOG.md/0 | {
"file_path": "ApplicationInsights-Python/azure-monitor-events-extension/CHANGELOG.md",
"repo_id": "ApplicationInsights-Python",
"token_count": 41
} | 88 |
[tool.black]
line-length = 79
exclude = '''
(
/( # generated files
.github|
.tox|
.vscode|
venv|
.*/build/lib/.*|
scripts|
azure-monitor-opentelemetry/azure/monitor/opentelemetry/_vendor|
)/
)
'''
| ApplicationInsights-Python/pyproject.toml/0 | {
"file_path": "ApplicationInsights-Python/pyproject.toml",
"repo_id": "ApplicationInsights-Python",
"token_count": 113
} | 89 |
from distutils.util import strtobool
import logging
import datetime
import uuid
import json
import re
import os
import azure.functions as func
from shared_code import constants
from shared_code.blob_operations import get_blob_info_from_topic_and_subject, get_blob_client_from_blob_info
def main(msg: func.ServiceBusM... | AzureTRE/airlock_processor/BlobCreatedTrigger/__init__.py/0 | {
"file_path": "AzureTRE/airlock_processor/BlobCreatedTrigger/__init__.py",
"repo_id": "AzureTRE",
"token_count": 1705
} | 90 |
import os
import logging
import json
import re
from datetime import datetime, timedelta
from typing import Tuple
from azure.core.exceptions import ResourceExistsError
from azure.identity import DefaultAzureCredential
from azure.storage.blob import ContainerSasPermissions, generate_container_sas, BlobServiceClient
fro... | AzureTRE/airlock_processor/shared_code/blob_operations.py/0 | {
"file_path": "AzureTRE/airlock_processor/shared_code/blob_operations.py",
"repo_id": "AzureTRE",
"token_count": 2659
} | 91 |
from fastapi import Depends, HTTPException, Path, status
from pydantic import UUID4
from api.helpers import get_repository
from db.errors import EntityDoesNotExist, ResourceIsNotDeployed
from db.repositories.operations import OperationRepository
from db.repositories.user_resources import UserResourceRepository
from db... | AzureTRE/api_app/api/dependencies/workspaces.py/0 | {
"file_path": "AzureTRE/api_app/api/dependencies/workspaces.py",
"repo_id": "AzureTRE",
"token_count": 1360
} | 92 |
from typing import Optional
from fastapi import APIRouter, Depends, HTTPException, status
from pydantic import parse_obj_as
from api.helpers import get_repository
from db.errors import EntityDoesNotExist, EntityVersionExist, InvalidInput
from db.repositories.resource_templates import ResourceTemplateRepository
from mo... | AzureTRE/api_app/api/routes/shared_service_templates.py/0 | {
"file_path": "AzureTRE/api_app/api/routes/shared_service_templates.py",
"repo_id": "AzureTRE",
"token_count": 1002
} | 93 |
from enum import Enum
from pydantic import Field
from models.domain.azuretremodel import AzureTREModel
from models.domain.resource import Resource, ResourceType
class WorkspaceRole(Enum):
NoRole = 0
Researcher = 1
Owner = 2
AirlockManager = 3
class Workspace(Resource):
"""
Workspace request
... | AzureTRE/api_app/models/domain/workspace.py/0 | {
"file_path": "AzureTRE/api_app/models/domain/workspace.py",
"repo_id": "AzureTRE",
"token_count": 190
} | 94 |
from pydantic import Field
from models.domain.resource import ResourceType
from models.domain.resource_template import CustomAction, Property
from models.domain.user_resource_template import UserResourceTemplate
from models.schemas.resource_template import ResourceTemplateInCreate, ResourceTemplateInResponse
def get... | AzureTRE/api_app/models/schemas/user_resource_template.py/0 | {
"file_path": "AzureTRE/api_app/models/schemas/user_resource_template.py",
"repo_id": "AzureTRE",
"token_count": 1246
} | 95 |
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/microsoft/AzureTRE/schema/workspace_service.json",
"type": "object",
"title": "Workspace Service Default Parameters",
"description": "These parameters are required for all workspaces services",
"required": [
"display_name"... | AzureTRE/api_app/schemas/workspace_service.json/0 | {
"file_path": "AzureTRE/api_app/schemas/workspace_service.json",
"repo_id": "AzureTRE",
"token_count": 345
} | 96 |
import logging
from opentelemetry.instrumentation.logging import LoggingInstrumentor
from opentelemetry import trace
from azure.monitor.opentelemetry import configure_azure_monitor
from core.config import APPLICATIONINSIGHTS_CONNECTION_STRING, LOGGING_LEVEL
UNWANTED_LOGGERS = [
"azure.core.pipeline.policies.http_... | AzureTRE/api_app/services/logging.py/0 | {
"file_path": "AzureTRE/api_app/services/logging.py",
"repo_id": "AzureTRE",
"token_count": 1365
} | 97 |
import pytest
from mock import patch
from fastapi import status
from services.authentication import get_current_admin_user, get_current_tre_user_or_tre_admin
from resources import strings
pytestmark = pytest.mark.asyncio
class TestMigrationRoutesWithNonAdminRights:
@pytest.fixture(autouse=True, scope='class')
... | AzureTRE/api_app/tests_ma/test_api/test_routes/test_migrations.py/0 | {
"file_path": "AzureTRE/api_app/tests_ma/test_api/test_routes/test_migrations.py",
"repo_id": "AzureTRE",
"token_count": 1937
} | 98 |
from unittest.mock import AsyncMock
import uuid
import pytest_asyncio
import pytest
from mock import patch
from db.repositories.resource_templates import ResourceTemplateRepository
from models.domain.operation import Status
from db.repositories.resources import ResourceRepository
from db.repositories.operations import ... | AzureTRE/api_app/tests_ma/test_db/test_repositories/test_operation_repository.py/0 | {
"file_path": "AzureTRE/api_app/tests_ma/test_db/test_repositories/test_operation_repository.py",
"repo_id": "AzureTRE",
"token_count": 977
} | 99 |
import copy
import pytest
from models.domain.resource_template import PipelineStep, PipelineStepProperty
from service_bus.substitutions import substitute_properties, substitute_value
def test_substitution_for_primary_resource_no_parents(primary_resource):
resource_dict = primary_resource.dict()
# Verify man... | AzureTRE/api_app/tests_ma/test_service_bus/test_substitutions.py/0 | {
"file_path": "AzureTRE/api_app/tests_ma/test_service_bus/test_substitutions.py",
"repo_id": "AzureTRE",
"token_count": 6452
} | 100 |
{
"dev": {
"baseUrl": "http://localhost:8000/api",
"contentType": "application/json",
"workspaceTemplate": "my-tre-workspace",
"workspaceServiceTemplate": "my-tre-workspace-service",
"userResourceTemplate": "my-tre-user-resource",
"workspaceId": "49ab7315-49bb-48ed-b9ca-c37369f15e7a",
"wor... | AzureTRE/api_http_requests/http-client.env.json/0 | {
"file_path": "AzureTRE/api_http_requests/http-client.env.json",
"repo_id": "AzureTRE",
"token_count": 244
} | 101 |
import sys
import click
import json
import logging
import msal
import os
from pathlib import Path
from tre.api_client import ApiClient
from typing import List
from tre.authentication import get_auth_token_client_credentials, get_public_client_application
def all_or_none(values: "list(bool)") -> bool:
"""Returns... | AzureTRE/cli/tre/commands/login.py/0 | {
"file_path": "AzureTRE/cli/tre/commands/login.py",
"repo_id": "AzureTRE",
"token_count": 3626
} | 102 |
import click
from tre.commands.workspace_service_templates.contexts import WorkspaceServiceTemplateContext
class UserResourceTemplateContext(object):
def __init__(self, workspace_service_name: str, template_name: str):
self.workspace_service_name = workspace_service_name
self.template_name = tem... | AzureTRE/cli/tre/commands/workspace_service_templates/user_resource_templates/contexts.py/0 | {
"file_path": "AzureTRE/cli/tre/commands/workspace_service_templates/user_resource_templates/contexts.py",
"repo_id": "AzureTRE",
"token_count": 231
} | 103 |
import logging
import click
from tre.commands.operation import operations_list
from tre.output import output_option, query_option
from .contexts import WorkspaceContext, pass_workspace_context
@click.group(name="operations", help="List operations ")
def workspace_operations():
pass
@click.command(name="list", ... | AzureTRE/cli/tre/commands/workspaces/operations.py/0 | {
"file_path": "AzureTRE/cli/tre/commands/workspaces/operations.py",
"repo_id": "AzureTRE",
"token_count": 265
} | 104 |
import sys
import click
import jmespath
import json
import typing as t
from tabulate import tabulate
from pygments import highlight, lexers, formatters
from enum import Enum
from httpx import Response
class OutputFormat(Enum):
Suppress = 'none'
Json = 'json'
JsonC = 'jsonc'
Table = 'table'
Raw = '... | AzureTRE/cli/tre/output.py/0 | {
"file_path": "AzureTRE/cli/tre/output.py",
"repo_id": "AzureTRE",
"token_count": 1476
} | 105 |
resource "azurerm_key_vault_access_policy" "app_gw_managed_identity" {
key_vault_id = var.keyvault_id
tenant_id = azurerm_user_assigned_identity.agw_id.tenant_id
object_id = azurerm_user_assigned_identity.agw_id.principal_id
key_permissions = [
"Get",
]
secret_permissions = [
"Get",
]
}
r... | AzureTRE/core/terraform/appgateway/certificate.tf/0 | {
"file_path": "AzureTRE/core/terraform/appgateway/certificate.tf",
"repo_id": "AzureTRE",
"token_count": 689
} | 106 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.