trains/task.py
def create(
        cls,
        task_name=None,
        project_name=None,
        task_type=TaskTypes.training,
    ):
        """
        Create a new Task object, regardless of the main execution task (Task.init).

        Notice: This function will always create a new task, whether running in development or remote execution mode.

        :param task_name: task name to be created
        :param project_name: Project to create the task in.
            If project is None, and the main execution task is initialized (Task.init), its project will be used.
            If project is provided but doesn't exist, it will be created.
        :param task_type: Task type to be created. (default: "training")
        Optional Task types are: "training" / "testing" / "dataset_import" / "annotation" / "annotation_manual"
        :return: Task() object
        """
        if not project_name:
            if not cls.__main_task:
                raise ValueError("Please provide project_name, no global task context found "
                                 "(Task.current_task hasn't been called)")
            project_name = cls.__main_task.get_project_name()

        try:
            task = cls(
                private=cls.__create_protection,
                project_name=project_name,
                task_name=task_name,
                task_type=task_type,
                log_to_backend=False,
                force_create=True,
            )
        except Exception:
            raise
        return task

        Create a new Task object, regardless of the main execution task (Task.init).

        Notice: This function will always create a new task, whether running in development or remote execution mode.

        :param task_name: task name to be created
        :param project_name: Project to create the task in.
            If project is None, and the main execution task is initialized (Task.init), its project will be used.
            If project is provided but doesn't exist, it will be created.
        :param task_type: Task type to be created. (default: "training")
        Optional Task types are: "training" / "testing" / "dataset_import" / "annotation" / "annotation_manual"
        :return: Task() object
        
Create a new Task object, regardless of the main execution task (Task.init).
Notice: This function will always create a new task, whether running in development or remote execution mode.
Create a new Task object regardless of the main execution task ( Task . init ) . Notice : This function will always create a new task whether running in development or remote execution mode .
def create(
        cls,
        task_name=None,
        project_name=None,
        task_type=TaskTypes.training,
    ):
        if not project_name:
            if not cls.__main_task:
                raise ValueError("Please provide project_name, no global task context found "
                                 "(Task.current_task hasn't been called)")
            project_name = cls.__main_task.get_project_name()
        try:
            task = cls(
                private=cls.__create_protection,
                project_name=project_name,
                task_name=task_name,
                task_type=task_type,
                log_to_backend=False,
                force_create=True,
            )
        except Exception:
            raise
        return task
def create ( cls , task_name = None , project_name = None , task_type = TaskTypes . training , ) : if not project_name : if not cls . __main_task : raise ValueError ( "Please provide project_name, no global task context found " "(Task.current_task hasn't been called)" ) project_name = cls . __main_task . get_project_name ( ) try : task = cls ( private = cls . __create_protection , project_name = project_name , task_name = task_name , task_type = task_type , log_to_backend = False , force_create = True , ) except Exception : raise return task
Create a new Task object, regardless of the main execution task (Task.init).
Create a new Task object regardless of the main execution task ( Task . init ) .
"""
        Create a new Task object, regardless of the main execution task (Task.init).

        Notice: This function will always create a new task, whether running in development or remote execution mode.

        :param task_name: task name to be created
        :param project_name: Project to create the task in.
            If project is None, and the main execution task is initialized (Task.init), its project will be used.
            If project is provided but doesn't exist, it will be created.
        :param task_type: Task type to be created. (default: "training")
        Optional Task types are: "training" / "testing" / "dataset_import" / "annotation" / "annotation_manual"
        :return: Task() object
        """
None
cls
task_name
task name to be created
task name to be created
project_name
Project to create the task in.
If project is None, and the main execution task is initialized (Task.init), its project will be used.
If project is provided but doesn't exist, it will be created.
Project to create the task in . If project is None and the main execution task is initialized ( Task . init ) its project will be used . If project is provided but doesn ' t exist it will be created .
task_type
Task type to be created. (default: "training")
Optional Task types are: "training" / "testing" / "dataset_import" / "annotation" / "annotation_manual"
Task type to be created . ( default : " training " ) Optional Task types are : " training " / " testing " / " dataset_import " / " annotation " / " annotation_manual "