comet_ml.integration.snowflake ยถ
get_artifact_v1 ยถ
get_artifact_v1(
experiment, artifact_name, workspace=None, version_or_alias=None
)
Get the SQL query for a Snowflake Artifact.
Parameters:
experiment
(Experiment
) โInstance of Experiment object.
artifact_name
(str
) โArtifact name.
workspace
(str
, default:None
) โRetrieve an artifact belonging to that workspace.
version_or_alias
(Iterable[str]
, default:None
) โRetrieve the artifact by the given alias or version.
log_artifact_v1 ยถ
log_artifact_v1(
experiment,
artifact_name,
sql,
sample=None,
sample_size=100,
url=None,
artifact_version=None,
artifact_aliases=None,
)
Logs a Snowflake Artifact to Comet based on a SQL query and a sample Pandas DataFrame.
Parameters:
experiment
(Experiment
) โInstance of an Experiment used to log the Artifact.
artifact_name
(str
) โThe name of the Artifact to create.
sql
(str
) โThe SQL used to generate the Snowflake dataset.
sample
(Pandas DataFrame
, default:None
) โSample of the data generated by the SQL query defined previously.
sample_size
(int
, default:100
) โNumber of rows to record from the sample dataframe defined previously. Defaults to 100.
artifact_version
(str
, default:None
) โVersion of the artifact. If none is provided Comet will auto-increment the version.
artifact_aliases
(Iterable[str]
, default:None
) โAliases to associate with the Artifact.
log_snowpark_dataframe_v1 ยถ
log_snowpark_dataframe_v1(
experiment,
artifact_name,
dataframe,
artifact_version=None,
artifact_aliases=None,
log_sample=False,
sample_size=10,
)
Logs a Snowpark Dataframe as a Snowflake Artifact to Comet. The full dataset is not saved in Comet, instead we record both the SQL query and a small preview sample.
Parameters:
experiment
(Experiment
) โInstance of an Experiment used to log the Artifact.
artifact_name
(str
) โThe name of the Artifact to create.
dataframe
(Snowpark Dataframe
) โThe Snowpark Dataframe to record.
artifact_version
(str
, default:None
) โVersion of the artifact. If none is provided Comet will auto-increment the version
artifact_aliases
(Iterable[str]
, default:None
) โAliases to associate with the Artifact
log_sample
(bool
, default:False
) โWhether a preview of the dataset should be saved to the Comet platform.
sample_size
(int
, default:10
) โNumber of rows to record from the sample dataframe defined previously.