Skip to main content

No project description provided

Project description

Fount SDK API Reference

Quick Reference

Client Initialization

from fount import Fount

# Basic usage
client = Fount()

# With custom transport
client = Fount(transport=custom_httpx_client)

# As context manager
with Fount() as client:
    # auto cleanup
    pass

Environment Variables

Class: Fount

Methods

upload_dataframe(dataframe, name=None) -> Dataset

Upload a pandas DataFrame.

Parameters:

  • dataframe (pd.DataFrame): DataFrame to upload
  • name (str, optional): Dataset name

Returns: Dataset object with ID


upload_csv(pathname, name) -> Dataset

Upload a CSV file.

Parameters:

  • pathname (str): Path to CSV file
  • name (str, optional): Dataset name

Returns: Dataset object with ID


upload_excel(pathname, sheet_name, name) -> Dataset

Upload Excel file (not implemented).

Parameters:

  • pathname (str): Path to Excel file
  • sheet_name (str): Sheet to extract
  • name (str, optional): Dataset name

train(dataset, categorical_cols, date_column, target_columns, validation_data_required, validation_split, time_granularity, **kwargs) -> TrainingJob

Train a model.

Parameters:

  • dataset (Dataset): Training dataset
  • categorical_cols (List[str]): Categorical column names
  • date_column (str): Date column name
  • target_columns (List[str]): Target column names
  • validation_data_required (bool): Create validation set
  • validation_split (float): Validation split ratio (0-1)
  • time_granularity (str): Time interval or frequency
  • **kwargs: Additional parameters (epochs, learning_rate, etc.)

Returns: TrainingJob object


tune(categorical_cols, date_column, target_columns, validation_data_required, validation_split, time_granularity, **kwargs) -> TuningJob

Hyperparameter tuning.

Parameters:

  • categorical_cols (List[str]): Categorical column names
  • date_column (str): Date column name
  • target_columns (List[str]): Target column names
  • validation_data_required (bool): Create validation set
  • validation_split (float): Validation split ratio (0-1)
  • time_granularity (str): Time interval or frequency
  • **kwargs: Additional parameters (param_grid, n_trials, etc.)

Returns: TuningJob object


inference(model_name, batch_size, **kwargs) -> InferenceJob

Run batch inference.

Parameters:

  • model_name (str): Model name/ID
  • batch_size (int): Batch size
  • **kwargs: Additional parameters (input_dataset, output_format, etc.)

Returns: InferenceJob object


close() -> None

Close client and release resources.


Job Classes

All job classes (TrainingJob, TuningJob, InferenceJob) have:

Methods

status() -> Dict

Get job status.

Returns: Dict with:

  • state: Current state (pending, running, completed, failed)
  • progress: Progress percentage
  • message: Status message

metrics() -> Dict

Get job results/metrics.

Returns: Dict with job-specific metrics

Exceptions

  • SDKError - Base SDK exception
  • AuthenticationError - Auth failures
  • RateLimitError - Rate limit exceeded
  • UploadError - Upload failures
  • TrainingError - Training failures
  • InferenceError - Inference failures
  • TuningError - Tuning failures

Common Patterns

Training Pipeline

# Upload data
df = pd.read_csv("data.csv")
dataset = client.upload_dataframe(df)

# Train model
job = client.train(
    dataset=dataset,
    categorical_cols=["cat1", "cat2"],
    date_column="date",
    target="target",
    validation_data_required=True,
    validation_split=0.2
)

# Monitor progress
while True:
    status = job.status()
    if status["state"] in ["completed", "failed"]:
        break
    time.sleep(30)

# Get results
if status["state"] == "completed":
    metrics = job.metrics()

Batch Inference

# Run inference
job = client.inference(
    model_name="my_model",
    batch_size=1000,
    input_dataset=dataset.id
)

# Get predictions
results = job.metrics()
predictions = results["predictions"]

Error Handling

from fount.errors import AuthenticationError, UploadError

try:
    dataset = client.upload_dataframe(df)
except AuthenticationError:
    print("Invalid API key")
except UploadError as e:
    print(f"Upload failed: {e}")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fount_core-0.1.5.5.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fount_core-0.1.5.5-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file fount_core-0.1.5.5.tar.gz.

File metadata

  • Download URL: fount_core-0.1.5.5.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for fount_core-0.1.5.5.tar.gz
Algorithm Hash digest
SHA256 809a7680334ce3dc8556f3055078f00b6c8598bf2d3cf32924d4f8bdcbb0b030
MD5 ef4166e290d7cf1f184a1aa2f4037671
BLAKE2b-256 889cd7f9d94c439c28dd596a8328184d2b75a7ef4cf4c01cb9eafc085a891ede

See more details on using hashes here.

File details

Details for the file fount_core-0.1.5.5-py3-none-any.whl.

File metadata

  • Download URL: fount_core-0.1.5.5-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for fount_core-0.1.5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 66e065dd5385338445494ecd6d10970f791d8b35ae8ecb16532f592c2011a059
MD5 6d81c533fb26cfa5bc23afa693478c0b
BLAKE2b-256 969611a5d6b3b7b2386ac0928093cc84852654f3f664d6b3c2281f911fe464c4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page