-
Notifications
You must be signed in to change notification settings - Fork 310
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
Tracks progress for package creation, upload and kickoff #2935
Conversation
Signed-off-by: Ketan Umare <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2935 +/- ##
===========================================
+ Coverage 76.33% 93.26% +16.93%
===========================================
Files 199 48 -151
Lines 20840 1842 -18998
Branches 2681 0 -2681
===========================================
- Hits 15908 1718 -14190
+ Misses 4214 124 -4090
+ Partials 718 0 -718 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could consider implementing a global Progress
to:
- Simplify the codebase
- Enable consistent progress reporting behavior across modules
- Make it easier to add progress tracking to new modules
- Allow for a global flag to enable/disable all progress logging (especially if we want something like
--verbose
or--silence
)
![image](https://private-user-images.githubusercontent.com/72752478/386932287-dddf3ddf-f7c3-4a7e-8fa9-c9d713cb37b0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMzc4MTksIm5iZiI6MTczOTEzNzUxOSwicGF0aCI6Ii83Mjc1MjQ3OC8zODY5MzIyODctZGRkZjNkZGYtZjdjMy00YTdlLThmYTktYzlkNzEzY2IzN2IwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDIxNDUxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgzNWQ1MzJhNGQ5OTQ5OTFiZjFmZjg2NzZjYWIwNmM2YzY4MGE5M2QyMDA4ZmVjZGI4Y2U3N2RmNDgxZjliNjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.RyBKLghg1Pgp3IEflSOpv_-DfNzoaLcvdZtHP2z136A)
![image](https://private-user-images.githubusercontent.com/72752478/386933134-b769dac2-e29f-4d1c-a5aa-0716e530bced.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxMzc4MTksIm5iZiI6MTczOTEzNzUxOSwicGF0aCI6Ii83Mjc1MjQ3OC8zODY5MzMxMzQtYjc2OWRhYzItZTI5Zi00ZDFjLWE1YWEtMDcxNmU1MzBiY2VkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDIxNDUxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ2ZjNkNDMwYjg3NjA0ODc4NWE1MDdjZGFlYTgzMjBmN2JiNjE1OGFmMmFjNjVhZmEyNjZiZDllYTRjYWQ4NTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.TD5V8PseUPHTdvtyafo8DPl7PLUJSzQstslR6-ejwG0)
Signed-off-by: Ketan Umare <[email protected]>
Signed-off-by: Jan Fiedler <[email protected]>
Signed-off-by: Jan Fiedler <[email protected]>
Signed-off-by: Jan Fiedler <[email protected]>
Signed-off-by: Jan Fiedler <[email protected]>
Signed-off-by: Jan Fiedler <[email protected]>
Signed-off-by: Jan Fiedler <[email protected]>
a6cc2ed
to
ae55489
Compare
Signed-off-by: Jan Fiedler <[email protected]>
fast-register.movChanges I made:
|
Code Review Agent Run #941fb7Actionable Suggestions - 5
Additional Suggestions - 2
Review Details
|
Changelist by BitoThis pull request implements the following key changes.
|
flytekit/remote/remote.py
Outdated
def fetch_task( | ||
self, | ||
project: str = None, | ||
domain: str = None, | ||
name: str = None, | ||
version: str = None, | ||
) -> FlyteTask: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using a dataclass or named tuple for the parameters since they are used together in multiple places in the codebase (e.g., fetch_task_lazy
, execute_local_task
, sync_execution
). This could improve code maintainability and reduce parameter duplication.
Code suggestion
Check the AI-generated fix before applying
# Add TaskIdentifier class
@dataclass
class TaskIdentifier:
project: Optional[str] = None
domain: Optional[str] = None
name: Optional[str] = None
version: Optional[str] = None
# Update method signature
def fetch_task(self, task_id: TaskIdentifier = None) -> FlyteTask:
Code Review Run #941fb7
Is this a valid issue, or was it incorrectly flagged by the Agent?
- it was incorrectly flagged
flytekit/remote/remote.py
Outdated
self, | ||
project: str = None, | ||
domain: str = None, | ||
name: str = None, | ||
version: str = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using a dataclass or named tuple for the parameters since they are all optional string parameters that appear to be used together frequently.
Code suggestion
Check the AI-generated fix before applying
self, | |
project: str = None, | |
domain: str = None, | |
name: str = None, | |
version: str = None, | |
self, entity_id: EntityIdentifier = None, |
Code Review Run #941fb7
Is this a valid issue, or was it incorrectly flagged by the Agent?
- it was incorrectly flagged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments, nothing major though.
flytekit/loggers.py
Outdated
@@ -186,5 +187,9 @@ def get_level_from_cli_verbosity(verbosity: int) -> int: | |||
return logging.DEBUG | |||
|
|||
|
|||
def is_display_progress_enabled() -> bool: | |||
return os.getenv(FLYTEKIT_DISPLAY_PROGRESS_ENV_VAR, False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use str2bool instead:
return os.getenv(FLYTEKIT_DISPLAY_PROGRESS_ENV_VAR, False) | |
return str2bool(os.getenv(FLYTEKIT_DISPLAY_PROGRESS_ENV_VAR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried using str2bool
here but we end up with a circular import here. Do you have a preference of fixing this?
This reverts commit 5b05419. Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Code Review Agent Run #fd1704Actionable Suggestions - 0Additional Suggestions - 10
Review Details
|
Signed-off-by: Jan Fiedler <[email protected]>
Signed-off-by: Jan Fiedler <[email protected]>
Code Review Agent Run #57e89bActionable Suggestions - 0Review Details
|
This is pretty cool. Thank you! |
* Tracks progress for package creation, upload and kickoff Signed-off-by: Ketan Umare <[email protected]> * updated Signed-off-by: Ketan Umare <[email protected]> * introduce FLYTEKIT_DISPLAY_PROGRESS_ENV_VAR to control progress Signed-off-by: Jan Fiedler <[email protected]> * update remote.py Signed-off-by: Jan Fiedler <[email protected]> * update fast_registration.py Signed-off-by: Jan Fiedler <[email protected]> * ruff format Signed-off-by: Jan Fiedler <[email protected]> * ruff check fix Signed-off-by: Jan Fiedler <[email protected]> * remove show_progress attribute from remote & fast_registration Signed-off-by: Jan Fiedler <[email protected]> * make lint Signed-off-by: Jan Fiedler <[email protected]> * Revert "make lint" This reverts commit 5b05419. Signed-off-by: Eduardo Apolinario <[email protected]> * run make lint from repo this time Signed-off-by: Eduardo Apolinario <[email protected]> * reformat remote.py Signed-off-by: Eduardo Apolinario <[email protected]> * reformat fast_registration.py Signed-off-by: Eduardo Apolinario <[email protected]> * reuse LOGGING_RICH_FMT_ENV_VAR for is_display_progress_enabled() Signed-off-by: Jan Fiedler <[email protected]> * replace l & t variable names with total files & files_processed Signed-off-by: Jan Fiedler <[email protected]> --------- Signed-off-by: Ketan Umare <[email protected]> Signed-off-by: Jan Fiedler <[email protected]> Signed-off-by: Eduardo Apolinario <[email protected]> Co-authored-by: Ketan Umare <[email protected]> Co-authored-by: Jan Fiedler <[email protected]> Co-authored-by: Jan Fiedler <[email protected]> Co-authored-by: Eduardo Apolinario <[email protected]> Signed-off-by: Umer Ahmad <[email protected]>
Allows users to understand through visualization if large packages are being uploaded or incorrect files are being packaged.
Summary by Bito
Comprehensive Flytekit improvements including progress tracking with updated environment variables (LOGGING_RICH_FMT_ENV_VAR), configurable chunk sizes for S3/GCS uploads, and enhanced Ray task configuration with pod template support. Features include package creation/compression progress visualization, improved error handling, and secret management functionality. Status messages and variable names in fast registration module have been made more descriptive.Unit tests added: True
Estimated effort to review (1-5, lower is better): 5