index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
13,547 | mperrin/jwst | refs/heads/master | /jwst/tests/compare_outputs.py | import copy
from datetime import datetime
import os
from difflib import unified_diff
from io import StringIO
from ci_watson.artifactory_helpers import (
get_bigdata,
BigdataError,
generate_upload_schema,
)
from astropy.io import fits
from astropy.io.fits import FITSDiff, HDUDiff
TODAYS_DATE = datetime.n... | {"/jwst/tests_nightly/general/miri/test_sloperpipeline.py": ["/jwst/tests/base_classes.py"], "/jwst/tests_nightly/general/nircam/test_image2pipeline_2b.py": ["/jwst/tests/base_classes.py"], "/jwst/tests_nightly/general/niriss/test_nis_wfss_spec2.py": ["/jwst/tests/base_classes.py"], "/jwst/regtest/test_miri_image_detec... |
13,548 | mperrin/jwst | refs/heads/master | /jwst/tests_nightly/general/nircam/test_coron3_1.py | import pytest
from jwst.tests.base_classes import BaseJWSTTest, raw_from_asn
from jwst.pipeline import Coron3Pipeline
@pytest.mark.bigdata
class TestCoron3Pipeline(BaseJWSTTest):
rtol = 0.00001
atol = 0.00001
input_loc = 'nircam'
ref_loc = ['test_coron3', 'truth']
def test_coron3_1(self):
... | {"/jwst/tests_nightly/general/miri/test_sloperpipeline.py": ["/jwst/tests/base_classes.py"], "/jwst/tests_nightly/general/nircam/test_image2pipeline_2b.py": ["/jwst/tests/base_classes.py"], "/jwst/tests_nightly/general/niriss/test_nis_wfss_spec2.py": ["/jwst/tests/base_classes.py"], "/jwst/regtest/test_miri_image_detec... |
13,549 | mperrin/jwst | refs/heads/master | /jwst/tests_nightly/general/miri/test_image2pipeline_1.py | import pytest
from jwst.pipeline import Image2Pipeline
from jwst.pipeline.collect_pipeline_cfgs import collect_pipeline_cfgs
from jwst.tests.base_classes import BaseJWSTTest
@pytest.mark.bigdata
class TestImage2Pipeline(BaseJWSTTest):
input_loc = 'miri'
ref_loc = ['test_image2pipeline', 'truth']
def tes... | {"/jwst/tests_nightly/general/miri/test_sloperpipeline.py": ["/jwst/tests/base_classes.py"], "/jwst/tests_nightly/general/nircam/test_image2pipeline_2b.py": ["/jwst/tests/base_classes.py"], "/jwst/tests_nightly/general/niriss/test_nis_wfss_spec2.py": ["/jwst/tests/base_classes.py"], "/jwst/regtest/test_miri_image_detec... |
13,560 | enginoid/django-debug-toolbar-requests | refs/heads/master | /debug_toolbar_requests/models.py | from debug_toolbar_requests.utils import timedelta_with_milliseconds
class ResponseTimer(object):
def __init__(self, start_time=None, end_time=None, response=None):
self.start_time = start_time
self.end_time = end_time
self.response = response
@property
def duration(self):
... | {"/debug_toolbar_requests/models.py": ["/debug_toolbar_requests/utils.py"], "/debug_toolbar_requests/panel.py": ["/debug_toolbar_requests/models.py"]} |
13,561 | enginoid/django-debug-toolbar-requests | refs/heads/master | /debug_toolbar_requests/utils.py | from datetime import timedelta
class timedelta_with_milliseconds(timedelta):
def milliseconds(self):
return int(round(self.microseconds / 1000.0)) | {"/debug_toolbar_requests/models.py": ["/debug_toolbar_requests/utils.py"], "/debug_toolbar_requests/panel.py": ["/debug_toolbar_requests/models.py"]} |
13,562 | enginoid/django-debug-toolbar-requests | refs/heads/master | /setup.py | from setuptools import setup
setup(
name='django-debug-toolbar-requests',
version='0.0.3',
description=('A django-debug-toolbar panel for HTTP requests made with '
'the `requests` library.'),
long_description=open('README.rst').read(),
author='Fred Jonsson',
author_email='fridrik@pyth.n... | {"/debug_toolbar_requests/models.py": ["/debug_toolbar_requests/utils.py"], "/debug_toolbar_requests/panel.py": ["/debug_toolbar_requests/models.py"]} |
13,563 | enginoid/django-debug-toolbar-requests | refs/heads/master | /debug_toolbar_requests/panel.py | from functools import partial
from pprint import pformat
from threading import local
import time
import requests
import requests.defaults
from django.utils.translation import ugettext_lazy as _, ngettext
from django.template.defaultfilters import truncatechars
from debug_toolbar.panels import DebugPanel
# Retain, b... | {"/debug_toolbar_requests/models.py": ["/debug_toolbar_requests/utils.py"], "/debug_toolbar_requests/panel.py": ["/debug_toolbar_requests/models.py"]} |
13,576 | goodwilrv/FlaskBlog | refs/heads/master | /FlaskBlog/model.py | from FlaskBlog import db,login_manager
from datetime import datetime
@login_manager.user_loader
def load_user(user_id):
return User.query.get(int(user_id))
class User(db.Model):
id = db.Column(db.Integer,primary_key=True)
username = db.Column(db.String(20),unique=True,nullable=False)
email = db.Column(db.St... | {"/FlaskBlog/routes.py": ["/FlaskBlog/model.py"]} |
13,577 | goodwilrv/FlaskBlog | refs/heads/master | /FlaskBlog/routes.py |
from flask import render_template, url_for, flash, redirect
from FlaskBlog.model import User, Post
from FlaskBlog.forms import RegistrationForm, LoginForm
from FlaskBlog import app,db, bcrypt
from flask_login import UserMixin, login_user, current_user, logout_user
posts = [
{
'author':'Gautam Kumar',
... | {"/FlaskBlog/routes.py": ["/FlaskBlog/model.py"]} |
13,698 | FrancoCuevas444/TimeTable-Generator | refs/heads/master | /TimeTableModule.py | from SubjectEntryModule import *
from openpyxl import *
from openpyxl.styles import *
class TimeTable:
def __init__(self, subjectList, step=30):
self.subjectList = subjectList
self.step = step
self.baseTimeRange = TimeRange.findTimeRange(subjectList)
def rowsFromTimeRange(sel... | {"/TimeTableModule.py": ["/SubjectEntryModule.py"], "/TimeTableGenerator.py": ["/SubjectEntryModule.py", "/TimeTableModule.py", "/SubjectsPermutations.py", "/TimeModule.py"], "/SubjectEntryModule.py": ["/TimeModule.py"]} |
13,699 | FrancoCuevas444/TimeTable-Generator | refs/heads/master | /TimeTableGenerator.py | from SubjectEntryModule import *
from TimeTableModule import *
from SubjectsPermutations import *
from TimeModule import TimeRange
import sys
VERSION = 0.1
# Main entry of the program
def main():
#Reading arguments from console for: JSON filename, initial time and final time
if(len(sys.argv) < 4):
... | {"/TimeTableModule.py": ["/SubjectEntryModule.py"], "/TimeTableGenerator.py": ["/SubjectEntryModule.py", "/TimeTableModule.py", "/SubjectsPermutations.py", "/TimeModule.py"], "/SubjectEntryModule.py": ["/TimeModule.py"]} |
13,700 | FrancoCuevas444/TimeTable-Generator | refs/heads/master | /SubjectsPermutations.py | class Choice:
def __init__(self, name, code):
self.name = name
self.code = code
self.visited = False
def generateNext(table):
nextPerm = {}
for i in range(len(table)):
if(allFalseInList(table[i])):
nextPerm[table[i][0].name] = table[i][0].code
... | {"/TimeTableModule.py": ["/SubjectEntryModule.py"], "/TimeTableGenerator.py": ["/SubjectEntryModule.py", "/TimeTableModule.py", "/SubjectsPermutations.py", "/TimeModule.py"], "/SubjectEntryModule.py": ["/TimeModule.py"]} |
13,701 | FrancoCuevas444/TimeTable-Generator | refs/heads/master | /TimeModule.py | import copy
from enum import IntEnum
#A representation of "Days"
class Days(IntEnum):
LUNES = 0
MARTES = 1
MIERCOLES = 2
JUEVES = 3
VIERNES = 4
def __str__(self):
if(self.value == 0): return "Lunes"
elif(self.value == 1): return "Martes"
elif(self.value ==... | {"/TimeTableModule.py": ["/SubjectEntryModule.py"], "/TimeTableGenerator.py": ["/SubjectEntryModule.py", "/TimeTableModule.py", "/SubjectsPermutations.py", "/TimeModule.py"], "/SubjectEntryModule.py": ["/TimeModule.py"]} |
13,702 | FrancoCuevas444/TimeTable-Generator | refs/heads/master | /SubjectEntryModule.py | from TimeModule import *
import json
import io
class SubjectModule(IntEnum):
TEORICO = 0
PRACTICO = 1
TEOPRA = 2
CONSULTA = 3
def __str__(self):
if(self.value == 0): return "Teórico"
elif(self.value == 1): return "Práctico"
elif(self.value == 2): return "Teóric... | {"/TimeTableModule.py": ["/SubjectEntryModule.py"], "/TimeTableGenerator.py": ["/SubjectEntryModule.py", "/TimeTableModule.py", "/SubjectsPermutations.py", "/TimeModule.py"], "/SubjectEntryModule.py": ["/TimeModule.py"]} |
13,703 | sebastian-philipp/test-rook-orchestrator | refs/heads/master | /test_rook.py | import json
import pytest
import requests
from fixtures import _orch_exec, _wait_for_condition, _service_exist, _ceph_exec, ceph_cluster, \
get_pods, pods_started, dashboard_url, dashboard_token_header
def test_status(ceph_cluster):
_orch_exec('status')
def test_service_ls(ceph_cluster):
svs = json.loa... | {"/test_rook.py": ["/fixtures.py"]} |
13,704 | sebastian-philipp/test-rook-orchestrator | refs/heads/master | /fixtures.py | import base64
import time
from subprocess import check_output, CalledProcessError
from typing import List
import requests
import yaml
from kubernetes import client, config
#from kubetest import utils, objects
#from kubetest.client import TestClient
from kubernetes.client import V1Pod, V1Service, V1ServicePort, V1Secre... | {"/test_rook.py": ["/fixtures.py"]} |
13,728 | chbrown13/servo-dependency-tool | refs/heads/master | /test/test_cargo_lock_parser.py | import unittest
import os
import sys
path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
sys.path.insert(0,path)
import cargo_lock_parser as parser
from cargo_lock_parser import LockRoot, LockDependency, LockPackage, LockFile
class TestCargoLockParser(unittest.TestCase):
def setUp(self):
self.pat... | {"/test/test_cargo_lock_parser.py": ["/cargo_lock_parser.py"], "/crates_io_checker.py": ["/repo_management.py"], "/test/test_cargo_toml_updater.py": ["/cargo_toml_updater.py", "/cargo_lock_parser.py"], "/test/test_crates_io_checker.py": ["/crates_io_checker.py", "/cargo_lock_parser.py"], "/servo_dependency_tool.py": ["... |
13,729 | chbrown13/servo-dependency-tool | refs/heads/master | /setup.py | from distutils.core import setup
setup(
name='servo-dependency-tool',
description='Tool for automatically upgrading Cargo dependencies.',
install_requires=['gitpython','github3.py'],
)
| {"/test/test_cargo_lock_parser.py": ["/cargo_lock_parser.py"], "/crates_io_checker.py": ["/repo_management.py"], "/test/test_cargo_toml_updater.py": ["/cargo_toml_updater.py", "/cargo_lock_parser.py"], "/test/test_crates_io_checker.py": ["/crates_io_checker.py", "/cargo_lock_parser.py"], "/servo_dependency_tool.py": ["... |
13,730 | chbrown13/servo-dependency-tool | refs/heads/master | /crates_io_checker.py | from git import Repo, Remote
import git
import os
import platform
import json
import repo_management
CRATES = "crates.io-index"
depend = {}
# Delete repo and files when done
def cleanup():
if platform.system() == "Windows":
rm = 'rmdir /S /Q "%s"' % CRATES
else:
rm = "rm -rf %s" % CRATES
... | {"/test/test_cargo_lock_parser.py": ["/cargo_lock_parser.py"], "/crates_io_checker.py": ["/repo_management.py"], "/test/test_cargo_toml_updater.py": ["/cargo_toml_updater.py", "/cargo_lock_parser.py"], "/test/test_crates_io_checker.py": ["/crates_io_checker.py", "/cargo_lock_parser.py"], "/servo_dependency_tool.py": ["... |
13,731 | chbrown13/servo-dependency-tool | refs/heads/master | /test/test_cargo_toml_updater.py | import unittest
import os
import sys
path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
sys.path.insert(0,path)
import cargo_toml_updater as updater
from cargo_lock_parser import lock_file_parse
class TestCargoTOMLUpdater(unittest.TestCase):
def setUp(self):
self.lock_file = lock_file_parse("Car... | {"/test/test_cargo_lock_parser.py": ["/cargo_lock_parser.py"], "/crates_io_checker.py": ["/repo_management.py"], "/test/test_cargo_toml_updater.py": ["/cargo_toml_updater.py", "/cargo_lock_parser.py"], "/test/test_crates_io_checker.py": ["/crates_io_checker.py", "/cargo_lock_parser.py"], "/servo_dependency_tool.py": ["... |
13,732 | chbrown13/servo-dependency-tool | refs/heads/master | /repo_management.py | from git import Repo, Remote
from github3 import login
import git
import traceback
# Function that takes the local git clone directory path and the new branch name as parameters
# and create a new branch in both the local repository and remote
def create_new_branch(path, branch_name):
repo = Repo(path)
... | {"/test/test_cargo_lock_parser.py": ["/cargo_lock_parser.py"], "/crates_io_checker.py": ["/repo_management.py"], "/test/test_cargo_toml_updater.py": ["/cargo_toml_updater.py", "/cargo_lock_parser.py"], "/test/test_crates_io_checker.py": ["/crates_io_checker.py", "/cargo_lock_parser.py"], "/servo_dependency_tool.py": ["... |
13,733 | chbrown13/servo-dependency-tool | refs/heads/master | /test/test_crates_io_checker.py | import unittest
import os
import sys
path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
sys.path.insert(0,path)
import crates_io_checker as crates
from cargo_lock_parser import LockPackage
class TestCratesIOChecker(unittest.TestCase):
def setUp(self):
self.path = os.path.join(path,"test")
sel... | {"/test/test_cargo_lock_parser.py": ["/cargo_lock_parser.py"], "/crates_io_checker.py": ["/repo_management.py"], "/test/test_cargo_toml_updater.py": ["/cargo_toml_updater.py", "/cargo_lock_parser.py"], "/test/test_crates_io_checker.py": ["/crates_io_checker.py", "/cargo_lock_parser.py"], "/servo_dependency_tool.py": ["... |
13,734 | chbrown13/servo-dependency-tool | refs/heads/master | /servo_dependency_tool.py | # Servo Dependency Tool
#
# Authors:
# Chris Brown (dcbrow10@ncsu.edu)
# Bradford Ingersoll (bingers@ncsu.edu)
# Qiufeng Yu (qyu4@ncsu.edu)
import datetime
import getpass
import os
import shutil
import cargo_lock_parser
import cargo_toml_updater
import crates_io_checker
import repo_management
import run_cargo_u... | {"/test/test_cargo_lock_parser.py": ["/cargo_lock_parser.py"], "/crates_io_checker.py": ["/repo_management.py"], "/test/test_cargo_toml_updater.py": ["/cargo_toml_updater.py", "/cargo_lock_parser.py"], "/test/test_crates_io_checker.py": ["/crates_io_checker.py", "/cargo_lock_parser.py"], "/servo_dependency_tool.py": ["... |
13,735 | chbrown13/servo-dependency-tool | refs/heads/master | /cargo_lock_parser.py | # Cargo.lock Parser
#
# This script parses a Cargo.lock file and converts it into a
# LockFile object. A LockFile object contains all of the information about
# the [root] and the [[package]] sections within a Cargo.lock file.
# NOTE: Must be placed in the same folder as the Cargo.lock file
#
# From our Initial Ste... | {"/test/test_cargo_lock_parser.py": ["/cargo_lock_parser.py"], "/crates_io_checker.py": ["/repo_management.py"], "/test/test_cargo_toml_updater.py": ["/cargo_toml_updater.py", "/cargo_lock_parser.py"], "/test/test_crates_io_checker.py": ["/crates_io_checker.py", "/cargo_lock_parser.py"], "/servo_dependency_tool.py": ["... |
13,736 | chbrown13/servo-dependency-tool | refs/heads/master | /cargo_toml_updater.py | # Cargo.toml File Updater
#
# This script parses a cargo.toml file and updates all of the version numbers
# to the version numbers from the lock_file object
import re
# Method to update the passed file (a Cargo.toml file)
def toml_file_update(fname, lock_file):
with open(fname, 'r+') as fp:
in_dependenci... | {"/test/test_cargo_lock_parser.py": ["/cargo_lock_parser.py"], "/crates_io_checker.py": ["/repo_management.py"], "/test/test_cargo_toml_updater.py": ["/cargo_toml_updater.py", "/cargo_lock_parser.py"], "/test/test_crates_io_checker.py": ["/crates_io_checker.py", "/cargo_lock_parser.py"], "/servo_dependency_tool.py": ["... |
13,737 | chbrown13/servo-dependency-tool | refs/heads/master | /run_cargo_update.py | import os
import subprocess
def run_update(git_path, pkg):
print("Running update for %s" % pkg.name)
if os.path.isfile(os.path.join(git_path, 'mach')):
mach_path = git_path + '/mach'
args = [mach_path, 'cargo-update', '-p', pkg.name]
else: # Otherwise use default cargo update command
... | {"/test/test_cargo_lock_parser.py": ["/cargo_lock_parser.py"], "/crates_io_checker.py": ["/repo_management.py"], "/test/test_cargo_toml_updater.py": ["/cargo_toml_updater.py", "/cargo_lock_parser.py"], "/test/test_crates_io_checker.py": ["/crates_io_checker.py", "/cargo_lock_parser.py"], "/servo_dependency_tool.py": ["... |
13,743 | DavidWalshe93/Network-Anomoly-Classification | refs/heads/master | /src/pipeline.py | """
Author: David Walshe
Date: 08/04/2020
"""
from __future__ import annotations
from collections import Counter
from typing import TYPE_CHECKING
from imblearn.over_sampling import RandomOverSampler, SMOTE
from imblearn.pipeline import Pipeline as ImblearnPipeline
from imblearn.under_sampling im... | {"/src/pipeline.py": ["/src/config.py"], "/src/data.py": ["/src/config.py", "/src/logger_config.py"], "/src/preprocess.py": ["/src/data.py", "/src/pipeline.py", "/src/utils.py"], "/main.py": ["/src/plotting.py", "/src/config.py", "/src/data.py", "/src/evaluate.py", "/src/logger_config.py", "/src/pipeline.py", "/src/pre... |
13,744 | DavidWalshe93/Network-Anomoly-Classification | refs/heads/master | /src/data.py | """
Author: David Walshe
Date: 03/04/2020
"""
# Imports
import logging
from json import load
import numpy as np
import pandas as pd
from sklearn.datasets import fetch_kddcup99
from src.config import RANDOM_STATE
from src.logger_config import setup_logger
logger = setup_logger(logging.getLogger(... | {"/src/pipeline.py": ["/src/config.py"], "/src/data.py": ["/src/config.py", "/src/logger_config.py"], "/src/preprocess.py": ["/src/data.py", "/src/pipeline.py", "/src/utils.py"], "/main.py": ["/src/plotting.py", "/src/config.py", "/src/data.py", "/src/evaluate.py", "/src/logger_config.py", "/src/pipeline.py", "/src/pre... |
13,745 | DavidWalshe93/Network-Anomoly-Classification | refs/heads/master | /src/preprocess.py | """
Author: David Walshe
Date: 09/04/2020
"""
import numpy as np
import pandas as pd
from src.data import LabelManager
from src.pipeline import PreprocessPipelineFactory
from src.utils import refactor_names, refactor_byte_name
class Preprocess:
def __init__(self):
self._signature_k... | {"/src/pipeline.py": ["/src/config.py"], "/src/data.py": ["/src/config.py", "/src/logger_config.py"], "/src/preprocess.py": ["/src/data.py", "/src/pipeline.py", "/src/utils.py"], "/main.py": ["/src/plotting.py", "/src/config.py", "/src/data.py", "/src/evaluate.py", "/src/logger_config.py", "/src/pipeline.py", "/src/pre... |
13,746 | DavidWalshe93/Network-Anomoly-Classification | refs/heads/master | /src/utils.py | """
Author: David Walshe
Date: 09/04/2020
"""
import pandas as pd
def refactor_names(names, features):
for i, feature in enumerate(features):
for j, name in enumerate(names):
if name.find(f"x{i}") > -1:
name = name.replace(f"x{i}_", f"[{feature}] ")
... | {"/src/pipeline.py": ["/src/config.py"], "/src/data.py": ["/src/config.py", "/src/logger_config.py"], "/src/preprocess.py": ["/src/data.py", "/src/pipeline.py", "/src/utils.py"], "/main.py": ["/src/plotting.py", "/src/config.py", "/src/data.py", "/src/evaluate.py", "/src/logger_config.py", "/src/pipeline.py", "/src/pre... |
13,747 | DavidWalshe93/Network-Anomoly-Classification | refs/heads/master | /main.py | """
Author: David Walshe
Date: 03/04/2020
"""
import logging
from collections import Counter
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
# Pre-processing
from sklearn.decomposition import PCA
from sklearn.model_selection import train_test_split
# noinspecti... | {"/src/pipeline.py": ["/src/config.py"], "/src/data.py": ["/src/config.py", "/src/logger_config.py"], "/src/preprocess.py": ["/src/data.py", "/src/pipeline.py", "/src/utils.py"], "/main.py": ["/src/plotting.py", "/src/config.py", "/src/data.py", "/src/evaluate.py", "/src/logger_config.py", "/src/pipeline.py", "/src/pre... |
13,748 | DavidWalshe93/Network-Anomoly-Classification | refs/heads/master | /src/plotting.py | """
Author: David Walshe
Date: 09/04/2020
"""
from collections import Counter
from itertools import zip_longest
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from src.utils import change_label_to_class
def get_colors():
import json
with open("colors.json") as fh... | {"/src/pipeline.py": ["/src/config.py"], "/src/data.py": ["/src/config.py", "/src/logger_config.py"], "/src/preprocess.py": ["/src/data.py", "/src/pipeline.py", "/src/utils.py"], "/main.py": ["/src/plotting.py", "/src/config.py", "/src/data.py", "/src/evaluate.py", "/src/logger_config.py", "/src/pipeline.py", "/src/pre... |
13,749 | DavidWalshe93/Network-Anomoly-Classification | refs/heads/master | /src/config.py | """
Author: David Walshe
Date: 11/04/2020
Desc: Helper file to control all global variables in the model Pipeline.
"""
# Sets up configuration for a pipeline run.
# =========================================
RANDOM_STATE = 0
FULL_DATA_SET = False
TUNING = False
| {"/src/pipeline.py": ["/src/config.py"], "/src/data.py": ["/src/config.py", "/src/logger_config.py"], "/src/preprocess.py": ["/src/data.py", "/src/pipeline.py", "/src/utils.py"], "/main.py": ["/src/plotting.py", "/src/config.py", "/src/data.py", "/src/evaluate.py", "/src/logger_config.py", "/src/pipeline.py", "/src/pre... |
13,750 | DavidWalshe93/Network-Anomoly-Classification | refs/heads/master | /src/evaluate.py | """
Author: David Walshe
Date: 12/04/2020
"""
import logging
from itertools import product
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import confusion_matrix
from sklearn.met... | {"/src/pipeline.py": ["/src/config.py"], "/src/data.py": ["/src/config.py", "/src/logger_config.py"], "/src/preprocess.py": ["/src/data.py", "/src/pipeline.py", "/src/utils.py"], "/main.py": ["/src/plotting.py", "/src/config.py", "/src/data.py", "/src/evaluate.py", "/src/logger_config.py", "/src/pipeline.py", "/src/pre... |
13,751 | DavidWalshe93/Network-Anomoly-Classification | refs/heads/master | /src/timer.py | """
Author: David Walshe
Date: 05/04/2020
"""
from collections import OrderedDict
from datetime import datetime as dt
class Singleton(type):
_instances = {}
def __call__(cls, *args, **kwargs):
if cls not in cls._instances:
cls._instances[cls] = super(Singleton, cls).... | {"/src/pipeline.py": ["/src/config.py"], "/src/data.py": ["/src/config.py", "/src/logger_config.py"], "/src/preprocess.py": ["/src/data.py", "/src/pipeline.py", "/src/utils.py"], "/main.py": ["/src/plotting.py", "/src/config.py", "/src/data.py", "/src/evaluate.py", "/src/logger_config.py", "/src/pipeline.py", "/src/pre... |
13,752 | DavidWalshe93/Network-Anomoly-Classification | refs/heads/master | /src/logger_config.py | """
Author: David Walshe
Date: 12/04/2020
"""
import logging
from src.timer import Singleton
class SetupLogger(metaclass=Singleton):
def __init__(self):
self._c_handler = logging.StreamHandler()
self._f_handler = logging.FileHandler("run.log", mode="w")
self._c_han... | {"/src/pipeline.py": ["/src/config.py"], "/src/data.py": ["/src/config.py", "/src/logger_config.py"], "/src/preprocess.py": ["/src/data.py", "/src/pipeline.py", "/src/utils.py"], "/main.py": ["/src/plotting.py", "/src/config.py", "/src/data.py", "/src/evaluate.py", "/src/logger_config.py", "/src/pipeline.py", "/src/pre... |
13,763 | huleos/django_course | refs/heads/master | /portfolio/migrations/0004_auto_20160617_1943.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-06-17 19:43
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('portfolio', '0003_auto_20160603_0140'),
]
operations = [
migrations.AlterField... | {"/portfolio/forms.py": ["/portfolio/models.py"], "/portfolio/serializers.py": ["/portfolio/models.py"], "/core/urls.py": ["/core/views.py"], "/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/portfolio/views.py": ["/portfolio/models.py", "/blog/models.py", "/portfolio/forms.py"], "/blog/ur... |
13,764 | huleos/django_course | refs/heads/master | /portfolio/forms.py | from django import forms
from portfolio.models import PortfolioItem
class PortfolioForm(forms.ModelForm):
class Meta:
model = PortfolioItem
fields = ['categories', 'title', 'edit_slug', 'slug', 'image', 'body', 'status']
title = forms.CharField(
required=True,
error_messages={'required': 'Please enter your... | {"/portfolio/forms.py": ["/portfolio/models.py"], "/portfolio/serializers.py": ["/portfolio/models.py"], "/core/urls.py": ["/core/views.py"], "/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/portfolio/views.py": ["/portfolio/models.py", "/blog/models.py", "/portfolio/forms.py"], "/blog/ur... |
13,765 | huleos/django_course | refs/heads/master | /portfolio/migrations/0003_auto_20160603_0140.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-06-03 01:40
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('portfolio', '0002_auto_20160603_0119'),
]
operations = [
migrations.AlterField... | {"/portfolio/forms.py": ["/portfolio/models.py"], "/portfolio/serializers.py": ["/portfolio/models.py"], "/core/urls.py": ["/core/views.py"], "/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/portfolio/views.py": ["/portfolio/models.py", "/blog/models.py", "/portfolio/forms.py"], "/blog/ur... |
13,766 | huleos/django_course | refs/heads/master | /portfolio/serializers.py | from rest_framework import serializers
from portfolio.models import PortfolioItem
class PortfolioSerializer(serializers.ModelSerializer):
url = serializers.URLField(source='get_absolute_url')
class Meta:
model = PortfolioItem
fields = ('id', 'author', 'title', 'slug', 'body', 'status', 'url')
read_only_field... | {"/portfolio/forms.py": ["/portfolio/models.py"], "/portfolio/serializers.py": ["/portfolio/models.py"], "/core/urls.py": ["/core/views.py"], "/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/portfolio/views.py": ["/portfolio/models.py", "/blog/models.py", "/portfolio/forms.py"], "/blog/ur... |
13,767 | huleos/django_course | refs/heads/master | /core/urls.py | from django.conf.urls import url
from core.views import NewsletterView
urlpatterns = [
url(r'^newsletter/$', NewsletterView.as_view(), name='newsletter'),
] | {"/portfolio/forms.py": ["/portfolio/models.py"], "/portfolio/serializers.py": ["/portfolio/models.py"], "/core/urls.py": ["/core/views.py"], "/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/portfolio/views.py": ["/portfolio/models.py", "/blog/models.py", "/portfolio/forms.py"], "/blog/ur... |
13,768 | huleos/django_course | refs/heads/master | /blog/views.py | from django.views.generic import TemplateView, DetailView
from blog.models import Post
class BlogView(TemplateView):
template_name = 'blog/list.html'
class DetailPost(DetailView):
template_name = 'blog/post.html'
model = Post
context_object_name = 'post' | {"/portfolio/forms.py": ["/portfolio/models.py"], "/portfolio/serializers.py": ["/portfolio/models.py"], "/core/urls.py": ["/core/views.py"], "/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/portfolio/views.py": ["/portfolio/models.py", "/blog/models.py", "/portfolio/forms.py"], "/blog/ur... |
13,769 | huleos/django_course | refs/heads/master | /blog/admin.py | from django.contrib import admin
from blog.models import Post, Category
class PostAdmin(admin.ModelAdmin):
filter_horizontal = ['categories']
admin.site.register(Post, PostAdmin)
admin.site.register(Category) | {"/portfolio/forms.py": ["/portfolio/models.py"], "/portfolio/serializers.py": ["/portfolio/models.py"], "/core/urls.py": ["/core/views.py"], "/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/portfolio/views.py": ["/portfolio/models.py", "/blog/models.py", "/portfolio/forms.py"], "/blog/ur... |
13,770 | huleos/django_course | refs/heads/master | /core/forms.py | from django import forms
class NewsletterForm(forms.Form):
name = forms.CharField(required=True)
email = forms.EmailField(required=True) | {"/portfolio/forms.py": ["/portfolio/models.py"], "/portfolio/serializers.py": ["/portfolio/models.py"], "/core/urls.py": ["/core/views.py"], "/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/portfolio/views.py": ["/portfolio/models.py", "/blog/models.py", "/portfolio/forms.py"], "/blog/ur... |
13,771 | huleos/django_course | refs/heads/master | /portfolio/views.py | from django.core.urlresolvers import reverse_lazy
from django.views.generic import (
DetailView,
ListView,
CreateView,
UpdateView,
DeleteView,
TemplateView,
)
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from portfolio.models import PortfolioItem
... | {"/portfolio/forms.py": ["/portfolio/models.py"], "/portfolio/serializers.py": ["/portfolio/models.py"], "/core/urls.py": ["/core/views.py"], "/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/portfolio/views.py": ["/portfolio/models.py", "/blog/models.py", "/portfolio/forms.py"], "/blog/ur... |
13,772 | huleos/django_course | refs/heads/master | /blog/urls.py | from django.conf.urls import url
from blog.views import BlogView, DetailPost
urlpatterns = [
url(r'^$', BlogView.as_view(), name='blog-list'),
url(r'^(?P<slug>[-\w]+)/$', DetailPost.as_view(), name='blog-post')
] | {"/portfolio/forms.py": ["/portfolio/models.py"], "/portfolio/serializers.py": ["/portfolio/models.py"], "/core/urls.py": ["/core/views.py"], "/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/portfolio/views.py": ["/portfolio/models.py", "/blog/models.py", "/portfolio/forms.py"], "/blog/ur... |
13,773 | huleos/django_course | refs/heads/master | /blog/models.py | from __future__ import unicode_literals
from django.db import models
from django.utils.text import slugify
from django.core.urlresolvers import reverse
class Post(models.Model):
author = models.ForeignKey('auth.User', on_delete=models.SET_NULL, blank=True, null=True)
categories = models.ManyToManyField('Category')
... | {"/portfolio/forms.py": ["/portfolio/models.py"], "/portfolio/serializers.py": ["/portfolio/models.py"], "/core/urls.py": ["/core/views.py"], "/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/portfolio/views.py": ["/portfolio/models.py", "/blog/models.py", "/portfolio/forms.py"], "/blog/ur... |
13,774 | huleos/django_course | refs/heads/master | /portfolio/urls.py | from django.conf.urls import url, include
from rest_framework.routers import DefaultRouter
from portfolio.views_api import PortfolioViewSet
from portfolio.views import (
DetailPortfolio,
ListPortfolio,
CreatePortfolio,
UpdatePortfolio,
DeletePortfolio,
PortfolioView,
)
router = DefaultRouter()
router.register('... | {"/portfolio/forms.py": ["/portfolio/models.py"], "/portfolio/serializers.py": ["/portfolio/models.py"], "/core/urls.py": ["/core/views.py"], "/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/portfolio/views.py": ["/portfolio/models.py", "/blog/models.py", "/portfolio/forms.py"], "/blog/ur... |
13,775 | huleos/django_course | refs/heads/master | /portfolio/admin.py | from django.db import models
from django.contrib import admin
from portfolio.models import PortfolioItem, Category
def make_published(modeladmin, request, queryset):
queryset.update(status='published')
make_published.short_description = 'Mark as published'
class PortfolioAdmin(admin.ModelAdmin):
class Media:
js... | {"/portfolio/forms.py": ["/portfolio/models.py"], "/portfolio/serializers.py": ["/portfolio/models.py"], "/core/urls.py": ["/core/views.py"], "/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/portfolio/views.py": ["/portfolio/models.py", "/blog/models.py", "/portfolio/forms.py"], "/blog/ur... |
13,776 | huleos/django_course | refs/heads/master | /portfolio/views_api.py | from rest_framework import viewsets
from rest_framework.permissions import IsAdminUser
from portfolio.serializers import PortfolioSerializer
from portfolio.models import PortfolioItem
class PortfolioViewSet(viewsets.ModelViewSet):
serializer_class = PortfolioSerializer
queryset = PortfolioItem.objects.all()
search... | {"/portfolio/forms.py": ["/portfolio/models.py"], "/portfolio/serializers.py": ["/portfolio/models.py"], "/core/urls.py": ["/core/views.py"], "/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/portfolio/views.py": ["/portfolio/models.py", "/blog/models.py", "/portfolio/forms.py"], "/blog/ur... |
13,777 | huleos/django_course | refs/heads/master | /portfolio/migrations/0002_auto_20160603_0119.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-06-03 01:19
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('portfolio', '0001_initial'),
]
operations = [
migrations.AddField(
... | {"/portfolio/forms.py": ["/portfolio/models.py"], "/portfolio/serializers.py": ["/portfolio/models.py"], "/core/urls.py": ["/core/views.py"], "/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/portfolio/views.py": ["/portfolio/models.py", "/blog/models.py", "/portfolio/forms.py"], "/blog/ur... |
13,778 | huleos/django_course | refs/heads/master | /core/templatetags/core_tags.py | from django import template
from core.forms import NewsletterForm
register = template.Library()
@register.inclusion_tag('core/newsletter_widget.html', takes_context=True)
def newsletter_widget(context):
form = context.get('form', NewsletterForm())
return {
'form': form
} | {"/portfolio/forms.py": ["/portfolio/models.py"], "/portfolio/serializers.py": ["/portfolio/models.py"], "/core/urls.py": ["/core/views.py"], "/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/portfolio/views.py": ["/portfolio/models.py", "/blog/models.py", "/portfolio/forms.py"], "/blog/ur... |
13,779 | huleos/django_course | refs/heads/master | /portfolio/models.py | from __future__ import unicode_literals
from django.db import models
from django.utils.text import slugify
from django.core.urlresolvers import reverse
STATUSES = (
('draft', 'Draft'),
('published', 'Published'),
('deleted', 'Deleted')
)
class PortfolioItem(models.Model):
author = models.ForeignKey('auth.User',... | {"/portfolio/forms.py": ["/portfolio/models.py"], "/portfolio/serializers.py": ["/portfolio/models.py"], "/core/urls.py": ["/core/views.py"], "/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/portfolio/views.py": ["/portfolio/models.py", "/blog/models.py", "/portfolio/forms.py"], "/blog/ur... |
13,780 | huleos/django_course | refs/heads/master | /core/views.py | from django.views.generic import TemplateView, FormView
from core.forms import NewsletterForm
from django.core.mail import EmailMultiAlternatives
class HomeView(TemplateView):
template_name = 'core/index.html'
class NewsletterView(FormView):
template_name = 'core/newsletter.html'
form_class = NewsletterForm
suc... | {"/portfolio/forms.py": ["/portfolio/models.py"], "/portfolio/serializers.py": ["/portfolio/models.py"], "/core/urls.py": ["/core/views.py"], "/blog/views.py": ["/blog/models.py"], "/blog/admin.py": ["/blog/models.py"], "/portfolio/views.py": ["/portfolio/models.py", "/blog/models.py", "/portfolio/forms.py"], "/blog/ur... |
13,781 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/environments/local/local_fileshare_env.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Scheduler-side Environment to run scripts locally
and upload/download data to the shared storage.
"""
import logging
from datetime import datetime
from string import Template
from typing import Any, Dict, List, Generator, Iterable, Mappi... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,782 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/tests/tunables/tunable_group_indexing_test.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Tests for checking the indexing rules for tunable groups.
"""
from mlos_bench.tunables.tunable import Tunable
from mlos_bench.tunables.tunable_groups import TunableGroups
def test_tunable_group_indexing(tunable_groups: TunableGroups, tu... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,783 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/optimizers/one_shot_optimizer.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
No-op optimizer for mlos_bench that proposes a single configuration.
"""
import logging
from typing import Optional
from mlos_bench.services.base_service import Service
from mlos_bench.tunables.tunable_groups import TunableGroups
from ml... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,784 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/environments/remote/remote_env.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Remotely executed benchmark/script environment.
"""
import logging
from typing import Dict, Iterable, Optional, Tuple
from mlos_bench.environments.status import Status
from mlos_bench.environments.script_env import ScriptEnv
from mlos_be... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,785 | microsoft/MLOS | refs/heads/main | /mlos_core/mlos_core/spaces/adapters/__init__.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Basic initializer module for the mlos_core space adapters.
"""
from enum import Enum
from typing import Optional, TypeVar
import ConfigSpace
from mlos_core.spaces.adapters.identity_adapter import IdentityAdapter
from mlos_core.spaces.ad... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,786 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/tests/services/__init__.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Tests for mlos_bench.services.
Used to make mypy happy about multiple conftest.py modules.
"""
from .local import MockLocalExecService
from .remote import MockFileShareService, MockRemoteExecService, MockVMService
__all__ = [
'MockLo... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,787 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/tunables/tunable_groups.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
TunableGroups definition.
"""
import copy
from typing import Dict, Generator, Iterable, Mapping, Optional, Tuple, Union
from mlos_bench.tunables.tunable import Tunable, TunableValue
from mlos_bench.tunables.covariant_group import Covaria... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,788 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/tests/tunables/tunable_group_update_test.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Tests for checking the is_updated flag for tunable groups.
"""
from mlos_bench.tunables.tunable_groups import TunableGroups
_TUNABLE_VALUES = {
"kernel_sched_migration_cost_ns": 8888,
"kernel_sched_latency_ns": 9999,
}
def test... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,789 | microsoft/MLOS | refs/heads/main | /mlos_core/mlos_core/tests/optimizers/optimizer_test.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Tests for Bayesian Optimizers.
"""
from copy import deepcopy
from typing import List, Optional, Type
import logging
import pytest
import pandas as pd
import numpy as np
import numpy.typing as npt
import ConfigSpace as CS
from mlos_core... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,790 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/tests/environments/composite_env_test.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Unit tests for composite environment.
"""
import pytest
from mlos_bench.environments.composite_env import CompositeEnv
from mlos_bench.tunables.tunable_groups import TunableGroups
from mlos_bench.services.config_persistence import Config... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,791 | microsoft/MLOS | refs/heads/main | /mlos_core/mlos_core/tests/spaces/adapters/llamatune_test.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Tests for LlamaTune space adapter.
"""
# pylint: disable=missing-function-docstring
from typing import Any, Dict, Iterator, List, Set
import pytest
import ConfigSpace as CS
import pandas as pd
from mlos_core.spaces.adapters import Lla... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,792 | microsoft/MLOS | refs/heads/main | /mlos_core/mlos_core/tests/spaces/adapters/identity_adapter_test.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Tests for Identity space adapter.
"""
# pylint: disable=missing-function-docstring
import ConfigSpace as CS
import pandas as pd
from mlos_core.spaces.adapters import IdentityAdapter
def test_identity_adapter() -> None:
"""
Tes... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,793 | microsoft/MLOS | refs/heads/main | /mlos_core/mlos_core/tests/optimizers/conftest.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Test fixtures for mlos_bench optimizers.
"""
import pytest
import ConfigSpace as CS
@pytest.fixture
def configuration_space() -> CS.ConfigurationSpace:
"""
Test fixture to produce a config space with all types of hyperparameter... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,794 | microsoft/MLOS | refs/heads/main | /mlos_core/mlos_core/optimizers/bayesian_optimizers/__init__.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Basic initializer module for the mlos_core Bayesian optimizers.
"""
from mlos_core.optimizers.bayesian_optimizers.bayesian_optimizer import BaseBayesianOptimizer
from mlos_core.optimizers.bayesian_optimizers.smac_optimizer import SmacOpti... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,795 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/environments/remote/__init__.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Remote Tunable Environments for mlos_bench.
"""
from mlos_bench.environments.remote.remote_env import RemoteEnv
from mlos_bench.environments.remote.os_env import OSEnv
from mlos_bench.environments.remote.vm_env import VMEnv
__all__ = [
... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,796 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/services/remote/azure/azure_auth.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
A collection Service functions for managing VMs on Azure.
"""
import datetime
import json
import logging
import subprocess
from typing import Any, Dict, Optional
from mlos_bench.services.base_service import Service
from mlos_bench.servic... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,797 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/tunables/covariant_group.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Tunable parameter definition.
"""
import copy
from typing import Dict, Iterable, Union
from mlos_bench.tunables.tunable import Tunable, TunableValue
class CovariantTunableGroup:
"""
A collection of tunable parameters.
Chang... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,798 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/tests/environments/local/local_env_vars_test.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Unit tests for passing shell environment variables into LocalEnv scripts.
"""
import sys
import pytest
from mlos_bench.tunables.tunable_groups import TunableGroups
from mlos_bench.tests.environments.local import create_local_env, check_l... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,799 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/environments/status.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Enum for the status of the benchmark/environment.
"""
import enum
class Status(enum.Enum):
"""
Enum for the status of the benchmark/environment.
"""
UNKNOWN = 0
PENDING = 1
READY = 2
RUNNING = 3
SUCCEEDE... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,800 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/tests/tunables/conftest.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Test fixtures for individual Tunable objects.
"""
import pytest
from mlos_bench.tunables.tunable import Tunable
# pylint: disable=redefined-outer-name
# -- Ignore pylint complaints about pytest references to
# `tunable_groups` fixture a... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,801 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/tests/services/config_persistence_test.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Unit tests for configuration persistence service.
"""
import os
import sys
import pytest
from mlos_bench.config.schemas import ConfigSchema
from mlos_bench.services.config_persistence import ConfigPersistenceService
if sys.version_info... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,802 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/tunables/__init__.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Tunables classes for Environments in mlos_bench.
"""
from mlos_bench.tunables.tunable import Tunable
from mlos_bench.tunables.tunable_groups import TunableGroups
__all__ = [
'Tunable',
'TunableGroups',
]
| {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,803 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/tests/services/local/__init__.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Tests for mlos_bench.services.local.
Used to make mypy happy about multiple conftest.py modules.
"""
from .mock import MockLocalExecService
__all__ = [
'MockLocalExecService',
]
| {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,804 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/tests/config/schemas/optimizers/test_optimizer_schemas.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Tests for optimizer schema validation.
"""
from os import path
from typing import Optional
import pytest
from mlos_core.optimizers import OptimizerType
from mlos_core.spaces.adapters import SpaceAdapterType
from mlos_core.tests import g... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,805 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/services/types/config_loader_type.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Protocol interface for helper functions to lookup and load configs.
"""
from typing import Dict, List, Iterable, Optional, Union, Protocol, runtime_checkable, TYPE_CHECKING
from mlos_bench.config.schemas import ConfigSchema
from mlos_ben... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,806 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/tests/tunables/tunable_group_subgroup_test.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Tests for `TunableGroup.subgroup()` method.
"""
from mlos_bench.tunables.tunable_groups import TunableGroups
def test_tunable_group_subgroup(tunable_groups: TunableGroups) -> None:
"""
Check that the subgroup() method returns on... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,807 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/storage/sql/storage.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Saving and restoring the benchmark data in SQL database.
"""
import logging
from typing import Optional
from sqlalchemy import URL, create_engine
from mlos_bench.tunables.tunable_groups import TunableGroups
from mlos_bench.services.base... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,808 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/tests/environments/local/__init__.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Tests for mlos_bench.environments.local.
Used to make mypy happy about multiple conftest.py modules.
"""
from datetime import datetime
from typing import Any, Dict, List, Tuple
import pytest
from mlos_bench.environments.local.local_env i... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,809 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/tests/environments/mock_env_test.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Unit tests for mock benchmark environment.
"""
import pytest
from mlos_bench.environments.mock_env import MockEnv
from mlos_bench.tunables.tunable_groups import TunableGroups
def test_mock_env_default(mock_env: MockEnv, tunable_groups: ... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,810 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/services/types/authenticator_type.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Protocol interface for authentication for the cloud services.
"""
from typing import Protocol, runtime_checkable
@runtime_checkable
class SupportsAuth(Protocol):
"""
Protocol interface for authentication for the cloud services.
... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,811 | microsoft/MLOS | refs/heads/main | /mlos_core/mlos_core/tests/optimizers/bayesian_optimizers_test.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Tests for Bayesian Optimizers.
"""
from typing import Optional, Type
import pytest
import pandas as pd
import ConfigSpace as CS
from mlos_core.optimizers import BaseOptimizer, OptimizerType
from mlos_core.optimizers.bayesian_optimizers... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,812 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/tests/storage/conftest.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Test fixtures for mlos_bench storage.
"""
import pytest
from mlos_bench.tunables.tunable_groups import TunableGroups
from mlos_bench.storage.base_storage import Storage
from mlos_bench.storage.sql.storage import SqlStorage
@pytest.fixt... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,813 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/services/types/remote_exec_type.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Protocol interface for Service types that provide helper functions to run
scripts on a remote host OS.
"""
from typing import Iterable, Tuple, Protocol, runtime_checkable, TYPE_CHECKING
if TYPE_CHECKING:
from mlos_bench.environments.... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,814 | microsoft/MLOS | refs/heads/main | /mlos_core/mlos_core/tests/__init__.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Common functions for mlos_core Optimizer tests.
"""
import sys
from importlib import import_module
from pkgutil import walk_packages
from typing import List, Optional, Set, Type, TypeVar
if sys.version_info >= (3, 10):
from typing ... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,815 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/tests/environments/include_tunables_test.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Test the selection of tunables / tunable groups for the environment.
"""
from mlos_bench.environments.mock_env import MockEnv
from mlos_bench.services.config_persistence import ConfigPersistenceService
from mlos_bench.tunables.tunable_gro... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,816 | microsoft/MLOS | refs/heads/main | /mlos_core/mlos_core/__init__.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Basic initializer module for the mlos_core package.
"""
import ConfigSpace
import pandas as pd
def config_to_dataframe(config: ConfigSpace.Configuration) -> pd.DataFrame:
"""Converts a ConfigSpace config to a DataFrame
Paramete... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,817 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/config/schemas/__init__.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
A module for managing config schemas and their validation.
"""
from mlos_bench.config.schemas.config_schemas import ConfigSchema, CONFIG_SCHEMA_DIR
__all__ = [
'ConfigSchema',
'CONFIG_SCHEMA_DIR',
]
| {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,818 | microsoft/MLOS | refs/heads/main | /mlos_core/mlos_core/tests/spaces/adapters/space_adapter_factory_test.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Tests for space adapter factory.
"""
# pylint: disable=missing-function-docstring
from typing import List, Optional, Type
import pytest
import ConfigSpace as CS
from mlos_core.spaces.adapters import SpaceAdapterFactory, SpaceAdapterTy... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,819 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/tests/environments/local/local_env_telemetry_test.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Unit tests for telemetry and status of LocalEnv benchmark environment.
"""
from datetime import datetime, timedelta
from mlos_bench.tunables.tunable_groups import TunableGroups
from mlos_bench.tests.environments.local import (
create_... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,820 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/environments/local/local_env.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Scheduler-side benchmark environment to run scripts locally.
"""
import json
import logging
import sys
from datetime import datetime
from tempfile import TemporaryDirectory
from contextlib import nullcontext
from types import TracebackT... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,821 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/services/remote/azure/__init__.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Azure-specific benchmark environments for mlos_bench.
"""
from mlos_bench.services.remote.azure.azure_auth import AzureAuthService
from mlos_bench.services.remote.azure.azure_services import AzureVMService
from mlos_bench.services.remote.... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,822 | microsoft/MLOS | refs/heads/main | /mlos_core/mlos_core/optimizers/__init__.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Basic initializer module for the mlos_core optimizers.
"""
from enum import Enum
from typing import Optional, TypeVar
import ConfigSpace
from mlos_core.optimizers.optimizer import BaseOptimizer
from mlos_core.optimizers.random_optimizer... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,823 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/tests/services/remote/mock/mock_fileshare_service.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
A collection Service functions for mocking file share ops.
"""
import logging
from typing import Any, Dict, Optional
from mlos_bench.services.base_service import Service
from mlos_bench.services.base_fileshare import FileShareService
fro... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,824 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/environments/base_environment.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
A hierarchy of benchmark environments.
"""
import abc
import json
import logging
from datetime import datetime
from types import TracebackType
from typing import Any, Dict, Iterable, List, Optional, Sequence, Tuple, Type, TYPE_CHECKING, U... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,825 | microsoft/MLOS | refs/heads/main | /mlos_bench/mlos_bench/run.py | #!/usr/bin/env python3
#
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
OS Autotune main optimization loop.
Note: this script is also available as a CLI tool via pip under the name "mlos_bench".
See `--help` output for details.
"""
import json
import logging
from datetime import datet... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
13,826 | microsoft/MLOS | refs/heads/main | /mlos_core/setup.py | #
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
"""
Setup instructions for the mlos_core package.
"""
from itertools import chain
from logging import warning
from typing import Dict, List
from setuptools import setup, find_packages
from _version import _VERSION # pylint: disable=import... | {"/mlos_bench/mlos_bench/tests/services/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/__init__.py", "/mlos_bench/mlos_bench/tests/services/remote/__init__.py"], "/mlos_bench/mlos_bench/tests/services/local/__init__.py": ["/mlos_bench/mlos_bench/tests/services/local/mock/__init__.py"], "/mlos_bench/mlos_be... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.