Skip to content

Configuration

This page presents the full range of configuration options for controlling how your data is logged to Comet.

There are additional configuration parameters that are specific to Comet integrations with other tools and frameworks. For details, see the Comet documentation on the relevant integration.

Order of precedence for configuration parameters

Comet prioritizes setting configuration parameters in the following order:

  • Arguments passed to code, for example, comet_llm.init(api_key="Your API Key").
  • Environment parameters, for example, export COMET_API_KEY=<Your API Key>
  • A setting in the .comet.config file in your current folder
  • A setting in the .comet.config file in your HOME directory

In other words, an explicit parameter passed to code has top priority, followed by parameters set through environment parameters, followed by a .comet.config file in your current working directory, followed by the .comet.config file in your HOME directory.

Configuration parameters

These parameters control behaviors of the SDK that are not related to logging data.

The table below outlines all the available configuration environment parameters and their corresponding names in the .comet.config file.

Comet Config Section/NameEnvironment Parameter NameDescription
[comet]
api_key
COMET_API_KEYThe API key used for logging data and using the Python API
[comet]
workspace
COMET_WORKSPACEUse this workspace when logging datra
[comet]
project_name
COMET_PROJECT_NAMEUse this project when logging data
[comet]
url_override
COMET_URL_OVERRIDEURL to upload data to, this needs to be updated for on-premise deployments. Defaults to https://www.comet.com/clientlib/.

Environment-only parameters

In addition to the configuration parameters, there are a few special-purpose Comet environment-only parameters. These only operate in the environment, and cannot be set in the configuration:

Environment ParameterDescription
COMET_INIA path to another .comet.config file to take into account
Feb. 24, 2024