The Gretel Object
A one-stop shop for interacting with Gretel’s APIs, models, and artifacts
The Gretel
object provides a streamlined interface for Gretel's SDK:
Configure your Gretel session
Your Gretel session is configured upon instantiation of a Gretel
object. To customize your session (e.g., with custom endpoints for a Hybrid deployment), pass any keyword argument of the configure_session function to the Gretel
initialization method:
Set the current project
Each Gretel
instance can be bound to a single project. This is relevant when you submit project-based jobs like training or generating synthetic data with a Gretel Model.
You have three options for setting the current project:
Use the
project_name
keyword argument when you instantiate aGretel
object, as we demonstrated above. If the project does not exist, a new one will be created.Use the
set_project
method. For example,gretel.set_project("sdk-docs")
. Again, if the project does not exist, a new one will be created.Do not set the project. In this case, a random project will be created if/when you run a
submit_*
method. This behavior is described in the Train and Generate Jobs section.
A Note on "Project Name"
Project names must be unique, but project display names can be the same. Because of this, many times your project name will be different than the display name. The display name is what is surfaced in the UI.
To look up your project name in the Console:
Navigate to the Projects tab
Select your project
Click on "Settings", down and to the right of the project name
The box labeled "Name" is your project name.
Last updated
Was this helpful?