Skip to content

task

Task commands.

fractal task [-h]  {list,collect,collect-custom,check-collection,new,edit}  ...

Sub-commands

task list

List tasks.

fractal task list [-h]

task collect

Install and collect all tasks from a pip-installable package.

fractal task collect [-h] [--python-version PYTHON_VERSION]  [--package-version
        PACKAGE_VERSION]  [--package-extras PACKAGE_EXTRAS]
        [--pinned-dependency PINNED_DEPENDENCY]  [--private]  package

Positional Arguments

  • package: Package name or absolute path to local package.

Named Arguments

  • --python-version: Select the python version to use for this package.

  • --package-version: Select the package version.

  • --package-extras: Comma separated list of extra components for the package to be installed, e.g., collect fractal-tasks-core --package-extras=torch,tensorflow will trigger the installation of fractal-tasks-core[torch,tensorflow].

  • --pinned-dependency: Package/version pair representing a pinned-version dependency, in the form collect fractal-tasks-core --pinned-dependency pydantic=1.10.0. Include --pinned-dependency multiple times to pin several packages to specific versions.

  • --private: Make task group private. Default: False.

task collect-custom

Collect all tasks from a custom Python interpreter.

fractal task collect-custom [-h] [--version VERSION]  (--package-name
        PACKAGE_NAME | --package-root PACKAGE_ROOT)  [--private]  label
        python_interpreter manifest

Positional Arguments

  • label: A common label identifying this package.

  • python_interpreter: Absolute path to the Python interpreter to be used for running tasks.

  • manifest: Local path of the Manifest of the Fractal task package.

Named Arguments

  • --version: Version of tasks to be collected.

  • --package-name: Name of the package, as used in 'import '; this is then used to extract the package directory (package_root) via 'importlib.util.find_spec '.

  • --package-root: The folder where the package is installed. If not provided, it will be automatically inferred based on 'package_name'.

  • --private: Make task group private. Default: False.

task check-collection

Check status of background task collection processes.

fractal task check-collection [-h] [--include-logs]  task_group_activity_id

Positional Arguments

  • task_group_activity_id: Activity ID of the collection (see output of task collect).

Named Arguments

  • --include-logs: Also include task-collection logs. Default: False.

task new

Create new task.

fractal task new [-h] [--command-non-parallel COMMAND_NON_PARALLEL]
        [--command-parallel COMMAND_PARALLEL]  [--version VERSION]
        [--meta-non-parallel META_NON_PARALLEL]  [--meta-parallel META_PARALLEL]
        [--args-schema-non-parallel ARGS_SCHEMA_NON_PARALLEL]
        [--args-schema-parallel ARGS_SCHEMA_PARALLEL]  [--args-schema-version
        ARGS_SCHEMA_VERSION]  [--private]  name

Positional Arguments

  • name: A human readable name for the task.

Named Arguments

  • --command-non-parallel: The non parallel command that executes the task.

  • --command-parallel: The parallel command that executes the task.

  • --version: Task version.

  • --meta-non-parallel: Path to JSON file with meta non parallel arguments.

  • --meta-parallel: Path to JSON file with meta parallel arguments.

  • --args-schema-non-parallel: Path to JSON file with args non parallel arguments.

  • --args-schema-parallel: Path to JSON file with arg parallel arguments.

  • --args-schema-version: Label encoding how the task-arguments JSON Schema was generated (e.g. pydantic_v1).

  • --private: Make task group private. Default: False.

task edit

Edit task.

fractal task edit [-h] (--id ID | --name NAME) [--version VERSION]
        [--new-version NEW_VERSION]  [--command-non-parallel
        COMMAND_NON_PARALLEL]  [--command-parallel COMMAND_PARALLEL]
        [--input-types INPUT_TYPES]  [--output-types OUTPUT_TYPES]

Named Arguments

  • --id: ID of the task to edit.

  • --name: Name of the task to edit.

  • --version: Version of the task to edit (only accepted in combination with --name).

  • --new-version: New task version.

  • --command-non-parallel: New task non parallel command.

  • --command-parallel: New task parallel command.

  • --input-types: Path to JSON file with new input types.

  • --output-types: Path to JSON file with new output types.