neptune-client icon indicating copy to clipboard operation
neptune-client copied to clipboard

neptune.new API doesn't allow git_info to be passed

Open FlorianWilhelm opened this issue 4 years ago • 1 comments
trafficstars

With the old legacy API it was possible to pass git_info as a parameter to the create_experiment function. With the new API (which is awesome btw) and create_experiment gone, the new init should have a parameter git_info to pass this information in cases where Neptune is not able to figure it out itself. This happens in my case when I call the script via a console_scripts entry-point.

In this case

    if hasattr(__main__, '__file__'):
        return os.path.dirname(os.path.abspath(__main__.__file__))

in discover_git_repo_location does not work.

An alternative solution would be to be able to pass repo_path, which could be None be the default, meaning it is determined automatically.

FlorianWilhelm avatar Apr 02 '21 22:04 FlorianWilhelm

Implemented in #866

michalsustr avatar Mar 16 '22 16:03 michalsustr

Hey @FlorianWilhelm and @michalsustr

Exciting news!

On the latest release of the neptune client v1.1.0, we added the ability to pass custom git_info. All you need to do is update your client to the latest release.

pip install -U neptune

Docs: https://docs.neptune.ai/logging/git_info/#specifying-the-repository-path

Changelog: https://github.com/neptune-ai/neptune-client/releases/tag/1.1.0

Blaizzy avatar Mar 20 '23 16:03 Blaizzy

Thanks @Blaizzy, this is awesome!

FlorianWilhelm avatar Mar 20 '23 16:03 FlorianWilhelm

Most welcome!

Blaizzy avatar Mar 20 '23 18:03 Blaizzy