PriorLabs / TabPFN

⚡ TabPFN: Foundation Model for Tabular Data ⚡

Home Page:http://priorlabs.ai

Repository from Github https://github.comPriorLabs/TabPFNRepository from Github https://github.comPriorLabs/TabPFN

`CI` environment variable not handled correctly

janjagusch opened this issue · comments

Describe the bug

The TestSettings class doesn't handle the case correctly when the CI environment variable is set to anything other than 'true' or 'false'. For example, Azure DevOps pipelines set this variable to 'azure'.

ci: bool = Field(
default=False,
description="Indicates if running in continuous integration environment. "
"Typically set by CI systems (e.g., GitHub Actions).",
)

Steps/Code to Reproduce

import os

os.environ["CI"] = "azure"  # Setting this to an arbitrary value other than 'true' or 'false'

import tabpfnn

Expected Results

Setting the CI environment variable to a value other than '' should set it to True.

Actual Results

ValidationError: 1 validation error for TestingSettings
ci
  Input should be a valid boolean, unable to interpret input [type=bool_parsing, input_value='azure', input_type=str]
    For further information visit https://errors.pydantic.dev/2.11/v/bool_parsing

Versions

from importlib.metadata import version  # Can't import directly due to error above

version("tabpfn")  # Returns '2.1.3'

Thanks for reporting, should be fixed on main now, and will be fixed in next pip release!