text
stringlengths
5
22M
id
stringlengths
12
177
metadata
dict
__index_level_0__
int64
0
1.37k
# Codex CLI Installation In order to leverage the Codex CLI tool, you will need to prepare your environment for the shell of your choice. Installation instructions are shown below for each supported shell environment. The following terminal environments are supported: * [Powershell](#powershell-instructions) * [B...
Codex-CLI/Installation.md/0
{ "file_path": "Codex-CLI/Installation.md", "repo_id": "Codex-CLI", "token_count": 2477 }
228
# This repository has been retired. Please visit the [Face QuickStart](https://docs.microsoft.com/en-us/azure/cognitive-services/face/quickstarts/client-libraries?tabs=visual-studio&pivots=programming-language-csharp) to get started with the latest Face SDKs. ### Microsoft Face API: Python SDK & Sample [![PyPi Versio...
Cognitive-Face-Python/README.md/0
{ "file_path": "Cognitive-Face-Python/README.md", "repo_id": "Cognitive-Face-Python", "token_count": 1314 }
229
#!/usr/bin/env python # -*- coding: utf-8 -*- """ File: test_large_face_list.py Description: Unittests for Large Face List section of the Cognitive Face API. """ import uuid import unittest import cognitive_face as CF from . import util class TestFaceList(unittest.TestCase): """Unittests for Large Face List se...
Cognitive-Face-Python/cognitive_face/tests/test_large_face_list.py/0
{ "file_path": "Cognitive-Face-Python/cognitive_face/tests/test_large_face_list.py", "repo_id": "Cognitive-Face-Python", "token_count": 897 }
230
#!/usr/bin/env python # -*- coding: utf-8 -*- """ File: panel_detection.py Description: Detection Panel for Python SDK sample. """ import wx import util import model from view import base class DetectionPanel(base.MyPanel): """Detection Panel.""" def __init__(self, parent): super(DetectionPanel, se...
Cognitive-Face-Python/sample/view/panel_detection.py/0
{ "file_path": "Cognitive-Face-Python/sample/view/panel_detection.py", "repo_id": "Cognitive-Face-Python", "token_count": 1945 }
231
export CUDA_VISIBLE_DEVICES=6 python t5_run_train.py \ --model_name_or_path ./checkpoint/Mod/ContrastExp_pretrain_contrast_set1_seed1/checkpoint-100000 \ --subtask Mod \ --method ContrastExp \ --train_file finetune \ --max_steps 50000 \ --save_steps 50000 \ --batch_size 8 \ --ebatch_size 16 \ --gas 1 \ --seed 1 \ --se...
ContextualSP/abstraction_probing/code/t5_code/Mod_ContrastExp_finetune.sh/0
{ "file_path": "ContextualSP/abstraction_probing/code/t5_code/Mod_ContrastExp_finetune.sh", "repo_id": "ContextualSP", "token_count": 127 }
232
scitail: data_format: PremiseAndOneHypothesis enable_san: false labels: - neutral - entails metric_meta: - ACC loss: CeCriterion kd_loss: MseCriterion adv_loss: SymKlCriterion n_class: 2 task_type: Classification snli: data_format: PremiseAndOneHypothesis enable_san: false labels: - cont...
ContextualSP/adaptershare/experiments/domain_adaptation/domain_adaptation_def.yml/0
{ "file_path": "ContextualSP/adaptershare/experiments/domain_adaptation/domain_adaptation_def.yml", "repo_id": "ContextualSP", "token_count": 183 }
233
# coding=utf-8 # Copyright (c) Microsoft. All rights reserved. # Code is adpated from https://github.com/google-research/bert import json import collections MaskedLmInstance = collections.namedtuple("MaskedLmInstance", ["index", "label"]) def truncate_seq_pair(tokens_a, tokens_b, max_num_tokens, rng): """Truncat...
ContextualSP/adaptershare/experiments/mlm/mlm_utils.py/0
{ "file_path": "ContextualSP/adaptershare/experiments/mlm/mlm_utils.py", "repo_id": "ContextualSP", "token_count": 4163 }
234
# coding=utf-8 # Copyright (c) Microsoft. All rights reserved. import torch import torch.nn as nn import torch.nn.functional as F class DropoutWrapper(nn.Module): """ This is a dropout wrapper which supports the fix mask dropout """ def __init__(self, dropout_p=0, enable_vbp=True): super(Drop...
ContextualSP/adaptershare/module/dropout_wrapper.py/0
{ "file_path": "ContextualSP/adaptershare/module/dropout_wrapper.py", "repo_id": "ContextualSP", "token_count": 616 }
235
import argparse from ast import arg import json import os import torch from torch.utils.data import DataLoader from data_utils.task_def import TaskType from experiments.exp_def import TaskDefs, EncoderModelType from torch.utils.data import Dataset, DataLoader, BatchSampler from mt_dnn.batcher import SingleTaskDataset,...
ContextualSP/adaptershare/predict.py/0
{ "file_path": "ContextualSP/adaptershare/predict.py", "repo_id": "ContextualSP", "token_count": 1318 }
236
[ { "tbl": "203_733", "nt": "nu-0", "columns": [ [ "rank", [ "rank" ], [ "number" ], "number", "1" ], [ "cyclist", [ "cyclist" ], [ "first", "second" ...
ContextualSP/awakening_latent_grounding/data/wtq_grounding/test.json/0
{ "file_path": "ContextualSP/awakening_latent_grounding/data/wtq_grounding/test.json", "repo_id": "ContextualSP", "token_count": 6243405 }
237
#%% import sys sys.path.append("..") from typing import List import matplotlib.pyplot as plt import numpy as np import seaborn as sn import torch from models import * from utils import * from datetime import datetime device = torch.device('cpu') if torch.cuda.is_available() else torch.device('cpu') #%% # Generate a cus...
ContextualSP/awakening_latent_grounding/scripts/align_visualize.py/0
{ "file_path": "ContextualSP/awakening_latent_grounding/scripts/align_visualize.py", "repo_id": "ContextualSP", "token_count": 2671 }
238
# How Do In-Context Examples Affect Compositional Generalization? This is the official repo for the paper *'How Do In-Context Examples Affect Compositional Generalization?'*. This work has been accepted at ACL 2023. ## Data Description We provide the main six versions of CoFe to help reproduce our work. Each line i...
ContextualSP/cofe/README.md/0
{ "file_path": "ContextualSP/cofe/README.md", "repo_id": "ContextualSP", "token_count": 165 }
239
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. # Author: Qian Liu (SivilTaram) # Original Repo: https://github.com/microsoft/ContextualSP import os import pickle import re import sys import traceback from typing import List, Iterable import numpy as np from allennlp.common.checks import Conf...
ContextualSP/incomplete_utterance_rewriting/src/data_reader.py/0
{ "file_path": "ContextualSP/incomplete_utterance_rewriting/src/data_reader.py", "repo_id": "ContextualSP", "token_count": 5007 }
240
# Interactive Text-to-SQL <img src="https://pytorch.org/assets/images/logo-dark.svg" height = "25" align=center /> The official pytorch implementation of our paper ["What Do You Mean by That?" A Parser-Independent Interactive Approach for Enhancing Text-to-SQL](https://arxiv.org/abs/2011.04151).
ContextualSP/interactive_text_to_sql/README.md/0
{ "file_path": "ContextualSP/interactive_text_to_sql/README.md", "repo_id": "ContextualSP", "token_count": 91 }
241
# coding: utf-8 import json import logging import os import random from enum import Enum import dill import torch from transformers import BertTokenizer from torch.utils.data import Dataset, DataLoader from tqdm import tqdm import numpy as np from src.utils.semql_tree_util import Node as SemQLTree from src.component...
ContextualSP/interactive_text_to_sql/src/data.py/0
{ "file_path": "ContextualSP/interactive_text_to_sql/src/data.py", "repo_id": "ContextualSP", "token_count": 6230 }
242
import sys sys.path.append('../executor/') from strongsup.rlong.executor import RLongExecutor from strongsup.rlong.predicate import RLongPredicate from strongsup.rlong.state import RLongAlchemyState from itertools import permutations from random import choices, choice, sample import math import argparse import multipro...
ContextualSP/lemon/corpus_generation/alchemy_corpus_generation.py/0
{ "file_path": "ContextualSP/lemon/corpus_generation/alchemy_corpus_generation.py", "repo_id": "ContextualSP", "token_count": 3549 }
243
import numpy as np import pytest import tensorflow as tf from numpy.testing import assert_almost_equal from tensorflow.python.framework.errors import InvalidArgumentError from gtd.ml.seq_batch import SequenceBatch, FeedSequenceBatch, reduce_mean, reduce_max, reduce_sum from gtd.ml.utils import clean_session from gtd.m...
ContextualSP/lemon/executor/gtd/tests/ml/test_seq_batch.py/0
{ "file_path": "ContextualSP/lemon/executor/gtd/tests/ml/test_seq_batch.py", "repo_id": "ContextualSP", "token_count": 5170 }
244
import os from collections import namedtuple from os.path import join import numpy as np from dependency.data_directory import DataDirectory from gtd.chrono import verboserate from gtd.ml.vocab import SimpleVocab, SimpleEmbeddings from gtd.utils import random_seed, cached_property, ComparableMixin from strongsup.tab...
ContextualSP/lemon/executor/strongsup/embeddings.py/0
{ "file_path": "ContextualSP/lemon/executor/strongsup/embeddings.py", "repo_id": "ContextualSP", "token_count": 3565 }
245
import math class ResultValue(object): """Wrapper class to keep track of valid and final accs for 1-5 utterances Args: valid_acc (list[float]): valid accuracies in order 1-5 final_acc (list[float]): final accuracies in order 1-5 """ def __init__(self, valid_accs, final_accs): ...
ContextualSP/lemon/executor/strongsup/results/result_value.py/0
{ "file_path": "ContextualSP/lemon/executor/strongsup/results/result_value.py", "repo_id": "ContextualSP", "token_count": 1044 }
246
import os from gtd.utils import cached_property from dependency.data_directory import DataDirectory from strongsup.domain import Domain from strongsup.dataset import Dataset, DatasetFromFile from strongsup.tables.predicate import ( FIXED_PREDICATES, WikiTablePredicate, WikiTablePredicateType, ...
ContextualSP/lemon/executor/strongsup/tables/domain.py/0
{ "file_path": "ContextualSP/lemon/executor/strongsup/tables/domain.py", "repo_id": "ContextualSP", "token_count": 1242 }
247
import os import pytest from strongsup.tables.graph import TablesKnowledgeGraph from strongsup.tables.structure import Date, NeqInfiniteSet, RangeInfiniteSet from abc import ABCMeta, abstractmethod class KnowledgeGraphTester(object, metaclass=ABCMeta): def test_properties(self, graph): assert graph.all_r...
ContextualSP/lemon/executor/strongsup/tests/tables/test_graph.py/0
{ "file_path": "ContextualSP/lemon/executor/strongsup/tests/tables/test_graph.py", "repo_id": "ContextualSP", "token_count": 2045 }
248
from abc import ABCMeta, abstractproperty, abstractmethod class World(object, metaclass=ABCMeta): """Encapsulate the world where the LF execution takes place. Depending on the domain, the world can be a graph (tables domain), a list of objects (ctx domain), a grid (blocksworld domain), or other thing...
ContextualSP/lemon/executor/strongsup/world.py/0
{ "file_path": "ContextualSP/lemon/executor/strongsup/world.py", "repo_id": "ContextualSP", "token_count": 296 }
249
FROM python:3.6.8 RUN pip install numpy==1.19.2 RUN pip install scikit-learn==0.23.2 WORKDIR /eqasc ENV PYTHONPATH . ENV PYTHONUNBUFFERED yes COPY allennlp_reasoning_explainqa /eqasc/allennlp_reasoning_explainqa
ContextualSP/lemon/propara_evaluator/aristo-leaderboard/eqasc/code/Dockerfile/0
{ "file_path": "ContextualSP/lemon/propara_evaluator/aristo-leaderboard/eqasc/code/Dockerfile", "repo_id": "ContextualSP", "token_count": 94 }
250
# ProPara * [evaluator](evaluator/) is the program used by the [ProPara Leaderboard](https://leaderboard.allenai.org/) to evaluate submitted predictions. * [data](data/) contains dev, train and test datasets ## Example usage To evaluate dummy predictions against the ProPara test dataset, run this: ``` % export PYTH...
ContextualSP/lemon/propara_evaluator/aristo-leaderboard/propara/README.md/0
{ "file_path": "ContextualSP/lemon/propara_evaluator/aristo-leaderboard/propara/README.md", "repo_id": "ContextualSP", "token_count": 580 }
251
FROM python:3.7.0-alpine3.8 WORKDIR /app/ ENV PYTHONPATH=. COPY errors /app/errors COPY evaluation /app/evaluation COPY evaluator.py /app/evaluator.py COPY process /app/process COPY scoring /app/scoring COPY text /app/text
ContextualSP/lemon/propara_evaluator/aristo-leaderboard/propara/evaluator/Dockerfile/0
{ "file_path": "ContextualSP/lemon/propara_evaluator/aristo-leaderboard/propara/evaluator/Dockerfile", "repo_id": "ContextualSP", "token_count": 95 }
252
from typing import Dict, List, NamedTuple from process.process import Conversion, Move, Input, Output class ProcessSummary(NamedTuple): process_id: int inputs: List[Input] outputs: List[Output] conversions: List[Conversion] moves: List[Move] def __repr__(self): return f"Process {self...
ContextualSP/lemon/propara_evaluator/aristo-leaderboard/propara/evaluator/process/summary.py/0
{ "file_path": "ContextualSP/lemon/propara_evaluator/aristo-leaderboard/propara/evaluator/process/summary.py", "repo_id": "ContextualSP", "token_count": 1037 }
253
## Test case: Made up example prediction for process 1167 * answers.tsv has answers to three processes. * predictions.tsv has a prediction of one process. An evaluation on this prediction should result in an F1 score of 0.686.
ContextualSP/lemon/propara_evaluator/aristo-leaderboard/propara/evaluator/testfiles-3/README.md/0
{ "file_path": "ContextualSP/lemon/propara_evaluator/aristo-leaderboard/propara/evaluator/testfiles-3/README.md", "repo_id": "ContextualSP", "token_count": 58 }
254
""" This was copied from the NLTK source: https://github.com/nltk/nltk/blob/7e06fcb2be41a7dbc23bf0b4f666aef7b915d402/nltk/stem/porter.py It was modified slightly to run outside NLTK. """ """ Porter Stemmer This is the Porter stemming algorithm. It follows the algorithm presented in Porter, M. "An algorithm for...
ContextualSP/lemon/propara_evaluator/aristo-leaderboard/propara/evaluator/text/stemmer.py/0
{ "file_path": "ContextualSP/lemon/propara_evaluator/aristo-leaderboard/propara/evaluator/text/stemmer.py", "repo_id": "ContextualSP", "token_count": 13759 }
255
import os import evaluator import unittest import tempfile import typing class TestAccuracy(unittest.TestCase): def test_EverythingCorrect(self): qa = {"P1": "E", "P2": "N", "P3": "N"} p = {"P1": "E", "P2": "N", "P3": "N"} self.assertEqual(3.0 / 3.0, evaluator.calculate_accuracy(qa, p)) ...
ContextualSP/lemon/propara_evaluator/aristo-leaderboard/scitail/evaluator/test_evaluator.py/0
{ "file_path": "ContextualSP/lemon/propara_evaluator/aristo-leaderboard/scitail/evaluator/test_evaluator.py", "repo_id": "ContextualSP", "token_count": 2377 }
256
python build_gen_train.py --num_examples 40000 --local_rank 1 --start_index 0 & python build_gen_train.py --num_examples 40000 --local_rank 2 --start_index 40000 & python build_gen_train.py --num_examples 40000 --local_rank 3 --start_index 80000 & python build_gen_train.py --num_examples 40000 --local_rank 4 --start_in...
ContextualSP/logigan/corpus_construction/elastic_search/run_gen.sh/0
{ "file_path": "ContextualSP/logigan/corpus_construction/elastic_search/run_gen.sh", "repo_id": "ContextualSP", "token_count": 701 }
257
# coding=utf-8 # Copyright 2018 Mesh TensorFlow authors, T5 Authors and HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
ContextualSP/logigan/pre-training/modeling_t5_with_loss.py/0
{ "file_path": "ContextualSP/logigan/pre-training/modeling_t5_with_loss.py", "repo_id": "ContextualSP", "token_count": 37387 }
258
(('directed', 'film.film.directed_by'), 56438) (('edited', 'film.film.edited_by'), 56145) (('written', 'film.film.written_by'), 55778) (('star', 'film.actor.film/ns:film.performance.film'), 55317) (('writer', 'film.writer.film'), 52945) (('cinematographer', 'film.cinematographer.film'), 52824) (('editor', 'film.editor....
ContextualSP/poset_decoding/data/phrase_table.pred/0
{ "file_path": "ContextualSP/poset_decoding/data/phrase_table.pred", "repo_id": "ContextualSP", "token_count": 3622 }
259
[flake8] # Maximum number of characters on a single line. Ideally, lines should be under 79 characters, # but we allow some leeway before calling it an error. max-line-length = 90 ignore = # D401 First line should be in imperative mood D401, # D202 No blank lines allowed after function docstring D20...
ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/.flake8/0
{ "file_path": "ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/.flake8", "repo_id": "ContextualSP", "token_count": 194 }
260
************************ MatchZoo Model Reference ************************ DenseBaseline ############# Model Documentation ******************* A simple densely connected baseline model. Examples: >>> model = DenseBaseline() >>> model.params['mlp_num_layers'] = 2 >>> model.params['mlp_num_units'] = 300 ...
ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/docs/source/model_reference.rst/0
{ "file_path": "ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/docs/source/model_reference.rst", "repo_id": "ContextualSP", "token_count": 33765 }
261
import numpy as np import matchzoo as mz from matchzoo.engine.base_callback import BaseCallback class Histogram(BaseCallback): """ Generate data with matching histogram. :param embedding_matrix: The embedding matrix used to generator match histogram. :param bin_size: The...
ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/matchzoo/dataloader/callbacks/histogram.py/0
{ "file_path": "ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/matchzoo/dataloader/callbacks/histogram.py", "repo_id": "ContextualSP", "token_count": 866 }
262
# `engine` dependencies span across the entire project, so it's better to # leave this __init__.py empty, and use `from matchzoo.engine.package import # x` or `from matchzoo.engine import package` instead of `from matchzoo # import engine`.
ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/matchzoo/engine/__init__.py/0
{ "file_path": "ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/matchzoo/engine/__init__.py", "repo_id": "ContextualSP", "token_count": 67 }
263
"""Discounted cumulative gain metric for ranking.""" import math import numpy as np from matchzoo.engine.base_metric import ( BaseMetric, sort_and_couple, RankingMetric ) class DiscountedCumulativeGain(RankingMetric): """Disconunted cumulative gain metric.""" ALIAS = ['discounted_cumulative_gain', 'dcg...
ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/matchzoo/metrics/discounted_cumulative_gain.py/0
{ "file_path": "ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/matchzoo/metrics/discounted_cumulative_gain.py", "repo_id": "ContextualSP", "token_count": 977 }
264
"""An implementation of DRMM Model.""" import typing import torch import torch.nn as nn from matchzoo.engine.param_table import ParamTable from matchzoo.engine.param import Param from matchzoo.engine.base_model import BaseModel from matchzoo.dataloader import callbacks from matchzoo.modules import Attention class D...
ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/matchzoo/models/drmm.py/0
{ "file_path": "ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/matchzoo/models/drmm.py", "repo_id": "ContextualSP", "token_count": 1463 }
265
"""Character embedding module.""" import typing import torch import torch.nn as nn class CharacterEmbedding(nn.Module): """ Character embedding module. :param char_embedding_input_dim: The input dimension of character embedding layer. :param char_embedding_output_dim: The output dimension of charact...
ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/matchzoo/modules/character_embedding.py/0
{ "file_path": "ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/matchzoo/modules/character_embedding.py", "repo_id": "ContextualSP", "token_count": 790 }
266
"""Naive Preprocessor.""" from tqdm import tqdm from matchzoo.engine.base_preprocessor import BasePreprocessor from matchzoo import DataPack from .chain_transform import chain_transform from .build_vocab_unit import build_vocab_unit from . import units tqdm.pandas() class NaivePreprocessor(BasePreprocessor): "...
ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/matchzoo/preprocessors/naive_preprocessor.py/0
{ "file_path": "ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/matchzoo/preprocessors/naive_preprocessor.py", "repo_id": "ContextualSP", "token_count": 1051 }
267
from .stateful_unit import StatefulUnit class Vocabulary(StatefulUnit): """ Vocabulary class. :param pad_value: The string value for the padding position. :param oov_value: The string value for the out-of-vocabulary terms. Examples: >>> vocab = Vocabulary(pad_value='[PAD]', oov_value='[O...
ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/matchzoo/preprocessors/units/vocabulary.py/0
{ "file_path": "ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/matchzoo/preprocessors/units/vocabulary.py", "repo_id": "ContextualSP", "token_count": 1170 }
268
"""Timer.""" import time class Timer(object): """Computes elapsed time.""" def __init__(self): """Timer constructor.""" self.reset() def reset(self): """Reset timer.""" self.running = True self.total = 0 self.start = time.time() def resume(self): ...
ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/matchzoo/utils/timer.py/0
{ "file_path": "ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/matchzoo/utils/timer.py", "repo_id": "ContextualSP", "token_count": 375 }
269
import pytest from matchzoo import tasks @pytest.mark.parametrize("task_type", [ tasks.Ranking, tasks.Classification ]) def test_task_listings(task_type): assert task_type.list_available_losses() assert task_type.list_available_metrics() @pytest.mark.parametrize("arg", [None, -1, 0, 1]) def test_classi...
ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/tests/tasks/test_tasks.py/0
{ "file_path": "ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/tests/tasks/test_tasks.py", "repo_id": "ContextualSP", "token_count": 227 }
270
<jupyter_start><jupyter_code>%run init.ipynb preprocessor = mz.models.ConvKNRM.get_default_preprocessor() train_pack_processed = preprocessor.fit_transform(train_pack_raw) dev_pack_processed = preprocessor.transform(dev_pack_raw) test_pack_processed = preprocessor.transform(test_pack_raw) preprocessor.context glove_emb...
ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/tutorials/ranking/conv_knrm.ipynb/0
{ "file_path": "ContextualSP/poset_decoding/traversal_path_prediction/MatchZoo-py/tutorials/ranking/conv_knrm.ipynb", "repo_id": "ContextualSP", "token_count": 806 }
271
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. class SpecialSymbol: copy_delimiter = ' [COPY] ' class CacheMethod: pick = "pickle" dil = "dill" class CacheMode: all = "all" single = "single" class ContextMode: turn_model = "turn" concat_history = "concat" ...
ContextualSP/semantic_parsing_in_context/constant.py/0
{ "file_path": "ContextualSP/semantic_parsing_in_context/constant.py", "repo_id": "ContextualSP", "token_count": 371 }
272
################################ # val: number(float)/string(str)/sql(dict) # col_unit: (agg_id, col_id, isDistinct(bool)) # val_unit: (unit_op, col_unit1, col_unit2) # table_unit: (table_type, col_unit/sql) # cond_unit: (not_op, op_id, val_unit, val1, val2) # condition: [cond_unit1, 'and'/'or', cond_unit2, ...] # sql ...
ContextualSP/semantic_parsing_in_context/scripts/eval/evaluation_sqa.py/0
{ "file_path": "ContextualSP/semantic_parsing_in_context/scripts/eval/evaluation_sqa.py", "repo_id": "ContextualSP", "token_count": 15739 }
273
[ { "id": 0, "database_id": "concert_singer", "interaction": [ { "utterance": "how many singers do we have ?", "db_id": "concert_singer", "query": "SELECT count(*) FROM singer", "question": "How many singers do we have?", "sql": "select count ( * ) from singer...
ContextualSP/unified_parser_text_to_sql/data/spider_schema_linking_tag/dev.json/0
{ "file_path": "ContextualSP/unified_parser_text_to_sql/data/spider_schema_linking_tag/dev.json", "repo_id": "ContextualSP", "token_count": 485588 }
274
################################ # Assumptions: # 1. sql is correct # 2. only table name has alias # 3. only one intersect/union/except # # val: number(float)/string(str)/sql(dict) # col_unit: (agg_id, col_id, isDistinct(bool)) # val_unit: (unit_op, col_unit1, col_unit2) # table_unit: (table_type, col_unit/sql) #...
ContextualSP/unified_parser_text_to_sql/third_party/spider/preprocess/parsed_sql_examples.sql/0
{ "file_path": "ContextualSP/unified_parser_text_to_sql/third_party/spider/preprocess/parsed_sql_examples.sql", "repo_id": "ContextualSP", "token_count": 1577 }
275
import os import random import argparse random.seed(0) parser = argparse.ArgumentParser('Generate SubImageNet', add_help=False) parser.add_argument('--data-path', default='../data/imagenet', type=str, help='dataset path') args = parser.parse_args() data_path = args.data_path ImageNet_train_path = o...
Cream/AutoFormer/lib/subImageNet.py/0
{ "file_path": "Cream/AutoFormer/lib/subImageNet.py", "repo_id": "Cream", "token_count": 828 }
276
import torch.nn as nn def constant_init(module, val, bias=0): nn.init.constant_(module.weight, val) if hasattr(module, 'bias') and module.bias is not None: nn.init.constant_(module.bias, bias) def xavier_init(module, gain=1, bias=0, distribution='normal'): assert distribution in ['uniform', 'nor...
Cream/CDARTS/CDARTS_detection/mmcv/cnn/weight_init.py/0
{ "file_path": "Cream/CDARTS/CDARTS_detection/mmcv/cnn/weight_init.py", "repo_id": "Cream", "token_count": 852 }
277
import cv2 def use_opencv2(): try: major_version = cv2.__version__.split('.')[0] except TypeError: # solves doc generation issue major_version = 4 return major_version == '2' USE_OPENCV2 = use_opencv2()
Cream/CDARTS/CDARTS_detection/mmcv/opencv_info.py/0
{ "file_path": "Cream/CDARTS/CDARTS_detection/mmcv/opencv_info.py", "repo_id": "Cream", "token_count": 100 }
278
from .base import LoggerHook from .pavi import PaviLoggerHook from .tensorboard import TensorboardLoggerHook from .text import TextLoggerHook __all__ = [ 'LoggerHook', 'TextLoggerHook', 'PaviLoggerHook', 'TensorboardLoggerHook' ]
Cream/CDARTS/CDARTS_detection/mmcv/runner/hooks/logger/__init__.py/0
{ "file_path": "Cream/CDARTS/CDARTS_detection/mmcv/runner/hooks/logger/__init__.py", "repo_id": "Cream", "token_count": 88 }
279
import collections import functools import itertools import subprocess from importlib import import_module import six # ABCs from collections will be deprecated in python 3.8+, # while collections.abc is not available in python 2.7 try: import collections.abc as collections_abc except ImportError: import coll...
Cream/CDARTS/CDARTS_detection/mmcv/utils/misc.py/0
{ "file_path": "Cream/CDARTS/CDARTS_detection/mmcv/utils/misc.py", "repo_id": "Cream", "token_count": 2403 }
280
import cv2 import numpy as np from mmcv.image import imread, imwrite from .color import color_val import colorsys def imshow(img, win_name='', wait_time=0): """Show an image. Args: img (str or ndarray): The image to be displayed. win_name (str): The window name. wait_time (int): Value...
Cream/CDARTS/CDARTS_detection/mmcv/visualization/image.py/0
{ "file_path": "Cream/CDARTS/CDARTS_detection/mmcv/visualization/image.py", "repo_id": "Cream", "token_count": 2525 }
281
import torch from ..bbox import assign_and_sample, build_assigner, PseudoSampler, bbox2delta from ..utils import multi_apply def anchor_target(anchor_list, valid_flag_list, gt_bboxes_list, img_metas, target_means, target_stds, ...
Cream/CDARTS/CDARTS_detection/mmdet/core/anchor/anchor_target.py/0
{ "file_path": "Cream/CDARTS/CDARTS_detection/mmdet/core/anchor/anchor_target.py", "repo_id": "Cream", "token_count": 3587 }
282
import torch from .base_sampler import BaseSampler from ..transforms import bbox2roi class OHEMSampler(BaseSampler): def __init__(self, num, pos_fraction, context, neg_pos_ub=-1, add_gt_as_proposals=True, **kwa...
Cream/CDARTS/CDARTS_detection/mmdet/core/bbox/samplers/ohem_sampler.py/0
{ "file_path": "Cream/CDARTS/CDARTS_detection/mmdet/core/bbox/samplers/ohem_sampler.py", "repo_id": "Cream", "token_count": 1589 }
283
from .utils import split_combined_polys from .mask_target import mask_target __all__ = ['split_combined_polys', 'mask_target']
Cream/CDARTS/CDARTS_detection/mmdet/core/mask/__init__.py/0
{ "file_path": "Cream/CDARTS/CDARTS_detection/mmdet/core/mask/__init__.py", "repo_id": "Cream", "token_count": 42 }
284
from functools import partial import numpy as np import torch.utils.data.sampler as _sampler from mmcv.runner import get_dist_info from mmcv.parallel import collate from torch.utils.data import DataLoader from .sampler import GroupSampler, DistributedGroupSampler, DistributedSampler # https://github.com/pytorch/pytor...
Cream/CDARTS/CDARTS_detection/mmdet/datasets/loader/build_loader.py/0
{ "file_path": "Cream/CDARTS/CDARTS_detection/mmdet/datasets/loader/build_loader.py", "repo_id": "Cream", "token_count": 1740 }
285
from __future__ import division import numpy as np import torch import torch.nn as nn from mmcv.cnn import normal_init from mmdet.core import (AnchorGenerator, anchor_target, delta2bbox, multi_apply, multiclass_nms, force_fp32) from ..builder import build_loss from ..registry import HEADS @H...
Cream/CDARTS/CDARTS_detection/mmdet/models/anchor_heads/anchor_head.py/0
{ "file_path": "Cream/CDARTS/CDARTS_detection/mmdet/models/anchor_heads/anchor_head.py", "repo_id": "Cream", "token_count": 6071 }
286
import torch import torch.nn as nn import torch.nn.functional as F import time import numpy as np norm_cfg = { 'BN': nn.BatchNorm2d, 'SyncBN': nn.SyncBatchNorm, 'GN': nn.GroupNorm, } # _norm = 'SyncBN' _norm = 'BN' norm_layer = norm_cfg[_norm] PRIMITIVES = { 'skip': lambda input_size, in_channels, ...
Cream/CDARTS/CDARTS_detection/mmdet/models/backbones/fbnet_blocks.py/0
{ "file_path": "Cream/CDARTS/CDARTS_detection/mmdet/models/backbones/fbnet_blocks.py", "repo_id": "Cream", "token_count": 3544 }
287
import torch.nn as nn from .bbox_head import BBoxHead from ..registry import HEADS from ..utils import ConvModule from .auto_head.build_head import build_search_head class ResidualBlock(nn.Module): def __init__(self, in_channel, out_channel): super(ResidualBlock, self).__init__() self.in_channel...
Cream/CDARTS/CDARTS_detection/mmdet/models/bbox_heads/convfc_bbox_head.py/0
{ "file_path": "Cream/CDARTS/CDARTS_detection/mmdet/models/bbox_heads/convfc_bbox_head.py", "repo_id": "Cream", "token_count": 7402 }
288
import torch.nn as nn from .base import BaseDetector from .. import builder from ..registry import DETECTORS from mmdet.core import bbox2result @DETECTORS.register_module class SingleStageDetector(BaseDetector): def __init__(self, backbone, neck=None, bbox_head...
Cream/CDARTS/CDARTS_detection/mmdet/models/detectors/single_stage.py/0
{ "file_path": "Cream/CDARTS/CDARTS_detection/mmdet/models/detectors/single_stage.py", "repo_id": "Cream", "token_count": 1525 }
289
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import kaiming_init, normal_init from ..builder import build_loss from ..registry import HEADS from ..utils import ConvModule @HEADS.register_module class GridHead(nn.Module): def __init__(self, ...
Cream/CDARTS/CDARTS_detection/mmdet/models/mask_heads/grid_head.py/0
{ "file_path": "Cream/CDARTS/CDARTS_detection/mmdet/models/mask_heads/grid_head.py", "repo_id": "Cream", "token_count": 8290 }
290
import torch import torch.nn as nn from mmcv.cnn import constant_init, normal_init from ..utils import ConvModule class NonLocal2D(nn.Module): """Non-local module. See https://arxiv.org/abs/1711.07971 for details. Args: in_channels (int): Channels of the input feature map. reduction (in...
Cream/CDARTS/CDARTS_detection/mmdet/models/plugins/non_local.py/0
{ "file_path": "Cream/CDARTS/CDARTS_detection/mmdet/models/plugins/non_local.py", "repo_id": "Cream", "token_count": 1910 }
291
import torch from torch.autograd import Function from torch.nn.modules.utils import _pair from .. import deform_conv_cuda class DeformConvFunction(Function): @staticmethod def forward(ctx, input, offset, weight, stride=1, paddin...
Cream/CDARTS/CDARTS_detection/mmdet/ops/dcn/functions/deform_conv.py/0
{ "file_path": "Cream/CDARTS/CDARTS_detection/mmdet/ops/dcn/functions/deform_conv.py", "repo_id": "Cream", "token_count": 3790 }
292
import torch.nn as nn from ..functions.masked_conv import masked_conv2d class MaskedConv2d(nn.Conv2d): """A MaskedConv2d which inherits the official Conv2d. The masked forward doesn't implement the backward function and only supports the stride parameter to be 1 currently. """ def __init__(self,...
Cream/CDARTS/CDARTS_detection/mmdet/ops/masked_conv/modules/masked_conv.py/0
{ "file_path": "Cream/CDARTS/CDARTS_detection/mmdet/ops/masked_conv/modules/masked_conv.py", "repo_id": "Cream", "token_count": 513 }
293
import os import subprocess import time from setuptools import find_packages, setup def readme(): with open('README.md', encoding='utf-8') as f: content = f.read() return content MAJOR = 0 MINOR = 6 PATCH = 0 SUFFIX = '' SHORT_VERSION = '{}.{}.{}{}'.format(MAJOR, MINOR, PATCH, SUFFIX) version_file ...
Cream/CDARTS/CDARTS_detection/setup.py/0
{ "file_path": "Cream/CDARTS/CDARTS_detection/setup.py", "repo_id": "Cream", "token_count": 1406 }
294
from dataloaders.datasets import cityscapes, kd, coco, combine_dbs, pascal, sbd from dataloaders.segdatasets import Cityscapes, CityscapesPanoptic, COCOPanoptic from torch.utils.data import DataLoader import torch.utils.data.distributed def make_data_loader(args, **kwargs): root = args.data_path if args.dist: ...
Cream/CDARTS/CDARTS_segmentation/dataloaders/__init__.py/0
{ "file_path": "Cream/CDARTS/CDARTS_segmentation/dataloaders/__init__.py", "repo_id": "Cream", "token_count": 7903 }
295
from .build import build_transforms from .pre_augmentation_transforms import Resize from .target_transforms import PanopticTargetGenerator, SemanticTargetGenerator
Cream/CDARTS/CDARTS_segmentation/dataloaders/transforms/__init__.py/0
{ "file_path": "Cream/CDARTS/CDARTS_segmentation/dataloaders/transforms/__init__.py", "repo_id": "Cream", "token_count": 43 }
296
""" MIT License Copyright (c) 2019 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, dis...
Cream/CDARTS/CDARTS_segmentation/segmentation/model/backbone/hrnet.py/0
{ "file_path": "Cream/CDARTS/CDARTS_segmentation/segmentation/model/backbone/hrnet.py", "repo_id": "Cream", "token_count": 10761 }
297
# ------------------------------------------------------------------------------ # DeepLabV3 meta architecture. # Written by Bowen Cheng (bcheng9@illinois.edu) # ------------------------------------------------------------------------------ from collections import OrderedDict import torch from torch import nn from ....
Cream/CDARTS/CDARTS_segmentation/segmentation/model/meta_arch/deeplabv3.py/0
{ "file_path": "Cream/CDARTS/CDARTS_segmentation/segmentation/model/meta_arch/deeplabv3.py", "repo_id": "Cream", "token_count": 843 }
298
# ------------------------------------------------------------------------------ # Reference: https://github.com/facebookresearch/detectron2/blob/master/detectron2/utils/logger.py # Modified by Bowen Cheng (bcheng9@illinois.edu) # ------------------------------------------------------------------------------ import fu...
Cream/CDARTS/CDARTS_segmentation/segmentation/utils/logger.py/0
{ "file_path": "Cream/CDARTS/CDARTS_segmentation/segmentation/utils/logger.py", "repo_id": "Cream", "token_count": 3162 }
299
from .coco import COCO __all__ = ['COCO']
Cream/CDARTS/CDARTS_segmentation/tools/datasets/coco/__init__.py/0
{ "file_path": "Cream/CDARTS/CDARTS_segmentation/tools/datasets/coco/__init__.py", "repo_id": "Cream", "token_count": 20 }
300
import math class Iter_LR_Scheduler(object): """Learning Rate Scheduler Step mode: ``lr = baselr * 0.1 ^ {floor(epoch-1 / lr_step)}`` Cosine mode: ``lr = baselr * 0.5 * (1 + cos(iter/maxiter))`` Poly mode: ``lr = baselr * (1 - iter/maxiter) ^ 0.9`` Args: args: :attr:`args.lr_sche...
Cream/CDARTS/CDARTS_segmentation/tools/utils/lr_scheduler.py/0
{ "file_path": "Cream/CDARTS/CDARTS_segmentation/tools/utils/lr_scheduler.py", "repo_id": "Cream", "token_count": 1175 }
301
from __future__ import division import os import sys import time import glob import json import yaml 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 from tensorboardX import SummaryWriter import nump...
Cream/CDARTS/CDARTS_segmentation/train/test_seg.py/0
{ "file_path": "Cream/CDARTS/CDARTS_segmentation/train/test_seg.py", "repo_id": "Cream", "token_count": 3303 }
302
""" Operations """ import torch import torch.nn as nn # from models.sync_batchnorm.batchnorm import SynchronizedBatchNorm2d # BatchNorm2d = SynchronizedBatchNorm2d # from apex.parallel import SyncBatchNorm # BatchNorm2d = SyncBatchNorm BatchNorm2d = nn.BatchNorm2d OPS = { 'none': lambda C, stride, affine: Zero(str...
Cream/CDARTS/lib/models/ops.py/0
{ "file_path": "Cream/CDARTS/lib/models/ops.py", "repo_id": "Cream", "token_count": 3907 }
303
# 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 import torch.nn.functional as F from copy import deepcopy from lib.utils.util import cross_entropy_loss_with_soft_target # Meta Ma...
Cream/Cream/lib/models/MetaMatchingNetwork.py/0
{ "file_path": "Cream/Cream/lib/models/MetaMatchingNetwork.py", "repo_id": "Cream", "token_count": 2301 }
304
# 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 # This file is to demonstrate how to generate subImagenet. import os data_path = './data' ImageNet_train_path = os.path.join(data_path, 'imagenet...
Cream/Cream/tools/generate_subImageNet.py/0
{ "file_path": "Cream/Cream/tools/generate_subImageNet.py", "repo_id": "Cream", "token_count": 822 }
305
""" Train and eval functions used in main.py """ import math import sys from typing import Iterable, Optional import torch from timm.data import Mixup from timm.utils import accuracy, ModelEma from losses import DistillationLoss import utils def set_bn_state(model): for m in model.modules(): if isinstan...
Cream/EfficientViT/classification/engine.py/0
{ "file_path": "Cream/EfficientViT/classification/engine.py", "repo_id": "Cream", "token_count": 1667 }
306
_base_ = 'coco_instance.py' dataset_type = 'LVISV05Dataset' data_root = 'data/lvis_v0.5/' data = dict( samples_per_gpu=2, workers_per_gpu=2, train=dict( _delete_=True, type='ClassBalancedDataset', oversample_thr=1e-3, dataset=dict( type=dataset_type, a...
Cream/EfficientViT/downstream/configs/_base_/datasets/lvis_v0.5_instance.py/0
{ "file_path": "Cream/EfficientViT/downstream/configs/_base_/datasets/lvis_v0.5_instance.py", "repo_id": "Cream", "token_count": 400 }
307
# model settings norm_cfg = dict(type='GN', num_groups=32, requires_grad=True) model = dict( type='RepPointsV2MaskDetector', pretrained=None, backbone=dict( type='SwinTransformer', embed_dim=96, depths=[2, 2, 6, 2], num_heads=[3, 6, 12, 24], window_size=7, mlp...
Cream/EfficientViT/downstream/configs/_base_/models/mask_reppointsv2_swin_bifpn.py/0
{ "file_path": "Cream/EfficientViT/downstream/configs/_base_/models/mask_reppointsv2_swin_bifpn.py", "repo_id": "Cream", "token_count": 2328 }
308
# -*- coding: utf-8 -*- from .checkpoint import load_checkpoint, load_state_dict, _load_checkpoint __all__ = ['load_checkpoint', 'load_state_dict', '_load_checkpoint']
Cream/EfficientViT/downstream/mmcv_custom/__init__.py/0
{ "file_path": "Cream/EfficientViT/downstream/mmcv_custom/__init__.py", "repo_id": "Cream", "token_count": 63 }
309
import os import yaml from yacs.config import CfgNode as CN _C = CN() # Base config files _C.BASE = [''] # ----------------------------------------------------------------------------- # Data settings # ----------------------------------------------------------------------------- _C.DATA = CN() # Batch size for a si...
Cream/MiniViT/Mini-Swin/config.py/0
{ "file_path": "Cream/MiniViT/Mini-Swin/config.py", "repo_id": "Cream", "token_count": 4209 }
310
import os import sys import logging import functools from termcolor import colored @functools.lru_cache() def create_logger(output_dir, dist_rank=0, name=''): # create logger logger = logging.getLogger(name) logger.setLevel(logging.DEBUG) logger.propagate = False # create formatter fmt = '[%(...
Cream/MiniViT/Mini-Swin/logger.py/0
{ "file_path": "Cream/MiniViT/Mini-Swin/logger.py", "repo_id": "Cream", "token_count": 503 }
311
import torch import re from collections import defaultdict BLOCKS_PATTERNS = [ # blocks.<stage id>.<layer id>. (re.compile(r"visual.blocks\.(\d+)\.(\d+)\.(.*?)$"), 'visual.blocks.{}.{}.{}'), # TinyViT (re.compile(r"layers.(\d+)\.blocks\.(\d+)\.(.*?)$"), 'layers.{}.blocks.{}.{}'), # ResNet (re....
Cream/TinyCLIP/src/open_clip/weight_inherit.py/0
{ "file_path": "Cream/TinyCLIP/src/open_clip/weight_inherit.py", "repo_id": "Cream", "token_count": 4160 }
312
import os import copy import logging import torch import torch.nn.functional as F import torch.distributed as dist from tqdm import tqdm from open_clip import tokenize from .precision import get_autocast from timm.utils.model import unwrap_model from open_clip.imagenet_zeroshot_data import imagenet_classnames, openai...
Cream/TinyCLIP/src/training/zero_shot.py/0
{ "file_path": "Cream/TinyCLIP/src/training/zero_shot.py", "repo_id": "Cream", "token_count": 2618 }
313
""" Loader Factory, Fast Collate, CUDA Prefetcher Prefetcher and Fast Collate inspired by NVIDIA APEX example at https://github.com/NVIDIA/apex/commit/d5e2bb4bdeedd27b1dfaf5bb2b24d6c000dee9be#diff-cf86c282ff7fba81fad27a559379d5bf Hacked together by / Copyright 2021 Ross Wightman """ from .aug_random import random, np...
Cream/TinyViT/data/augmentation/loader.py/0
{ "file_path": "Cream/TinyViT/data/augmentation/loader.py", "repo_id": "Cream", "token_count": 4655 }
314
""" Transforms Factory Factory methods for building image transforms for use with TIMM (PyTorch Image Models) Hacked together by / Copyright 2020 Ross Wightman """ import math import torch from . import aug_tv_transforms as transforms from .constants import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD, DEFAULT_CROP_P...
Cream/TinyViT/data/augmentation/transforms_factory.py/0
{ "file_path": "Cream/TinyViT/data/augmentation/transforms_factory.py", "repo_id": "Cream", "token_count": 3976 }
315
# -------------------------------------------------------- # CLIP Model # Copyright (c) 2021 OpenAI # MIT License # Link: https://github.com/openai/CLIP # -------------------------------------------------------- from collections import OrderedDict from typing import Tuple, Union import torch from torch import nn from...
Cream/TinyViT/models/clip.py/0
{ "file_path": "Cream/TinyViT/models/clip.py", "repo_id": "Cream", "token_count": 2482 }
316
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import json from pathlib import Path import numpy as np import torch from PIL import Image from panopticapi.utils import rgb2id from util.box_ops import masks_to_boxes from .coco import make_coco_transforms class CocoPanoptic: def __init__(...
Cream/iRPE/DETR-with-iRPE/datasets/coco_panoptic.py/0
{ "file_path": "Cream/iRPE/DETR-with-iRPE/datasets/coco_panoptic.py", "repo_id": "Cream", "token_count": 1628 }
317
# Copyright (c) 2015-present, Facebook, Inc. # All rights reserved. from models import * dependencies = ["torch", "torchvision", "timm"]
Cream/iRPE/DeiT-with-iRPE/hubconf.py/0
{ "file_path": "Cream/iRPE/DeiT-with-iRPE/hubconf.py", "repo_id": "Cream", "token_count": 43 }
318
#!/bin/bash train() { python3 -m torch.distributed.launch \ --nnodes ${NODE_COUNT} \ --node_rank ${RANK} \ --master_addr ${MASTER_ADDR} \ --master_port ${MASTER_PORT} \ --nproc_per_node ${GPUS} \ tools/train.py ${EXTRA_ARGS} } test() { python3 -m torch.distribu...
CvT/run.sh/0
{ "file_path": "CvT/run.sh", "repo_id": "CvT", "token_count": 821 }
319
from msanomalydetector import SpectralResidual from msanomalydetector import THRESHOLD, MAG_WINDOW, SCORE_WINDOW, DetectMode import os import pandas as pd def detect_anomaly(series, threshold, mag_window, score_window, sensitivity, detect_mode): detector = SpectralResidual(series=series, threshold=threshold, mag_...
anomalydetector/main.py/0
{ "file_path": "anomalydetector/main.py", "repo_id": "anomalydetector", "token_count": 309 }
320
# This file is used to subscribe for notifications for PRs # related to specific file paths, does not necessarily mean # approval is required from these people before merging. # # Learn more about CODEOWNERS syntax here: # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizi...
archai/CODEOWNERS/0
{ "file_path": "archai/CODEOWNERS", "repo_id": "archai", "token_count": 405 }
321
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import argparse from typing import Callable, List, Optional, Any from collections import UserDict from typing import Sequence from collections.abc import Mapping, MutableMapping import os from distutils.util import strtobool import copy import y...
archai/archai/common/config.py/0
{ "file_path": "archai/archai/common/config.py", "repo_id": "archai", "token_count": 3265 }
322
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from typing import Mapping, MutableMapping, Any, Optional _PREFIX_NODE = '_copy' # for copy node content command (must be dict) _PREFIX_PATH = '_copy:' # for copy node value command (must be scaler) def resolve_all(root_d:MutableMapping): ...
archai/archai/common/yaml_utils.py/0
{ "file_path": "archai/archai/common/yaml_utils.py", "repo_id": "archai", "token_count": 2463 }
323
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from typing import Callable, List, Optional, Tuple import cv2 from overrides import overrides from torch.utils.data import ConcatDataset from archai.api.dataset_provider import DatasetProvider from archai.common.ordered_dict_logger import Order...
archai/archai/datasets/cv/tensorpack_lmdb_dataset_provider.py/0
{ "file_path": "archai/archai/datasets/cv/tensorpack_lmdb_dataset_provider.py", "repo_id": "archai", "token_count": 7445 }
324
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import json import os from collections import OrderedDict from typing import Counter, List, Optional, Union from overrides import overrides from tokenizers import ByteLevelBPETokenizer from transformers import PreTrainedTokenizerFast from archa...
archai/archai/datasets/nlp/tokenizer_utils/bbpe_tokenizer.py/0
{ "file_path": "archai/archai/datasets/nlp/tokenizer_utils/bbpe_tokenizer.py", "repo_id": "archai", "token_count": 4422 }
325
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from abc import abstractmethod from typing import NamedTuple import numpy as np from overrides import EnforceOverrides class MeanVar(NamedTuple): """Predictive mean and variance estimates from a surrogate model (`Predictor`).""" mean:...
archai/archai/discrete_search/api/predictor.py/0
{ "file_path": "archai/archai/discrete_search/api/predictor.py", "repo_id": "archai", "token_count": 575 }
326
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import hashlib from random import Random from typing import Any, Callable, Dict, List, Optional, Type, Union import numpy as np import torch from overrides import overrides from archai.discrete_search.api.archai_model import ArchaiModel from ar...
archai/archai/discrete_search/search_spaces/config/search_space.py/0
{ "file_path": "archai/archai/discrete_search/search_spaces/config/search_space.py", "repo_id": "archai", "token_count": 2728 }
327