mirror of
https://github.com/clearml/clearml
synced 2025-04-09 23:24:31 +00:00
Fix clearml-task diff was corrupted by windows drive letter and separator (issue #483)
This commit is contained in:
parent
0bc43a31f4
commit
5bc689c9fe
@ -3,6 +3,7 @@ import json
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import tempfile
|
import tempfile
|
||||||
|
from sys import platform
|
||||||
from functools import reduce
|
from functools import reduce
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
from typing import Optional, Sequence, Union, Tuple, List, Callable, Dict, Any
|
from typing import Optional, Sequence, Union, Tuple, List, Callable, Dict, Any
|
||||||
@ -270,8 +271,12 @@ class CreateAndPopulate(object):
|
|||||||
"Use --requirements or --packages".format(reqs_txt_file.as_posix()))
|
"Use --requirements or --packages".format(reqs_txt_file.as_posix()))
|
||||||
|
|
||||||
if self.add_task_init_call:
|
if self.add_task_init_call:
|
||||||
script_entry = os.path.abspath('/' + task_state['script'].get('working_dir', '.') +
|
script_entry = ('/' + task_state['script'].get('working_dir', '.')
|
||||||
'/' + task_state['script']['entry_point'])
|
+ '/' + task_state['script']['entry_point'])
|
||||||
|
if platform == "win32":
|
||||||
|
script_entry = os.path.normpath(script_entry).replace('\\', '/')
|
||||||
|
else:
|
||||||
|
script_entry = os.path.abspath(script_entry)
|
||||||
idx_a = 0
|
idx_a = 0
|
||||||
# find the right entry for the patch if we have a local file (basically after __future__
|
# find the right entry for the patch if we have a local file (basically after __future__
|
||||||
if local_entry_file:
|
if local_entry_file:
|
||||||
|
Loading…
Reference in New Issue
Block a user