Skip to content

exp: add --hide-workspace flag to exp show #10798

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MirjalilovS
Copy link

@MirjalilovS MirjalilovS commented Jul 4, 2025

Fixes #10741

@MirjalilovS MirjalilovS force-pushed the feature/hide-workspace-10741 branch from 1c62c2d to d4e4ae9 Compare July 4, 2025 20:13
@MirjalilovS
Copy link
Author

Hi, I am failing a lot of CI checks and I am not sure how I can fix that. I followed the DVC Contributing Docs and managed to pass every test on my local machine. I have updated the relevant tests to account for the new feature. Any help would be greatly appreciated.

Also, should documentation be created for this? I noticed whilst working on this issue that there are some exp show flags are not mentioned in the documentation such as --hide-queue and --hide-failed. This left me quite confused as to how I should proceed. Again, any help would be greatly appreciated.

Copy link

codecov bot commented Jul 7, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 91.06%. Comparing base (2431ec6) to head (5b95a69).
Report is 81 commits behind head on main.

Files with missing lines Patch % Lines
dvc/repo/experiments/collect.py 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10798      +/-   ##
==========================================
+ Coverage   90.68%   91.06%   +0.38%     
==========================================
  Files         504      504              
  Lines       39795    40283     +488     
  Branches     3141     3185      +44     
==========================================
+ Hits        36087    36684     +597     
+ Misses       3042     2969      -73     
+ Partials      666      630      -36     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@skshetry
Copy link
Collaborator

skshetry commented Jul 7, 2025

Hi, I am failing a lot of CI checks and I am not sure how I can fix that. I followed the DVC Contributing Docs and managed to pass every test on my local machine. I have updated the relevant tests to account for the new feature. Any help would be greatly appreciated.

This was due to an upstream bug: jelmer/dulwich#1643, which is now been resolved.

Also, should documentation be created for this? I noticed whilst working on this issue that there are some exp show flags are not mentioned in the documentation.

Great finding. yes, this and all of those flags need to be documented. Looks like we forgot to update the docs when we introduced those flags in #8318.

@MirjalilovS
Copy link
Author

Thank you for your response. When making an issue for this in the docs repo, should it be separate for each feature or is it fine to put it all in one issue?

@skshetry
Copy link
Collaborator

skshetry commented Jul 7, 2025

Thank you for your response. When making an issue for this in the docs repo, should it be separate for each feature or is it fine to put it all in one issue?

It might be easier to create a PR directly than creating an issue. If you don't want to document other flags right now, it's okay to create just a single issue to track them.

@skshetry skshetry assigned skshetry and unassigned skshetry Jul 7, 2025
@skshetry skshetry added this to DVC Jul 7, 2025
@skshetry skshetry moved this to Review In Progress in DVC Jul 7, 2025
@@ -319,4 +326,5 @@ def add_parser(experiments_subparsers, parent_parser):
action="store_true",
help="Force re-collection of experiments instead of loading from exp cache.",
)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Unnecessary change.

Suggested change

@MirjalilovS MirjalilovS force-pushed the feature/hide-workspace-10741 branch from d4e4ae9 to 1c62c2d Compare July 8, 2025 21:55
Comment on lines 310 to 316
ExpState(
rev="workspace",
name=baseline_names.get("workspace"),
data=workspace_data.data,
error=workspace_data.error,
experiments=None,
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why does this require creating ExpState again?

Copy link
Author

Choose a reason for hiding this comment

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

Hi, thank you for flagging this. I have refactored those lines to something more elegant now

@skshetry
Copy link
Collaborator

skshetry commented Jul 9, 2025

@MirjalilovS, would you be able to add a test for this?

Adds a new --hide-workspace CLI flag to dvc exp show to allow hiding the workspace row from the output table. This helps users focus on committed baselines and experiments without including the current workspace state.

Fixes iterative#10741.
Adds a new --hide-workspace CLI flag to dvc exp show to allow hiding the workspace row from the output table.

Fixes iterative#10741.
@skshetry skshetry force-pushed the feature/hide-workspace-10741 branch from 6726046 to f0f8671 Compare July 11, 2025 16:08
@MirjalilovS
Copy link
Author

@MirjalilovS, would you be able to add a test for this?

Hi, I added a test for the flag in tests/unit/command/test_experiments.py. I could not find any other tests for exp show flags so I assumed that was all that I had to do. Please let me know if there is anything else that needs to be added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Review In Progress
Development

Successfully merging this pull request may close these issues.

dvc exp show remove workspace row
2 participants