Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(systemMetadata): add pipeline names to system metadata #8684

Merged
merged 5 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you set this from a recipe?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

technically yes, but it's kinda janky

source:
	type: ...
	config: ...
	extractor: "generic"
	extractor_config:
		set_system_metadata_pipeline_name: True

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in reality, nobody uses this extractor abstraction so effectively no

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
Loading