mirror of
https://github.com/clearml/clearml
synced 2025-01-30 16:46:58 +00:00
Fix OutputModel should prefer connected task name over filename stem
This commit is contained in:
parent
71c74f977b
commit
04fe7dffe3
5
.gitignore
vendored
5
.gitignore
vendored
@ -7,8 +7,9 @@
|
||||
# Python
|
||||
*.pyc
|
||||
__pycache__
|
||||
build/
|
||||
dist/
|
||||
/build/
|
||||
/dist/
|
||||
*/conda_build/build/
|
||||
*.egg-info
|
||||
.env
|
||||
.venv/
|
||||
|
@ -2400,11 +2400,15 @@ class OutputModel(BaseModel):
|
||||
|
||||
# make sure the created model is updated:
|
||||
out_model_file_name = target_filename or weights_filename or register_uri
|
||||
name = (
|
||||
Path(out_model_file_name).stem
|
||||
if out_model_file_name
|
||||
else (self._task_connect_name or "Output Model")
|
||||
)
|
||||
|
||||
# prefer self._task_connect_name if exists
|
||||
if self._task_connect_name:
|
||||
name = self._task_connect_name
|
||||
elif out_model_file_name:
|
||||
name = Path(out_model_file_name).stem
|
||||
else:
|
||||
name = "Output Model"
|
||||
|
||||
if not self._base_model:
|
||||
model = self._get_force_base_model(task_model_entry=name)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user