Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename code directory #48

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-12, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-wheel-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
os: [macos-12, ubuntu-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10']

steps:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
18 changes: 15 additions & 3 deletions adatest/utils/__init__.py → adaptivetesting/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
import io
import shap

import numpy as np


def parse_test_type(test_type):
part_names = ["text1", "value1", "text2", "value2", "text3", "value3", "text4"]
parts = re.split(r"(\{\}|\[\])", test_type)
Expand Down Expand Up @@ -40,6 +43,7 @@ def get_image(url):

def _download_image(url):
import PIL

urllib_request = urllib.request.Request(
url,
data=None,
Expand All @@ -56,8 +60,16 @@ def is_subtopic(topic, candidate):
# Returns true if candidate is a subtopic of topic
# Both arguments are strings, which look like UNIX paths
# Return is boolean
#return True if re.search(r"^%s(/|$)" % re.escape(topic), candidate) else False
if len(topic)==len(candidate):
# return True if re.search(r"^%s(/|$)" % re.escape(topic), candidate) else False
if len(topic) == len(candidate):
return topic == candidate
else:
return candidate.startswith(topic) and candidate[len(topic)]=='/'
return candidate.startswith(topic) and candidate[len(topic)] == "/"


def convert_float(s):
try:
f = float(s)
except ValueError:
f = np.nan
return f
11 changes: 6 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ def find_version(*file_paths):

setup(
name="adatest",
version=find_version("adatest", "__init__.py"),
url="https://github.com/microsoft/adatest.git",
version=find_version("adaptivetesting", "__init__.py"),
url="https://github.com/microsoft/adaptive-testing.git",
author="Scott Lundberg and Marco Tulio Ribeiro",
author_email="scott.lundberg@microsoft.com",
description="Adaptively test and debug any natural language machine learning model.",
packages=find_packages(exclude=["user_studies", "notebooks", "client"]),
packages=['adatest'],
package_dir={"adatest": "adaptivetesting"},
package_data={"adatest": ["resources/*"]},
install_requires=[
"aiohttp",
Expand All @@ -46,9 +47,9 @@ def find_version(*file_paths):
"dev": [
"black",
"flake8",
"openai",
"openai<1",
"datasets",
"transformers",
"transformers<4.26",
"pytest",
"pytest-mock",
"torch",
Expand Down
Loading