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

Create separate class for metadata #372

Merged
merged 7 commits into from
Aug 22, 2023
Merged

Conversation

PhilippeMoussalli
Copy link
Contributor

@PhilippeMoussalli PhilippeMoussalli commented Aug 21, 2023

PR that creates a metadata class, this will make it easier to implement #368 (was originally part of #325 but decided to break it down to make it easier to review).

Few other notable changes:

  • Refactored the runner to accept the pipeline as an attribute since it's the runner's interface
  • The run_id between both runners has now an identical format (name_timestamp), we no longer need the uid of kfp since it's just used to store the native output artifacts
  • The safe_component_name has been moved from the local runner to the component spec to avoid having to plug it everywhere

@PhilippeMoussalli PhilippeMoussalli requested review from GeorgesLorre and RobbeSneyders and removed request for GeorgesLorre August 21, 2023 13:09
self,
pipeline: Pipeline,
):
self.pipeline = pipeline
Copy link
Member

Choose a reason for hiding this comment

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

I originally proposed to move the pipeline argument to the compile method, and I still think that's more logical.

Why is the pipeline passed as an initialization argument instead of to the compile method. From a logical perspective, I wouldn't expect a compiler instance to be specific to a single pipeline.

Originally posted by @RobbeSneyders in #194 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh I see, makes sense. I'll revert the changes

path, volume = self._patch_path(base_path=pipeline.base_path)
run_id = f"{pipeline.name}-{timestamp}"
metadata = MetaData(run_id=run_id, base_path=path)
datetime.datetime.now().strftime("%Y%m%d%H%M%S")
Copy link
Member

Choose a reason for hiding this comment

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

Is this line doing anything?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it should be removed

Copy link
Collaborator

@GeorgesLorre GeorgesLorre left a comment

Choose a reason for hiding this comment

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

Nice change, makes sense

src/fondant/manifest.py Outdated Show resolved Hide resolved
Co-authored-by: Georges Lorré <[email protected]>
@RobbeSneyders RobbeSneyders merged commit ea50d75 into main Aug 22, 2023
@RobbeSneyders RobbeSneyders deleted the create_metadata_class branch August 22, 2023 13:18
RobbeSneyders pushed a commit that referenced this pull request Aug 23, 2023
Hakimovich99 pushed a commit that referenced this pull request Oct 16, 2023
PR that creates a metadata class, this will make it easier to implement
#368 (was originally part of #325 but decided to break it down to make
it easier to review).

Few other notable changes: 

- The `run_id` between both runners has now an identical format
(name_timestamp), we no longer need the uid of kfp since it's just used
to store the native output artifacts
- The `safe_component_name` has been moved from the local runner to the
component spec to avoid having to plug it everywhere

---------

Co-authored-by: Georges Lorré <[email protected]>
Hakimovich99 pushed a commit that referenced this pull request Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants