text stringlengths 5 22M | id stringlengths 12 177 | metadata dict | __index_level_0__ int64 0 1.37k |
|---|---|---|---|
# Retrain Workspace | Cream/Cream/experiments/workspace/retrain/README.md/0 | {
"file_path": "Cream/Cream/experiments/workspace/retrain/README.md",
"repo_id": "Cream",
"token_count": 5
} | 333 |
import math
import torch.nn as nn
from timm.utils import *
from timm.models.layers.activations import Swish
from timm.models.layers import CondConv2d, get_condconv_initializer
def parse_ksize(ss):
if ss.isdigit():
return int(ss)
else:
return [int(k) for k in ss.split('.')]
def decode_arch_d... | Cream/Cream/lib/utils/builder_util.py/0 | {
"file_path": "Cream/Cream/lib/utils/builder_util.py",
"repo_id": "Cream",
"token_count": 4620
} | 334 |
# EfficientViT for Object Detection and Instance Segmentation
The codebase implements the object detection and instance segmentation framework with [MMDetection](https://github.com/open-mmlab/mmdetection), using EfficientViT as the backbone.
## Model Zoo
### RetinaNet Object Detection
|Model | Pretrain | Lr Schd | B... | Cream/EfficientViT/downstream/README.md/0 | {
"file_path": "Cream/EfficientViT/downstream/README.md",
"repo_id": "Cream",
"token_count": 1886
} | 335 |
# model settings
norm_cfg = dict(type='BN', requires_grad=False)
model = dict(
type='FasterRCNN',
pretrained='open-mmlab://detectron2/resnet50_caffe',
backbone=dict(
type='ResNet',
depth=50,
num_stages=3,
strides=(1, 2, 2),
dilations=(1, 1, 1),
out_indices=(2,... | Cream/EfficientViT/downstream/configs/_base_/models/faster_rcnn_r50_caffe_c4.py/0 | {
"file_path": "Cream/EfficientViT/downstream/configs/_base_/models/faster_rcnn_r50_caffe_c4.py",
"repo_id": "Cream",
"token_count": 2254
} | 336 |
# optimizer
optimizer = dict(type='SGD', lr=0.02, momentum=0.9, weight_decay=0.0001)
optimizer_config = dict(grad_clip=None)
# learning policy
lr_config = dict(
policy='step',
warmup='linear',
warmup_iters=500,
warmup_ratio=0.001,
step=[16, 22])
runner = dict(type='EpochBasedRunner', max_epochs=24)
| Cream/EfficientViT/downstream/configs/_base_/schedules/schedule_2x.py/0 | {
"file_path": "Cream/EfficientViT/downstream/configs/_base_/schedules/schedule_2x.py",
"repo_id": "Cream",
"token_count": 135
} | 337 |
import torch
import rpe_index_cpp
EXPECTED_VERSION = "1.2.0"
assert rpe_index_cpp.version() == EXPECTED_VERSION, \
f"""Unmatched `rpe_index_cpp` version: {rpe_index_cpp.version()}, expected version: {EXPECTED_VERSION}
Please re-build the package `rpe_ops`."""
class RPEIndexFunction(torch.autograd.Function):... | Cream/MiniViT/Mini-DeiT/rpe_ops/rpe_index.py/0 | {
"file_path": "Cream/MiniViT/Mini-DeiT/rpe_ops/rpe_index.py",
"repo_id": "Cream",
"token_count": 1572
} | 338 |
MODEL:
TYPE: swin
NAME: swin_tiny_patch4_window7_224
DROP_PATH_RATE: 0.2
SWIN:
EMBED_DIM: 96
DEPTHS: [ 2, 2, 6, 2 ]
NUM_HEADS: [ 3, 6, 12, 24 ]
WINDOW_SIZE: 7 | Cream/MiniViT/Mini-Swin/configs/swin_tiny_patch4_window7_224.yaml/0 | {
"file_path": "Cream/MiniViT/Mini-Swin/configs/swin_tiny_patch4_window7_224.yaml",
"repo_id": "Cream",
"token_count": 102
} | 339 |
OPENAI_DATASET_MEAN = (0.48145466, 0.4578275, 0.40821073)
OPENAI_DATASET_STD = (0.26862954, 0.26130258, 0.27577711)
| Cream/TinyCLIP/src/open_clip/constants.py/0 | {
"file_path": "Cream/TinyCLIP/src/open_clip/constants.py",
"repo_id": "Cream",
"token_count": 66
} | 340 |
import hashlib
import os
import time
import urllib
import warnings
from functools import partial
from typing import Dict, Union
from tqdm import tqdm
from .version import __version__
try:
from huggingface_hub import hf_hub_download
hf_hub_download = partial(
hf_hub_download, library_name="open_clip",... | Cream/TinyCLIP/src/open_clip/pretrained.py/0 | {
"file_path": "Cream/TinyCLIP/src/open_clip/pretrained.py",
"repo_id": "Cream",
"token_count": 6734
} | 341 |
# --------------------------------------------------------
# TinyViT Utils
# Copyright (c) 2022 Microsoft
# --------------------------------------------------------
import torch
import torch.distributed as dist
def reduce_tensor(tensor, n=None):
if n is None:
n = dist.get_world_size()
rt = tensor.clo... | Cream/TinyCLIP/src/training/my_meter.py/0 | {
"file_path": "Cream/TinyCLIP/src/training/my_meter.py",
"repo_id": "Cream",
"token_count": 829
} | 342 |
MODEL:
NAME: TinyViT-21M-1k
TYPE: tiny_vit
DROP_PATH_RATE: 0.2
TINY_VIT:
DEPTHS: [ 2, 2, 6, 2 ]
NUM_HEADS: [ 3, 6, 12, 18 ]
WINDOW_SIZES: [ 7, 7, 14, 7 ]
EMBED_DIMS: [96, 192, 384, 576]
| Cream/TinyViT/configs/1k/tiny_vit_21m.yaml/0 | {
"file_path": "Cream/TinyViT/configs/1k/tiny_vit_21m.yaml",
"repo_id": "Cream",
"token_count": 127
} | 343 |
""" AutoAugment, RandAugment, and AugMix for PyTorch
This code implements the searched ImageNet policies with various tweaks and improvements and
does not include any of the search code.
AA and RA Implementation adapted from:
https://github.com/tensorflow/tpu/blob/master/models/official/efficientnet/autoaugment.p... | Cream/TinyViT/data/augmentation/auto_augment.py/0 | {
"file_path": "Cream/TinyViT/data/augmentation/auto_augment.py",
"repo_id": "Cream",
"token_count": 13996
} | 344 |
""" A dataset parser that reads tarfile based datasets
This parser can read and extract image samples from:
* a single tar of image files
* a folder of multiple tarfiles containing imagefiles
* a tar of tars containing image files
Labels are based on the combined folder and/or tar name structure.
Hacked together by ... | Cream/TinyViT/data/augmentation/parsers/parser_image_in_tar.py/0 | {
"file_path": "Cream/TinyViT/data/augmentation/parsers/parser_image_in_tar.py",
"repo_id": "Cream",
"token_count": 3968
} | 345 |
# --------------------------------------------------------
# TinyViT Utils (save/load checkpoints, etc.)
# Copyright (c) 2022 Microsoft
# Based on the code: Swin Transformer
# (https://github.com/microsoft/swin-transformer)
# Adapted for TinyViT
# --------------------------------------------------------
import os
im... | Cream/TinyViT/utils.py/0 | {
"file_path": "Cream/TinyViT/utils.py",
"repo_id": "Cream",
"token_count": 6809
} | 346 |
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
"""
Various positional encodings for the transformer.
"""
import math
import torch
from torch import nn
from util.misc import NestedTensor
class PositionEmbeddingSine(nn.Module):
"""
This is a more standard version of the position embeddi... | Cream/iRPE/DETR-with-iRPE/models/position_encoding.py/0 | {
"file_path": "Cream/iRPE/DETR-with-iRPE/models/position_encoding.py",
"repo_id": "Cream",
"token_count": 1509
} | 347 |
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
"""
Misc functions, including distributed helpers.
Mostly copy-paste from torchvision references.
"""
import os
import subprocess
import time
from collections import defaultdict, deque
import datetime
import pickle
from typing import Optional, List... | Cream/iRPE/DETR-with-iRPE/util/misc.py/0 | {
"file_path": "Cream/iRPE/DETR-with-iRPE/util/misc.py",
"repo_id": "Cream",
"token_count": 7011
} | 348 |
from .default import _C as config
from .default import update_config
from .default import _update_config_from_file
from .default import save_config
| CvT/lib/config/__init__.py/0 | {
"file_path": "CvT/lib/config/__init__.py",
"repo_id": "CvT",
"token_count": 38
} | 349 |
from .build import build_optimizer
| CvT/lib/optim/__init__.py/0 | {
"file_path": "CvT/lib/optim/__init__.py",
"repo_id": "CvT",
"token_count": 9
} | 350 |
InvalidTimestamps = '''The timestamp column specified is malformed.'''
InvalidSeriesOrder = '''The timestamp column specified is not in ascending order.'''
DuplicateSeriesTimestamp = '''The timestamp column specified has duplicated timestamps.'''
InvalidValueFormat = '''The data in column "{0}" can not be parsed as flo... | anomalydetector/aml_component/error_messages.py/0 | {
"file_path": "anomalydetector/aml_component/error_messages.py",
"repo_id": "anomalydetector",
"token_count": 220
} | 351 |
from setuptools import setup, find_packages, Extension
from Cython.Build import cythonize
from Cython.Distutils import build_ext
import numpy as np
__version__ = "can't find version.py"
exec(compile(open('version.py').read(),
'version.py', 'exec'))
extensions = [
Extension("msanomalydetector._anomaly... | anomalydetector/setup.py/0 | {
"file_path": "anomalydetector/setup.py",
"repo_id": "anomalydetector",
"token_count": 430
} | 352 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from abc import abstractmethod
from typing import Any
from overrides import EnforceOverrides
class DatasetProvider(EnforceOverrides):
"""Abstract class for dataset providers.
This class serves as a base for implementing dataset provid... | archai/archai/api/dataset_provider.py/0 | {
"file_path": "archai/archai/api/dataset_provider.py",
"repo_id": "archai",
"token_count": 903
} | 353 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from typing import Union, Optional
from pathlib import Path
import pandas as pd
def get_search_csv(output_path: Union[str, Path], iteration_num: Optional[int] = -1) -> pd.DataFrame:
"""Reads the search csv file from the output path and retu... | archai/archai/common/notebook_helper.py/0 | {
"file_path": "archai/archai/common/notebook_helper.py",
"repo_id": "archai",
"token_count": 708
} | 354 |
# 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 Flowers102
from torchvision.transforms import ToTensor
from archai.api.dataset_provider import DatasetPr... | archai/archai/datasets/cv/flowers102_dataset_provider.py/0 | {
"file_path": "archai/archai/datasets/cv/flowers102_dataset_provider.py",
"repo_id": "archai",
"token_count": 811
} | 355 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
#
# Copyright (c) Hazy Research.
# Licensed under the BSD-3-Clause license.
# https://github.com/HazyResearch/flash-attention/blob/main/training/src/datamodules
from __future__ import annotations
import math
import mmap
import sys
from typing im... | archai/archai/datasets/nlp/fast_hf_dataset_provider_utils.py/0 | {
"file_path": "archai/archai/datasets/nlp/fast_hf_dataset_provider_utils.py",
"repo_id": "archai",
"token_count": 2639
} | 356 |
# 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 tqdm import tqdm
from archai.common.ordered_dict_logger import OrderedDictLogger
from archai.discrete_search.api.archai_model import A... | archai/archai/discrete_search/algos/local_search.py/0 | {
"file_path": "archai/archai/discrete_search/algos/local_search.py",
"repo_id": "archai",
"token_count": 3521
} | 357 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
| archai/archai/discrete_search/evaluators/nlp/__init__.py/0 | {
"file_path": "archai/archai/discrete_search/evaluators/nlp/__init__.py",
"repo_id": "archai",
"token_count": 17
} | 358 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from archai.discrete_search.search_spaces.benchmark.natsbench_tss import (
NatsbenchTssSearchSpace,
)
| archai/archai/discrete_search/search_spaces/benchmark/__init__.py/0 | {
"file_path": "archai/archai/discrete_search/search_spaces/benchmark/__init__.py",
"repo_id": "archai",
"token_count": 58
} | 359 |
from .codegen.model import CodeGenForCausalLM, CodeGenConfig
from .gpt2.model import GPT2LMHeadModel, GPT2Config
BACKBONES = {
'codegen': CodeGenForCausalLM,
'gpt2': GPT2LMHeadModel
}
CONFIGS = {
'codegen': CodeGenConfig,
'gpt2': GPT2Config
}
| archai/archai/discrete_search/search_spaces/nlp/tfpp/backbones/__init__.py/0 | {
"file_path": "archai/archai/discrete_search/search_spaces/nlp/tfpp/backbones/__init__.py",
"repo_id": "archai",
"token_count": 111
} | 360 |
# TD: [2023-01-05]: Extracted the OptimModule class from
# https://github.com/HazyResearch/state-spaces/blob/06dbbdfd0876501a7f12bf3262121badbc7658af/src/models/sequence/ss/kernel.py
import torch.nn as nn
class OptimModule(nn.Module):
""" Interface for Module that allows registering buffers/parameters with confi... | archai/archai/discrete_search/search_spaces/nlp/tfpp/ops/ssm_utils/utils.py/0 | {
"file_path": "archai/archai/discrete_search/search_spaces/nlp/tfpp/ops/ssm_utils/utils.py",
"repo_id": "archai",
"token_count": 313
} | 361 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import json
from copy import deepcopy
from hashlib import sha1
from random import Random
from typing import Any, Dict, List, Optional
import torch
from overrides import overrides
from transformers.modeling_utils import no_init_weights
from trans... | archai/archai/discrete_search/search_spaces/nlp/transformer_flex/search_space.py/0 | {
"file_path": "archai/archai/discrete_search/search_spaces/nlp/transformer_flex/search_space.py",
"repo_id": "archai",
"token_count": 5025
} | 362 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from overrides import overrides
from archai.supergraph.algos.darts.bilevel_arch_trainer import BilevelArchTrainer
from archai.supergraph.algos.darts.darts_model_desc_builder import DartsModelDescBuilder
from archai.supergraph.nas.arch_trainer im... | archai/archai/supergraph/algos/darts/darts_exp_runner.py/0 | {
"file_path": "archai/archai/supergraph/algos/darts/darts_exp_runner.py",
"repo_id": "archai",
"token_count": 214
} | 363 |
"""Builds the Pytorch computational graph.
Tensors flowing into a single vertex are added together for all vertices
except the output, which is concatenated instead. Tensors flowing out of input
are always added.
If interior edge channels don't match, drop the extra channels (channels are
guaranteed non-decreasing). ... | archai/archai/supergraph/algos/nasbench101/model.py/0 | {
"file_path": "archai/archai/supergraph/algos/nasbench101/model.py",
"repo_id": "archai",
"token_count": 4009
} | 364 |
import os
import torch
import torch.nn as nn
__all__ = ['AlexNet','alexnet']
class AlexNet(nn.Module):
def __init__(self,num_classes=1000,init_weights='True'):
super(AlexNet,self).__init__()
self.features=nn.Sequential(
nn.Conv2d(3, 96, kernel_size=(11,11), stride=(4,4), padding=2),
... | archai/archai/supergraph/models/alexnet.py/0 | {
"file_path": "archai/archai/supergraph/models/alexnet.py",
"repo_id": "archai",
"token_count": 1529
} | 365 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import copy
from typing import Dict, Optional, Tuple
from overrides import EnforceOverrides
from archai.common.config import Config
from archai.common.ordered_dict_logger import get_global_logger
from archai.supergraph.datasets import data
from... | archai/archai/supergraph/nas/searcher.py/0 | {
"file_path": "archai/archai/supergraph/nas/searcher.py",
"repo_id": "archai",
"token_count": 2713
} | 366 |
# Copyright (c) 2020 abhuse.
# Licensed under the MIT license.
# https://github.com/ildoonet/pytorch-gradual-warmup-lr
from typing import Any, Dict, List, Optional
from torch.optim.lr_scheduler import ReduceLROnPlateau, _LRScheduler
from torch.optim.optimizer import Optimizer
class GradualWarmupScheduler(_LRSchedul... | archai/archai/trainers/gradual_warmup_scheduler.py/0 | {
"file_path": "archai/archai/trainers/gradual_warmup_scheduler.py",
"repo_id": "archai",
"token_count": 1645
} | 367 |
# in toy mode, load the confif for algo and then override with common settings for toy mode
# any additional algo specific toy mode settings will go in this file
__include__: ['divnas.yaml', 'toy_common.yaml']
# disable seed train and post train by setting the epochs to 0
nas:
search:
seed_train:
trainer:
... | archai/confs/algos/divnas_toy.yaml/0 | {
"file_path": "archai/confs/algos/divnas_toy.yaml",
"repo_id": "archai",
"token_count": 159
} | 368 |
common:
checkpoint:
freq: 20
dataset:
max_batches: -1
autoaug:
loader:
epochs: 200
batch: 512
lr_schedule:
type: 'cosine'
warmup:
multiplier: 4
epochs: 5
optimizer:
lr: 0.1
type: 'sgd'
nesterov: True
d... | archai/confs/aug/aug_cifar_sgd_resnet50.yaml/0 | {
"file_path": "archai/confs/aug/aug_cifar_sgd_resnet50.yaml",
"repo_id": "archai",
"token_count": 221
} | 369 |
__include__: './size_224x224_base.yaml' # inherit settings for 224x224 dataset
dataset_eval: # search dataset default is cifar10, we override eval dataset to sport8
name: 'sport8'
n_classes: 8
channels: 3 # number of channels in image
max_batches: -1 # if >= 0 then only these many batches are generated (useful... | archai/confs/datasets/sport8.yaml/0 | {
"file_path": "archai/confs/datasets/sport8.yaml",
"repo_id": "archai",
"token_count": 126
} | 370 |
import argparse
import uuid
import json
import os
from archai.common.store import ArchaiStore
from commands import make_train_model_command
from azure.ai.ml import Input, MLClient
from azure.ai.ml.identity import AzureMLOnBehalfOfCredential
from azure.identity import DefaultAzureCredential
from archai.discrete_search.s... | archai/docs/advanced_guide/cloud/azure/notebooks/multi_node_search/scripts/training_pipeline.py/0 | {
"file_path": "archai/docs/advanced_guide/cloud/azure/notebooks/multi_node_search/scripts/training_pipeline.py",
"repo_id": "archai",
"token_count": 2850
} | 371 |
<jupyter_start><jupyter_text>Implementing a Custom TrainerAbstract base classes (ABCs) define a blueprint for a class, specifying its methods and attributes, but not its implementation. They are important in implementing a consistent interface, as they enforce a set of requirements on implementing classes and make it e... | archai/docs/getting_started/notebooks/api/trainer_base.ipynb/0 | {
"file_path": "archai/docs/getting_started/notebooks/api/trainer_base.ipynb",
"repo_id": "archai",
"token_count": 2531
} | 372 |
<jupyter_start><jupyter_text>Creating Memory Mapped NLP-based DataIn this notebook, we will use a fast dataset provider-based abstraction that interfaces with Hugging Face's `datasets` (and has been created by HazyResearch). The key advantage of this approach is the use of either shared memory or memory maps in Python ... | archai/docs/getting_started/notebooks/nlp/fast_hf_dataset_provider.ipynb/0 | {
"file_path": "archai/docs/getting_started/notebooks/nlp/fast_hf_dataset_provider.ipynb",
"repo_id": "archai",
"token_count": 1667
} | 373 |
Computer Vision
===============
.. toctree::
:maxdepth: 2
archai.datasets.cv.transforms
FGVC Aircraft Dataset Provider
------------------------------
.. automodule:: archai.datasets.cv.aircraft_dataset_provider
:members:
:undoc-members:
:show-inheritance:
Caltech-Based Dataset Provider
-------------... | archai/docs/reference/api/archai.datasets.cv.rst/0 | {
"file_path": "archai/docs/reference/api/archai.datasets.cv.rst",
"repo_id": "archai",
"token_count": 996
} | 374 |
Segmentation DAG
================
Model
-----
.. automodule:: archai.discrete_search.search_spaces.cv.segmentation_dag.model
:members:
:undoc-members:
Operators
---------
.. automodule:: archai.discrete_search.search_spaces.cv.segmentation_dag.ops
:members:
:undoc-members:
Search Space
------------
..... | archai/docs/reference/api/archai.discrete_search.search_spaces.cv.segmentation_dag.rst/0 | {
"file_path": "archai/docs/reference/api/archai.discrete_search.search_spaces.cv.segmentation_dag.rst",
"repo_id": "archai",
"token_count": 161
} | 375 |
NasBench-101
============
Base Operators
--------------
.. automodule:: archai.supergraph.algos.nasbench101.base_ops
:members:
:undoc-members:
Operators
---------
.. automodule:: archai.supergraph.algos.nasbench101.nasbench101_op
:members:
:undoc-members:
Configuration
-------------
.. automodule:: ar... | archai/docs/reference/api/archai.supergraph.algos.nasbench101.rst/0 | {
"file_path": "archai/docs/reference/api/archai.supergraph.algos.nasbench101.rst",
"repo_id": "archai",
"token_count": 520
} | 376 |
Roadmap
=======
This section of the documentation is designed to give users a sense of what to expect from Archai in the coming months and years, and to provide insight into the direction and focus of future work.
The roadmap is organized into broad categories or themes, with each category representing a key area. Wi... | archai/docs/reference/roadmap.rst/0 | {
"file_path": "archai/docs/reference/roadmap.rst",
"repo_id": "archai",
"token_count": 95
} | 377 |
# Copyright (c) EleutherAI.
# Licensed under the MIT license.
# https://github.com/EleutherAI/lm-evaluation-harness/blob/master/main.py
import fnmatch
from typing import List
def pattern_match(patterns: List[str], source_list: List[str]) -> List[str]:
task_names = set()
for pattern in patterns:
for ... | archai/research/lm_eval_harness/lm_eval_harness/utils/regex.py/0 | {
"file_path": "archai/research/lm_eval_harness/lm_eval_harness/utils/regex.py",
"repo_id": "archai",
"token_count": 335
} | 378 |
#!/bin/bash
#fail if any errors
set -e
nvidia-smi --list-gpus
gpu_count=$(nvidia-smi --query-gpu=name --format=csv,noheader | wc -l)
echo "*****************************************"
echo "Using $gpu_count GPUS"
echo "*****************************************"
set -e -o xtrace
python -m torch.distributed.launch --... | archai/scripts/supergraph/dist_main.sh/0 | {
"file_path": "archai/scripts/supergraph/dist_main.sh",
"repo_id": "archai",
"token_count": 123
} | 379 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
# Copyright 2019 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apac... | archai/scripts/supergraph/nasbench101/archai_train.py/0 | {
"file_path": "archai/scripts/supergraph/nasbench101/archai_train.py",
"repo_id": "archai",
"token_count": 1327
} | 380 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import argparse
import os
import pathlib
import re
from collections import OrderedDict
from inspect import getsourcefile
import subprocess
import sys
from typing import Dict, Iterator, List, Tuple
import matplotlib
import yaml
try:
from run... | archai/scripts/supergraph/reports/exprep.py/0 | {
"file_path": "archai/scripts/supergraph/reports/exprep.py",
"repo_id": "archai",
"token_count": 6983
} | 381 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from argparse import ArgumentParser
from pathlib import Path
import os
import sys
import yaml
from typing import Optional, Dict
from azure.identity import DefaultAzureCredential
from azure.ai.ml.entities import UserIdentityConfiguration
from azure... | archai/tasks/face_segmentation/aml.py/0 | {
"file_path": "archai/tasks/face_segmentation/aml.py",
"repo_id": "archai",
"token_count": 3186
} | 382 |
# 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 unlock(con_str, experiment_name):
parser = argparse.ArgumentParser(
description='Unlock all job... | archai/tasks/face_segmentation/aml/azure/unlock.py/0 | {
"file_path": "archai/tasks/face_segmentation/aml/azure/unlock.py",
"repo_id": "archai",
"token_count": 341
} | 383 |
ο»Ώ<?xml version="1.0" encoding="utf-8"?>
<DirectedGraph GraphDirection="TopToBottom" Layout="Sugiyama" Offset="-1829.8148940022802,-883.0494917160034" ZoomLevel="1" xmlns="http://schemas.microsoft.com/vs/2009/dgml">
<Nodes>
<Node Id="..." Bounds="-891.259155273438,-398.550804903068,50,25.96" UseManualLocation="Tru... | archai/tasks/face_segmentation/aml/images/snpe.dgml/0 | {
"file_path": "archai/tasks/face_segmentation/aml/images/snpe.dgml",
"repo_id": "archai",
"token_count": 3387
} | 384 |
## Readme
This folder contains code for running models using the Qualcomm SNPE Neural Processing SDK,
including quantizing those models and running them on the Qualcomm DSP.
This folder uses http://github.com/microsoft/olive to do the actual SNPE work.
1. **Snapdragon 888 Dev Kit** - get one of these [Snapdragon 888 ... | archai/tasks/face_segmentation/aml/snpe/readme.md/0 | {
"file_path": "archai/tasks/face_segmentation/aml/snpe/readme.md",
"repo_id": "archai",
"token_count": 1270
} | 385 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
"""Adapted from torchvision https://github.com/pytorch/vision/blob/main/references/classification/train.py"""
import copy
import datetime
import os
import time
import warnings
import torch
import torch.utils.data
import torchvision
import transf... | archai/tasks/facial_landmark_detection/train.py/0 | {
"file_path": "archai/tasks/facial_landmark_detection/train.py",
"repo_id": "archai",
"token_count": 8576
} | 386 |
{
"arch_type": "gpt2",
"d_inner": 960,
"d_model": 704,
"dropatt": 0.0,
"max_sequence_length": 1024,
"n_head": 2,
"n_layer": 9,
"vocab_size": 50257
} | archai/tasks/text_generation/models/gpt2_46e7c68a025417e20a7e13bd4c1ee71438d28069/0 | {
"file_path": "archai/tasks/text_generation/models/gpt2_46e7c68a025417e20a7e13bd4c1ee71438d28069",
"repo_id": "archai",
"token_count": 83
} | 387 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from unittest.mock import MagicMock
from overrides import overrides
from archai.api.trainer_base import TrainerBase
class MyTrainer(TrainerBase):
def __init__(self) -> None:
super().__init__()
@overrides
def train(self) -... | archai/tests/api/test_trainer_base.py/0 | {
"file_path": "archai/tests/api/test_trainer_base.py",
"repo_id": "archai",
"token_count": 248
} | 388 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import pytest
from archai.datasets.nlp.tokenizer_utils.token_config import (
SpecialTokenEnum,
TokenConfig,
)
@pytest.fixture
def token_config():
return TokenConfig(
bos_token="<bos>",
eos_token="<eos>",
unk... | archai/tests/datasets/nlp/tokenizer_utils/test_token_config.py/0 | {
"file_path": "archai/tests/datasets/nlp/tokenizer_utils/test_token_config.py",
"repo_id": "archai",
"token_count": 672
} | 389 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from typing import List
from unittest.mock import MagicMock
import numpy as np
from overrides import overrides
from archai.discrete_search.api.archai_model import ArchaiModel
from archai.discrete_search.api.search_space import (
BayesOptSea... | archai/tests/discrete_search/api/test_search_space.py/0 | {
"file_path": "archai/tests/discrete_search/api/test_search_space.py",
"repo_id": "archai",
"token_count": 876
} | 390 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import pytest
from transformers import PretrainedConfig
from archai.onnx.config_utils.codegen_onnx_config import CodeGenOnnxConfig
@pytest.fixture
def dummy_config_codegen():
class DummyConfig(PretrainedConfig):
max_position_embedd... | archai/tests/onnx/config_utils/test_codegen_onnx_config.py/0 | {
"file_path": "archai/tests/onnx/config_utils/test_codegen_onnx_config.py",
"repo_id": "archai",
"token_count": 293
} | 391 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import pytest
from archai.quantization.quantization_utils import rgetattr, rsetattr
@pytest.fixture
def obj():
class DummyInnerObject:
def __init__(self):
self.attr = "some inner value"
class DummyObject:
d... | archai/tests/quantization/test_quantization_utils.py/0 | {
"file_path": "archai/tests/quantization/test_quantization_utils.py",
"repo_id": "archai",
"token_count": 446
} | 392 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import numpy as np
import pytest
import torch
from torch.optim import SGD
from archai.trainers.gradual_warmup_scheduler import GradualWarmupScheduler
@pytest.fixture
def optimizer():
return SGD([torch.randn(2, 2, requires_grad=True)], 0.1)... | archai/tests/trainers/test_gradual_warmup_scheduler.py/0 | {
"file_path": "archai/tests/trainers/test_gradual_warmup_scheduler.py",
"repo_id": "archai",
"token_count": 601
} | 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/released/graph/__init__.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/released/graph/__init__.py",
"repo_id": "azure-devops-python-api",
"token_count": 371
} | 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/released/policy/__init__.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/released/policy/__init__.py",
"repo_id": "azure-devops-python-api",
"token_count": 200
} | 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/released/symbol/__init__.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/released/symbol/__init__.py",
"repo_id": "azure-devops-python-api",
"token_count": 203
} | 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/released/wiki/__init__.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/released/wiki/__init__.py",
"repo_id": "azure-devops-python-api",
"token_count": 421
} | 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_0/audit/models.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_0/audit/models.py",
"repo_id": "azure-devops-python-api",
"token_count": 4894
} | 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_0/core/models.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_0/core/models.py",
"repo_id": "azure-devops-python-api",
"token_count": 14889
} | 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_0/feature_management/__init__.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_0/feature_management/__init__.py",
"repo_id": "azure-devops-python-api",
"token_count": 196
} | 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_0/notification/models.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_0/notification/models.py",
"repo_id": "azure-devops-python-api",
"token_count": 27095
} | 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_0/pipelines/pipelines_client.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_0/pipelines/pipelines_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 6316
} | 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_0/security/models.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_0/security/models.py",
"repo_id": "azure-devops-python-api",
"token_count": 4356
} | 403 |
ο»Ώ# --------------------------------------------------------------------------------------------
# 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/task_agent/__init__.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_0/task_agent/__init__.py",
"repo_id": "azure-devops-python-api",
"token_count": 1343
} | 404 |
ο»Ώ# --------------------------------------------------------------------------------------------
# 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/models.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_0/token_admin/models.py",
"repo_id": "azure-devops-python-api",
"token_count": 2643
} | 405 |
ο»Ώ# --------------------------------------------------------------------------------------------
# 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/work_item_tracking_client.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_0/work_item_tracking/work_item_tracking_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 50934
} | 406 |
ο»Ώ# --------------------------------------------------------------------------------------------
# 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/build/models.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/build/models.py",
"repo_id": "azure-devops-python-api",
"token_count": 57486
} | 407 |
ο»Ώ# --------------------------------------------------------------------------------------------
# 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/customer_intelligence/models.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/customer_intelligence/models.py",
"repo_id": "azure-devops-python-api",
"token_count": 353
} | 408 |
ο»Ώ# --------------------------------------------------------------------------------------------
# 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/__init__.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/identity/__init__.py",
"repo_id": "azure-devops-python-api",
"token_count": 317
} | 409 |
ο»Ώ# --------------------------------------------------------------------------------------------
# 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/pipelines_checks/pipelines_checks_client.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/pipelines_checks/pipelines_checks_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 4538
} | 410 |
ο»Ώ# --------------------------------------------------------------------------------------------
# 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/py_pi_api/__init__.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/py_pi_api/__init__.py",
"repo_id": "azure-devops-python-api",
"token_count": 238
} | 411 |
ο»Ώ# --------------------------------------------------------------------------------------------
# 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/models.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/service_endpoint/models.py",
"repo_id": "azure-devops-python-api",
"token_count": 23307
} | 412 |
ο»Ώ# --------------------------------------------------------------------------------------------
# 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/__init__.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/test/__init__.py",
"repo_id": "azure-devops-python-api",
"token_count": 1225
} | 413 |
ο»Ώ# --------------------------------------------------------------------------------------------
# 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/models.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/upack_api/models.py",
"repo_id": "azure-devops-python-api",
"token_count": 2655
} | 414 |
ο»Ώ# --------------------------------------------------------------------------------------------
# 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/work_item_tracking_process/work_item_tracking_process_client.py/0 | {
"file_path": "azure-devops-python-api/azure-devops/azure/devops/v7_1/work_item_tracking_process/work_item_tracking_process_client.py",
"repo_id": "azure-devops-python-api",
"token_count": 31805
} | 415 |
##
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
##
"""Defines interfaces for interacting with Azure Quantum"""
import logging
from .version import __version__
from .job.job import *
from .job.session import *
from .workspace import *
from ._client.models._enums impo... | azure-quantum-python/azure-quantum/azure/quantum/__init__.py/0 | {
"file_path": "azure-quantum-python/azure-quantum/azure/quantum/__init__.py",
"repo_id": "azure-quantum-python",
"token_count": 139
} | 416 |
# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by ... | azure-quantum-python/azure-quantum/azure/quantum/_client/operations/_operations.py/0 | {
"file_path": "azure-quantum-python/azure-quantum/azure/quantum/_client/operations/_operations.py",
"repo_id": "azure-quantum-python",
"token_count": 35108
} | 417 |
##
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
##
import abc
import logging
import uuid
from enum import Enum
from datetime import datetime, timezone, timedelta
from urllib.parse import urlparse, parse_qs
from typing import Any, Dict, Optional, TYPE_CHECKING
from azure... | azure-quantum-python/azure-quantum/azure/quantum/job/base_job.py/0 | {
"file_path": "azure-quantum-python/azure-quantum/azure/quantum/job/base_job.py",
"repo_id": "azure-quantum-python",
"token_count": 5854
} | 418 |
##
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
##
import warnings
import inspect
from itertools import groupby
from typing import Dict, List, Optional, Tuple, Type
from azure.quantum import Workspace
try:
from qiskit.providers import ProviderV1 as Provider
from qiskit.providers.ex... | azure-quantum-python/azure-quantum/azure/quantum/qiskit/provider.py/0 | {
"file_path": "azure-quantum-python/azure-quantum/azure/quantum/qiskit/provider.py",
"repo_id": "azure-quantum-python",
"token_count": 4587
} | 419 |
"""Defines targets and helper functions for the Pasqal provider"""
##
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
##
__all__ = [
"Result",
]
import json
from typing import Union, Dict, List, TypeVar, cast
from ...job import Job
class Result:
"""Downloads t... | azure-quantum-python/azure-quantum/azure/quantum/target/pasqal/result.py/0 | {
"file_path": "azure-quantum-python/azure-quantum/azure/quantum/target/pasqal/result.py",
"repo_id": "azure-quantum-python",
"token_count": 565
} | 420 |
##
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
##
# A resource estimation CLI that can execute resource estimation jobs from
# various input formats and generate JSON output.
import argparse
import json
import os
import sys
from azure.quantum import Workspace
from azure.quantum.target.mic... | azure-quantum-python/azure-quantum/examples/resource_estimation/cli.py/0 | {
"file_path": "azure-quantum-python/azure-quantum/examples/resource_estimation/cli.py",
"repo_id": "azure-quantum-python",
"token_count": 1351
} | 421 |
# Unit tests
## Environment Pre-reqs
Refer to [the parent README](../README.md) for how to prepare the development environment before running the unit tests.
### Environment variables for Recording and Live-Tests
The 'recordings' directory is used to replay network connections.
To manually **create new recordings**... | azure-quantum-python/azure-quantum/tests/README.md/0 | {
"file_path": "azure-quantum-python/azure-quantum/tests/README.md",
"repo_id": "azure-quantum-python",
"token_count": 2245
} | 422 |
interactions:
- request:
body: client_id=PLACEHOLDER&grant_type=client_credentials&client_assertion=PLACEHOLDER&client_info=1&client_assertion_type=PLACEHOLDER&scope=https%3A%2F%2Fquantum.microsoft.com%2F.default
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
... | azure-quantum-python/azure-quantum/tests/unit/recordings/test_parametrized_quil.yaml/0 | {
"file_path": "azure-quantum-python/azure-quantum/tests/unit/recordings/test_parametrized_quil.yaml",
"repo_id": "azure-quantum-python",
"token_count": 14633
} | 423 |
interactions:
- request:
body: client_id=PLACEHOLDER&grant_type=client_credentials&client_assertion=PLACEHOLDER&client_info=1&client_assertion_type=PLACEHOLDER&scope=https%3A%2F%2Fquantum.microsoft.com%2F.default
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
... | azure-quantum-python/azure-quantum/tests/unit/recordings/test_plugins_submit_qiskit_to_ionq_with_default_shots.yaml/0 | {
"file_path": "azure-quantum-python/azure-quantum/tests/unit/recordings/test_plugins_submit_qiskit_to_ionq_with_default_shots.yaml",
"repo_id": "azure-quantum-python",
"token_count": 20909
} | 424 |
interactions:
- request:
body: client_id=PLACEHOLDER&grant_type=client_credentials&client_assertion=PLACEHOLDER&client_info=1&client_assertion_type=PLACEHOLDER&scope=https%3A%2F%2Fquantum.microsoft.com%2F.default
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
... | azure-quantum-python/azure-quantum/tests/unit/recordings/test_qiskit_get_ionq_native_gateset.yaml/0 | {
"file_path": "azure-quantum-python/azure-quantum/tests/unit/recordings/test_qiskit_get_ionq_native_gateset.yaml",
"repo_id": "azure-quantum-python",
"token_count": 5294
} | 425 |
interactions:
- request:
body: client_id=PLACEHOLDER&grant_type=client_credentials&client_assertion=PLACEHOLDER&client_info=1&client_assertion_type=PLACEHOLDER&scope=https%3A%2F%2Fquantum.microsoft.com%2F.default
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
... | azure-quantum-python/azure-quantum/tests/unit/recordings/test_qsharp_qir_inline_quantinuum_h2.yaml/0 | {
"file_path": "azure-quantum-python/azure-quantum/tests/unit/recordings/test_qsharp_qir_inline_quantinuum_h2.yaml",
"repo_id": "azure-quantum-python",
"token_count": 21747
} | 426 |
interactions:
- request:
body: client_id=PLACEHOLDER&grant_type=client_credentials&client_info=1&client_secret=PLACEHOLDER&scope=https%3A%2F%2Fquantum.microsoft.com%2F.default
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
... | azure-quantum-python/azure-quantum/tests/unit/recordings/test_session_with_target_open_session.yaml/0 | {
"file_path": "azure-quantum-python/azure-quantum/tests/unit/recordings/test_session_with_target_open_session.yaml",
"repo_id": "azure-quantum-python",
"token_count": 1716
} | 427 |
##
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
##
import re
import unittest
from unittest.mock import Mock
import pytest
from common import QuantumTestBase, RegexScrubbingPatterns
from azure.quantum import Job, JobDetails
from azure.quantum.target import Target
class... | azure-quantum-python/azure-quantum/tests/unit/test_job_results.py/0 | {
"file_path": "azure-quantum-python/azure-quantum/tests/unit/test_job_results.py",
"repo_id": "azure-quantum-python",
"token_count": 1448
} | 428 |
<jupyter_start><jupyter_text>ππ Hello, world: Submit a Cirq job to QuantinuumIn this notebook, we'll review the basics of Azure Quantum by submitting a simple *job*, or quantum program, to [Quantinuum](https://www.quantinuum.com/). We will use [Cirq](https://quantumai.google/cirq) to express the quantum job. Submit ... | azure-quantum-python/samples/hello-world/HW-quantinuum-cirq.ipynb/0 | {
"file_path": "azure-quantum-python/samples/hello-world/HW-quantinuum-cirq.ipynb",
"repo_id": "azure-quantum-python",
"token_count": 1794
} | 429 |
---
page_type: sample
author: guenp
description: Variational Quantum Eigensolver
ms.author: guenp@microsoft.com
ms.date: 05/02/2022
languages:
- python
products:
- azure-quantum
---
# Estimating the ground state energy of hydrogen using variational quantum eigensolvers (VQE) on Azure Quantum
This sample shows how to ... | azure-quantum-python/samples/vqe/README.md/0 | {
"file_path": "azure-quantum-python/samples/vqe/README.md",
"repo_id": "azure-quantum-python",
"token_count": 247
} | 430 |
/*------------------------------------
Copyright (c) Microsoft Corporation.
Licensed under the MIT License.
All rights reserved.
------------------------------------ */
import React from "react";
import { IColumn } from "@fluentui/react";
import { Icon } from "@fluentui/react/lib/Icon";
import { mergeStyleSets } ... | azure-quantum-python/visualization/react-lib/src/components/table/Column.tsx/0 | {
"file_path": "azure-quantum-python/visualization/react-lib/src/components/table/Column.tsx",
"repo_id": "azure-quantum-python",
"token_count": 943
} | 431 |
Alignment
=========
.. js:autoclass:: Alignment
:members:
| bistring/docs/JavaScript/Alignment.rst/0 | {
"file_path": "bistring/docs/JavaScript/Alignment.rst",
"repo_id": "bistring",
"token_count": 24
} | 432 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.