Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/awslabs/autogluon into cp311
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/awslabs/autogluon:
  Lint tabular (autogluon#3347)
  Update Windows Conda install instructions (autogluon#3346)
  Lint features (autogluon#3344)
  • Loading branch information
ddelange committed Jun 25, 2023
2 parents 650cc81 + 3f48d66 commit 22cee55
Show file tree
Hide file tree
Showing 164 changed files with 7,859 additions and 7,638 deletions.
2 changes: 2 additions & 0 deletions .github/workflow_scripts/lint_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ function lint_check_all {
lint_check timeseries 119
lint_check common 160
lint_check core 160
lint_check features 160
lint_check tabular 160
}

bandit -r multimodal/src -ll
Expand Down
2 changes: 1 addition & 1 deletion docs/install-conda-full.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```console
conda create -n ag python=3.9
conda create -n ag python=3.10
conda activate ag
conda install -c conda-forge mamba
mamba install -c conda-forge autogluon
Expand Down
4 changes: 4 additions & 0 deletions docs/install-windows-conda-gpu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
:::{note}
AutoGluon cannot currently be installed with GPU support on Windows via Conda. Windows/Conda/GPU support will become available once AutoGluon migrates to PyTorch 2.0. Please follow the Windows/Conda/CPU installation instructions at this time.
:::

10 changes: 0 additions & 10 deletions docs/install-windows-conda.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ AutoGluon requires Python version 3.8, 3.9, or 3.10 and is available on Linux, M
:::::{tab} Conda

::::{tab} CPU
```{include} install-windows-conda.md
```{include} install-conda-full.md
```
::::

::::{tab} GPU
```{include} install-windows-conda.md
```{include} install-windows-conda-gpu.md
```
::::

Expand Down
40 changes: 23 additions & 17 deletions features/setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/usr/bin/env python
###########################
# This code block is a HACK (!), but is necessary to avoid code duplication. Do NOT alter these lines.
import importlib.util
import os

from setuptools import setup
import importlib.util

filepath = os.path.abspath(os.path.dirname(__file__))
filepath_import = os.path.join(filepath, '..', 'core', 'src', 'autogluon', 'core', '_setup_utils.py')
filepath_import = os.path.join(filepath, "..", "core", "src", "autogluon", "core", "_setup_utils.py")
spec = importlib.util.spec_from_file_location("ag_min_dependencies", filepath_import)
ag = importlib.util.module_from_spec(spec)
# Identical to `from autogluon.core import _setup_utils as ag`, but works without `autogluon.core` being installed.
Expand All @@ -15,24 +17,28 @@
version = ag.load_version_file()
version = ag.update_version(version)

submodule = 'features'
install_requires = [
# version ranges added in ag.get_dependency_version_ranges()
'numpy', # version range defined in `core/_setup_utils.py`
'pandas', # version range defined in `core/_setup_utils.py`
'scikit-learn', # version range defined in `core/_setup_utils.py`
f'autogluon.common=={version}',
] if not ag.LITE_MODE else [
# version ranges added in ag.get_dependency_version_ranges()
'numpy', # version range defined in `core/_setup_utils.py`
'pandas', # version range defined in `core/_setup_utils.py`
'scikit-learn', # version range defined in `core/_setup_utils.py`
f'{ag.PACKAGE_NAME}.common=={version}',
]
submodule = "features"
install_requires = (
[
# version ranges added in ag.get_dependency_version_ranges()
"numpy", # version range defined in `core/_setup_utils.py`
"pandas", # version range defined in `core/_setup_utils.py`
"scikit-learn", # version range defined in `core/_setup_utils.py`
f"autogluon.common=={version}",
]
if not ag.LITE_MODE
else [
# version ranges added in ag.get_dependency_version_ranges()
"numpy", # version range defined in `core/_setup_utils.py`
"pandas", # version range defined in `core/_setup_utils.py`
"scikit-learn", # version range defined in `core/_setup_utils.py`
f"{ag.PACKAGE_NAME}.common=={version}",
]
)

install_requires = ag.get_dependency_version_ranges(install_requires)

if __name__ == '__main__':
if __name__ == "__main__":
ag.create_version_file(version=version, submodule=submodule)
setup_args = ag.default_setup_args(version=version, submodule=submodule)
setup(
Expand Down
1 change: 0 additions & 1 deletion features/src/autogluon/features/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
from .generators import * # noqa

from .version import __version__
5 changes: 2 additions & 3 deletions features/src/autogluon/features/generators/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from .abstract import AbstractFeatureGenerator
from .astype import AsTypeFeatureGenerator
from .auto_ml_pipeline import AutoMLInterpretablePipelineFeatureGenerator, AutoMLPipelineFeatureGenerator
from .binned import BinnedFeatureGenerator
from .bulk import BulkFeatureGenerator
from .category import CategoryFeatureGenerator
Expand All @@ -13,9 +14,7 @@
from .label_encoder import LabelEncoderFeatureGenerator
from .memory_minimize import CategoryMemoryMinimizeFeatureGenerator, NumericMemoryMinimizeFeatureGenerator
from .one_hot_encoder import OneHotEncoderFeatureGenerator
from .pipeline import PipelineFeatureGenerator
from .rename import RenameFeatureGenerator
from .text_ngram import TextNgramFeatureGenerator
from .text_special import TextSpecialFeatureGenerator

from .pipeline import PipelineFeatureGenerator
from .auto_ml_pipeline import AutoMLPipelineFeatureGenerator, AutoMLInterpretablePipelineFeatureGenerator

0 comments on commit 22cee55

Please sign in to comment.