Rename library
Signed-off-by: András Schmelczer <andras@schmelczer.dev>
This commit is contained in:
parent
01befc54a6
commit
04404f2fc4
141 changed files with 844 additions and 842 deletions
8
.vscode/tasks.json
vendored
8
.vscode/tasks.json
vendored
|
|
@ -4,9 +4,9 @@
|
|||
{
|
||||
"label": "Format and lint Python",
|
||||
"type": "shell",
|
||||
"command": "source .env/bin/activate && scripts/format-python.sh good_ai && scripts/format-python.sh example",
|
||||
"command": "source .env/bin/activate && scripts/format-python.sh great_ai && scripts/format-python.sh example",
|
||||
"windows": {
|
||||
"command": ".env/bin/activate.bat; scripts/format-python.sh good_ai; scripts\\format-python.sh example"
|
||||
"command": ".env/bin/activate.bat; scripts/format-python.sh great_ai; scripts\\format-python.sh example"
|
||||
},
|
||||
"group": "test",
|
||||
"presentation": {
|
||||
|
|
@ -20,9 +20,9 @@
|
|||
{
|
||||
"label": "Test Python",
|
||||
"type": "shell",
|
||||
"command": "source .env/bin/activate && python3 -m pytest good_ai",
|
||||
"command": "source .env/bin/activate && python3 -m pytest great_ai",
|
||||
"windows": {
|
||||
"command": ".env/bin/activate.bat; python3 -m pytest good_ai"
|
||||
"command": ".env/bin/activate.bat; python3 -m pytest great_ai"
|
||||
},
|
||||
"group": "test",
|
||||
"presentation": {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@ mkdir ss-data && cd ss-data
|
|||
wget https://s3-us-west-2.amazonaws.com/ai2-s2-research-public/open-corpus/2022-02-01/manifest.txt
|
||||
wget -B https://s3-us-west-2.amazonaws.com/ai2-s2-research-public/open-corpus/2022-02-01/ -i manifest.txt
|
||||
cd -
|
||||
python3 -m good_ai.open_s3 --secrets s3.ini --push ss-data
|
||||
python3 -m great_ai.open_s3 --secrets s3.ini --push ss-data
|
||||
rm -rf ss-data
|
||||
```
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ from random import shuffle
|
|||
from devtools import debug
|
||||
from predict_domain import predict_domain
|
||||
|
||||
from good_ai import process_batch
|
||||
from great_ai import process_batch
|
||||
|
||||
if __name__ == "__main__":
|
||||
with open(".cache/data-1/s2-corpus-323.json") as f:
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
from predict_domain import predict_domain
|
||||
|
||||
from good_ai import serve
|
||||
from great_ai import serve
|
||||
|
||||
if __name__ == "__main__":
|
||||
serve(predict_domain)
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ from preprocess import preprocess
|
|||
from pydantic import BaseModel
|
||||
from sklearn.pipeline import Pipeline
|
||||
|
||||
from good_ai import log_argument, log_metric, use_model
|
||||
from good_ai.utilities.clean import clean
|
||||
from great_ai import log_argument, log_metric, use_model
|
||||
from great_ai.utilities.clean import clean
|
||||
|
||||
|
||||
class DomainPrediction(BaseModel):
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import re
|
||||
|
||||
from good_ai.utilities.lemmatize_text import lemmatize_text
|
||||
from great_ai.utilities.lemmatize_text import lemmatize_text
|
||||
|
||||
|
||||
def preprocess(text: str) -> str:
|
||||
lemmas = [re.sub(r"\d+", "NUM", lemma) for lemma in lemmatize_text(text)]
|
||||
lemmas = [re.sub(r"\d[\d.,]*", "NUM", lemma) for lemma in lemmatize_text(text)]
|
||||
return " ".join(lemmas)
|
||||
|
|
|
|||
1576
example/train.ipynb
1576
example/train.ipynb
File diff suppressed because one or more lines are too long
0
good_ai/.gitignore → great_ai/.gitignore
vendored
0
good_ai/.gitignore → great_ai/.gitignore
vendored
|
|
@ -1,3 +1,3 @@
|
|||
from .good_ai import *
|
||||
from .great_ai import *
|
||||
from .open_s3 import *
|
||||
from .utilities import *
|
||||
|
|
@ -4,8 +4,8 @@ from logging import INFO, Logger
|
|||
from pathlib import Path
|
||||
from typing import Optional, cast
|
||||
|
||||
from good_ai.open_s3 import LargeFile
|
||||
from good_ai.utilities.logger import create_logger
|
||||
from great_ai.open_s3 import LargeFile
|
||||
from great_ai.utilities.logger import create_logger
|
||||
|
||||
from ..persistence import ParallelTinyDbDriver, PersistenceDriver
|
||||
from .context import Context
|
||||
|
|
@ -32,7 +32,7 @@ def set_default_config(
|
|||
) -> None:
|
||||
global _context
|
||||
|
||||
logger = create_logger("good_ai", level=log_level)
|
||||
logger = create_logger("great_ai", level=log_level)
|
||||
|
||||
is_production = _is_in_production_mode(
|
||||
override=is_production_mode_override, logger=logger
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
from typing import Any, Callable, Iterable, Optional, Sequence
|
||||
|
||||
from good_ai.utilities.parallel_map import parallel_map
|
||||
from great_ai.utilities.parallel_map import parallel_map
|
||||
|
||||
from ..context import get_context
|
||||
from ..tracing import TracingContext
|
||||
|
|
@ -36,11 +36,11 @@ def serve(
|
|||
**LOGGING_CONFIG,
|
||||
"formatters": {
|
||||
"default": {
|
||||
"()": "good_ai.logger.CustomFormatter",
|
||||
"()": "great_ai.logger.CustomFormatter",
|
||||
"fmt": "%(asctime)s | %(levelname)8s | %(message)s",
|
||||
},
|
||||
"access": {
|
||||
"()": "good_ai.logger.CustomFormatter",
|
||||
"()": "great_ai.logger.CustomFormatter",
|
||||
"fmt": "%(asctime)s | %(levelname)8s | %(message)s", # noqa: E501
|
||||
},
|
||||
},
|
||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
|
@ -7,7 +7,7 @@ from dash import Dash, dash_table, dcc, html
|
|||
from dash.dependencies import Input, Output
|
||||
from flask import Flask
|
||||
|
||||
from good_ai.utilities.unique import unique
|
||||
from great_ai.utilities.unique import unique
|
||||
|
||||
from ..context import get_context
|
||||
from ..helper import snake_case_to_text, text_to_hex_color
|
||||
|
|
@ -6,7 +6,7 @@ def get_footer() -> html.Footer:
|
|||
[
|
||||
html.Div(
|
||||
[
|
||||
html.H6("GoodAI"),
|
||||
html.H6("GreatAI"),
|
||||
html.P(
|
||||
"A human-friendly framework for robust end-to-end AI deployments."
|
||||
),
|
||||
|
|
@ -14,7 +14,7 @@ def get_footer() -> html.Footer:
|
|||
),
|
||||
html.A(
|
||||
html.Img(src="/assets/github.png"),
|
||||
href="https://github.com/ScoutinScience/good-ai",
|
||||
href="https://github.com/ScoutinScience/great-ai",
|
||||
target="_blank",
|
||||
),
|
||||
],
|
||||
|
|
@ -2,7 +2,7 @@ from typing import Any, Optional, Tuple
|
|||
|
||||
from joblib import load
|
||||
|
||||
from good_ai.open_s3 import LargeFile
|
||||
from great_ai.open_s3 import LargeFile
|
||||
|
||||
from ..context import get_context
|
||||
|
||||
|
|
@ -3,7 +3,7 @@ from typing import Optional, Union
|
|||
|
||||
from joblib import dump
|
||||
|
||||
from good_ai.open_s3 import LargeFile
|
||||
from great_ai.open_s3 import LargeFile
|
||||
|
||||
from ..context import get_context
|
||||
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
from math import remainder
|
||||
from .persistence_driver import PersistenceDriver
|
||||
|
||||
|
||||
class MongoDbDriver(PersistenceDriver):
|
||||
pass
|
||||
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
from pathlib import Path
|
||||
|
||||
from good_ai.utilities.logger import create_logger
|
||||
from great_ai.utilities.logger import create_logger
|
||||
|
||||
from .large_file import LargeFile
|
||||
from .parse_arguments import parse_arguments
|
||||
|
|
@ -8,7 +8,7 @@ from typing import IO, Any, List, Mapping, Optional, Type, Union, cast
|
|||
|
||||
import boto3
|
||||
|
||||
from good_ai.utilities.logger import create_logger
|
||||
from great_ai.utilities.logger import create_logger
|
||||
|
||||
from .helper import DownloadProgressBar, UploadProgressBar, human_readable_to_byte
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ preceding = [
|
|||
"doubt",
|
||||
"negative for",
|
||||
"no",
|
||||
"vergood_ai.utilities",
|
||||
"vergreat_ai.utilities",
|
||||
"without",
|
||||
"doesn't",
|
||||
"doesnt",
|
||||
|
|
@ -104,7 +104,7 @@ pseudo_clinical = pseudo + [
|
|||
"not ruled out",
|
||||
"not been ruled out",
|
||||
"not drain",
|
||||
"no good_ai.utilitiespicious change",
|
||||
"no great_ai.utilitiespicious change",
|
||||
"no interval change",
|
||||
"no significant interval change",
|
||||
]
|
||||
|
|
@ -287,7 +287,7 @@ def placeholder_node_formatter(placeholdertext, block=True):
|
|||
r"""
|
||||
This function returns a callable that can be used in
|
||||
:py:class:`MacroTextSpec`, :py:class:`EnvironmentTextSpec`, or
|
||||
:py:class:`SpecialsTextSpec` for latex nodes that do not have a good textual
|
||||
:py:class:`SpecialsTextSpec` for latex nodes that do not have a great textual
|
||||
representation, providing as text replacement the simple placeholder text
|
||||
``'< P L A C E H O L D E R T E X T >'``.
|
||||
|
||||
|
|
@ -316,7 +316,7 @@ def fmt_placeholder_node(node, l2tobj):
|
|||
r"""
|
||||
This function can be used as callable in :py:class:`MacroTextSpec`,
|
||||
:py:class:`EnvironmentTextSpec`, or :py:class:`SpecialsTextSpec` for latex
|
||||
nodes that do not have a good textual representation. The text replacement
|
||||
nodes that do not have a great textual representation. The text replacement
|
||||
is the placeholder text
|
||||
``'< N A M E O F T H E M A C R O O R E N V I R O N M E N T >'``.
|
||||
|
||||
|
|
@ -266,7 +266,7 @@ _latex_specs_approximations = {
|
|||
("fcolorbox", "%(5)s"),
|
||||
("hspace", ""),
|
||||
("vspace", "\n"),
|
||||
# \\ is treated as an "approximation" because a good text renderer would
|
||||
# \\ is treated as an "approximation" because a great text renderer would
|
||||
# have to actually note that this is a end-of-line marker which is not
|
||||
# to be confused with other newlines in the paragraph (which can be
|
||||
# reflowed)
|
||||
|
|
@ -342,7 +342,7 @@ class UnicodeToLatexEncoder(object):
|
|||
|
||||
Possible protection schemes are:
|
||||
|
||||
- 'braces' (the default): Any good_ai.utilitiespicious replacement text (that
|
||||
- 'braces' (the default): Any great_ai.utilitiespicious replacement text (that
|
||||
might look fragile) is placed in curly braces ``{...}``.
|
||||
|
||||
- 'braces-all': All replacement latex escapes are surrounded in
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
#
|
||||
# - tests pass: https://travis-ci.org/github/phfaist/pylatexenc
|
||||
#
|
||||
# - LGTM looks good: https://lgtm.com/projects/g/phfaist/pylatexenc/
|
||||
# - LGTM looks great: https://lgtm.com/projects/g/phfaist/pylatexenc/
|
||||
#
|
||||
# - python package creation works: (python setup.py sdist, pip install
|
||||
# dist/pylatexenc-xxx.tar.gz)
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue