index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
31,028 | ServiceNow/azimuth | refs/heads/main | /azimuth/types/outcomes.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from enum import Enum
from azimuth.types import AliasModel
class OutcomeName(str, Enum):
CorrectAndPredicted = "CorrectAndPredicted"
Corr... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,029 | ServiceNow/azimuth | refs/heads/main | /azimuth/utils/plots.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from enum import Enum
from typing import List
from azimuth.types import DatasetSplitName
TITLE_FONT_SIZE = 20
AXIS_FONT_SIZE = 14
MARGIN = 32
PAPE... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,030 | ServiceNow/azimuth | refs/heads/main | /tests/test_modules/test_module.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import time
import pytest
from datasets import Dataset, DatasetDict
from distributed import Variable
from azimuth.config import CustomObject
from... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,031 | ServiceNow/azimuth | refs/heads/main | /azimuth/modules/task_mapping.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import azimuth.modules.model_performance.outcomes
from azimuth.modules import perturbation_testing
from azimuth.modules.dataset_analysis import (
... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,032 | ServiceNow/azimuth | refs/heads/main | /azimuth/types/general/dataset.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from enum import Enum
class DatasetSplitName(str, Enum):
eval = "eval"
train = "train"
all = "all"
class DatasetColumn(str, Enum):
... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,033 | ServiceNow/azimuth | refs/heads/main | /azimuth/modules/model_contracts/hf_text_classification.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from typing import List, Optional, Set
import numpy as np
import structlog
import torch
from datasets import Dataset
from azimuth.config import M... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,034 | ServiceNow/azimuth | refs/heads/main | /azimuth/routers/export.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import os
import time
from os.path import join as pjoin
from typing import Dict, Generator, List, Optional
import pandas as pd
from fastapi import... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,035 | ServiceNow/azimuth | refs/heads/main | /azimuth/routers/config.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from typing import Dict, List
import structlog
from fastapi import APIRouter, Body, Depends, HTTPException, Query
from starlette.status import (
... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,036 | ServiceNow/azimuth | refs/heads/main | /azimuth/modules/word_analysis/top_words.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from collections import Counter
from typing import Dict, List, Tuple
import numpy as np
import spacy
from azimuth.config import TopWordsConfig
fro... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,037 | ServiceNow/azimuth | refs/heads/main | /tests/conftest.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import threading
from copy import deepcopy
import pytest
from distributed import Client, LocalCluster
from azimuth.config import AzimuthConfig, S... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,038 | ServiceNow/azimuth | refs/heads/main | /azimuth/utils/project.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from typing import Dict
import structlog
from datasets import DatasetDict
from azimuth.config import (
AzimuthConfig,
ModelContractConfig,... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,039 | ServiceNow/azimuth | refs/heads/main | /tests/test_modules/test_dataset_analysis/test_dataset_warnings.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from copy import deepcopy
from typing import Any, List
import numpy as np
import pytest
from datasets import ClassLabel
from azimuth.dataset_spli... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,040 | ServiceNow/azimuth | refs/heads/main | /azimuth/modules/base_classes/expirable_mixin.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import abc
class ExpirableMixin(abc.ABC):
"""Module that can get expired based on changes in the dataset.
This class should be added to M... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,041 | ServiceNow/azimuth | refs/heads/main | /azimuth/modules/validation/validation.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from typing import Any, List, Optional
import torch
from datasets import Dataset
from transformers import TextClassificationPipeline
from azimuth.... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,042 | ServiceNow/azimuth | refs/heads/main | /azimuth/types/class_overlap.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from typing import Dict, List, Optional
from pydantic import Field
from azimuth.types import AliasModel, Array, PlotSpecification
class Similar... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,043 | ServiceNow/azimuth | refs/heads/main | /tests/test_routers/test_custom_utterances.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from fastapi import FastAPI
from starlette.status import HTTP_200_OK
from starlette.testclient import TestClient
def test_generate_perturbation_t... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,044 | ServiceNow/azimuth | refs/heads/main | /azimuth/types/word_analysis.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from enum import Enum
from typing import List
from pydantic import Field
from azimuth.types import AliasModel, ModuleResponse
class TokensToWor... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,045 | ServiceNow/azimuth | refs/heads/main | /azimuth/plots/sankey_plot.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import json
import math
from itertools import cycle
from typing import List, Optional, Tuple
import numpy as np
from matplotlib.colors import to_r... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,046 | ServiceNow/azimuth | refs/heads/main | /tests/test_routers/test_model_performance/test_utterance_count.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from fastapi import FastAPI
from starlette.status import HTTP_200_OK
from starlette.testclient import TestClient
from azimuth.types.tag import Sma... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,047 | ServiceNow/azimuth | refs/heads/main | /azimuth/modules/model_contracts/__init__.py | # Do not reorder
from azimuth.modules.model_contracts.hf_text_classification import HFTextClassificationModule
from azimuth.modules.model_contracts.custom_classification import CustomTextClassificationModule
from azimuth.modules.model_contracts.file_based_text_classification import (
FileBasedTextClassificationModu... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,048 | ServiceNow/azimuth | refs/heads/main | /tests/test_modules/test_task_execution.py | from typing import List
from distributed import get_client
from azimuth.modules.base_classes import IndexableModule
from azimuth.modules.task_execution import get_task_result
from azimuth.types import DatasetSplitName, ModuleOptions, ModuleResponse
class Potato(ModuleResponse):
a: int
class MyModule(Indexable... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,049 | ServiceNow/azimuth | refs/heads/main | /tests/test_modules/test_word_analysis/test_tokens_to_words.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import numpy as np
from azimuth.modules.word_analysis.tokens_to_words import TokensToWordsModule
from azimuth.types import DatasetSplitName, Modul... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,050 | ServiceNow/azimuth | refs/heads/main | /tests/test_routers/test_top_words.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from fastapi import FastAPI
from starlette.status import HTTP_200_OK
from starlette.testclient import TestClient
def test_top_words(app: FastAPI)... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,051 | ServiceNow/azimuth | refs/heads/main | /tests/test_modules/test_model_contracts/test_text_classification.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from typing import List, cast
import numpy as np
import pytest
import tensorflow as tf
import torch
from datasets import Dataset
from transformers... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,052 | ServiceNow/azimuth | refs/heads/main | /azimuth/types/pipeline_comparison.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from azimuth.types import AliasModel
class PredictionComparisonResponse(AliasModel):
pipeline_disagreement: bool
incorrect_for_all_pipelin... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,053 | ServiceNow/azimuth | refs/heads/main | /azimuth/modules/word_analysis/tokens_to_words.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from functools import reduce
from typing import List, Tuple, cast
from datasets import Dataset
from azimuth.config import ModelContractConfig
fro... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,054 | ServiceNow/azimuth | refs/heads/main | /azimuth/types/app.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from typing import Any, Dict, List, Optional
from pydantic import Field
from azimuth.types import AliasModel, DatasetSplitName, SupportedModelCon... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,055 | ServiceNow/azimuth | refs/heads/main | /azimuth/plots/dataset_warnings.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import json
from typing import Dict, List, Optional, cast
import numpy as np
import plotly.graph_objs as go
from plotly.subplots import make_subplo... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,056 | ServiceNow/azimuth | refs/heads/main | /azimuth/app.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import logging
from threading import Event
from typing import Dict, Optional
import structlog
from distributed import SpecCluster
from fastapi impo... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,057 | ServiceNow/azimuth | refs/heads/main | /tests/test_utils/test_ml/test_ece.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from azimuth.types.model_performance import ConfidenceBinDetails
from azimuth.types.outcomes import OutcomeName
from azimuth.utils.ml.ece import co... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,058 | ServiceNow/azimuth | refs/heads/main | /azimuth/utils/openapi.py | from typing import Dict
from pydantic import BaseSettings
def fix_union_types(schema: Dict):
"""Replace oneOf with anyOf, which openapi-typescript understands better."""
for field in schema["properties"].values():
field = field.get("additionalProperties", field) # Dict values (if applicable)
... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,059 | ServiceNow/azimuth | refs/heads/main | /azimuth/utils/pydantic_utils.py | # Taken from https://github.com/samuelcolvin/pydantic/pull/3946/files
# TODO When we update pydantic >= v1.10, we can remove this file and use their create_model()
import warnings
from types import prepare_class, resolve_bases
from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple, Type, TypeVar, Union, cast
fr... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,060 | ServiceNow/azimuth | refs/heads/main | /azimuth/utils/dataset_operations.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from typing import List, Union, cast
from datasets import Dataset
from azimuth.config import ProjectConfig
from azimuth.types import DatasetColumn... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,061 | ServiceNow/azimuth | refs/heads/main | /tests/test_loading_resources.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import string
from dataclasses import dataclass
from typing import Callable, Dict, List
import numpy as np
import torch
from datasets import Datase... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,062 | ServiceNow/azimuth | refs/heads/main | /azimuth/utils/ml/preprocessing.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from typing import List
from azimuth.types import AliasModel
class PreprocessingStepAPIResponse(AliasModel):
"""Class for saving the results ... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,063 | ServiceNow/azimuth | refs/heads/main | /azimuth/types/perturbation_testing.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from enum import Enum
from typing import List, Optional
from pydantic import Field
from azimuth.types import AliasModel, ModuleResponse
class P... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,064 | ServiceNow/azimuth | refs/heads/main | /azimuth/types/general/array_type.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from typing import Generic, TypeVar
import numpy as np
"""
Module that handles numpy arrays in Pydantic models.
Code from: https://github.com/sam... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,065 | ServiceNow/azimuth | refs/heads/main | /tests/test_utils/test_ml/test_mc_dropout.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import numpy as np
from azimuth.modules.model_contracts import HFTextClassificationModule
from azimuth.types import DatasetSplitName, ModuleOption... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,066 | ServiceNow/azimuth | refs/heads/main | /tests/test_modules/test_dataset_analysis/test_similarity_analysis.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import numpy as np
from sklearn.preprocessing import normalize
import azimuth.modules.dataset_analysis.similarity_analysis as faiss_mod
from azimu... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,067 | ServiceNow/azimuth | refs/heads/main | /azimuth/utils/ml/saliency.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from typing import Any, List
import numpy as np
import structlog
from torch.nn import Embedding
from azimuth.types.general.module_arguments import... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,068 | ServiceNow/azimuth | refs/heads/main | /azimuth/utils/ml/third_parties/transformations_types.py | """
Code from https://github.com/GEM-benchmark/NL-Augmenter/blob/
26343c2b9116c8886eaaf8aa904e412e6fc64b17/interfaces/SentenceOperation.py#L10
MIT License
Copyright (c) 2021 GEM-benchmark
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files ... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,069 | ServiceNow/azimuth | refs/heads/main | /azimuth/utils/ml/mc_dropout.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import warnings
from typing import Optional
# TODO structlog warning issue tracked in BaaL #192
with warnings.catch_warnings():
warnings.simple... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,070 | ServiceNow/azimuth | refs/heads/main | /azimuth/modules/model_performance/confidence_binning.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from collections import defaultdict
from typing import List, cast
import numpy as np
from datasets import Dataset
from azimuth.config import Model... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,071 | ServiceNow/azimuth | refs/heads/main | /azimuth_shr/data/CLINC150.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import json
from pathlib import Path
import datasets
_DESCRIPTION = """\
Subset of CLINC150 Dataset (https://github.com/clinc/oos-eval).
"""
#... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,072 | ServiceNow/azimuth | refs/heads/main | /tests/test_modules/test_model_contracts/test_custom_text_classification.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import pytest
from azimuth.modules.model_contracts import CustomTextClassificationModule
from azimuth.types import DatasetSplitName, ModuleOptions,... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,073 | ServiceNow/azimuth | refs/heads/main | /azimuth/utils/ml/perturbation_functions.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import contextlib
import re
from itertools import zip_longest
from typing import List
import nlpaug.augmenter.char as nac
from azimuth.config impo... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,074 | ServiceNow/azimuth | refs/heads/main | /azimuth/modules/dataset_analysis/dataset_warnings.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from collections import defaultdict
from functools import partial
from typing import Dict, List, Set
import numpy as np
from azimuth.config import... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,075 | ServiceNow/azimuth | refs/heads/main | /tests/test_modules/test_model_performance/test_metrics.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from collections import defaultdict
from typing import Dict
import datasets
import numpy as np
import pytest
from azimuth.config import MetricDefi... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,076 | ServiceNow/azimuth | refs/heads/main | /tests/test_routers/test_utils.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from fastapi import FastAPI
from starlette.status import HTTP_200_OK, HTTP_503_SERVICE_UNAVAILABLE
from starlette.testclient import TestClient
de... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,077 | ServiceNow/azimuth | refs/heads/main | /azimuth/modules/model_performance/outcome_count.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from collections import Counter, defaultdict
from typing import Dict, List, Tuple
import numpy as np
from datasets import Dataset
from tqdm import ... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,078 | ServiceNow/azimuth | refs/heads/main | /azimuth/utils/cluster.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import os
import tempfile
from os.path import join as pjoin
import dask
import distributed
import structlog
from distributed import SpecCluster
l... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,079 | ServiceNow/azimuth | refs/heads/main | /tests/test_routers/test_export.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from fastapi import FastAPI
from starlette.status import HTTP_200_OK, HTTP_400_BAD_REQUEST
from starlette.testclient import TestClient
def test_g... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,080 | ServiceNow/azimuth | refs/heads/main | /tests/test_modules/test_dataset_analysis/test_class_overlap.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import numpy as np
from sklearn.preprocessing import normalize
import azimuth.modules.dataset_analysis.similarity_analysis as faiss_mod
from azimu... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,081 | ServiceNow/azimuth | refs/heads/main | /azimuth/types/general/__init__.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
| {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,082 | ServiceNow/azimuth | refs/heads/main | /azimuth/modules/base_classes/caching.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import abc
import json
import os
import time
from typing import List, Optional
import h5py
import structlog
from filelock import FileLock
from ret... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,083 | ServiceNow/azimuth | refs/heads/main | /tests/test_modules/test_pipeline_comparison/test_prediction_comparison.py | import pytest
from azimuth.dataset_split_manager import PredictionTableKey
from azimuth.modules.pipeline_comparison.prediction_comparison import PredictionComparisonModule
from azimuth.types import DatasetSplitName
from azimuth.types.pipeline_comparison import PredictionComparisonResponse
from azimuth.types.tag import... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,084 | ServiceNow/azimuth | refs/heads/main | /openapi.py | import json
import sys
from fastapi.openapi.utils import get_openapi
from azimuth.app import create_app
if __name__ == "__main__":
app = create_app()
openapi = get_openapi(
title=app.title,
version=app.version,
openapi_version=app.openapi_version,
description=app.description,
... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,085 | ServiceNow/azimuth | refs/heads/main | /azimuth/startup.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import threading
import time
from collections import defaultdict
from dataclasses import dataclass, field
from typing import Dict, List, Optional
i... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,086 | ServiceNow/azimuth | refs/heads/main | /azimuth/modules/model_contracts/text_classification_no_saliency.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from typing import List
from datasets import Dataset
from azimuth.modules.model_contracts.text_classification import TextClassificationModule
from... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,087 | ServiceNow/azimuth | refs/heads/main | /azimuth/types/dataset_warnings.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from enum import Enum
from typing import Dict, List, Optional, Union
from pydantic import Field
from pydantic.types import StrictFloat, StrictInt
... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,088 | ServiceNow/azimuth | refs/heads/main | /azimuth/utils/utterance.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import re
re_irregular_apostrophes = re.compile("[’`]")
def clean_utterance(utterance: str) -> str:
"""Converts characters as appropriate for... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,089 | ServiceNow/azimuth | refs/heads/main | /tests/test_utils/test_task_running.py | from unittest.mock import MagicMock
import pytest
from azimuth.types import DatasetFilters, DatasetSplitName, ModuleOptions, SupportedModule
from azimuth.utils.routers import get_custom_task_result, get_standard_task_result
standard_task_result = "task_result"
custom_task_result = "custom_task_result"
task_name = Su... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,090 | ServiceNow/azimuth | refs/heads/main | /tests/profiling_debugging.py | """
This file help profiling Module. Change the constants and run the file.
"""
import tempfile
import threading
import time
import psutil
from pyinstrument import Profiler
from tqdm import tqdm
from azimuth.app import load_dataset_split_managers_from_config
from azimuth.config import AzimuthConfig
from azimuth.modul... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,091 | ServiceNow/azimuth | refs/heads/main | /azimuth/modules/base_classes/dask_module.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import abc
import os
import threading
import time
import uuid
from enum import IntEnum
from functools import partial
from os.path import join as pj... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,092 | ServiceNow/azimuth | refs/heads/main | /tests/test_modules/test_model_contracts/test_hf_text_classification.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from typing import List, cast
import numpy as np
import pytest
import torch
from datasets import Dataset
from azimuth.modules.model_contracts impo... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,093 | ServiceNow/azimuth | refs/heads/main | /tests/test_routers/conftest.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
import json
import time
import pytest
from fastapi import FastAPI
from starlette.testclient import TestClient
from azimuth.app import get_ready_fl... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,094 | ServiceNow/azimuth | refs/heads/main | /tests/test_modules/test_model_contracts/test_file_based_text_classification.py | # Copyright ServiceNow, Inc. 2021 – 2022
# This source code is licensed under the Apache 2.0 license found in the LICENSE file
# in the root directory of this source tree.
from typing import List, cast
import numpy as np
import pytest
from azimuth.modules.model_contracts import FileBasedTextClassificationModule
from ... | {"/tests/test_config.py": ["/azimuth/config.py", "/azimuth/utils/project.py"], "/azimuth/types/general/module_arguments.py": ["/azimuth/types/__init__.py", "/azimuth/types/outcomes.py", "/azimuth/types/tag.py"], "/tests/test_dataset_manager.py": ["/azimuth/config.py", "/azimuth/dataset_split_manager.py", "/azimuth/type... |
31,107 | croisez/invaderStub | refs/heads/master | /config.py | # ===========
# invaderStub
# ===========
#
# This is a kind of simple python replacement for the incredible PixelInvaders Java application
Panels = ['ROTATE_180_FLIPPEDY', 'ROTATE_180_FLIPPEDX']
#Panels = ['NO_ROTATE','NO_ROTATE','NO_ROTATE']
USE_TCPIP = 1
TCP_IP = "192.168.99.187"
TCP_PORT = 5333
#SERIAL_PORT = 'CO... | {"/ledwall.py": ["/invaderStub.py"]} |
31,108 | croisez/invaderStub | refs/heads/master | /invaderStub.py | # ===========
# invaderStub
# ===========
#
# This is a kind of simple python replacement for the incredible PixelInvaders Java application
#
# This program, invaderStub, is released as Free Software.
#
# First written by LM Croisez, on 5 Aug 2014
#
# Programme d'interfaçage avec des panneaux du type PixelIn... | {"/ledwall.py": ["/invaderStub.py"]} |
31,109 | croisez/invaderStub | refs/heads/master | /ledwall.py | from invaderStub import *
clear()
DoAnimationAll()
| {"/ledwall.py": ["/invaderStub.py"]} |
31,110 | noisy/barylkakrwi | refs/heads/master | /barylka_django/crawler/cron.py | from django_cron import CronJobBase, Schedule
from barylka_django.crawler import micro_crawler
class CrawlerCronJob(CronJobBase):
RUN_EVERY_MINS = 1
schedule = Schedule(run_every_mins=RUN_EVERY_MINS)
code = 'crawler.crawler_cron_job' # a unique code
def do(self):
micro_crawler.crawl(None)
... | {"/barylka_django/web/views.py": ["/barylka_django/web/models.py"], "/barylka_django/crawler/tests.py": ["/barylka_django/crawler/micro_crawler.py"]} |
31,111 | noisy/barylkakrwi | refs/heads/master | /barylka_django/web/templatetags/commontags.py | from django import template
register = template.Library()
@register.filter
def key(d, key_name):
return d[key_name]
@register.filter
def toInt(d):
return int(d)
key = register.filter('key', key)
toInt = register.filter('toInt', toInt)
@register.filter
def sort_by_keys(value, keys):
transformed = []
... | {"/barylka_django/web/views.py": ["/barylka_django/web/models.py"], "/barylka_django/crawler/tests.py": ["/barylka_django/crawler/micro_crawler.py"]} |
31,112 | noisy/barylkakrwi | refs/heads/master | /barylka_django/web/models.py | from django.db import models
from django.contrib import admin
# Create your models here.
BLOOD_TYPE = (
('A-', 'A Rh-'),
('A+', 'A Rh+'),
('B-', 'B Rh-'),
('B+', 'B Rh+'),
('0-', '0 Rh-'),
('0+', '0 Rh+'),
('AB-', 'AB Rh-'),
('AB+', 'AB Rh+'),
)
GENDER_CHOICES = (
('M', 'Male'),
... | {"/barylka_django/web/views.py": ["/barylka_django/web/models.py"], "/barylka_django/crawler/tests.py": ["/barylka_django/crawler/micro_crawler.py"]} |
31,113 | noisy/barylkakrwi | refs/heads/master | /barylka_django/crawler/micro_crawler.py | # -*- coding: utf-8 -*-
import os
import re
import wykop
from django.db.models import DateField
from django.conf import settings
from barylka_django.web.models import *
from unidecode import unidecode
def read_entry(body, donations):
body = unidecode(body.lower())
equation = re.search('(\d+)(?:\s*ml)*((?:\s*-... | {"/barylka_django/web/views.py": ["/barylka_django/web/models.py"], "/barylka_django/crawler/tests.py": ["/barylka_django/crawler/micro_crawler.py"]} |
31,114 | noisy/barylkakrwi | refs/heads/master | /barylka_django/web/migrations/0001_initial.py | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Edition'
db.create_table(u'web_edition', (
('number', self.gf('django.db.models.... | {"/barylka_django/web/views.py": ["/barylka_django/web/models.py"], "/barylka_django/crawler/tests.py": ["/barylka_django/crawler/micro_crawler.py"]} |
31,115 | noisy/barylkakrwi | refs/heads/master | /barylka_django/web/templatetags/__init__.py | __author__ = 'work'
| {"/barylka_django/web/views.py": ["/barylka_django/web/models.py"], "/barylka_django/crawler/tests.py": ["/barylka_django/crawler/micro_crawler.py"]} |
31,116 | noisy/barylkakrwi | refs/heads/master | /barylka_django/web/views.py | # -*- coding: utf-8 -*-
import datetime
from django.shortcuts import render
from barylka_django.settings import CURRENT_BARYLKA_EDITION
from barylka_django.web.models import *
from django.db.models import Sum, Min
def index(request, edition=CURRENT_BARYLKA_EDITION):
editon_obj = Edition.objects.filter(number=edit... | {"/barylka_django/web/views.py": ["/barylka_django/web/models.py"], "/barylka_django/crawler/tests.py": ["/barylka_django/crawler/micro_crawler.py"]} |
31,117 | noisy/barylkakrwi | refs/heads/master | /barylka_django/crawler/tests.py | # -*- coding: utf-8 -*-
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
from .micro_crawler import *
class MicroCrawlerTest(TestCase):
def run_r... | {"/barylka_django/web/views.py": ["/barylka_django/web/models.py"], "/barylka_django/crawler/tests.py": ["/barylka_django/crawler/micro_crawler.py"]} |
31,118 | noisy/barylkakrwi | refs/heads/master | /barylka_django/urls.py | from django.conf import settings
from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin
from django.views.generic.base import RedirectView
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', 'barylka_djan... | {"/barylka_django/web/views.py": ["/barylka_django/web/models.py"], "/barylka_django/crawler/tests.py": ["/barylka_django/crawler/micro_crawler.py"]} |
31,136 | netrunners/genclass | refs/heads/master | /generators/__init__.py |
from .monguo import Monguo
from .reactComponent import ReactComponent
from .reactList import ReactList
from .torgHandler import TorgHandler
from .wtform import WtForm
all = ['Mongo','ReactComponent', 'ReactList', 'TorgHandler', 'WtForm']
| {"/generators/__init__.py": ["/generators/monguo.py", "/generators/reactComponent.py", "/generators/reactList.py", "/generators/torgHandler.py", "/generators/wtform.py"], "/generators/torgHandler.py": ["/generators/utils.py"], "/Genclass.py": ["/yml.py", "/gui.py", "/Struct.py", "/Generators.py", "/generators/__init__.... |
31,137 | netrunners/genclass | refs/heads/master | /generators/reactComponent.py |
def ReactComponent(_,o):
import pprint
definition = _.definitions['reactComponent']
imports = definition['imports']
field = definition['input']
typedmembers = _._getmembers(o)
members = [m[0] for m in _._getmembers(o)] #
indent = ' '
print(members)
fields = {
'name':o... | {"/generators/__init__.py": ["/generators/monguo.py", "/generators/reactComponent.py", "/generators/reactList.py", "/generators/torgHandler.py", "/generators/wtform.py"], "/generators/torgHandler.py": ["/generators/utils.py"], "/Genclass.py": ["/yml.py", "/gui.py", "/Struct.py", "/Generators.py", "/generators/__init__.... |
31,138 | netrunners/genclass | refs/heads/master | /generators/utils.py |
# upper first letter (classNames)
def upper(s): return s[0].upper() + s[1:]
# lower first letter (files)
def lower(s): return s[0].lower() + s[1:]
| {"/generators/__init__.py": ["/generators/monguo.py", "/generators/reactComponent.py", "/generators/reactList.py", "/generators/torgHandler.py", "/generators/wtform.py"], "/generators/torgHandler.py": ["/generators/utils.py"], "/Genclass.py": ["/yml.py", "/gui.py", "/Struct.py", "/Generators.py", "/generators/__init__.... |
31,139 | netrunners/genclass | refs/heads/master | /generators/torgHandler.py | from .utils import upper, lower
def TorgHandler(_,o):
definition = _.definitions['TorgHandler']
urlpattern = definition['urlpattern']
members = _._getmembers(o)
CRUD = 'Create Read Update Delete List FullList'.split()
docdict = '\n'.join(["%s%s%s" % (
3*' ',
... | {"/generators/__init__.py": ["/generators/monguo.py", "/generators/reactComponent.py", "/generators/reactList.py", "/generators/torgHandler.py", "/generators/wtform.py"], "/generators/torgHandler.py": ["/generators/utils.py"], "/Genclass.py": ["/yml.py", "/gui.py", "/Struct.py", "/Generators.py", "/generators/__init__.... |
31,140 | netrunners/genclass | refs/heads/master | /Genclass.py |
'''
Genclass
'''
from PyQt5.QtWidgets import (qApp,
QApplication,QWidget,
QMessageBox, QFileDialog,
QPushButton,
QTableView,QTableWidget,QTableWidgetItem,
QSizePolicy, QHead... | {"/generators/__init__.py": ["/generators/monguo.py", "/generators/reactComponent.py", "/generators/reactList.py", "/generators/torgHandler.py", "/generators/wtform.py"], "/generators/torgHandler.py": ["/generators/utils.py"], "/Genclass.py": ["/yml.py", "/gui.py", "/Struct.py", "/Generators.py", "/generators/__init__.... |
31,141 | netrunners/genclass | refs/heads/master | /generators/reactList.py | from .utils import upper, lower
def ReactList(_,o):
definition = _.definitions['reactList']
imports = definition['imports']
th = definition['th']
td = definition['td']
members = [m[0] for m in _._getmembers(o)] #
fields = {
'name': lower(o.name),
... | {"/generators/__init__.py": ["/generators/monguo.py", "/generators/reactComponent.py", "/generators/reactList.py", "/generators/torgHandler.py", "/generators/wtform.py"], "/generators/torgHandler.py": ["/generators/utils.py"], "/Genclass.py": ["/yml.py", "/gui.py", "/Struct.py", "/Generators.py", "/generators/__init__.... |
31,142 | netrunners/genclass | refs/heads/master | /scaff.py |
import importlib
import imp
from importlib import import_module
import ast, types, sys, time
from inspect import signature, getmembers, isclass, ismethod, _empty
from monguo import Field,StringField,IntegerField, ReferenceField
import torg.debuglog
log = torg.debuglog.get(__name__)
def GetSubList(obj):
if isc... | {"/generators/__init__.py": ["/generators/monguo.py", "/generators/reactComponent.py", "/generators/reactList.py", "/generators/torgHandler.py", "/generators/wtform.py"], "/generators/torgHandler.py": ["/generators/utils.py"], "/Genclass.py": ["/yml.py", "/gui.py", "/Struct.py", "/Generators.py", "/generators/__init__.... |
31,143 | netrunners/genclass | refs/heads/master | /Generators.py | import yaml,os
from generators.utils import lower
from PyQt5.QtWidgets import QMessageBox
class Generators:
'''
The code generators
the Generators are functions in this class not starting with a _
(ie considered private in some conventions)
'''
def __init__(_,definitions):
_.definitio... | {"/generators/__init__.py": ["/generators/monguo.py", "/generators/reactComponent.py", "/generators/reactList.py", "/generators/torgHandler.py", "/generators/wtform.py"], "/generators/torgHandler.py": ["/generators/utils.py"], "/Genclass.py": ["/yml.py", "/gui.py", "/Struct.py", "/Generators.py", "/generators/__init__.... |
31,144 | netrunners/genclass | refs/heads/master | /yml.py | import yaml
def load(file):
class Struct:
def __init__(self,rawdat) :
self.__dict__ = rawdat
with open(file) as f:
rawDic = yaml.safe_load(f)
return Struct(rawDic)
| {"/generators/__init__.py": ["/generators/monguo.py", "/generators/reactComponent.py", "/generators/reactList.py", "/generators/torgHandler.py", "/generators/wtform.py"], "/generators/torgHandler.py": ["/generators/utils.py"], "/Genclass.py": ["/yml.py", "/gui.py", "/Struct.py", "/Generators.py", "/generators/__init__.... |
31,145 | netrunners/genclass | refs/heads/master | /generators/wtform.py | from .utils import upper
def WtForm(_,o):
# retrieve class template
definition = _.definitions['WtForm']
imports = definition['imports']
Cls = definition['class']
# generate head
# generate class with head
fields = []
for x in _._getmembers(o): # write members
name = x[0]
... | {"/generators/__init__.py": ["/generators/monguo.py", "/generators/reactComponent.py", "/generators/reactList.py", "/generators/torgHandler.py", "/generators/wtform.py"], "/generators/torgHandler.py": ["/generators/utils.py"], "/Genclass.py": ["/yml.py", "/gui.py", "/Struct.py", "/Generators.py", "/generators/__init__.... |
31,146 | netrunners/genclass | refs/heads/master | /Struct.py |
class Struct:
def __init__(self,rawdat) :
self.__dict__ = rawdat
| {"/generators/__init__.py": ["/generators/monguo.py", "/generators/reactComponent.py", "/generators/reactList.py", "/generators/torgHandler.py", "/generators/wtform.py"], "/generators/torgHandler.py": ["/generators/utils.py"], "/Genclass.py": ["/yml.py", "/gui.py", "/Struct.py", "/Generators.py", "/generators/__init__.... |
31,147 | netrunners/genclass | refs/heads/master | /gui.py | from collections import OrderedDict
from PyQt5.QtWidgets import QAction
from PyQt5.QtGui import QIcon
from PyQt5.QtCore import QState, QStateMachine
from PyQt5.QtWidgets import QBoxLayout
Icons = './icons/'
win = None
def GUI(qApp,window):
global win
win = window
return {
'Menus': [
[... | {"/generators/__init__.py": ["/generators/monguo.py", "/generators/reactComponent.py", "/generators/reactList.py", "/generators/torgHandler.py", "/generators/wtform.py"], "/generators/torgHandler.py": ["/generators/utils.py"], "/Genclass.py": ["/yml.py", "/gui.py", "/Struct.py", "/Generators.py", "/generators/__init__.... |
31,148 | netrunners/genclass | refs/heads/master | /generators/monguo.py | from .utils import upper
def Monguo(_,o):
definition = _.definitions['Monguo']
out = '\n'.join([
"\'''",
_._header(o),
"\'''\n",
definition['imports'],
definition['document'].format(name=o.name)
])
for x in _._getmembers(o): # write members
name = x[0]
... | {"/generators/__init__.py": ["/generators/monguo.py", "/generators/reactComponent.py", "/generators/reactList.py", "/generators/torgHandler.py", "/generators/wtform.py"], "/generators/torgHandler.py": ["/generators/utils.py"], "/Genclass.py": ["/yml.py", "/gui.py", "/Struct.py", "/Generators.py", "/generators/__init__.... |
31,158 | timdvd/python_videoplayer | refs/heads/main | /main.py | import sys
from PyQt5.QtWidgets import QApplication
from mediaPlayer import MediaWindow
app = QApplication(sys.argv)
mediaPlayerWindow = MediaWindow()
sys.exit(app.exec_()) | {"/main.py": ["/mediaPlayer.py"], "/mediaPlayer.py": ["/ui_mediaPlayer.py"]} |
31,159 | timdvd/python_videoplayer | refs/heads/main | /mediaPlayer.py | from PyQt5 import QtWidgets
from ui_mediaPlayer import Ui_MediaPlayer
from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QHBoxLayout, QVBoxLayout, QLabel, \
QSlider, QStyle, QSizePolicy, QFileDialog, QMessageBox
import sys
from PyQt5.QtMultimedia import QMediaPlayer, QMediaContent
from PyQt5.QtMultimediaW... | {"/main.py": ["/mediaPlayer.py"], "/mediaPlayer.py": ["/ui_mediaPlayer.py"]} |
31,160 | timdvd/python_videoplayer | refs/heads/main | /ui_mediaPlayer.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mediaPlayer.ui'
#
# Created by: PyQt5 UI code generator 5.13.0
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtGui import QIcon
from PyQt5.QtCore import Qt, QUrl, QSize
# PyQ... | {"/main.py": ["/mediaPlayer.py"], "/mediaPlayer.py": ["/ui_mediaPlayer.py"]} |
31,324 | oldsix-learn/Passenger-Flow-Forecast | refs/heads/master | /export.py | import datetime
import os
import re
import time
import warnings
import matplotlib.pyplot as plt
import pandas as pd
from sklearn import feature_selection
from sklearn.ensemble import RandomForestRegressor, AdaBoostRegressor, GradientBoostingRegressor
from sklearn.linear_model import Lasso
from sklearn.metrics import m... | {"/example.py": ["/export.py"], "/app.py": ["/export.py"]} |
31,325 | oldsix-learn/Passenger-Flow-Forecast | refs/heads/master | /example.py | from export import MyModel
import time
def pre_station(date, station):
pre = MyModel(date=date, text_day=120, station=station, all=True)
return pre.pre_station()
def pre_route(date, route):
pre = MyModel(date=date, text_day=90, route=route)
return pre.pre_route()
if __name__ == '__main__':
be ... | {"/example.py": ["/export.py"], "/app.py": ["/export.py"]} |
31,326 | oldsix-learn/Passenger-Flow-Forecast | refs/heads/master | /total.py | import json
import os
import pandas as pd
import datetime as dt
path = ''
for root, dirs, files in os.walk('a9'):
if len(files) > 0:
path = 'init_data/'
else:
path = 'http://114.55.125.234:1111/init_data/'
trips = pd.read_csv(os.path.join(path, 'clean_data.csv'), encoding='gbk') # 读取
user = p... | {"/example.py": ["/export.py"], "/app.py": ["/export.py"]} |
31,327 | oldsix-learn/Passenger-Flow-Forecast | refs/heads/master | /app.py | import filecmp
import json
import os
import sys
import time
from threading import Thread
from flask import Flask, render_template
from flask_sqlalchemy import SQLAlchemy
from export import MyModel
app = Flask(__name__)
app.secret_key = os.getenv('SECRET_KEY', 'secret string')
app.jinja_env.trim_blocks = True
app.jinj... | {"/example.py": ["/export.py"], "/app.py": ["/export.py"]} |
31,328 | oldsix-learn/Passenger-Flow-Forecast | refs/heads/master | /run.py | import os
import requests
data = ['a9/2020.csv', 'a9/city.csv', 'a9/test_station.csv', 'a9/trips.csv', 'init_data/clean_data.csv',
'init_data/test_station.csv', 'init_data/users.csv', 'init_data/workdays2020.csv']
# def get_all_name():
# data_dirs = ['a9', 'init_data']
# result = []
# for dir_ite... | {"/example.py": ["/export.py"], "/app.py": ["/export.py"]} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.