text
stringlengths
5
22M
id
stringlengths
12
177
metadata
dict
__index_level_0__
int64
0
1.37k
data "azurerm_subscription" "current" {} data "azurerm_client_config" "current" {} # Random unique id resource "random_string" "unique_id" { length = 4 min_numeric = 4 } data "azurerm_container_registry" "mgmt_acr" { name = var.acr_name resource_group_name = var.mgmt_resource_group_name }...
AzureTRE/core/terraform/data.tf/0
{ "file_path": "AzureTRE/core/terraform/data.tf", "repo_id": "AzureTRE", "token_count": 332 }
107
output "core_vnet_id" { value = azurerm_virtual_network.core.id } output "bastion_subnet_id" { value = azurerm_subnet.bastion.id } output "azure_firewall_subnet_id" { value = azurerm_subnet.azure_firewall.id } output "app_gw_subnet_id" { value = azurerm_subnet.app_gw.id } output "web_app_subnet_id" { valu...
AzureTRE/core/terraform/network/outputs.tf/0
{ "file_path": "AzureTRE/core/terraform/network/outputs.tf", "repo_id": "AzureTRE", "token_count": 784 }
108
variable "tre_id" { type = string description = "Unique identifier for the TRE, such as projectx-dev-1234" validation { condition = length(var.tre_id) < 12 && lower(var.tre_id) == var.tre_id error_message = "The tre_id value must be lowercase and < 12 chars." } } variable "location" { type...
AzureTRE/core/terraform/variables.tf/0
{ "file_path": "AzureTRE/core/terraform/variables.tf", "repo_id": "AzureTRE", "token_count": 1885 }
109
#!/bin/bash set -o errexit set -o pipefail set -o nounset # Uncomment this line to see each command for debugging (careful: this will show secrets!) # set -o xtrace if [ "$(yq eval ".custom.runtime_image.build" porter.yaml)" == "null" ]; then echo "Runtime image build section isn't specified. Exiting..." exit 0 fi...
AzureTRE/devops/scripts/bundle_runtime_image_push.sh/0
{ "file_path": "AzureTRE/devops/scripts/bundle_runtime_image_push.sh", "repo_id": "AzureTRE", "token_count": 258 }
110
#!/bin/bash # This script migrates the Cosmos database based on any breaking changes that have occurred. # Cosmos is behind a private network, so we call the /migrations endpoint of the API set -o errexit set -o pipefail # Uncomment this line to see each command for debugging (careful: this will show secrets!) # set ...
AzureTRE/devops/scripts/migrate_state_store.sh/0
{ "file_path": "AzureTRE/devops/scripts/migrate_state_store.sh", "repo_id": "AzureTRE", "token_count": 918 }
111
terraform { required_version = ">= 1.2.5" required_providers { azurerm = { source = "hashicorp/azurerm" version = "3.51.0" } } }
AzureTRE/devops/terraform/terraform.tf/0
{ "file_path": "AzureTRE/devops/terraform/terraform.tf", "repo_id": "AzureTRE", "token_count": 79 }
112
{ "$schema": "https://json-schema.org/draft/2019-09/schema", "type": "object", "properties": { "id": { "type": "string", "description": "Operation id.", "format": "uuid" }, "operationType": { "type": "string", "description":...
AzureTRE/docs/schemas/operation.json/0
{ "file_path": "AzureTRE/docs/schemas/operation.json", "repo_id": "AzureTRE", "token_count": 1813 }
113
# Configuring Shared Services In general, a shared service should be installed by using the UI or API directly once its bundle has been registered on the system. As part of this quickstart, you will need to install the Nexus shared service, as you will be subsequently deploying Guacamole VMs that depend on public pac...
AzureTRE/docs/tre-admins/setup-instructions/configuring-shared-services.md/0
{ "file_path": "AzureTRE/docs/tre-admins/setup-instructions/configuring-shared-services.md", "repo_id": "AzureTRE", "token_count": 1643 }
114
# Upgrading AzureTRE version This document will cover how Azure TRE is referenced and how to upgrade its version in the [Azure TRE deployment repository](https://github.com/microsoft/AzureTRE-Deployment) ## Introduction Azure TRE is referenced as an external folder in the [Azure TRE deployment repository](https://gi...
AzureTRE/docs/tre-admins/upgrading-tre.md/0
{ "file_path": "AzureTRE/docs/tre-admins/upgrading-tre.md", "repo_id": "AzureTRE", "token_count": 801 }
115
# Nexus Shared Service Sonatype Nexus (RepoManager) allows users in workspaces to access external software packages securely. Documentation on Nexus can be found here: [https://help.sonatype.com/repomanager3/](https://help.sonatype.com/repomanager3/). ## Deploy !!! caution Before deploying the Nexus service, yo...
AzureTRE/docs/tre-templates/shared-services/nexus.md/0
{ "file_path": "AzureTRE/docs/tre-templates/shared-services/nexus.md", "repo_id": "AzureTRE", "token_count": 2748 }
116
# OHDSI Workspace Service !!! warning - This workspace service does not work "out of the box". It requires additional networking configuration to work properly. See the [networking configuration](#networking-configuration) section for more details. - Currently the only CDM data source supported by the workspac...
AzureTRE/docs/tre-templates/workspace-services/ohdsi.md/0
{ "file_path": "AzureTRE/docs/tre-templates/workspace-services/ohdsi.md", "repo_id": "AzureTRE", "token_count": 807 }
117
# Using the Azure TRE This section contains information relevant on how to use AzureTRE.
AzureTRE/docs/using-tre/index.md/0
{ "file_path": "AzureTRE/docs/using-tre/index.md", "repo_id": "AzureTRE", "token_count": 21 }
118
import asyncio from typing import List, Optional from contextlib import asynccontextmanager from httpx import AsyncClient, Timeout, Response import logging from starlette import status from azure.identity import ClientSecretCredential, UsernamePasswordCredential import config from e2e_tests import cloud LOGGER = logg...
AzureTRE/e2e_tests/helpers.py/0
{ "file_path": "AzureTRE/e2e_tests/helpers.py", "repo_id": "AzureTRE", "token_count": 1913 }
119
import pytest from httpx import AsyncClient from starlette import status import config from helpers import assert_status, get_auth_header, get_template from resources import strings from helpers import get_admin_token pytestmark = pytest.mark.asyncio workspace_service_templates = [ (strings.AZUREML_SERVICE), ...
AzureTRE/e2e_tests/test_workspace_service_templates.py/0
{ "file_path": "AzureTRE/e2e_tests/test_workspace_service_templates.py", "repo_id": "AzureTRE", "token_count": 1023 }
120
#!/bin/bash set -o errexit set -o pipefail set -o nounset # Uncomment this line to see each command for debugging (careful: this will show secrets!) # set -o xtrace # Install Azure CLI apt-get update apt-get -y install ca-certificates curl apt-transport-https lsb-release gnupg curl -sL https://packages.microsoft.com/...
AzureTRE/resource_processor/scripts/azure-cli.sh/0
{ "file_path": "AzureTRE/resource_processor/scripts/azure-cli.sh", "repo_id": "AzureTRE", "token_count": 236 }
121
--- default-storage: mydb default-secrets: mysecrets storage: - name: mydb plugin: mongodb config: url: ${secret.porter-db-connection-string} secrets: - name: mysecrets plugin: azure.keyvault config: vault-url: ${env.KEY_VAULT_URL}
AzureTRE/resource_processor/vmss_porter/config.yaml/0
{ "file_path": "AzureTRE/resource_processor/vmss_porter/config.yaml", "repo_id": "AzureTRE", "token_count": 115 }
122
# See https://docs.docker.com/engine/reference/builder/#dockerignore-file # Put files here that you don't want copied into your bundle's invocation image .gitignore **/.terraform/* **/*_backend.tf Dockerfile.tmpl .env* deploy.sh destroy.sh
AzureTRE/templates/shared_services/airlock_notifier/.dockerignore/0
{ "file_path": "AzureTRE/templates/shared_services/airlock_notifier/.dockerignore", "repo_id": "AzureTRE", "token_count": 77 }
123
output "airlock_notifier_logic_app_name" { value = azurerm_logic_app_standard.logic_app.name } output "airlock_notifier_logic_app_resource_group_name" { value = azurerm_logic_app_standard.logic_app.resource_group_name }
AzureTRE/templates/shared_services/airlock_notifier/terraform/outputs.tf/0
{ "file_path": "AzureTRE/templates/shared_services/airlock_notifier/terraform/outputs.tf", "repo_id": "AzureTRE", "token_count": 89 }
124
locals { staticweb_storage_name = lower(replace("stwebcerts${var.tre_id}", "-", "")) staticweb_backend_pool_name = "beap-certs-staticweb" app_path_map_name = "upm-certs" redirect_path_map_name = "upm-certs-redirect" insecure_frontend_port_name = "feport-certs-insecure" secure_frontend_port_...
AzureTRE/templates/shared_services/certs/terraform/locals.tf/0
{ "file_path": "AzureTRE/templates/shared_services/certs/terraform/locals.tf", "repo_id": "AzureTRE", "token_count": 383 }
125
output "connection_uri" { value = "https://${azurerm_private_dns_zone.cyclecloud.name}" }
AzureTRE/templates/shared_services/cyclecloud/terraform/outputs.tf/0
{ "file_path": "AzureTRE/templates/shared_services/cyclecloud/terraform/outputs.tf", "repo_id": "AzureTRE", "token_count": 34 }
126
resource "azurerm_firewall_policy_rule_collection_group" "core" { name = "rcg-core" firewall_policy_id = azurerm_firewall_policy.root.id priority = 500 network_rule_collection { name = "nrc-general" priority = 201 action = "Allow" rule { name = "time" ...
AzureTRE/templates/shared_services/firewall/terraform/rules.tf/0
{ "file_path": "AzureTRE/templates/shared_services/firewall/terraform/rules.tf", "repo_id": "AzureTRE", "token_count": 3358 }
127
{ "name": "r-proxy", "online": true, "storage": { "blobStoreName": "default", "strictContentTypeValidation": true, "write_policy": "ALLOW" }, "proxy": { "remoteUrl": "https://cran.r-project.org/", "contentMaxAge": 1440, "metadataMaxAge": 1440 }, "negativeCache": { "enabled": tr...
AzureTRE/templates/shared_services/sonatype-nexus-vm/scripts/nexus_repos_config/cran_proxy_conf.json/0
{ "file_path": "AzureTRE/templates/shared_services/sonatype-nexus-vm/scripts/nexus_repos_config/cran_proxy_conf.json", "repo_id": "AzureTRE", "token_count": 292 }
128
#!/bin/bash export TF_LOG="" terraform init -input=false -backend=true -reconfigure -upgrade \ -backend-config="resource_group_name=${TF_VAR_mgmt_resource_group_name:?}" \ -backend-config="storage_account_name=${TF_VAR_mgmt_storage_account_name:?}" \ -backend-config="container_name=${TF_VAR_terraform_state...
AzureTRE/templates/shared_services/sonatype-nexus-vm/terraform/deploy.sh/0
{ "file_path": "AzureTRE/templates/shared_services/sonatype-nexus-vm/terraform/deploy.sh", "repo_id": "AzureTRE", "token_count": 182 }
129
data "azurerm_resource_group" "ws" { name = "rg-${var.tre_id}-ws-${local.short_workspace_id}" } data "azurerm_virtual_network" "ws" { name = "vnet-${var.tre_id}-ws-${local.short_workspace_id}" resource_group_name = data.azurerm_resource_group.ws.name } resource "azurerm_application_insights" "ai"...
AzureTRE/templates/workspace_services/azureml/terraform/data.tf/0
{ "file_path": "AzureTRE/templates/workspace_services/azureml/terraform/data.tf", "repo_id": "AzureTRE", "token_count": 756 }
130
{ "$schema": "http://json-schema.org/draft-07/schema", "$id": "https://github.com/microsoft/AzureTRE/templates/workspace_services/azureml/user_resources/aml_compute/custom_parameters.json", "type": "object", "title": "Azure Machine Learning Compute Instance", "description": "An Azure Machine Learning compute ...
AzureTRE/templates/workspace_services/azureml/user_resources/aml_compute/template_schema.json/0
{ "file_path": "AzureTRE/templates/workspace_services/azureml/user_resources/aml_compute/template_schema.json", "repo_id": "AzureTRE", "token_count": 750 }
131
data "azurerm_resource_group" "ws" { name = local.resource_group_name } data "azurerm_virtual_network" "ws" { name = local.virtual_network_name resource_group_name = data.azurerm_resource_group.ws.name } data "azurerm_firewall" "firewall" { name = local.firewall_name resource_g...
AzureTRE/templates/workspace_services/databricks/terraform/data.tf/0
{ "file_path": "AzureTRE/templates/workspace_services/databricks/terraform/data.tf", "repo_id": "AzureTRE", "token_count": 434 }
132
{ "schemaType": "ParameterSet", "schemaVersion": "1.0.1", "namespace": "", "name": "tre-workspace-service-gitea", "parameters": [ { "name": "id", "source": { "env": "ID" } }, { "name": "workspace_id", "source": { "env": "WORKSPACE_ID" } }, ...
AzureTRE/templates/workspace_services/gitea/parameters.json/0
{ "file_path": "AzureTRE/templates/workspace_services/gitea/parameters.json", "repo_id": "AzureTRE", "token_count": 758 }
133
# GUID to identify the workspace service ID=__CHANGE_ME__ TRE_RESOURCE_ID=__SAME_AS_ID__ # GUID to identify the workspace bundle WORKSPACE_ID="__CHANGE_ME__" # Guacamole image tag to use (version in templates\workspace\services\guacamole\version.txt) GUACAMOLE_IMAGE_TAG="__CHANGE_ME__" MGMT_ACR_NAME="__CHANGE_ME__" ...
AzureTRE/templates/workspace_services/guacamole/.env.sample/0
{ "file_path": "AzureTRE/templates/workspace_services/guacamole/.env.sample", "repo_id": "AzureTRE", "token_count": 244 }
134
package org.apache.guacamole.auth.azuretre; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache L...
AzureTRE/templates/workspace_services/guacamole/guacamole-server/guacamole-auth-azure/src/test/java/org/apache/guacamole/auth/azuretre/AuthenticationProviderServiceTest.java/0
{ "file_path": "AzureTRE/templates/workspace_services/guacamole/guacamole-server/guacamole-auth-azure/src/test/java/org/apache/guacamole/auth/azuretre/AuthenticationProviderServiceTest.java", "repo_id": "AzureTRE", "token_count": 8924 }
135
variable "workspace_id" { type = string description = "The workspace ID" } variable "aad_authority_url" { type = string description = "The Azure AD authority URL" } variable "tre_id" { type = string description = "The TRE ID" } variable "mgmt_resource_group_name" { type = strin...
AzureTRE/templates/workspace_services/guacamole/terraform/variables.tf/0
{ "file_path": "AzureTRE/templates/workspace_services/guacamole/terraform/variables.tf", "repo_id": "AzureTRE", "token_count": 617 }
136
locals { short_service_id = substr(var.tre_resource_id, -4, -1) short_workspace_id = substr(var.workspace_id, -4, -1) short_parent_id = substr(var.parent_service_id, -4, -1) workspace_resource_name_suffix = "${var.tre_id}-ws-${local.short_workspace_id}" service_resourc...
AzureTRE/templates/workspace_services/guacamole/user_resources/guacamole-azure-export-reviewvm/terraform/locals.tf/0
{ "file_path": "AzureTRE/templates/workspace_services/guacamole/user_resources/guacamole-azure-export-reviewvm/terraform/locals.tf", "repo_id": "AzureTRE", "token_count": 687 }
137
#!/bin/bash set -o errexit set -o pipefail set -o nounset # Uncomment this line to see each command for debugging (careful: this will show secrets!) # set -o xtrace export TF_LOG="" # This variables are loaded in for us # shellcheck disable=SC2154 terraform init -input=false -backend=true -reconfigure \ -backend-...
AzureTRE/templates/workspace_services/guacamole/user_resources/guacamole-azure-import-reviewvm/terraform/deploy.sh/0
{ "file_path": "AzureTRE/templates/workspace_services/guacamole/user_resources/guacamole-azure-import-reviewvm/terraform/deploy.sh", "repo_id": "AzureTRE", "token_count": 254 }
138
--- schemaVersion: 1.0.0 name: tre-service-guacamole-windowsvm version: 0.7.9 description: "An Azure TRE User Resource Template for Guacamole (Windows 10)" dockerfile: Dockerfile.tmpl registry: azuretre custom: # For information on vm_sizes and image_options, see README.me in the guacamole/user-resources folder vm...
AzureTRE/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/porter.yaml/0
{ "file_path": "AzureTRE/templates/workspace_services/guacamole/user_resources/guacamole-azure-windowsvm/porter.yaml", "repo_id": "AzureTRE", "token_count": 4083 }
139
--- schemaVersion: 1.0.0 name: tre-workspace-service-health version: 0.2.5 description: "An Azure Data Health Services workspace service" registry: azuretre dockerfile: Dockerfile.tmpl credentials: # Credentials for interacting with the AAD Auth tenant - name: auth_client_id env: AUTH_CLIENT_ID - name: auth_...
AzureTRE/templates/workspace_services/health-services/porter.yaml/0
{ "file_path": "AzureTRE/templates/workspace_services/health-services/porter.yaml", "repo_id": "AzureTRE", "token_count": 2234 }
140
{ "schemaVersion": "1.0.1", "name": "service-azureml", "created": "2021-06-03T11:54:54.0225968Z", "modified": "2021-06-03T11:54:54.0225968Z", "parameters": [ { "name": "id", "source": { "env": "ID" } }, { "name": "workspace_id", "source": { "env": "WOR...
AzureTRE/templates/workspace_services/innereye/parameters_service_azureml.json/0
{ "file_path": "AzureTRE/templates/workspace_services/innereye/parameters_service_azureml.json", "repo_id": "AzureTRE", "token_count": 528 }
141
FROM python:3.8-bullseye # Install MLflow Python Packages RUN pip install --no-cache-dir psycopg2==2.9.5 mlflow==2.0.1 azure-storage-blob==12.14.1 RUN apt-get update \ && apt-get install openssh-server -y --no-install-recommends \ && apt-get clean -y && rm -rf /var/lib/apt/lists/* # define default server env var...
AzureTRE/templates/workspace_services/mlflow/mlflow-server/docker/Dockerfile/0
{ "file_path": "AzureTRE/templates/workspace_services/mlflow/mlflow-server/docker/Dockerfile", "repo_id": "AzureTRE", "token_count": 230 }
142
output "connection_uri" { value = "https://${azurerm_linux_web_app.mlflow.default_hostname}" } output "is_exposed_externally" { value = false }
AzureTRE/templates/workspace_services/mlflow/terraform/outputs.tf/0
{ "file_path": "AzureTRE/templates/workspace_services/mlflow/terraform/outputs.tf", "repo_id": "AzureTRE", "token_count": 57 }
143
variable "workspace_id" { type = string } variable "tre_id" { type = string } variable "tre_resource_id" { type = string } variable "sql_sku" { type = string } variable "db_name" { type = string } variable "storage_mb" { type = number validation { condition = var.storage_mb > 5119 && var.storage_m...
AzureTRE/templates/workspace_services/mysql/terraform/variables.tf/0
{ "file_path": "AzureTRE/templates/workspace_services/mysql/terraform/variables.tf", "repo_id": "AzureTRE", "token_count": 161 }
144
/****** Results and temp Schema creation ******/ CREATE SCHEMA [$(RESULTS_SCHEMA_NAME)] GO CREATE SCHEMA [$(TEMP_SCHEMA_NAME)] GO /****** Copy Data ******/ CREATE TABLE #tbl WITH ( DISTRIBUTION = ROUND_ROBIN ) AS SELECT ROW_NUMBER() OVER(ORDER BY (SELECT NULL)) AS Sequence , [name] , 'CREATE TABLE ' + N'$(...
AzureTRE/templates/workspace_services/ohdsi/sql/init_synapse_schemas.sql/0
{ "file_path": "AzureTRE/templates/workspace_services/ohdsi/sql/init_synapse_schemas.sql", "repo_id": "AzureTRE", "token_count": 432 }
145
variable "workspace_id" { type = string } variable "tre_id" { type = string } variable "tre_resource_id" { type = string } variable "arm_environment" { type = string } variable "address_space" { type = string description = "Address space for PostgreSQL's subnet" } # ATLAS Database variable "postgres...
AzureTRE/templates/workspace_services/ohdsi/terraform/variables.tf/0
{ "file_path": "AzureTRE/templates/workspace_services/ohdsi/terraform/variables.tf", "repo_id": "AzureTRE", "token_count": 294 }
146
# This file is maintained automatically by "terraform init". # Manual edits may be lost in future updates. provider "registry.terraform.io/azure/azapi" { version = "1.5.0" constraints = ">= 1.3.0, 1.5.0" hashes = [ "h1:wiX+oIlwttTKq6z3LGbrqmRCkN66C0YgqxM+jKQbejw=", "zh:14109c169973e1b0d526131ca047e25...
AzureTRE/templates/workspaces/base/terraform/.terraform.lock.hcl/0
{ "file_path": "AzureTRE/templates/workspaces/base/terraform/.terraform.lock.hcl", "repo_id": "AzureTRE", "token_count": 2699 }
147
terraform { # In modules we should only specify the min version required_providers { azurerm = { source = "hashicorp/azurerm" version = ">= 3.8.0" } azapi = { source = "Azure/azapi" version = ">= 1.3.0" } } }
AzureTRE/templates/workspaces/base/terraform/azure-monitor/providers.tf/0
{ "file_path": "AzureTRE/templates/workspaces/base/terraform/azure-monitor/providers.tf", "repo_id": "AzureTRE", "token_count": 124 }
148
terraform { required_providers { azurerm = { source = "hashicorp/azurerm" version = "=3.73.0" } azuread = { source = "hashicorp/azuread" version = "=2.20.0" } azapi = { source = "Azure/azapi" version = "=1.5.0" } } backend "azurerm" {} } provider "a...
AzureTRE/templates/workspaces/base/terraform/providers.tf/0
{ "file_path": "AzureTRE/templates/workspaces/base/terraform/providers.tf", "repo_id": "AzureTRE", "token_count": 515 }
149
# Getting Started with Create React App and Fluent UI This is a [Create React App](https://github.com/facebook/create-react-app) based repo that comes with Fluent UI pre-installed! ## Available Scripts In the project directory, you can run: ### `yarn start` Runs the app in the development mode.<br> Open [http://lo...
AzureTRE/ui/app/README.md/0
{ "file_path": "AzureTRE/ui/app/README.md", "repo_id": "AzureTRE", "token_count": 793 }
150
import { Dialog, DialogFooter, PrimaryButton, DefaultButton, DialogType, Spinner } from '@fluentui/react'; import React, { useContext, useState } from 'react'; import { Resource } from '../../models/resource'; import { HttpMethod, ResultType, useAuthApiCall } from '../../hooks/useAuthApiCall'; import { WorkspaceContext...
AzureTRE/ui/app/src/components/shared/ConfirmDeleteResource.tsx/0
{ "file_path": "AzureTRE/ui/app/src/components/shared/ConfirmDeleteResource.tsx", "repo_id": "AzureTRE", "token_count": 1031 }
151
import { DefaultPalette, IStackItemStyles, Stack } from "@fluentui/react"; interface ResourceOperationListItemProps { header: String, val: String } export const ResourceOperationListItem: React.FunctionComponent<ResourceOperationListItemProps> = (props: ResourceOperationListItemProps) => { const stackIte...
AzureTRE/ui/app/src/components/shared/ResourceOperationListItem.tsx/0
{ "file_path": "AzureTRE/ui/app/src/components/shared/ResourceOperationListItem.tsx", "repo_id": "AzureTRE", "token_count": 401 }
152
import { Spinner, SpinnerSize } from "@fluentui/react"; import { useEffect, useState } from "react"; import { LoadingState } from "../../../models/loadingState"; import { HttpMethod, ResultType, useAuthApiCall } from "../../../hooks/useAuthApiCall"; import Form from "@rjsf/fluent-ui"; import { Operation } from "../../....
AzureTRE/ui/app/src/components/shared/create-update-resource/ResourceForm.tsx/0
{ "file_path": "AzureTRE/ui/app/src/components/shared/create-update-resource/ResourceForm.tsx", "repo_id": "AzureTRE", "token_count": 2209 }
153
{ "rootClientId": "", "rootTenantId": "", "treApplicationId": "api://", "treUrl": "https://my-tre.northeurope.cloudapp.azure.com/api", "pollingDelayMilliseconds": 10000, "treId": "my-tre", "debug": false, "version": "0.0.0", "activeDirectoryUri": "" }
AzureTRE/ui/app/src/config.source.json/0
{ "file_path": "AzureTRE/ui/app/src/config.source.json", "repo_id": "AzureTRE", "token_count": 133 }
154
import { ResourceType } from "./resourceType"; export interface ResourceTemplate { id: string, name: string, type: string, description: string, version: string, title: string, resourceType: ResourceType, current: boolean, properties: any, allOf?: Array<any>, system_properties: any, actions: Arr...
AzureTRE/ui/app/src/models/resourceTemplate.ts/0
{ "file_path": "AzureTRE/ui/app/src/models/resourceTemplate.ts", "repo_id": "AzureTRE", "token_count": 536 }
155
# TODO: The maintainer of this repo has not yet edited this file **REPO OWNER**: Do you want Customer Service & Support (CSS) support for this product/project? - **No CSS support:** Fill out this template with information about how to file issues and get help. - **Yes CSS support:** Fill out an intake form at [aka.ms...
BioGPT/SUPPORT.md/0
{ "file_path": "BioGPT/SUPPORT.md", "repo_id": "BioGPT", "token_count": 317 }
156
FORMAT=$1 GOLD_FILE=$2 PREDICTION_FILE=$3 java -cp bc5cdr_eval.jar ncbi.bc5cdr_eval.Evaluate relation CID $FORMAT $GOLD_FILE $PREDICTION_FILE | grep -v INFO # java -cp bc5cdr_eval.jar ncbi.bc5cdr_eval.Evaluate relation CID $FORMAT $GOLD_FILE $PREDICTION_FILE
BioGPT/data/BC5CDR/raw/BC5CDR_Evaluation-0.0.3/eval_relation.sh/0
{ "file_path": "BioGPT/data/BC5CDR/raw/BC5CDR_Evaluation-0.0.3/eval_relation.sh", "repo_id": "BioGPT", "token_count": 115 }
157
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import os import sys import json from sklearn.metrics import accuracy_score pred_file = sys.argv[1] gold_file = sys.argv[2] def do_eval(preds, golden): print(accuracy_score(golden, preds)) return def main(): preds = [] with o...
BioGPT/examples/QA-PubMedQA/hard_match_evaluation.py/0
{ "file_path": "BioGPT/examples/QA-PubMedQA/hard_match_evaluation.py", "repo_id": "BioGPT", "token_count": 473 }
158
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import os import sys import re import json out_file = sys.argv[1] prefix = [ '(learned[0-9]+ )+', 'we can conclude that', 'we have that', 'in conclusion,', ] def strip_prefix(line): for p in prefix: res = re.s...
BioGPT/examples/RE-DDI/postprocess.py/0
{ "file_path": "BioGPT/examples/RE-DDI/postprocess.py", "repo_id": "BioGPT", "token_count": 962 }
159
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. from .language_modeling_prompt import * from .transformer_lm_prompt import * from .language_model_prompt_dataset import * from .constrained_generator import *
BioGPT/src/__init__.py/0
{ "file_path": "BioGPT/src/__init__.py", "repo_id": "BioGPT", "token_count": 68 }
160
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import tvm from bitblas.base.roller.policy import TensorCorePolicy, DefaultPolicy from bitblas.base.roller.arch import CUDA from bitblas.gpu.matmul_analysis import get_tensorized_func_and_tags from bitblas.gpu import Matmul from bitblas.utils imp...
BitBLAS/benchmark/dsl/matmul.py/0
{ "file_path": "BitBLAS/benchmark/dsl/matmul.py", "repo_id": "BitBLAS", "token_count": 3145 }
161
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # pylint: disable=missing-docstring, invalid-name """This is modified from https://huggingface.co/1bitLLM/bitnet_b1_58-3B/blob/main/utils_quant.py to work with BitBLAS.""" import torch from torch import nn import bitblas from bitblas.cache impor...
BitBLAS/integration/BitNet/utils_quant.py/0
{ "file_path": "BitBLAS/integration/BitNet/utils_quant.py", "repo_id": "BitBLAS", "token_count": 3204 }
162
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import bitblas from bitblas_linear import Linear as BitBLASLinear import torch import time import numpy as np import torch.nn as nn import pytest torch.manual_seed(0) @pytest.mark.parametrize( "m, in_features, out_features, bias", [ ...
BitBLAS/integration/pytorch/test_bitblas_linear.py/0
{ "file_path": "BitBLAS/integration/pytorch/test_bitblas_linear.py", "repo_id": "BitBLAS", "token_count": 1386 }
163
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. from .arch_base import TileDevice from .cuda import * from .cpu import * def get_arch(target: tvm.target.Target) -> TileDevice: if target.kind.name == "cuda": return CUDA(target) elif target.kind.name == "llvm": return CP...
BitBLAS/python/bitblas/base/roller/arch/__init__.py/0
{ "file_path": "BitBLAS/python/bitblas/base/roller/arch/__init__.py", "repo_id": "BitBLAS", "token_count": 149 }
164
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. """ Apply ScheduleRules onto an IRModule to generate default schedules without tuning, or a space for MetaSchedule tuning """ from typing import List, Optional, Dict import os import shutil import tempfile import os.path as osp import tvm from tvm...
BitBLAS/python/bitblas/base/transform.py/0
{ "file_path": "BitBLAS/python/bitblas/base/transform.py", "repo_id": "BitBLAS", "token_count": 4176 }
165
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # pylint: disable=missing-docstring, invalid-name """A GEMM schedule rule for GPU operators.""" from typing import Literal, Optional, List from tvm import tir, DataType from tvm.target import Target from ..base.roller.rasterization import NoRas...
BitBLAS/python/bitblas/gpu/matmul_mma.py/0
{ "file_path": "BitBLAS/python/bitblas/gpu/matmul_mma.py", "repo_id": "BitBLAS", "token_count": 13885 }
166
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. from bitblas.gpu.matmul_analysis import get_propagate_map from ..operator import TransformKind from typing import Literal from tvm import te, IRModule def select_implementation( M: int, N: int, datatype: Literal["float16"] = "float16...
BitBLAS/python/bitblas/ops/impl/param_permutate_impl.py/0
{ "file_path": "BitBLAS/python/bitblas/ops/impl/param_permutate_impl.py", "repo_id": "BitBLAS", "token_count": 836 }
167
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import re def match_global_kernel(source: str) -> int: pattern = r"__global__\s+void\s+[__launch_bounds__\(\d+\)\s+]\w+" matched = re.findall(pattern, source) assert len(matched) > 1 # may have statement before kernel return sou...
BitBLAS/python/bitblas/utils/post_process.py/0
{ "file_path": "BitBLAS/python/bitblas/utils/post_process.py", "repo_id": "BitBLAS", "token_count": 735 }
168
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import numpy as np import tvm from bitblas.base.roller.policy import TensorCorePolicy, DefaultPolicy from bitblas.base.roller.arch import CUDA from bitblas.gpu.matmul_analysis import get_tensorized_func_and_tags from bitblas.gpu import Matmul from...
BitBLAS/testing/python/dsl/test_auto_normalized_tensorcore.py/0
{ "file_path": "BitBLAS/testing/python/dsl/test_auto_normalized_tensorcore.py", "repo_id": "BitBLAS", "token_count": 1995 }
169
date ; hostname ; pwd export MASTER_ADDR=$HOSTNAME export MASTER_PORT=19800 export NODE_RANK=0 EXP_LR_ARRAY=(1e-5 1e-5 2e-5 2e-5 1e-5 1e-5 2e-5 2e-5) EXP_LF_ARRAY=(True False True False True False True False) EXP_GN_ARRAY=(cifar10 cifar10 cifar10 cifar10 cifar100 cifar100 cifar100 cifar100) EXP_RB_ARRAY=(288 224 288 ...
BridgeTower/scripts/ftfpt_cifar.sh/0
{ "file_path": "BridgeTower/scripts/ftfpt_cifar.sh", "repo_id": "BridgeTower", "token_count": 455 }
170
from ..datasets import F30KCaptionKarpathyDataset from .datamodule_base import BaseDataModule from torch.utils.data import DataLoader class F30KCaptionKarpathyDataModule(BaseDataModule): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) @property def dataset_cls(self): ...
BridgeTower/src/datamodules/f30k_caption_karpathy_datamodule.py/0
{ "file_path": "BridgeTower/src/datamodules/f30k_caption_karpathy_datamodule.py", "repo_id": "BridgeTower", "token_count": 716 }
171
from .base_dataset import BaseDataset class VQAv2Dataset(BaseDataset): def __init__(self, *args, split="", **kwargs): assert split in ["train", "val", "test"] self.split = split if split == "train": # names = ["vqav2_train", "vqav2_trainable_val"] # ViLT # names = ...
BridgeTower/src/datasets/vqav2_dataset.py/0
{ "file_path": "BridgeTower/src/datasets/vqav2_dataset.py", "repo_id": "BridgeTower", "token_count": 1065 }
172
# code in this file is adpated from rpmcruz/autoaugment # https://github.com/rpmcruz/autoaugment/blob/master/transformations.py import random import PIL, PIL.ImageOps, PIL.ImageEnhance, PIL.ImageDraw import numpy as np import torch from PIL import Image def ShearX(img, v): # [-0.3, 0.3] assert -0.3 <= v <= 0.3 ...
BridgeTower/src/transforms/randaug.py/0
{ "file_path": "BridgeTower/src/transforms/randaug.py", "repo_id": "BridgeTower", "token_count": 3588 }
173
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import sys import argparse import os from util import util import torch import models import data import pickle class BaseOptions: def __init__(self): self.initialized = False def initialize(self, parser): # experiment ...
Bringing-Old-Photos-Back-to-Life/Face_Enhancement/options/base_options.py/0
{ "file_path": "Bringing-Old-Photos-Back-to-Life/Face_Enhancement/options/base_options.py", "repo_id": "Bringing-Old-Photos-Back-to-Life", "token_count": 5057 }
174
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import torch.utils.data as data from PIL import Image import os IMG_EXTENSIONS = [ '.jpg', '.JPG', '.jpeg', '.JPEG', '.png', '.PNG', '.ppm', '.PPM', '.bmp', '.BMP', '.tiff' ] def is_image_file(filename): return any(filename.endswit...
Bringing-Old-Photos-Back-to-Life/Global/data/image_folder.py/0
{ "file_path": "Bringing-Old-Photos-Back-to-Life/Global/data/image_folder.py", "repo_id": "Bringing-Old-Photos-Back-to-Life", "token_count": 763 }
175
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import argparse import os from util import util import torch class BaseOptions: def __init__(self): self.parser = argparse.ArgumentParser() self.initialized = False def initialize(self): # experiment specifics ...
Bringing-Old-Photos-Back-to-Life/Global/options/base_options.py/0
{ "file_path": "Bringing-Old-Photos-Back-to-Life/Global/options/base_options.py", "repo_id": "Bringing-Old-Photos-Back-to-Life", "token_count": 7077 }
176
#!/bin/sh cd Face_Enhancement/models/networks git clone https://github.com/vacancy/Synchronized-BatchNorm-PyTorch cp -rf Synchronized-BatchNorm-PyTorch/sync_batchnorm . cd ../../../ cd Global/detection_models git clone https://github.com/vacancy/Synchronized-BatchNorm-PyTorch cp -rf Synchronized-BatchNorm-PyTorch/syn...
Bringing-Old-Photos-Back-to-Life/download-weights/0
{ "file_path": "Bringing-Old-Photos-Back-to-Life/download-weights", "repo_id": "Bringing-Old-Photos-Back-to-Life", "token_count": 315 }
177
""" This is an example using CLAP to perform zeroshot classification on ESC50 (https://github.com/karolpiczak/ESC-50). """ from msclap import CLAP from esc50_dataset import ESC50 import torch.nn.functional as F import numpy as np from tqdm import tqdm from sklearn.metrics import accuracy_score # Load dataset root...
CLAP/examples/zero_shot_classification.py/0
{ "file_path": "CLAP/examples/zero_shot_classification.py", "repo_id": "CLAP", "token_count": 556 }
178
[tool.poetry] name = "msclap" version = "1.3.3" description = "CLAP (Contrastive Language-Audio Pretraining) is a model that learns acoustic concepts from natural language supervision and enables “Zero-Shot” inference. The model has been extensively evaluated in 26 audio downstream tasks achieving SoTA in several of th...
CLAP/pyproject.toml/0
{ "file_path": "CLAP/pyproject.toml", "repo_id": "CLAP", "token_count": 358 }
179
.. role:: hidden :class: hidden-section .. module:: fairseq.models .. _Models: Models ====== A Model defines the neural network's ``forward()`` method and encapsulates all of the learnable parameters in the network. Each model also provides a set of named *architectures* that define the precise network configur...
COCO-LM/fairseq/docs/models.rst/0
{ "file_path": "COCO-LM/fairseq/docs/models.rst", "repo_id": "COCO-LM", "token_count": 913 }
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 from dataclasses import dataclass from typing import Dict, List, Optional import torch from fairseq.dataclass import FairseqDa...
COCO-LM/fairseq/examples/adaptive_span/adaptive_span_model_wrapper.py/0
{ "file_path": "COCO-LM/fairseq/examples/adaptive_span/adaptive_span_model_wrapper.py", "repo_id": "COCO-LM", "token_count": 2101 }
181
# CamemBERT: a Tasty French Language Model ## Introduction [CamemBERT](https://arxiv.org/abs/1911.03894) is a pretrained language model trained on 138GB of French text based on RoBERTa. Also available in [github.com/huggingface/transformers](https://github.com/huggingface/transformers/). ## Pre-trained models | Mo...
COCO-LM/fairseq/examples/camembert/README.md/0
{ "file_path": "COCO-LM/fairseq/examples/camembert/README.md", "repo_id": "COCO-LM", "token_count": 1625 }
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. import logging from typing import Any, Dict, List, Optional from torch import Tensor import torch import torch.nn as nn from fairseq.models...
COCO-LM/fairseq/examples/laser/laser_src/laser_transformer.py/0
{ "file_path": "COCO-LM/fairseq/examples/laser/laser_src/laser_transformer.py", "repo_id": "COCO-LM", "token_count": 5621 }
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. """ Linformer: Self-Attention with Linear Complexity """ import logging import torch from fairseq import utils from fairseq.models import reg...
COCO-LM/fairseq/examples/linformer/linformer_src/models/linformer_roberta.py/0
{ "file_path": "COCO-LM/fairseq/examples/linformer/linformer_src/models/linformer_roberta.py", "repo_id": "COCO-LM", "token_count": 1705 }
184
#!/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. import sys from pythainlp import word_tokenize for line in sys.stdin: print(" ".join(word_tokenize(line.strip())...
COCO-LM/fairseq/examples/m2m_100/tokenizers/tokenize_thai.py/0
{ "file_path": "COCO-LM/fairseq/examples/m2m_100/tokenizers/tokenize_thai.py", "repo_id": "COCO-LM", "token_count": 99 }
185
#!/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 varia...
COCO-LM/fairseq/examples/multilingual/data_scripts/download_flores_data.sh/0
{ "file_path": "COCO-LM/fairseq/examples/multilingual/data_scripts/download_flores_data.sh", "repo_id": "COCO-LM", "token_count": 4807 }
186
## Training a pointer-generator model on the Extreme Summarization dataset ##### 1. Download the Extreme Summarization data and preprocess it Follow the instructions [here](https://github.com/EdinburghNLP/XSum) to obtain the original Extreme Summarization dataset. You should have six files, {train,validation,test}.{d...
COCO-LM/fairseq/examples/pointer_generator/README.xsum.md/0
{ "file_path": "COCO-LM/fairseq/examples/pointer_generator/README.xsum.md", "repo_id": "COCO-LM", "token_count": 2249 }
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 examples.simultaneous_translation.modules.monotonic_transformer_layer ...
COCO-LM/fairseq/examples/simultaneous_translation/models/transformer_monotonic_attention.py/0
{ "file_path": "COCO-LM/fairseq/examples/simultaneous_translation/models/transformer_monotonic_attention.py", "repo_id": "COCO-LM", "token_count": 4284 }
188
# 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. """ This module contains collection of classes which implement collate functionalities for various tasks. Collaters should know wh...
COCO-LM/fairseq/examples/speech_recognition/data/collaters.py/0
{ "file_path": "COCO-LM/fairseq/examples/speech_recognition/data/collaters.py", "repo_id": "COCO-LM", "token_count": 2220 }
189
#!/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. from __future__ import absolute_import, division, print_function, unicode_literals import re from collections import ...
COCO-LM/fairseq/examples/speech_recognition/utils/wer_utils.py/0
{ "file_path": "COCO-LM/fairseq/examples/speech_recognition/utils/wer_utils.py", "repo_id": "COCO-LM", "token_count": 6380 }
190
# Neural Machine Translation This README contains instructions for [using pretrained translation models](#example-usage-torchhub) as well as [training new models](#training-a-new-model). ## Pre-trained models Model | Description | Dataset | Download ---|---|---|--- `conv.wmt14.en-fr` | Convolutional <br> ([Gehring e...
COCO-LM/fairseq/examples/translation/README.md/0
{ "file_path": "COCO-LM/fairseq/examples/translation/README.md", "repo_id": "COCO-LM", "token_count": 5913 }
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 argparse import sys import numpy as np aggregate_funcs = { "std": np.std, "var": np.var, "median": np.median, "mean"...
COCO-LM/fairseq/examples/unsupervised_quality_estimation/aggregate_scores.py/0
{ "file_path": "COCO-LM/fairseq/examples/unsupervised_quality_estimation/aggregate_scores.py", "repo_id": "COCO-LM", "token_count": 443 }
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. import ast import collections import contextlib import logging import os import re import traceback from collections import OrderedDict from t...
COCO-LM/fairseq/fairseq/checkpoint_utils.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/checkpoint_utils.py", "repo_id": "COCO-LM", "token_count": 13028 }
193
# 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 import torch import torch.nn.functional as F from fairseq import metrics, utils from fairseq.criterions import FairseqCriterion, ...
COCO-LM/fairseq/fairseq/criterions/legacy_masked_lm.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/criterions/legacy_masked_lm.py", "repo_id": "COCO-LM", "token_count": 3057 }
194
import numpy as np from fairseq.data.audio.feature_transforms import ( AudioFeatureTransform, register_audio_feature_transform, ) @register_audio_feature_transform("utterance_cmvn") class UtteranceCMVN(AudioFeatureTransform): """Utterance-level CMVN (cepstral mean and variance normalization)""" @clas...
COCO-LM/fairseq/fairseq/data/audio/feature_transforms/utterance_cmvn.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/data/audio/feature_transforms/utterance_cmvn.py", "repo_id": "COCO-LM", "token_count": 566 }
195
# 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 re WHITESPACE_NORMALIZER = re.compile(r"\s+") SPACE = chr(32) SPACE_ESCAPE = chr(9601) # excluding non-breaking space (160) here PRIN...
COCO-LM/fairseq/fairseq/data/encoders/byte_utils.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/data/encoders/byte_utils.py", "repo_id": "COCO-LM", "token_count": 800 }
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 torch from . import FairseqDataset class IdDataset(FairseqDataset): def __getitem__(self, index): return index def ...
COCO-LM/fairseq/fairseq/data/id_dataset.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/data/id_dataset.py", "repo_id": "COCO-LM", "token_count": 146 }
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 itertools import json import logging import math import os from collections import OrderedDict, defaultdict from fairseq import utils ...
COCO-LM/fairseq/fairseq/data/multilingual/multilingual_data_manager.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/data/multilingual/multilingual_data_manager.py", "repo_id": "COCO-LM", "token_count": 23039 }
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 logging import numpy as np from fairseq.data import BaseWrapperDataset, plasma_utils logger = logging.getLogger(__name__) class Re...
COCO-LM/fairseq/fairseq/data/resampling_dataset.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/data/resampling_dataset.py", "repo_id": "COCO-LM", "token_count": 1912 }
199
# 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 torch from . import FairseqDataset class TransformEosLangPairDataset(FairseqDataset): """A :class:...
COCO-LM/fairseq/fairseq/data/transform_eos_lang_pair_dataset.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/data/transform_eos_lang_pair_dataset.py", "repo_id": "COCO-LM", "token_count": 1790 }
200
# 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 uuid from typing import Dict, Optional from torch import Tensor class FairseqIncrementalState(object): def __init__(self, *args,...
COCO-LM/fairseq/fairseq/incremental_decoding_utils.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/incremental_decoding_utils.py", "repo_id": "COCO-LM", "token_count": 699 }
201
# 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 torch.nn as nn from fairseq.model_parallel.modules import ( ModelParallelTransformerDecoderLayer, ModelParallel...
COCO-LM/fairseq/fairseq/model_parallel/models/transformer.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/model_parallel/models/transformer.py", "repo_id": "COCO-LM", "token_count": 1575 }
202
# 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. """ Base classes for various fairseq models. """ import logging from argparse import Namespace from typing import Dict, List, Optional, Tuple ...
COCO-LM/fairseq/fairseq/models/fairseq_model.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/models/fairseq_model.py", "repo_id": "COCO-LM", "token_count": 8781 }
203
# 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 numpy as np import torch import torch.nn.functional as F from fairseq.models import register_model, register_model_architecture from fa...
COCO-LM/fairseq/fairseq/models/nat/insertion_transformer.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/models/nat/insertion_transformer.py", "repo_id": "COCO-LM", "token_count": 4742 }
204
#!/usr/bin/env python3 import logging import math from typing import Dict, List, Optional, Tuple import torch import torch.nn as nn import torch.nn.functional as F from fairseq.data.data_utils import lengths_to_padding_mask from fairseq import checkpoint_utils, utils from fairseq.models import ( FairseqEncoder, ...
COCO-LM/fairseq/fairseq/models/speech_to_text/convtransformer.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/models/speech_to_text/convtransformer.py", "repo_id": "COCO-LM", "token_count": 7742 }
205
# 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 List import torch from fairseq.modules.quant_noise import quant_noise from torch import nn class AdaptiveInput(nn.Modul...
COCO-LM/fairseq/fairseq/modules/adaptive_input.py/0
{ "file_path": "COCO-LM/fairseq/fairseq/modules/adaptive_input.py", "repo_id": "COCO-LM", "token_count": 1290 }
206