python_code stringlengths 0 229k |
|---|
class Moderation(ApacAIObject):
VALID_MODEL_NAMES: List[str] = ["text-moderation-stable", "text-moderation-latest"]
@classmethod
def get_url(cls):
return "/moderations"
@classmethod
def _prepare_create(cls, input, model, api_key):
if model is not None and model not in cls.VALID_... |
class Edit(EngineAPIResource):
OBJECT_NAME = "edits"
@classmethod
def create(cls, *args, **kwargs):
"""
Creates a new edit for the provided input, instruction, and parameters.
"""
start = time.time()
timeout = kwargs.pop("timeout", None)
api_type = kwargs... |
class Model(ListableAPIResource, DeletableAPIResource):
OBJECT_NAME = "models"
|
class File(ListableAPIResource, DeletableAPIResource):
OBJECT_NAME = "files"
@classmethod
def __prepare_file_create(
cls,
file,
purpose,
model=None,
api_key=None,
api_base=None,
api_type=None,
api_version=None,
organization=None,
... |
class Engine(ListableAPIResource, UpdateableAPIResource):
OBJECT_NAME = "engines"
def generate(self, timeout=None, **params):
start = time.time()
while True:
try:
return self.request(
"post",
self.instance_url() + "/generate... |
class Audio(APIResource):
OBJECT_NAME = "audio"
@classmethod
def _get_url(cls, action):
return cls.class_url() + f"/{action}"
@classmethod
def _prepare_request(
cls,
file,
filename,
model,
api_key=None,
api_base=None,
api_type=None... |
class Customer(ApacAIObject):
@classmethod
def get_url(cls, customer, endpoint):
return f"/customer/{customer}/{endpoint}"
@classmethod
def create(cls, customer, endpoint, **params):
instance = cls()
return instance.request("post", cls.get_url(customer, endpoint), params)
... |
# WARNING: This interface is considered experimental and may changed in the future without warning.
class Image(APIResource):
OBJECT_NAME = "images"
@classmethod
def _get_url(cls, action, azure_action, api_type, api_version):
if api_type in (util.ApiType.AZURE, util.ApiType.AZURE_AD) and azure_a... |
class CreateableAPIResource(APIResource):
plain_old_data = False
@classmethod
def __prepare_create_requestor(
cls,
api_key=None,
api_base=None,
api_type=None,
api_version=None,
organization=None,
):
requestor = api_requestor.APIRequestor(
... |
class ListableAPIResource(APIResource):
@classmethod
def auto_paging_iter(cls, *args, **params):
return cls.list(*args, **params).auto_paging_iter()
@classmethod
def __prepare_list_requestor(
cls,
api_key=None,
api_version=None,
organization=None,
api_b... |
# flake8: noqa
nested_resource_class_methods,
)
|
class UpdateableAPIResource(APIResource):
@classmethod
def modify(cls, sid, **params):
url = "%s/%s" % (cls.class_url(), quote_plus(sid))
return cls._static_request("post", url, **params)
@classmethod
def amodify(cls, sid, **params) -> Awaitable:
url = "%s/%s" % (cls.class_ur... |
def _nested_resource_class_methods(
resource,
path=None,
operations=None,
resource_plural=None,
async_=False,
):
if resource_plural is None:
resource_plural = "%ss" % resource
if path is None:
path = resource_plural
if operations is None:
raise ValueError("oper... |
class APIResource(ApacAIObject):
api_prefix = ""
azure_api_prefix = "apacai"
azure_deployments_prefix = "deployments"
@classmethod
def retrieve(
cls, id, api_key=None, request_id=None, request_timeout=None, **params
):
instance = cls(id=id, api_key=api_key, **params)
... |
class DeletableAPIResource(APIResource):
@classmethod
def __prepare_delete(cls, sid, api_type=None, api_version=None):
if isinstance(cls, APIResource):
raise ValueError(".delete may only be called as a class method now.")
base = cls.class_url()
extn = quote_plus(sid)
... |
MAX_TIMEOUT = 20
class EngineAPIResource(APIResource):
plain_old_data = False
def __init__(self, engine: Optional[str] = None, **kwargs):
super().__init__(engine=engine, **kwargs)
@classmethod
def class_url(
cls,
engine: Optional[str] = None,
api_type: Optional[str]... |
CreateableAPIResource,
DeletableAPIResource,
ListableAPIResource,
)
class CompletionConfig(
CreateableAPIResource, ListableAPIResource, DeletableAPIResource
):
OBJECT_NAME = "experimental.completion_configs"
|
CompletionConfig,
)
|
# This code example has moved. You can now find it in the [APACAI Cookbook](https://github.com/apacai/apacai-cookbook)
# at [examples/Backtranslation_of_SQL_queries](https://github.com/apacai/apacai-cookbook/blob/main/examples/Backtranslation_of_SQL_queries.py)
|
# This code example has moved. You can now find it in the [APACAI Cookbook](https://github.com/apacai/apacai-cookbook)
# at [examples/fine-tuned_qa](https://github.com/apacai/apacai-cookbook/tree/main/examples/fine-tuned_qa)
|
def main():
print("Welcome!Input the number of hours on Earth so you can see how many hours pass by on Europa")
userInput = int(input("How many Europa days go by for every x Earth day"))
Europa = userInput * 3.551 #hours for 1 day in Europa 85.224
print(f"{userInput} days on Earth is {Eur... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
|
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
def fixed_pos_embedding(x):
seq_len, dim = x.shape
inv_freq = 1.0 / (10000 ** (torch.arange(0, dim) / dim))
sinusoid_inp = (
torch.einsum("i , j -> i j", torch.arange(0, seq_len, dtype=torch.float), inv_freq)... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
def MultiwayWrapper(args, module, dim=1):
if args.multiway:
return MultiwayNetwork(module, dim=dim)
return module
def set_split_position(position):
def apply_fn(module):
if hasattr(module, "split_... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
try:
from apex.normalization import FusedLayerNorm as LayerNorm
except ModuleNotFoundError:
from torch.nn import LayerNorm
class MultiheadAttention(nn.Module):
def __init__(
self,
args,
emb... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
class RelativePositionBias(nn.Module):
def __init__(
self, bidirectional=True, num_buckets=32, max_distance=128, n_heads=12
):
super().__init__()
self.bidirectional = bidirectional
self.... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
class VisionLanguageEmbedding(nn.Module):
def __init__(self, text_embed, vision_embed):
super().__init__()
self.text_embed = text_embed
self.vision_embed = vision_embed
def forward(self, textual... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
class DropPath(nn.Module):
"""Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks)."""
def __init__(self, drop_prob=None):
super(DropPath, self).__init__()
self.drop_... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
|
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
try:
from apex.normalization import FusedLayerNorm as LayerNorm
except ModuleNotFoundError:
from torch.nn import LayerNorm
class set_torch_seed(object):
def __init__(self, seed):
assert isinstance(seed, int... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
|
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.
# NOTE: This is a mirror of th... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.
# Implementation of Top2Gating... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
try:
from apex.normalization import FusedLayerNorm as LayerNorm
except ModuleNotFoundError:
from torch.nn import LayerNorm
class DecoderLayer(nn.Module):
def __init__(
self,
args,
depth,
... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
class EncoderConfig(object):
def __init__(self, **kwargs):
self.encoder_embed_dim = kwargs.pop("encoder_embed_dim", 768)
self.encoder_attention_heads = kwargs.pop("encoder_attention_heads", 12)
self.e... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
class EncoderDecoder(nn.Module):
def __init__(
self,
args,
encoder_embed_tokens=None,
encoder_embed_positions=None,
decoder_embed_tokens=None,
decoder_embed_positions=None,
... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
|
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
try:
from apex.normalization import FusedLayerNorm as LayerNorm
except ModuleNotFoundError:
from torch.nn import LayerNorm
class EncoderLayer(nn.Module):
def __init__(self, args, depth, is_moe_layer=False, is_enco... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
def init_bert_params(module):
def normal_(data):
data.copy_(data.cpu().normal_(mean=0.0, std=0.02).to(data.device))
if isinstance(module, nn.Linear):
normal_(module.weight.data)
if module.bias ... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
PositionalEmbedding,
TextEmbedding,
VisionEmbedding,
)
class BEiT3(nn.Module):
def __init__(self, args, **kwargs):
super().__init__()
self.args = args
assert args.multiway
assert... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
|
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
testcases = [
{},
{"vocab_size": 64000},
{"activation_fn": "relu"},
{"drop_path_rate": 0.1},
{"decoder_normalize_before": False},
{"no_scale_embedding": False},
{"layernorm_embedding": True},
{"r... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
testcases = [
{},
{"vocab_size": 64000},
{"activation_fn": "relu"},
{"drop_path_rate": 0.1},
{"encoder_normalize_before": False},
{"no_scale_embedding": False},
{"layernorm_embedding": True},
{"r... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
|
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
testcases = [
{},
{"vocab_size": 64000},
{"activation_fn": "relu"},
{"drop_path_rate": 0.1},
{"encoder_normalize_before": False, "decoder_normalize_before": False},
{"no_scale_embedding": False},
{"l... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
|
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# flake8: noqa
if __name__ == "__main__":
cli_main()
|
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
|
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# flake8: noqa
if __name__ == "__main__":
cli_main()
|
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# flake8: noqa
if __name__ == "__main__":
cli_main()
|
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
logger = logging.getLogger(__name__)
SAMPLE_BRE... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# register dataclass
TASK_DATACLASS_REGISTRY = {}
TASK_REGISTRY = {}
TASK_CLASS_NAMES = set()
# automatically import any Python files in the tasks/ directory
tasks_dir = os.path.dirname(__file__)
for file in os.listdir(tasks_di... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
class BaseBatchGen(CheckpointableIterator):
"""
This is a base class for batch generators that use infinibatch
"""
def __init__(self):
self._iter = None
self.epoch = 1
self.next_epoch_i... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
|
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
def apply_to_sample(f, sample):
if hasattr(sample, "__len__") and len(sample) == 0:
return {}
def _apply(x):
if isinstance(x, np.ndarray):
return f(x)
elif isinstance(x, collections... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
class MLMLoader(BaseBatchGen):
def __init__(
self,
args,
dataset,
dictionary,
tokenizer,
max_tokens=None,
max_sentences=None,
max_positions=None,
ign... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
@torch.no_grad()
def clip_grad_norm_(
params, max_norm, moe_expert_count, aggregate_norm_fn=None
) -> torch.Tensor:
def grad_exists(p):
return p is not None and getattr(p, "grad", None) is not None
if isin... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
|
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
FairseqIncrementalDecoder,
FairseqLanguage... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
MODEL_REGISTRY = {}
MODEL_DATACLASS_REGISTRY = {}
ARCH_MODEL_REGISTRY = {}
ARCH_MODEL_NAME_REGISTRY = {}
ARCH_MODEL_INV_REGISTRY = {}
ARCH_CONFIG_REGISTRY = {}
# automatically import any Python files in the models/ directory
mo... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
FairseqEncoder,
FairseqEncoderDecoderModel... |
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for details]
try:
from apex.normalization import FusedLayerNorm as LayerNorm
except ModuleNotFoundError:
from torch.nn import LayerNorm
DEFAULT_MAX_SOURCE_POSITIONS = 1024
logger = logging.getLogger(__name__)
@dataclass
class B... |
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
@register_criterion("masked_lm_moe_cross_entropy", dataclass=MoECriterionConfig)
class MaskedLMMoECrossEntropyCriterion(MoECriterion):
... |
# automatically import any Python files in the criterions/ directory
for file in sorted(os.listdir(os.path.dirname(__file__))):
if file.endswith(".py") and not file.startswith("_"):
file_name = file[: file.find(".py")]
importlib.import_module("criterions." + file_name) |
class MagnetoTokenizer:
def __init__(self):
self.processor = CLIPProcessor.from_pretrained("laion/CLIP-ViT-L-14-laion-2B-s32B-b82k")
self.tokenize = T5Tokenizer.from_pretrained(
"t5-large",
additional_special_tokens=["<image>", "</image>"],
extra_ids = 0,
... |
def count_number_of_parameters(model, only_trainable: bool = True) -> int:
if only_trainable:
num_param: int = sum(p.numel()
for p in model.parameters() if p.requires.grad)
else:
num_params: int = sum(p.numel() for p in model.parameters() if p)
d... |
class KomosTokenizer:
def __init__(self):
self.processor = CLIPProcessor.from_pretrained('laion/CLIP-ViT-L-14-laion2B-s32B-b82k')
#t5 uses sentience piece tokenizer
self.tokenize = T5Tokenizer.from_pretrained(
"t5-large",
additional_special_tokens=["<image>", "</... |
task = "Create GPT-2"
system = f"""
You are Quoc V. Le, a computer scientist and artificial intelligence researcher who is
widely regarded as one of the leading experts in deep learning and neural network architecture search.
Your work in this area has focused on developing efficient algorithms for searching th... |
task = """
Use numbers and basic arithmetic operations (+ - * /) to obtain 24. When
considering the next steps, do not choose operations that will result in a
negative or fractional number. In order to help with the calculations, the
numbers in the parenthesis represent the numbers that are left after the
operations ... |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)
class OpenAI:
def __init__(
self,
api_key,
strategy="cot",
evaluation_strategy="value",
api_base="",
api_m... |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)
class AoT:
def __init__(
self,
num_thoughts: int = None,
max_steps: int = None,
value_threshold: float = None,
pruning_threshold=0.5,
... |
model = AlphaDev().cuda()
x = torch.randint(0, 256, (1, 1024)).cuda()
model(x) # (1, 1024, 20000) |
############################
###### 1. Environment ######
class TaskSpec(NamedTuple):
max_program_size: int
num_inputs: int
num_funcs: int
num_locations: int
num_actions: int
correct_reward: float
correctness_reward_weight: float
latency_reward_weight: float
latency_quantile: float
class Assem... |
class AlphaDev(Module):
"""
AlphaDev is a transformer-based model architecture. It initializes with
a Transformer and AutoregressiveWrapper with default or user-specified parameters.
Initialize the model with specified or default parameters.
Args:
- num_tokens: Number of tokens in the vocabu... |
# constants
EfficientAttentionConfig = namedtuple('EfficientAttentionConfig', ['enable_flash', 'enable_math', 'enable_mem_efficient'])
@dataclass
class Intermediates:
qk_similarities: Optional[Tensor] = None
pre_softmax_attn: Optional[Tensor] = None
post_softmax_attn: Optional[Tensor] = None
def ... |
# constants
def eval_decorator(fn):
def inner(self, *args, **kwargs):
was_training = self.training
self.eval()
out = fn(self, *args, **kwargs)
self.train(was_training)
return out
return inner
# nucleus
def top_p(logits, thres = 0.9):
sorted_logits, sorted_indi... |
"""
Copyright (c) 2022, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
LinearWarmupCosineLRScheduler,
LinearWarmupStepLRScheduler,
)
# imports modules for reg... |
"""
Copyright (c) 2022, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
LinearWarmupCosineLRScheduler,
LinearWarmupStepLRScheduler,
)
# imports modules for reg... |
"""
Copyright (c) 2022, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
root_dir = os.path.dirname(os.path.abspath(__file__))
default_cfg = OmegaConf.load(os.path.jo... |
"""
Copyright (c) 2022, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
class BaseTask:
def __init__(self, **kwargs):
super().__init__()
self.inst... |
"""
Copyright (c) 2022, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
MultimodalClassificationTask,
)
def setup_task(cfg):
assert "task" in cfg.run_cfg, "Task... |
"""
Copyright (c) 2022, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
@registry.register_task("retrieval")
class RetrievalTask(BaseTask):
def __init__(self, cfg)... |
"""
Copyright (c) 2022, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
@registry.register_task("image_text_pretrain")
class ImageTextPretrainTask(BaseTask):
def __... |
"""
Copyright (c) 2022, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
@registry.register_task("dialogue")
class DialogueTask(BaseTask):
def __init__(self, num_b... |
"""
Copyright (c) 2022, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
@registry.register_task("captioning")
class CaptionTask(BaseTask):
def __init__(self, num_b... |
"""
Copyright (c) 2022, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
@registry.register_task("vqa")
class VQATask(BaseTask):
def __init__(
self,
... |
"""
Copyright (c) 2022, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
@registry.register_task("vqa_reading_comprehension")
class VQARCTask(VQATask):
def __init__... |
"""
Copyright (c) 2022, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
@registry.register_task("multimodal_classification")
class MultimodalClassificationTask(BaseTas... |
"""
Copyright (c) 2022, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
decord.bridge.set_bridge("torch")
MAX_INT = registry.get("MAX_INT")
def load_video(video_path,... |
"""
Copyright (c) 2022, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
@registry.register_builder("imagenet")
class ImageNetBuilder(BaseDatasetBuilder):
train_dat... |
"""
Copyright (c) 2022, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
class BaseDatasetBuilder:
train_dataset_cls, eval_dataset_cls = None, None
def __init_... |
"""
Copyright (c) 2022, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
class VideoQABuilder(BaseDatasetBuilder):
train_dataset_cls = VideoQADataset
eval_datase... |
"""
Copyright (c) 2022, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
COCOCapBuilder,
MSRVTTCapBuilder,
MSVDCapBuilder,
VATEXCapBuilder,
)
Conceptua... |
"""
Copyright (c) 2022, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
RetrievalDataset,
RetrievalEvalDataset,
VideoRetrievalDataset,
VideoRetrievalEvalD... |
"""
Copyright (c) 2022, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
@registry.register_builder("3d_vqa")
class ThreeDVQABuilder(BaseDatasetBuilder):
train_data... |
"""
Copyright (c) 2022, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
AVSDDialDataset,
AVSDDialEvalDataset,
)
@registry.register_builder("avsd_dialogue")
clas... |
"""
Copyright (c) 2022, salesforce.com, inc.
All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
"""
@registry.register_builder("conceptual_caption_3m")
class ConceptualCaption3MBuilder(BaseDatase... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.