Skip to content

Commit

Permalink
feat(systemMetadata): add pipeline names to system metadata
Browse files Browse the repository at this point in the history
Follow up on #8672
  • Loading branch information
hsheth2 committed Aug 21, 2023
1 parent 8cf299a commit df796d3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ def _try_reformat_with_black(code: str) -> str:

class WorkUnitRecordExtractorConfig(ConfigModel):
set_system_metadata = True
set_system_metadata_pipeline_name = (
False # false for now until the models are available in OSS
)
unpack_mces_into_mcps = False


Expand Down Expand Up @@ -66,6 +69,10 @@ def get_records(
workunit.metadata.systemMetadata = SystemMetadata(
lastObserved=get_sys_time(), runId=self.ctx.run_id
)
if self.config.set_system_metadata_pipeline_name:
workunit.metadata.systemMetadata.pipelineName = (
self.ctx.pipeline_name
)
if (
isinstance(workunit.metadata, MetadataChangeEvent)
and len(workunit.metadata.proposedSnapshot.aspects) == 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ record SystemMetadata {
*/
runId: optional string = "no-run-id-provided"

/**
* The ingestion pipeline id that produced the metadata. Populated in case of batch ingestion.
*/
pipelineName: optional string

/**
* The model registry name that was used to process this event
*/
Expand Down

0 comments on commit df796d3

Please sign in to comment.