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

BUG: Neptune Captures Non-Standard Git Patch Format When Using External Diff Viewer #1887

Open
liblaf opened this issue Nov 29, 2024 · 2 comments · May be fixed by #1891
Open

BUG: Neptune Captures Non-Standard Git Patch Format When Using External Diff Viewer #1887

liblaf opened this issue Nov 29, 2024 · 2 comments · May be fixed by #1891
Assignees
Labels
1.x api bug pending Waiting for a response

Comments

@liblaf
Copy link

liblaf commented Nov 29, 2024

Thank you for creating neptune.ai, the best tool for experiment tracking!

I have configured an external diff viewer, difftastic, in my Git configuration. However, I noticed that neptune captures the diff in a non-standard Git patch format, which appears to be the output format of my custom diff viewer.

Here is a snippet from my ~/.gitconfig:

[diff]
external = difft
tool = difftastic

[difftool]
prompt = false

[difftool "difftastic"]
cmd = difftastic "$LOCAL" "$REMOTE"

An example of a tracked experiment run can be found here: Neptune Experiment Run.

I believe that Neptune should avoid using the external diff viewer to ensure that the captured patch is in the standard Git patch format. The --no-ext-diff option in git diff might be useful for this purpose. Here is the relevant documentation: Git Diff Documentation.

Suggested Solution:

Consider adding an option or configuration setting in neptune to disable the use of external diff viewers when capturing patches. This would ensure that the captured diff is always in the standard Git patch format, regardless of the user's Git configuration.

Steps to Reproduce:

  1. Configure an external diff viewer in your Git configuration (e.g., difftastic).
  2. Run an experiment and capture the source code diff.
  3. Observe that the captured diff is in the format of the external diff viewer, not the standard Git patch format.

Expected Behavior:

Neptune should capture the diff in the standard Git patch format, even if an external diff viewer is configured in Git.

Actual Behavior:

Neptune captures the diff in the format of the external diff viewer, which is not the standard Git patch format.

@SiddhantSadangi
Copy link
Member

Hey @liblaf ,
Thanks for your kind words 🫶

And also for pointing out this issue. I'll look into it and include a fix in the 1.13.1 release in December ✅

@SiddhantSadangi SiddhantSadangi added the pending Waiting for a response label Dec 23, 2024
@SiddhantSadangi
Copy link
Member

Hey @liblaf 👋

I've created a PR for this: #1891

Before we include it in a stable release, could you install it from source and check if everything works well?

pip install git+https://github.com/neptune-ai/neptune-client.git@ss/1.x/no-ext-diff

@SiddhantSadangi SiddhantSadangi removed this from the 1.14 milestone Dec 23, 2024
@SiddhantSadangi SiddhantSadangi linked a pull request Dec 23, 2024 that will close this issue
2 tasks
@SiddhantSadangi SiddhantSadangi linked a pull request Dec 23, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x api bug pending Waiting for a response
Projects
None yet
2 participants