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
replace pipreqs with pip freeze #1384
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #1384 +/- ##
==========================================
- Coverage 79.53% 79.47% -0.07%
==========================================
Files 279 279
Lines 13846 13847 +1
==========================================
- Hits 11013 11005 -8
- Misses 2833 2842 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Co-authored-by: Timothy Wolodzko <twolodzko@users.noreply.github.com>
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.
LGTM
@@ -30,7 +30,7 @@ def log_dependencies(self, run: "Run") -> None: | |||
class InferDependenciesStrategy(DependencyTrackingStrategy): | |||
def log_dependencies(self, run: "Run") -> None: | |||
try: | |||
dependencies_str = subprocess.check_output(["pipreqs", "--print", "."]).decode("utf-8") | |||
dependencies_str = subprocess.check_output(["pip", "freeze"]).decode("utf-8") |
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.
@AleksanderWWW pip list --format=freeze
is a more reliable option as it correctly parses requirements in a conda environment
https://stackoverflow.com/questions/62863020/pip-freeze-generating-file-on-conda-environment
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 see in the comments on SO that there are some issues with it. For conda, we would probably go with a dedicated integration.
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.
@AleksanderWWW tested and said it works fine
There's a new PR: https://github.com/neptune-ai/neptune-client/pull/1389/files#diff-8d10a7f1e52cebb61d979c1afe224d21119c3f42b698cd2252ab88ab72598c72R35
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.
The comment there says that if someone installs a dependency from git then it will not be shown in the output. Is that a deal-breaker for us @twolodzko @SiddhantSadangi?
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.
It worked for me using pip==23.1.2
Before submitting checklist