Giter Site home page Giter Site logo

Make git diff prettier about git-theta HOT 5 CLOSED

craffel avatar craffel commented on August 14, 2024
Make git diff prettier

from git-theta.

Comments (5)

craffel avatar craffel commented on August 14, 2024

Depends on #46

from git-theta.

nkandpa2 avatar nkandpa2 commented on August 14, 2024

Took a first cut at this. Here's a sample for some feedback:
Screen Shot 2022-11-28 at 12 21 22 AM

@craffel I think you said this depends on #46 because we want the diff tool to give some idea of what intermediate changes were applied between two versions of a checkpoint (e.g., between commit A and commit B there were 2 sparse updates and one dense update). As per my current understanding this will not be possible with the information that git provides external diff tools. The interface git enforces for diff tools is that they take the following parameters: diff-tool path old-file old-hash old-mode new-file new-hash new-mode. Since there's no information about what commit the two versions come from, we won't be able to display the intermediate changes applied.

from git-theta.

blester125 avatar blester125 commented on August 14, 2024

I think with the way I setup the parameter updates on the FS we can actually figure out the updates applied.

Basically each update to a parameter is stored in a sub-dir that is named with the hash of the parameters for that update. So if we follow to metadata backpointers from .../params/updates/${new-file["${param_name}"]["hash"]} (or the parameter metadata file which I think has dup information rn) until we hit old-file["${param_name}"]["hash"] we should be able to tell what updates were applied.

I think this is dependent on the diff direction through? Like we need the on-disk .git_theta/... dir to be the one for the most recent model. If the on-disk value is older commit we can't do this.

A demo FS dir can be found here https://github.com/r-three/git-theta/blob/3e8566a83b6ef1e5cc5a24dc41ad7e0d73b8a0d3/git_theta/updates/base.py

from git-theta.

nkandpa2 avatar nkandpa2 commented on August 14, 2024

Yeah, just took a look at the updates PR and this seems feasible for diff-ing versions that do not have a dense update between them (since the updates folder is purged upon a dense update). I guess I'll wait on implementing this feature until after #92 gets merged.

from git-theta.

blester125 avatar blester125 commented on August 14, 2024

Finished in #207

from git-theta.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.