clearml_agent/commands/worker.py
def create_notebook_file(self, task, execution, repo_info):
        # type: (tasks_api.Task, ExecutionInfo, Optional[RepoInfo]) -> Tuple[str, str]
        """
        Create notebook file in appropriate location
        :return: directory and script path
        """
        log = logging.getLogger(__name__)
        if repo_info and repo_info.root:
            location = Path(repo_info.root, execution.working_dir)
        else:
            if execution.working_dir and execution.working_dir.strip() != '.':
                log.warning(
                    "found task with `script.working_dir` (`%s`) but without `script.repository`, ignoring",
                    execution.working_dir,
                )
            if not execution.entry_point:
                execution.entry_point = 'untitled.py'
            else:
                # ignore any folders in the entry point we only need the file name
                execution.entry_point = execution.entry_point.split(os.path.sep)[-1]
            location = None
        location = location or (repo_info and repo_info.root)
        if not location:
            location = Path(self.venv_folder, WORKING_STANDALONE_DIR)
            location.mkdir(exist_ok=True, parents=True)
        log.debug("selected execution directory: %s", location)
        return Text(location), self.write(task, location, execution.entry_point)

        Create notebook file in appropriate location
        :return: directory and script path
        
Create notebook file in appropriate location
Create notebook file in appropriate location
def create_notebook_file(self, task, execution, repo_info):
        log = logging.getLogger(__name__)
        if repo_info and repo_info.root:
            location = Path(repo_info.root, execution.working_dir)
        else:
            if execution.working_dir and execution.working_dir.strip() != '.':
                log.warning(
                    "found task with `script.working_dir` (`%s`) but without `script.repository`, ignoring",
                    execution.working_dir,
                )
            if not execution.entry_point:
                execution.entry_point = 'untitled.py'
            else:
                execution.entry_point = execution.entry_point.split(os.path.sep)[-1]
            location = None
        location = location or (repo_info and repo_info.root)
        if not location:
            location = Path(self.venv_folder, WORKING_STANDALONE_DIR)
            location.mkdir(exist_ok=True, parents=True)
        log.debug("selected execution directory: %s", location)
        return Text(location), self.write(task, location, execution.entry_point)
def create_notebook_file ( self , task , execution , repo_info ) : log = logging . getLogger ( __name__ ) if repo_info and repo_info . root : location = Path ( repo_info . root , execution . working_dir ) else : if execution . working_dir and execution . working_dir . strip ( ) != '.' : log . warning ( "found task with `script.working_dir` (`%s`) but without `script.repository`, ignoring" , execution . working_dir , ) if not execution . entry_point : execution . entry_point = 'untitled.py' else : execution . entry_point = execution . entry_point . split ( os . path . sep ) [ - 1 ] location = None location = location or ( repo_info and repo_info . root ) if not location : location = Path ( self . venv_folder , WORKING_STANDALONE_DIR ) location . mkdir ( exist_ok = True , parents = True ) log . debug ( "selected execution directory: %s" , location ) return Text ( location ) , self . write ( task , location , execution . entry_point )
Create notebook file in appropriate location
Create notebook file in appropriate location
# type: (tasks_api.Task, ExecutionInfo, Optional[RepoInfo]) -> Tuple[str, str] """
        Create notebook file in appropriate location
        :return: directory and script path
        """ # ignore any folders in the entry point we only need the file name
directory and script path
directory and script path
self
task
execution
repo_info