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

Initial code for making python_env output an artifact #214

Merged
merged 29 commits into from
Feb 11, 2025

Conversation

varkha-d-sharma
Copy link
Collaborator

@varkha-d-sharma varkha-d-sharma commented Oct 16, 2024

Related Issues / Pull Requests

List all related issues and/or pull requests if there are any.

Description

Include a brief summary of the proposed changes.

  1. Converting Python Env from a property for execution to an Artifact under Artifact Type - Environment
  2. Updated necessary documentation.
  3. Code Refactoring - putting cmf-server related logging functions in the cmf_server_methods.py
  4. Putting "Environment" into the model card.

What changes are proposed in this pull request?

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected; for instance,
    examples in this repository need to be updated too).
  • This change requires a documentation update.

Checklist:

  • My code follows the style guidelines of this project (PEP-8 with Google-style docstrings).
  • My code modifies existing public API, or introduces new public API, and I updated or wrote docstrings that
    uses Google-style formatting and any other formatting that is supported by mkdocs and plugins this project
    uses.
  • I have commented my code.
  • My code requires documentation updates, and I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

@varkha-d-sharma varkha-d-sharma self-assigned this Nov 7, 2024
Copy link
Collaborator

@shreyas-kulkarni09 shreyas-kulkarni09 left a comment

Choose a reason for hiding this comment

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

The PR is good to merge with a few suggestions for addressing technical debt:


1. Code Modularization

  • Break down large functions into smaller, more manageable pieces. For instance, the run method in metadata/push.py could be refactored into several helper methods for improved clarity and maintainability.
  • Consider splitting the cmflib/cmf_server.py file into multiple smaller files or a dedicated folder structure. For example, methods like log_model_with_version and log_execution_metrics_from_client could be moved to a separate logs file.

2. Type Annotations

  • Adding type annotations to function signatures would improve the readability and maintainability of the code, as well as facilitate better type checking.

3. Logging

  • Replace print statements with proper logging functionality. This would enhance the ability to track and debug issues in a production environment.

@rishabhsharma22
Copy link
Collaborator

The PR looks good. I will suggest to add comments to make it more detailed before we merging.

@varkha-d-sharma
Copy link
Collaborator Author

The PR is good to merge with a few suggestions for addressing technical debt:

1. Code Modularization

  • Break down large functions into smaller, more manageable pieces. For instance, the run method in metadata/push.py could be refactored into several helper methods for improved clarity and maintainability.
  • Consider splitting the cmflib/cmf_server.py file into multiple smaller files or a dedicated folder structure. For example, methods like log_model_with_version and log_execution_metrics_from_client could be moved to a separate logs file.

2. Type Annotations

  • Adding type annotations to function signatures would improve the readability and maintainability of the code, as well as facilitate better type checking.

3. Logging

  • Replace print statements with proper logging functionality. This would enhance the ability to track and debug issues in a production environment.

Created stories for these in our backlog @shreyas-kulkarni09

@varkha-d-sharma
Copy link
Collaborator Author

The PR looks good. I will suggest to add comments to make it more detailed before we merging.

@rishabhsharma22 Commented all the changes i have done with respect to this story. If you feel need for more, please let me know.

@annmary-roy annmary-roy merged commit 671eb97 into HewlettPackard:master Feb 11, 2025
@varkha-d-sharma varkha-d-sharma deleted the python_env branch February 20, 2025 12:03
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.

5 participants