mirror of
https://github.com/clearml/clearml
synced 2025-02-14 16:46:12 +00:00
Fix passing filename in sdk.development.detect_with_pip_freeze
This commit is contained in:
parent
9b551b6d40
commit
b803fa5ae1
@ -290,7 +290,12 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin):
|
|||||||
if self._force_use_pip_freeze:
|
if self._force_use_pip_freeze:
|
||||||
if isinstance(self._force_use_pip_freeze, (str, Path)):
|
if isinstance(self._force_use_pip_freeze, (str, Path)):
|
||||||
conda_requirements = ''
|
conda_requirements = ''
|
||||||
|
try:
|
||||||
req_file = Path(self._force_use_pip_freeze)
|
req_file = Path(self._force_use_pip_freeze)
|
||||||
|
except TypeError:
|
||||||
|
# LazyEvaluator loading when casting
|
||||||
|
req_file = Path(str(self._force_use_pip_freeze))
|
||||||
|
|
||||||
requirements = req_file.read_text() if req_file.is_file() else None
|
requirements = req_file.read_text() if req_file.is_file() else None
|
||||||
else:
|
else:
|
||||||
requirements, conda_requirements = pip_freeze(
|
requirements, conda_requirements = pip_freeze(
|
||||||
|
Loading…
Reference in New Issue
Block a user