Uploading Files to the Bakery

Sharing your files and work is a key feature of the Bakery platform. The Bakery provides several methods for uploading files, which we'll cover in this guide. You'll learn how to push files:

  • Using your Command Line Interface (CLI)

  • Through the Bakery platform interface

Before proceeding, ensure you're logged into your Bakery account. Let's start with the CLI, where you'll authenticate using your user ID and API key.

Uploading Files via CLI

  1. First, install the Bagel Python client by running the following command in your terminal

    pip install bagelML
  2. After installing the Bagel Python Client and creating a project file, you can upload a file to your dataset using the file_upload() function:

    import uuid
    import bagel
    from bagel.config import Settings
    
    server_settings = Settings(
        bagel_api_impl="rest",
        bagel_server_host="api.bageldb.ai"
    )
    
    client = bagel.Client(server_settings)
    
    api_key = ""
    dataset_id = ""
    file_path = ""
    
    client.file_upload(file_path, dataset_id, api_key)

Uploading Files via the Bakery Platform

  1. Navigate to the My Datasets or My Models section on the left side of your screen, and select the model or dataset you'd like to manage.

  2. In the Files section, click + Add on the right hand side of your screen to upload your files. You can select files from your local machine.

  3. Supported file formats include .csv, .json, .parquet, and .txt.

Here we can see an uploaded file in parquet format which can serve as training data in the finetuning process

  1. Additionally, you can download all uploaded files by selecting the Download all option located in the files section.

Last updated