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

Add aga CLI alias & make config optional #82

Merged
merged 2 commits into from
Nov 1, 2024
Merged
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
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ Note:

Now you can launch the AutoGluon Assistant run using the following command:
```
autogluon-assistant [NAME_OF_CONFIG_DIR] [NAME_OF_DATA_DIR]
# e.g. autogluon-assistant ./config ./toy_data
aga [NAME_OF_DATA_DIR]
# e.g. aga ./toy_data
```

After the run is complete, model predictions on test dataset are saved into the `aga-output-<timestamp>.csv` file which is formatted according to `sample_submission.csv` file.
Expand All @@ -81,7 +81,11 @@ the `config_overrides` parameter with Hydra syntax from the command line.

Here’s an example command with some configuration overrides:
```
autogluon-assistant ./config ./data --output-filename my_output.csv --config-overrides "autogluon.predictor_fit_kwargs.time_limit=120 autogluon.predictor_fit_kwargs.verbosity=3 autogluon.predictor_fit_kwargs.presets=medium_quality llm.temperature=0.7 llm.max_tokens=256"
autogluon-assistant ./data ./config --output-filename my_output.csv --config-overrides "autogluon.predictor_fit_kwargs.time_limit=120 autogluon.predictor_fit_kwargs.verbosity=3 autogluon.predictor_fit_kwargs.presets=medium_quality llm.temperature=0.7 llm.max_tokens=256"

# OR

aga ./data ./config --output-filename my_output.csv --config-overrides "autogluon.predictor_fit_kwargs.time_limit=120 autogluon.predictor_fit_kwargs.verbosity=3 autogluon.predictor_fit_kwargs.presets=medium_quality llm.temperature=0.7 llm.max_tokens=256"
```

`autogluon-assistant-tools` provides more functionality and utilities for benchmarking, wrapped around autogluon-assistant. Please check out the [repo](https://github.com/autogluon/autogluon-assistant-tools/) for more details.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@ dev = [

[project.scripts]
autogluon-assistant = "autogluon_assistant:main"
aga = "autogluon_assistant:main"

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools.package-data]
"autogluon_assistant_tools.config" = ["**/*.yaml"]
"autogluon_assistant.config" = ["**/*.yaml"]

[tool.pytest.ini_options]
testpaths = "tests"
Expand Down
9 changes: 6 additions & 3 deletions src/autogluon_assistant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,13 @@ def make_prediction_outputs(task: TabularPredictionTask, predictions: pd.DataFra


def run_assistant(
config_path: Annotated[
str, typer.Argument(help="Path to the configuration directory, which includes a config.yaml file")
],
task_path: Annotated[str, typer.Argument(help="Directory where task files are included")],
config_path: Annotated[
Optional[str],
typer.Option(
"--config-path", "-c", help="Path to the configuration directory, which includes a config.yaml file"
),
] = "./config/",
output_filename: Annotated[Optional[str], typer.Option(help="Output File")] = "",
config_overrides: Annotated[Optional[str], typer.Option(help="Overrides for the config in Hydra format")] = "",
) -> str:
Expand Down
Loading