diff --git a/.github/workflows/ligthtwood.yml b/.github/workflows/ligthtwood.yml index 9cea8d930..5986e43f7 100644 --- a/.github/workflows/ligthtwood.yml +++ b/.github/workflows/ligthtwood.yml @@ -6,6 +6,8 @@ on: branches: - stable - staging + release: + types: [ published ] jobs: @@ -46,7 +48,7 @@ jobs: deploy: runs-on: ubuntu-latest needs: test - if: github.ref == 'refs/heads/stable' + if: github.ref == 'refs/heads/stable' || github.event_name == 'release' steps: - uses: actions/checkout@v2 - name: Set up Python diff --git a/MANIFEST.in b/MANIFEST.in index 540b72040..47e0d9457 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -include requirements.txt \ No newline at end of file +include requirements*.txt \ No newline at end of file diff --git a/docssrc/source/tutorials/tutorial_data_analysis/tutorial_data_analysis.ipynb b/docssrc/source/tutorials/tutorial_data_analysis/tutorial_data_analysis.ipynb index 32739df69..f24944815 100644 --- a/docssrc/source/tutorials/tutorial_data_analysis/tutorial_data_analysis.ipynb +++ b/docssrc/source/tutorials/tutorial_data_analysis/tutorial_data_analysis.ipynb @@ -295,10 +295,10 @@ } ], "source": [ - "from type_infer.infer import infer_types\n", + "from type_infer.api import infer_types\n", "from type_infer.base import TypeInformation\n", "\n", - "type_information = infer_types(df, problem_definition.pct_invalid)\n", + "type_information = infer_types(df, config={'engine': 'rule_based', 'pct_invalid': problem_definition.pct_invalid})\n", "\n", "{field.name for field in fields(TypeInformation)} # show the fields this dataclass has" ] diff --git a/lightwood/__about__.py b/lightwood/__about__.py index a55b713f2..43a661b89 100644 --- a/lightwood/__about__.py +++ b/lightwood/__about__.py @@ -1,6 +1,6 @@ __title__ = 'lightwood' __package_name__ = 'lightwood' -__version__ = '23.11.1.0' +__version__ = '23.12.4.0' __description__ = "Lightwood is a toolkit for automatic machine learning model building" __email__ = "community@mindsdb.com" __author__ = 'MindsDB Inc' diff --git a/lightwood/api/high_level.py b/lightwood/api/high_level.py index 36d2dd9b3..17e7c36dd 100644 --- a/lightwood/api/high_level.py +++ b/lightwood/api/high_level.py @@ -4,7 +4,7 @@ import pandas as pd from lightwood.api.types import JsonAI, ProblemDefinition from dataprep_ml.insights import statistical_analysis -from type_infer.infer import infer_types +from type_infer.api import infer_types from lightwood.api.predictor import PredictorInterface from lightwood.api.json_ai import generate_json_ai from lightwood.helpers.codegen import code_from_json_ai as _code_from_json_ai, _module_from_code, _predictor_from_code @@ -65,7 +65,7 @@ def json_ai_from_problem(df: pd.DataFrame, problem_definition: Union[ProblemDefi log.info(f'Dropping features: {problem_definition.ignore_features}') df = df.drop(columns=problem_definition.ignore_features) - type_information = infer_types(df, problem_definition.pct_invalid) + type_information = infer_types(df, config={'engine': 'rule_based', 'pct_invalid': problem_definition.pct_invalid}) stats = statistical_analysis( df, type_information.dtypes, problem_definition.to_dict(), type_information.identifiers) diff --git a/lightwood/encoder/text/short.py b/lightwood/encoder/text/short.py index 127bb863f..3a3409af7 100644 --- a/lightwood/encoder/text/short.py +++ b/lightwood/encoder/text/short.py @@ -2,7 +2,7 @@ import torch from lightwood.encoder import BaseEncoder from lightwood.encoder.categorical import CategoricalAutoEncoder -from type_infer.helpers import tokenize_text +from type_infer.rule_based.helpers import tokenize_text from lightwood.helpers.torch import concat_vectors_and_pad, average_vectors import pandas as pd diff --git a/tests/unit_tests/encoder/text/test_short.py b/tests/unit_tests/encoder/text/test_short.py index 087ac4ac4..055e18b43 100644 --- a/tests/unit_tests/encoder/text/test_short.py +++ b/tests/unit_tests/encoder/text/test_short.py @@ -1,7 +1,7 @@ import random import unittest from lightwood.encoder.text.short import ShortTextEncoder -from type_infer.helpers import tokenize_text +from type_infer.rule_based.helpers import tokenize_text import torch VOCAB = [