text stringlengths 5 22M | id stringlengths 12 177 | metadata dict | __index_level_0__ int64 0 1.37k |
|---|---|---|---|
# ------------------------------------------------------------------------------
# DeepLabV3+ decoder.
# Written by Bowen Cheng (bcheng9@illinois.edu)
# ------------------------------------------------------------------------------
from collections import OrderedDict
import torch
from torch import nn
from torch.nn im... | Cream/CDARTS/CDARTS_segmentation/segmentation/model/decoder/deeplabv3plus.py/0 | {
"file_path": "Cream/CDARTS/CDARTS_segmentation/segmentation/model/decoder/deeplabv3plus.py",
"repo_id": "Cream",
"token_count": 905
} | 311 |
# ------------------------------------------------------------------------------
# Reference: https://github.com/facebookresearch/detectron2/blob/master/detectron2/engine/hooks.py#L195
# Modified by Bowen Cheng (bcheng9@illinois.edu)
# ------------------------------------------------------------------------------
from... | Cream/CDARTS/CDARTS_segmentation/segmentation/solver/utils.py/0 | {
"file_path": "Cream/CDARTS/CDARTS_segmentation/segmentation/solver/utils.py",
"repo_id": "Cream",
"token_count": 448
} | 312 |
from datasets.BaseDataset import BaseDataset
class CamVid(BaseDataset):
@classmethod
def get_class_colors(*args):
return [[128, 0, 0], [128, 128, 0], [128, 128, 128], [64, 0, 128],
[192, 128, 128], [128, 64, 128], [64, 64, 0], [64, 64, 128],
[192, 192, 128], [0, 0, 192]... | Cream/CDARTS/CDARTS_segmentation/tools/datasets/camvid/camvid.py/0 | {
"file_path": "Cream/CDARTS/CDARTS_segmentation/tools/datasets/camvid/camvid.py",
"repo_id": "Cream",
"token_count": 331
} | 313 |
from __future__ import division
import os
import sys
import time
import glob
import json
import logging
import argparse
from tqdm import tqdm
import torch
import torch.nn as nn
import torch.utils
import torch.nn.functional as F
import torch.optim as optim
import torch.distributed as dist
from tensorboardX import Summa... | Cream/CDARTS/CDARTS_segmentation/tools/utils/cal_model.py/0 | {
"file_path": "Cream/CDARTS/CDARTS_segmentation/tools/utils/cal_model.py",
"repo_id": "Cream",
"token_count": 3832
} | 314 |
from __future__ import division
import os
import sys
import time
import glob
import json
import logging
import argparse
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns
import warnings; warnings.filterwarnings(action='once')
class NpEncoder(json.JSONEncoder):
def d... | Cream/CDARTS/CDARTS_segmentation/train/cal_model.py/0 | {
"file_path": "Cream/CDARTS/CDARTS_segmentation/train/cal_model.py",
"repo_id": "Cream",
"token_count": 784
} | 315 |
import torch.nn as nn
import torch.nn.functional as F
import torch
class CrossEntropyLoss2d(nn.Module):
def __init__(self, weight=None, size_average=True, ignore_index=-100):
super(CrossEntropyLoss2d, self).__init__()
self.nll_loss = nn.NLLLoss(weight, size_average, ignore_index)
def forward(... | Cream/CDARTS/CDARTS_segmentation/train/loss.py/0 | {
"file_path": "Cream/CDARTS/CDARTS_segmentation/train/loss.py",
"repo_id": "Cream",
"token_count": 1386
} | 316 |
import torch
import torch.nn as nn
from utils import utils
from datasets import data_utils
from models.loss import CrossEntropyLabelSmooth
def train(train_loader, model, optimizer, epoch, writer, logger, config):
device = torch.device("cuda")
if config.label_smooth > 0:
criterion = CrossEntropyLabelSmo... | Cream/CDARTS/benchmark201/core/pretrain_function.py/0 | {
"file_path": "Cream/CDARTS/benchmark201/core/pretrain_function.py",
"repo_id": "Cream",
"token_count": 6837
} | 317 |
""" CNN cell for network augmentation """
import torch
import torch.nn as nn
from lib.models import ops
import lib.utils.genotypes as gt
class AugmentCell(nn.Module):
""" Cell for augmentation
Each edge is discrete.
"""
def __init__(self, genotype, C_pp, C_p, C, reduction_p, reduction, bn_affine=True)... | Cream/CDARTS/lib/models/augment_cells.py/0 | {
"file_path": "Cream/CDARTS/lib/models/augment_cells.py",
"repo_id": "Cream",
"token_count": 645
} | 318 |
# Test Workspace | Cream/Cream/experiments/workspace/test/README.md/0 | {
"file_path": "Cream/Cream/experiments/workspace/test/README.md",
"repo_id": "Cream",
"token_count": 4
} | 319 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# Written by Hao Du and Houwen Peng
# email: haodu8-c@my.cityu.edu.hk and houwen.peng@microsoft.com
import torch
from ptflops import get_model_complexity_info
class FlopsEst(object):
def __init__(self, model, input_shape=(2, 3, 224, 224), ... | Cream/Cream/lib/utils/flops_table.py/0 | {
"file_path": "Cream/Cream/lib/utils/flops_table.py",
"repo_id": "Cream",
"token_count": 1459
} | 320 |
dataset_type = 'CityscapesDataset'
data_root = 'data/cityscapes/'
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [
dict(type='LoadImageFromFile'),
dict(type='LoadAnnotations', with_bbox=True),
dict(
type='Resize', img_scale=[(2048,... | Cream/EfficientViT/downstream/configs/_base_/datasets/cityscapes_detection.py/0 | {
"file_path": "Cream/EfficientViT/downstream/configs/_base_/datasets/cityscapes_detection.py",
"repo_id": "Cream",
"token_count": 929
} | 321 |
_base_ = [
'./_base_/models/mask_rcnn_efficientvit_fpn.py',
'./_base_/datasets/coco_instance.py',
'./_base_/schedules/schedule_1x.py',
'./_base_/default_runtime.py'
]
model = dict(
pretrained=None,
backbone=dict(
type='EfficientViT_M4',
pretrained="/root/efficientvit_m4.... | Cream/EfficientViT/downstream/configs/mask_rcnn_efficientvit_m4_fpn_1x_coco.py/0 | {
"file_path": "Cream/EfficientViT/downstream/configs/mask_rcnn_efficientvit_m4_fpn_1x_coco.py",
"repo_id": "Cream",
"token_count": 634
} | 322 |
#include <c10/cuda/CUDAGuard.h>
#include <torch/extension.h>
#include <THC/THCAtomics.cuh>
#include <vector>
using index_t = int;
const int HIP_MAX_GRID_NUM = 65535;
const int HIP_MAX_NUM_THREADS = 512;
inline int HIP_GET_NUM_THREADS(const int n) {
return std::min(HIP_MAX_NUM_THREADS, ((n + 31) / 32) * 32);
}
in... | Cream/MiniViT/Mini-DeiT/rpe_ops/rpe_index_cuda.cu/0 | {
"file_path": "Cream/MiniViT/Mini-DeiT/rpe_ops/rpe_index_cuda.cu",
"repo_id": "Cream",
"token_count": 2412
} | 323 |
MODEL:
TYPE: swin_minivit_distill
NAME: swin_tiny_patch4_window7_224_minivit
DROP_PATH_RATE: 0.0
SWIN:
EMBED_DIM: 96
DEPTHS: [ 2, 2, 6, 2 ]
NUM_HEADS: [ 3, 6, 12, 24 ]
WINDOW_SIZE: 7
MINIVIT:
SEPARATE_LAYERNUM_LIST: [1, 1, 1, 1] | Cream/MiniViT/Mini-Swin/configs/swin_tiny_patch4_window7_224_minivit_sharenum6.yaml/0 | {
"file_path": "Cream/MiniViT/Mini-Swin/configs/swin_tiny_patch4_window7_224_minivit_sharenum6.yaml",
"repo_id": "Cream",
"token_count": 140
} | 324 |
import torch
import torch.distributed as dist
from utils import reduce_tensor
class AverageMeter:
"""Computes and stores the average and current value"""
def __init__(self):
self.reset()
def reset(self):
self.val = 0
self.avg = 0
self.sum = 0
self.count = 0
def... | Cream/MiniViT/Mini-Swin/my_meter.py/0 | {
"file_path": "Cream/MiniViT/Mini-Swin/my_meter.py",
"repo_id": "Cream",
"token_count": 415
} | 325 |
import json
import logging
import os
import pathlib
import re
from copy import deepcopy
from pathlib import Path
from typing import Optional, Tuple
import torch
from .constants import OPENAI_DATASET_MEAN, OPENAI_DATASET_STD
from .model import CLIP, convert_weights_to_fp16, resize_pos_embed
from .openai import load_op... | Cream/TinyCLIP/src/open_clip/factory.py/0 | {
"file_path": "Cream/TinyCLIP/src/open_clip/factory.py",
"repo_id": "Cream",
"token_count": 3760
} | 326 |
import torch
from torch import nn
import torch.nn.functional as F
from collections import OrderedDict
class Bottleneck(nn.Module):
expansion = 4
def __init__(self, inplanes, planes, stride=1):
super().__init__()
# all conv layers have stride 1. an avgpool is performed after the second convol... | Cream/TinyCLIP/src/open_clip/resnet.py/0 | {
"file_path": "Cream/TinyCLIP/src/open_clip/resnet.py",
"repo_id": "Cream",
"token_count": 3494
} | 327 |
from torch import optim
import logging
class EmptyOptimizer:
def __init__(self):
self.param_groups = []
def step(self, *args, **kwargs):
pass
def state_dict(self):
return dict()
def load_state_dict(self, *args, **kwargs):
pass
def zero_grad(self):
pass
... | Cream/TinyCLIP/src/training/optimizer.py/0 | {
"file_path": "Cream/TinyCLIP/src/training/optimizer.py",
"repo_id": "Cream",
"token_count": 1798
} | 328 |
import logging
from .constants import *
_logger = logging.getLogger(__name__)
def resolve_data_config(args, default_cfg={}, model=None, use_test_size=False, verbose=False):
new_config = {}
default_cfg = default_cfg
if not default_cfg and model is not None and hasattr(model, 'default_cfg'):
defau... | Cream/TinyViT/data/augmentation/config.py/0 | {
"file_path": "Cream/TinyViT/data/augmentation/config.py",
"repo_id": "Cream",
"token_count": 1235
} | 329 |
""" A dataset parser that reads single tarfile based datasets
This parser can read datasets consisting if a single tarfile containing images.
I am planning to deprecated it in favour of ParerImageInTar.
Hacked together by / Copyright 2020 Ross Wightman
"""
import os
import tarfile
from .parser import Parser
from .cl... | Cream/TinyViT/data/augmentation/parsers/parser_image_tar.py/0 | {
"file_path": "Cream/TinyViT/data/augmentation/parsers/parser_image_tar.py",
"repo_id": "Cream",
"token_count": 1057
} | 330 |
"""Model Inference."""
import torch
import numpy as np
from PIL import Image
from models.tiny_vit import tiny_vit_21m_224
from data import build_transform, imagenet_classnames
from config import get_config
config = get_config()
# Build model
model = tiny_vit_21m_224(pretrained=True)
model.eval()
# Load Image
fname... | Cream/TinyViT/inference.py/0 | {
"file_path": "Cream/TinyViT/inference.py",
"repo_id": "Cream",
"token_count": 299
} | 331 |
from .multi_head_attention import RPEMultiheadAttention
from . import irpe
| Cream/iRPE/DETR-with-iRPE/models/rpe_attention/__init__.py/0 | {
"file_path": "Cream/iRPE/DETR-with-iRPE/models/rpe_attention/__init__.py",
"repo_id": "Cream",
"token_count": 23
} | 332 |
"""
Plotting utilities to visualize training logs.
"""
import torch
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from pathlib import Path, PurePath
def plot_logs(logs, fields=('class_error', 'loss_bbox_unscaled', 'mAP'), ewm_col=0, log_name='log.txt'):
'''
Func... | Cream/iRPE/DETR-with-iRPE/util/plot_utils.py/0 | {
"file_path": "Cream/iRPE/DETR-with-iRPE/util/plot_utils.py",
"repo_id": "Cream",
"token_count": 2006
} | 333 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os.path as op
import yaml
from yacs.config import CfgNode as CN
from lib.utils.comm import comm
_C = CN()
_C.BASE = ['']
_C.NAME = ''
_C.DATA_DIR = ''
_C.DIST_BACKEND = 'nccl'
_C.GPUS = (0,)
# _C.LOG... | CvT/lib/config/default.py/0 | {
"file_path": "CvT/lib/config/default.py",
"repo_id": "CvT",
"token_count": 2530
} | 334 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import torch.nn as nn
import torch.optim as optim
from timm.optim import create_optimizer
def _is_depthwise(m):
return (
isinstance(m, nn.Conv2d)
and m.groups == m.in_channels
and... | CvT/lib/optim/build.py/0 | {
"file_path": "CvT/lib/optim/build.py",
"repo_id": "CvT",
"token_count": 2459
} | 335 |
import argparse
import logging
import os
import pathlib
import sr_detector
import numpy as np
import pandas as pd
from error_messages import *
from constants import *
from azureml.studio.core.io.data_frame_directory import load_data_frame_from_directory, save_data_frame_to_directory
PACKAGE_NAME = 'spectral_residual_a... | anomalydetector/aml_component/invoker.py/0 | {
"file_path": "anomalydetector/aml_component/invoker.py",
"repo_id": "anomalydetector",
"token_count": 2135
} | 336 |
"""
This file is referenced from https://github.com/iopsai/iops/blob/master/evaluation/evaluation.py
"""
import numpy as np
from sklearn.metrics import f1_score, precision_score, recall_score
def get_range_proba(predict, label, delay=7):
predict = np.array(predict)
label = np.array(label)
splits = np.wh... | anomalydetector/srcnn/competition_metric.py/0 | {
"file_path": "anomalydetector/srcnn/competition_metric.py",
"repo_id": "anomalydetector",
"token_count": 2271
} | 337 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from abc import abstractmethod
from overrides import EnforceOverrides
class TrainerBase(EnforceOverrides):
"""Abstract class for trainers.
The `TrainerBase` class provides an abstract interface for training a model. The user
is re... | archai/archai/api/trainer_base.py/0 | {
"file_path": "archai/archai/api/trainer_base.py",
"repo_id": "archai",
"token_count": 835
} | 338 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from __future__ import annotations
import itertools
import logging
import os
import pathlib
import time
from collections import OrderedDict
from types import TracebackType
from typing import Any, Dict, List, Optional, Union
import yaml
from ar... | archai/archai/common/ordered_dict_logger.py/0 | {
"file_path": "archai/archai/common/ordered_dict_logger.py",
"repo_id": "archai",
"token_count": 4092
} | 339 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from typing import Callable, Optional
from overrides import overrides
from torch.utils.data import Dataset
from torchvision.datasets import Food101
from torchvision.transforms import ToTensor
from archai.api.dataset_provider import DatasetProvi... | archai/archai/datasets/cv/food101_dataset_provider.py/0 | {
"file_path": "archai/archai/datasets/cv/food101_dataset_provider.py",
"repo_id": "archai",
"token_count": 793
} | 340 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from typing import Dict, List, Optional, Union
from datasets import load_dataset as hf_load_dataset
from datasets import load_from_disk as hf_load_from_disk
from datasets.arrow_dataset import Dataset
from datasets.dataset_dict import DatasetDict... | archai/archai/datasets/nlp/hf_dataset_provider.py/0 | {
"file_path": "archai/archai/datasets/nlp/hf_dataset_provider.py",
"repo_id": "archai",
"token_count": 2674
} | 341 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import random
from pathlib import Path
from typing import List, Optional
from overrides import overrides
from archai.common.ordered_dict_logger import OrderedDictLogger
from archai.discrete_search.api.archai_model import ArchaiModel
from archai... | archai/archai/discrete_search/algos/random_search.py/0 | {
"file_path": "archai/archai/discrete_search/algos/random_search.py",
"repo_id": "archai",
"token_count": 2212
} | 342 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from typing import List, Optional
from overrides import overrides
from torch import nn
from archai.discrete_search.api.archai_model import ArchaiModel
from archai.discrete_search.api.model_evaluator import ModelEvaluator
class NonEmbeddingPar... | archai/archai/discrete_search/evaluators/nlp/parameters.py/0 | {
"file_path": "archai/archai/discrete_search/evaluators/nlp/parameters.py",
"repo_id": "archai",
"token_count": 636
} | 343 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import random
import re
import warnings
from pathlib import Path
from typing import Any, List, Optional
import nats_bench
import numpy as np
import torch
import yaml
from overrides import overrides
from archai.discrete_search.api.archai_model i... | archai/archai/discrete_search/search_spaces/benchmark/natsbench_tss.py/0 | {
"file_path": "archai/archai/discrete_search/search_spaces/benchmark/natsbench_tss.py",
"repo_id": "archai",
"token_count": 3256
} | 344 |
# coding=utf-8
# Copyright 2020 The Trax 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 copy of the License at... | archai/archai/discrete_search/search_spaces/nlp/tfpp/ops/lsh_utils/modeling_reformer.py/0 | {
"file_path": "archai/archai/discrete_search/search_spaces/nlp/tfpp/ops/lsh_utils/modeling_reformer.py",
"repo_id": "archai",
"token_count": 26144
} | 345 |
from typing import Union, Tuple, Optional
import numpy as np
from archai.discrete_search.search_spaces.config import (
ArchParamTree, repeat_config, ConfigSearchSpace,
DiscreteChoice
)
from .model import LanguageModel
from .ops import OPS
from .utils import get_attn_head_simplex
def to_tuple(x: Union[Tuple[i... | archai/archai/discrete_search/search_spaces/nlp/tfpp/search_space.py/0 | {
"file_path": "archai/archai/discrete_search/search_spaces/nlp/tfpp/search_space.py",
"repo_id": "archai",
"token_count": 1907
} | 346 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import copy
from typing import Optional, Tuple
import torch
from archai.quantization.qat import prepare_with_qat
class MixedQAT(torch.nn.Module):
"""Mixed QAT (Quantization-Aware Training) model, which can be fine-tuned
using a linear... | archai/archai/quantization/mixed_qat.py/0 | {
"file_path": "archai/archai/quantization/mixed_qat.py",
"repo_id": "archai",
"token_count": 942
} | 347 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import copy
from typing import List, Tuple
from overrides import overrides
from archai.common.config import Config
from archai.supergraph.algos.darts.mixed_op import MixedOp
from archai.supergraph.nas.model_desc import (
CellType,
ConvM... | archai/archai/supergraph/algos/darts/darts_model_desc_builder.py/0 | {
"file_path": "archai/archai/supergraph/algos/darts/darts_model_desc_builder.py",
"repo_id": "archai",
"token_count": 1076
} | 348 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from typing import Optional
import torch
import torch.nn.functional as F
from overrides import overrides
from torch import Tensor, nn
from torch.optim.optimizer import Optimizer
from archai.common import ml_utils
from archai.common.common impor... | archai/archai/supergraph/algos/gumbelsoftmax/gs_arch_trainer.py/0 | {
"file_path": "archai/archai/supergraph/algos/gumbelsoftmax/gs_arch_trainer.py",
"repo_id": "archai",
"token_count": 1598
} | 349 |
import logging
from typing import List
import torch
from torch import nn
from archai.common import ml_utils
from archai.supergraph.algos.nasbench101.model import Network
from archai.supergraph.algos.nasbench101.model_spec import ModelSpec
EXAMPLE_VERTEX_OPS = ['input', 'conv1x1-bn-relu', 'conv3x3-bn-relu', 'conv3x3-... | archai/archai/supergraph/algos/nasbench101/model_builder.py/0 | {
"file_path": "archai/archai/supergraph/algos/nasbench101/model_builder.py",
"repo_id": "archai",
"token_count": 605
} | 350 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from overrides import overrides
from archai.supergraph.algos.random.random_model_desc_builder import (
RandomModelDescBuilder,
)
from archai.supergraph.nas.arch_trainer import TArchTrainer
from archai.supergraph.nas.exp_runner import Experim... | archai/archai/supergraph/algos/random/random_exp_runner.py/0 | {
"file_path": "archai/archai/supergraph/algos/random/random_exp_runner.py",
"repo_id": "archai",
"token_count": 182
} | 351 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import os
import torchvision
from overrides import overrides
from torchvision.transforms import transforms
from archai.common import utils
from archai.common.config import Config
from archai.supergraph.datasets.dataset_provider import (
Dat... | archai/archai/supergraph/datasets/providers/aircraft_provider.py/0 | {
"file_path": "archai/archai/supergraph/datasets/providers/aircraft_provider.py",
"repo_id": "archai",
"token_count": 1104
} | 352 |
import os
from collections import OrderedDict
import torch
import torch.nn as nn
import torch.nn.functional as F
__all__ = ['DenseNet', 'densenet121', 'densenet169', 'densenet201', 'densenet161']
class _DenseLayer(nn.Sequential):
def __init__(self, num_input_features, growth_rate, bn_size, drop_rate):
su... | archai/archai/supergraph/models/densenet.py/0 | {
"file_path": "archai/archai/supergraph/models/densenet.py",
"repo_id": "archai",
"token_count": 3535
} | 353 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from abc import ABC
from typing import Iterable, Iterator, Optional, Tuple
from overrides import EnforceOverrides
from torch import nn
from archai.supergraph.nas.arch_params import ArchParams, NNTypes
class ArchModule(nn.Module, ABC, EnforceO... | archai/archai/supergraph/nas/arch_module.py/0 | {
"file_path": "archai/archai/supergraph/nas/arch_module.py",
"repo_id": "archai",
"token_count": 854
} | 354 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from typing import Optional, Tuple
from graphviz import Digraph
from archai.common.ordered_dict_logger import get_global_logger
from archai.common.utils import first_or_default
from archai.supergraph.nas.model_desc import CellDesc, CellType, Mo... | archai/archai/supergraph/nas/vis_model_desc.py/0 | {
"file_path": "archai/archai/supergraph/nas/vis_model_desc.py",
"repo_id": "archai",
"token_count": 1381
} | 355 |
# Copyright (c) 2019-2020, NVIDIA CORPORATION.
# Licensed under the Apache License, Version 2.0.
# https://github.com/NVIDIA/DeepLearningExamples/blob/master/PyTorch/LanguageModeling/Transformer-XL/pytorch/lamb.py
#
# Copyright (c) 2019 cybertronai.
# Licensed under the MIT license.
from typing import Iterable, Option... | archai/archai/trainers/lamb_optimizer.py/0 | {
"file_path": "archai/archai/trainers/lamb_optimizer.py",
"repo_id": "archai",
"token_count": 4282
} | 356 |
__include__: "darts.yaml" # just use darts defaults
nas:
eval:
loader:
train_batch: 96
search:
loader:
val_ratio: 0.0 # don't need val during search in gs
trainer:
epochs: 1
model_desc:
max_final_edges: 1
cell:
gs:
num_sample: 1 | archai/confs/algos/gs.yaml/0 | {
"file_path": "archai/confs/algos/gs.yaml",
"repo_id": "archai",
"token_count": 147
} | 357 |
autoaug:
model:
type: pyramid
depth: 272
alpha: 200
bottleneck: True
loader:
aug: fa_reduced_cifar10
cutout: 16
batch: 64
epochs: 1800
lr_schedule:
type: 'cosine'
optimizer:
type: sgd
lr: 0.05
nesterov: True
decay: 0.00005
| archai/confs/aug/pyramid272_cifar10_b64.yaml/0 | {
"file_path": "archai/confs/aug/pyramid272_cifar10_b64.yaml",
"repo_id": "archai",
"token_count": 138
} | 358 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import os
import json
from glob import glob
from IPython.display import display, Image
from shutil import copyfile, rmtree
from archai.common.store import ArchaiStore
def get_results(store : ArchaiStore, blob_path, output_folder):
""" Fetch ... | archai/docs/advanced_guide/cloud/azure/notebooks/multi_node_search/scripts/utils.py/0 | {
"file_path": "archai/docs/advanced_guide/cloud/azure/notebooks/multi_node_search/scripts/utils.py",
"repo_id": "archai",
"token_count": 906
} | 359 |
Computer Vision
===============
.. toctree::
:maxdepth: 2
Dataset Provider <cv/cv_dataset_provider.ipynb>
PyTorch-Lightining Trainer <cv/pl_trainer.ipynb>
| archai/docs/getting_started/notebooks/cv.rst/0 | {
"file_path": "archai/docs/getting_started/notebooks/cv.rst",
"repo_id": "archai",
"token_count": 66
} | 360 |
<jupyter_start><jupyter_text>Creating NLP-based DataIn this notebook, we will use a dataset provider-based abstraction that interfaces with Hugging Face's `datasets`. Such a library provides access to a large number of NLP-based datasets, including text classification, question-answering, and language modeling, among o... | archai/docs/getting_started/notebooks/nlp/hf_dataset_provider.ipynb/0 | {
"file_path": "archai/docs/getting_started/notebooks/nlp/hf_dataset_provider.ipynb",
"repo_id": "archai",
"token_count": 1163
} | 361 |
Transforms
==========
Brightness
----------
.. automodule:: archai.datasets.cv.transforms.brightness
:members:
:undoc-members:
Custom Cutout
-------------
.. automodule:: archai.datasets.cv.transforms.custom_cutout
:members:
:undoc-members:
Lighting
--------
.. automodule:: archai.datasets.cv.transfor... | archai/docs/reference/api/archai.datasets.cv.transforms.rst/0 | {
"file_path": "archai/docs/reference/api/archai.datasets.cv.transforms.rst",
"repo_id": "archai",
"token_count": 134
} | 362 |
Natural Language Processing
===========================
.. toctree::
:maxdepth: 2
archai.discrete_search.search_spaces.nlp.tfpp
archai.discrete_search.search_spaces.nlp.transformer_flex
| archai/docs/reference/api/archai.discrete_search.search_spaces.nlp.rst/0 | {
"file_path": "archai/docs/reference/api/archai.discrete_search.search_spaces.nlp.rst",
"repo_id": "archai",
"token_count": 67
} | 363 |
Petridish
=========
Evaluater
---------
.. automodule:: archai.supergraph.algos.petridish.evaluater_petridish
:members:
:undoc-members:
Experiment Runner
-----------------
.. automodule:: archai.supergraph.algos.petridish.petridish_exp_runner
:members:
:undoc-members:
Model Description Builder
--------... | archai/docs/reference/api/archai.supergraph.algos.petridish.rst/0 | {
"file_path": "archai/docs/reference/api/archai.supergraph.algos.petridish.rst",
"repo_id": "archai",
"token_count": 299
} | 364 |
Contact
=======
If you have any questions or feedback about the Archai project or the open problems in Neural Architecture Search (NAS), please feel free to contact us using the following information:
* Email: archai@microsoft.com
* Website: https://github.com/microsoft/archai/issues
We welcome any questions, feedba... | archai/docs/support/contact.rst/0 | {
"file_path": "archai/docs/support/contact.rst",
"repo_id": "archai",
"token_count": 270
} | 365 |
# Copyright (c) EleutherAI.
# Licensed under the MIT license.
# https://github.com/EleutherAI/lm-evaluation-harness/blob/master/main.py
from __future__ import annotations
from typing import Any, Optional
REQUEST_RETURN_LENGTHS = {
"generate": None,
"greedy_until": None,
"loglikelihood": 2,
"loglikeli... | archai/research/lm_eval_harness/lm_eval_harness/utils/request_factory.py/0 | {
"file_path": "archai/research/lm_eval_harness/lm_eval_harness/utils/request_factory.py",
"repo_id": "archai",
"token_count": 663
} | 366 |
set -e -o xtrace
bash dist_main.sh --full --no-search --algos darts --datasets cifar10 --nas.eval.final_desc_filename confs/darts_modelsdarts_genotype.yaml --common.apex.min_world_size 2 --nas.eval.trainer.apex.enabled True | archai/scripts/supergraph/dist_test.sh/0 | {
"file_path": "archai/scripts/supergraph/dist_test.sh",
"repo_id": "archai",
"token_count": 84
} | 367 |
import logging
import statistics
from archai.supergraph.algos.nasbench101.nasbench101_dataset import Nasbench101Dataset
def main():
logging.getLogger().setLevel(logging.DEBUG)
# create dataset
nsds = Nasbench101Dataset("~/dataroot/nasbench_ds/nasbench_full.pkl")
vars = [
statistics.variance... | archai/scripts/supergraph/nasbench101/bad_data.py/0 | {
"file_path": "archai/scripts/supergraph/nasbench101/bad_data.py",
"repo_id": "archai",
"token_count": 242
} | 368 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import argparse
import os
import pathlib
import subprocess
import sys
try:
from runstats import Statistics
except:
subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'runstats'])
from runstats import Statistics
def main... | archai/scripts/supergraph/reports/old_logs.py/0 | {
"file_path": "archai/scripts/supergraph/reports/old_logs.py",
"repo_id": "archai",
"token_count": 651
} | 369 |
[flake8]
ignore = E111,E402,E722,W503,W504,F405,F403
max-line-length = 120
| archai/tasks/face_segmentation/aml/.flake8/0 | {
"file_path": "archai/tasks/face_segmentation/aml/.flake8",
"repo_id": "archai",
"token_count": 37
} | 370 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import argparse
import os
import sys
from archai.common.store import ArchaiStore
CONNECTION_NAME = 'MODEL_STORAGE_CONNECTION_STRING'
def upload(con_str, experiment_name, args):
parser = argparse.ArgumentParser(description='Upload a named mo... | archai/tasks/face_segmentation/aml/azure/upload.py/0 | {
"file_path": "archai/tasks/face_segmentation/aml/azure/upload.py",
"repo_id": "archai",
"token_count": 565
} | 371 |
conda activate snap
pushd $SNPE_ROOT
source bin/envsetup.sh -o ~/anaconda3/envs/snap/lib/python3.6/site-packages/onnx
popd
| archai/tasks/face_segmentation/aml/snpe/snpe_setup.sh/0 | {
"file_path": "archai/tasks/face_segmentation/aml/snpe/snpe_setup.sh",
"repo_id": "archai",
"token_count": 52
} | 372 |
from typing import Optional, List, Dict
import torch
@torch.no_grad()
def get_confusion_matrix(pred_labels: torch.LongTensor,
true_labels: torch.LongTensor,
num_labels: int, ignore_index: int = 255) -> torch.LongTensor:
pred_labels, true_labels = pred_labels.view(... | archai/tasks/face_segmentation/training/metrics.py/0 | {
"file_path": "archai/tasks/face_segmentation/training/metrics.py",
"repo_id": "archai",
"token_count": 900
} | 373 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import csv
import subprocess
"""Train the models that are in the pareto front"""
# Please change the following variables to your own path
data_dir = "face_synthetics/dataset_100000"
output_dir = "./output"
csv_file = "search_results.csv"
# Rea... | archai/tasks/facial_landmark_detection/train_candidate_models.py/0 | {
"file_path": "archai/tasks/facial_landmark_detection/train_candidate_models.py",
"repo_id": "archai",
"token_count": 1265
} | 374 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import os
from archai.common.config import Config
def test_config():
# Asserts that it can load keys from a YAML file
config_filepath = "config.yaml"
with open(config_filepath, "w") as f:
f.write("test_key: test_value")
... | archai/tests/common/test_config.py/0 | {
"file_path": "archai/tests/common/test_config.py",
"repo_id": "archai",
"token_count": 159
} | 375 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import pytest
from overrides import overrides
from archai.datasets.nlp.tokenizer_utils.token_config import SpecialTokenEnum
from archai.datasets.nlp.tokenizer_utils.tokenizer_base import TokenizerBase
@pytest.fixture
def tokenizer_base():
... | archai/tests/datasets/nlp/tokenizer_utils/test_tokenizer_base.py/0 | {
"file_path": "archai/tests/datasets/nlp/tokenizer_utils/test_tokenizer_base.py",
"repo_id": "archai",
"token_count": 1169
} | 376 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from overrides import overrides
from archai.discrete_search.api.search_results import SearchResults
from archai.discrete_search.api.searcher import Searcher
class MySearcher(Searcher):
def __init__(self) -> None:
super().__init__()... | archai/tests/discrete_search/api/test_searcher.py/0 | {
"file_path": "archai/tests/discrete_search/api/test_searcher.py",
"repo_id": "archai",
"token_count": 201
} | 377 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import pytest
import torch
from transformers import PretrainedConfig
from archai.onnx.config_utils.gpt2_onnx_config import GPT2FlexOnnxConfig, GPT2OnnxConfig
@pytest.fixture
def dummy_config_gpt2():
class DummyConfig(PretrainedConfig):
... | archai/tests/onnx/config_utils/test_gpt2_onnx_config.py/0 | {
"file_path": "archai/tests/onnx/config_utils/test_gpt2_onnx_config.py",
"repo_id": "archai",
"token_count": 791
} | 378 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import torch
from archai.quantization.quantizers import FakeDynamicQuant
def test_fake_dynamic_quant():
x = torch.randn(4)
# Assert the quint8 quantization type with 8-bit
fake_quant = FakeDynamicQuant(dtype=torch.quint8, bits=8)
... | archai/tests/quantization/test_quantizers.py/0 | {
"file_path": "archai/tests/quantization/test_quantizers.py",
"repo_id": "archai",
"token_count": 1061
} | 379 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import pytest
import torch
from archai.trainers.lamb_optimizer import JITLamb, Lamb
def test_lamb_init():
# Assert default parameter values
lamb = Lamb([torch.randn(10, 5)])
assert lamb.param_groups[0]["lr"] == 1e-3
assert lamb... | archai/tests/trainers/test_lamb_optimizer.py/0 | {
"file_path": "archai/tests/trainers/test_lamb_optimizer.py",
"repo_id": "archai",
"token_count": 1482
} | 380 |
[](https://github.com/microsoft/azure-devops-python-api/actions)
[](https://pypi.python.org/pypi/azure-devops)
# Azure DevOps Python API
This re... | azure-devops-python-api/README.md/0 | {
"file_path": "azure-devops-python-api/README.md",
"repo_id": "azure-devops-python-api",
"token_count": 1027
} | 381 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/released/accounts/accounts_client.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/released/accounts/accounts_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 840
} | 382 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/released/graph/graph_client.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/released/graph/graph_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 2538
} | 383 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/released/policy/policy_client.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/released/policy/policy_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 4773
} | 384 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/released/symbol/symbol_client.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/released/symbol/symbol_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 5672
} | 385 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/released/wiki/wiki_client.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/released/wiki/wiki_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 16066
} | 386 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/v7_0/build/__init__.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_0/build/__init__.py",
"repo_id": "azure-devops-python-api",
"token_count": 999
} | 387 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/v7_0/feature_management/feature_management_client.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_0/feature_management/feature_management_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 5488
} | 388 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/v7_0/graph/graph_client.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_0/graph/graph_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 11401
} | 389 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/v7_0/notification/notification_client.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_0/notification/notification_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 7258
} | 390 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/v7_0/pipelines_checks/__init__.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_0/pipelines_checks/__init__.py",
"repo_id": "azure-devops-python-api",
"token_count": 266
} | 391 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/v7_0/provenance/models.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_0/provenance/models.py",
"repo_id": "azure-devops-python-api",
"token_count": 616
} | 392 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/v7_0/security/security_client.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_0/security/security_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 5587
} | 393 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/v7_0/token_admin/token_admin_client.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_0/token_admin/token_admin_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 1856
} | 394 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/v7_0/work_item_tracking_process/__init__.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_0/work_item_tracking_process/__init__.py",
"repo_id": "azure-devops-python-api",
"token_count": 533
} | 395 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/v7_1/cix/__init__.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/cix/__init__.py",
"repo_id": "azure-devops-python-api",
"token_count": 244
} | 396 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/v7_1/dashboard/__init__.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/dashboard/__init__.py",
"repo_id": "azure-devops-python-api",
"token_count": 286
} | 397 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/v7_1/feed/feed_client.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/feed/feed_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 23109
} | 398 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/v7_1/identity/identity_client.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/identity/identity_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 14419
} | 399 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/v7_1/npm/npm_client.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/npm/npm_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 14608
} | 400 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/v7_1/service_endpoint/service_endpoint_client.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/service_endpoint/service_endpoint_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 7394
} | 401 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/v7_1/test/models.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/test/models.py",
"repo_id": "azure-devops-python-api",
"token_count": 78958
} | 402 |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... | azure-devops-python-api/azure-devops/azure/devops/v7_1/upack_api/upack_api_client.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/upack_api/upack_api_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 5042
} | 403 |
@REM init section. Set _echo=1 to echo everything
@IF NOT DEFINED _echo ECHO OFF
IF EXIST "%BUILD_BINARIESDIRECTORY%\python.3.6.2\tools\python.exe" (
REM Build step installs Python here.
SET PYTHONEXE=%BUILD_BINARIESDIRECTORY%\python.3.6.2\tools\python.exe
) ELSE (
SET PYTHONEXE=python.exe
)
"%PYTHONEXE%"... | azure-devops-python-api/scripts/windows/sdist.cmd/0 | {
"file_path": "azure-devops-python-api/scripts/windows/sdist.cmd",
"repo_id": "azure-devops-python-api",
"token_count": 197
} | 404 |
# coding=utf-8
##
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
##
from ._chained import *
from ._default import _DefaultAzureCredential
from ._token import _TokenFileCredential
| azure-quantum-python/azure-quantum/azure/quantum/_authentication/__init__.py/0 | {
"file_path": "azure-quantum-python/azure-quantum/azure/quantum/_authentication/__init__.py",
"repo_id": "azure-quantum-python",
"token_count": 63
} | 405 |
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
"""Customize generated code here.
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
"""
from typing import List
__all__: List[... | azure-quantum-python/azure-quantum/azure/quantum/_client/operations/_patch.py/0 | {
"file_path": "azure-quantum-python/azure-quantum/azure/quantum/_client/operations/_patch.py",
"repo_id": "azure-quantum-python",
"token_count": 181
} | 406 |
##
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
##
import re
import abc
from typing import Optional
from datetime import date, datetime, timezone
from azure.quantum._client.models import JobStatus
class FilteredJob(abc.ABC):
"""
Mixin for adding methods to fi... | azure-quantum-python/azure-quantum/azure/quantum/job/filtered_job.py/0 | {
"file_path": "azure-quantum-python/azure-quantum/azure/quantum/job/filtered_job.py",
"repo_id": "azure-quantum-python",
"token_count": 753
} | 407 |
"""Defines targets and helper functions for the Pasqal provider"""
##
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
##
__all__ = [
"InputParams",
"Pasqal",
"PasqalTarget",
]
from dataclasses import dataclass
from enum import Enum
from typing import Union, A... | azure-quantum-python/azure-quantum/azure/quantum/target/pasqal/target.py/0 | {
"file_path": "azure-quantum-python/azure-quantum/azure/quantum/target/pasqal/target.py",
"repo_id": "azure-quantum-python",
"token_count": 2049
} | 408 |
{
"arguments": [
{
"name": "bitwidth",
"value": 32,
"type": "Int"
}
]
} | azure-quantum-python/azure-quantum/examples/resource_estimation/cli_test_files/multiplier.json/0 | {
"file_path": "azure-quantum-python/azure-quantum/examples/resource_estimation/cli_test_files/multiplier.json",
"repo_id": "azure-quantum-python",
"token_count": 89
} | 409 |
namespace QSharpBellState {
open Microsoft.Quantum.Intrinsic;
operation BellState_File() : (Result,Result) {
use q0 = Qubit();
use q1 = Qubit();
H(q0);
CNOT(q0, q1);
return (M(q0), M(q1));
}
}
| azure-quantum-python/azure-quantum/tests/unit/QSharpBellState.qs/0 | {
"file_path": "azure-quantum-python/azure-quantum/tests/unit/QSharpBellState.qs",
"repo_id": "azure-quantum-python",
"token_count": 129
} | 410 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.