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

Specify package version #107

Merged
merged 2 commits into from
Nov 11, 2024
Merged
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
13 changes: 11 additions & 2 deletions src/autogluon_assistant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import subprocess
import sys
from importlib.metadata import PackageNotFoundError, version
from pathlib import Path
from typing import List, Optional

Expand All @@ -17,10 +18,18 @@
from .task import TabularPredictionTask
from .utils import load_config

logging.basicConfig(level=logging.INFO)
try:
# specified version in pyproject.toml
__version__ = version("autogluon-assistant")
except PackageNotFoundError:
# package is not installed
__version__ = "unknown"


__all__ = ["TabularPredictionAssistant", "TabularPredictionTask"]

logging.basicConfig(level=logging.INFO)


def get_task(path: Path) -> TabularPredictionTask:
"""Get a task from a path."""
Expand All @@ -45,7 +54,7 @@ def make_prediction_outputs(task: TabularPredictionTask, predictions: pd.DataFra
output_ids = task.sample_submission_data[task.output_id_column]

if not test_ids.equals(output_ids):
print(f"Warning: Test IDs and output IDs do not match!")
print("Warning: Test IDs and output IDs do not match!")

# Ensure test ID column is included
if task.test_id_column not in outputs.columns:
Expand Down
Loading