Index
v2 models module
| MODULE | DESCRIPTION |
|---|---|
accounting |
|
dataset |
|
history |
|
job |
|
profile |
|
project |
|
resource |
|
task |
|
task_group |
|
workflow_template |
|
| CLASS | DESCRIPTION |
|---|---|
AccountingRecord |
AccountingRecord table. |
AccountingRecordSlurm |
AccountingRecordSlurm table. |
DatasetV2 |
Dataset table. |
HistoryImageCache |
HistoryImageCache table. |
HistoryRun |
HistoryRun table. |
HistoryUnit |
HistoryUnit table. |
JobV2 |
Job table. |
LinkUserProjectV2 |
Crossing table between User and ProjectV2 |
Profile |
Profile table. |
ProjectV2 |
Project table. |
Resource |
Resource table. |
TaskGroupV2 |
|
TaskV2 |
Model for the |
WorkflowTemplate |
Model for the |
Classes
AccountingRecord
Bases: Base
AccountingRecord table.
Source code in fractal_server/app/models/v2/accounting.py
AccountingRecordSlurm
Bases: Base
AccountingRecordSlurm table.
Source code in fractal_server/app/models/v2/accounting.py
DatasetV2
Bases: Base
Dataset table.
Source code in fractal_server/app/models/v2/dataset.py
HistoryImageCache
Bases: Base
HistoryImageCache table.
Source code in fractal_server/app/models/v2/history.py
HistoryRun
Bases: Base
HistoryRun table.
Source code in fractal_server/app/models/v2/history.py
HistoryUnit
Bases: Base
HistoryUnit table.
Source code in fractal_server/app/models/v2/history.py
JobV2
Bases: Base
Job table.
- Reference Code Index Index Index Index _job Functions: _write_shutdown_file
Source code in fractal_server/app/models/v2/job.py
LinkUserProjectV2
Bases: Base
Crossing table between User and ProjectV2
Source code in fractal_server/app/models/linkuserproject.py
Profile
Bases: Base
Profile table.
| ATTRIBUTE | DESCRIPTION |
|---|---|
jobs_remote_dir |
Remote path of the job folder (only relevant if
TYPE:
|
name |
Profile name.
TYPE:
|
pixi_cache_dir |
Override for the
TYPE:
|
resource_type |
Type of resource (either
TYPE:
|
ssh_key_path |
Path to the private SSH key of user
TYPE:
|
tasks_remote_dir |
Remote path of the task folder (only relevant if
TYPE:
|
username |
Username to be impersonated, either via
TYPE:
|
Source code in fractal_server/app/models/v2/profile.py
Attributes
jobs_remote_dir = mapped_column(default=lambda: None)
class-attribute
instance-attribute
Remote path of the job folder (only relevant if
resource_type="slurm_ssh").
name = mapped_column(unique=True)
class-attribute
instance-attribute
Profile name.
pixi_cache_dir = mapped_column(default=lambda: None)
class-attribute
instance-attribute
Override for the PIXI_CACHE_DIR variable, which would otherwise default
to the cache subfolder of PIXI_HOME (only relevant if
resource_type="slurm_ssh")
resource_type
instance-attribute
Type of resource (either local, slurm_sudo or slurm_ssh).
ssh_key_path = mapped_column(default=lambda: None)
class-attribute
instance-attribute
Path to the private SSH key of user username (only relevant if
resource_type="slurm_ssh").
tasks_remote_dir = mapped_column(default=lambda: None)
class-attribute
instance-attribute
Remote path of the task folder (only relevant if
resource_type="slurm_ssh").
username = mapped_column(default=lambda: None)
class-attribute
instance-attribute
Username to be impersonated, either via sudo -u or via ssh.
ProjectV2
Bases: Base
Project table.
- Reference Code Index Index Index Index Index _aux_functions Functions: _get_project_check_access
Source code in fractal_server/app/models/v2/project.py
Resource
Bases: Base
Resource table.
| ATTRIBUTE | DESCRIPTION |
|---|---|
host |
Address for ssh connections, when
TYPE:
|
jobs_local_dir |
Base local folder for job subfolders (containing artifacts and logs).
TYPE:
|
jobs_poll_interval |
On SLURM resources: the interval to wait before new
TYPE:
|
jobs_runner_config |
Runner configuration, matching one of |
jobs_slurm_python_worker |
On SLURM deloyments, this is the Python interpreter that runs the
TYPE:
|
name |
Resource name.
TYPE:
|
pip_cache_dir_arg |
If
TYPE:
|
prevent_new_submissions |
When set to true: Prevent new job submissions and stop execution of
TYPE:
|
tasks_local_dir |
Base local folder for task-package subfolders.
TYPE:
|
tasks_pixi_config |
Pixi configuration for task collection. Basic example: |
tasks_python_config |
Python configuration for task collection. Example: |
timestamp_created |
Creation timestamp (autogenerated).
TYPE:
|
type |
One of
TYPE:
|
Source code in fractal_server/app/models/v2/resource.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | |
Attributes
host = mapped_column(default=lambda: None)
class-attribute
instance-attribute
Address for ssh connections, when type="slurm_ssh".
jobs_local_dir
instance-attribute
Base local folder for job subfolders (containing artifacts and logs).
jobs_poll_interval
instance-attribute
On SLURM resources: the interval to wait before new squeue calls.
On local resources: ignored.
jobs_runner_config = mapped_column(JSONB, nullable=False, server_default='{}')
class-attribute
instance-attribute
Runner configuration, matching one of JobRunnerConfigLocal or
JobRunnerConfigSLURM schemas.
jobs_slurm_python_worker = mapped_column(default=lambda: None)
class-attribute
instance-attribute
On SLURM deloyments, this is the Python interpreter that runs the
fractal-server worker from within the SLURM jobs.
name = mapped_column(unique=True)
class-attribute
instance-attribute
Resource name.
pip_cache_dir_arg
property
If pip_cache_dir is set (in self.tasks_python_config), then
return --cache_dir /something; else return --no-cache-dir.
prevent_new_submissions = mapped_column(BOOLEAN, server_default='false', nullable=False)
class-attribute
instance-attribute
When set to true: Prevent new job submissions and stop execution of ongoing jobs as soon as the current task is complete.
tasks_local_dir
instance-attribute
Base local folder for task-package subfolders.
tasks_pixi_config = mapped_column(JSONB, nullable=False, server_default='{}')
class-attribute
instance-attribute
tasks_python_config = mapped_column(JSONB, nullable=False, server_default='{}')
class-attribute
instance-attribute
timestamp_created = mapped_column(DateTime(timezone=True), nullable=False, default=get_timestamp)
class-attribute
instance-attribute
Creation timestamp (autogenerated).
type
instance-attribute
One of local, slurm_sudo or slurm_ssh - matching with
settings.FRACTAL_RUNNER_BACKEND.
TaskGroupV2
Bases: Base
- Reference Code Index
| ATTRIBUTE | DESCRIPTION |
|---|---|
pinned_package_versions_post_string |
Prepare string to be used in
TYPE:
|
pinned_package_versions_pre_string |
Prepare string to be used in
TYPE:
|
pip_install_string |
Prepare string to be used in
TYPE:
|
Source code in fractal_server/app/models/v2/task_group.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | |
Attributes
pinned_package_versions_post_string
property
Prepare string to be used in python -m pip install.
pinned_package_versions_pre_string
property
Prepare string to be used in python -m pip install.
pip_install_string
property
Prepare string to be used in python -m pip install.
TaskV2
Bases: Base
Model for the taskv2 database table.
| ATTRIBUTE | DESCRIPTION |
|---|---|
id |
TYPE:
|
name |
TYPE:
|
type |
TYPE:
|
version |
TYPE:
|
command_non_parallel |
TYPE:
|
command_parallel |
TYPE:
|
meta_non_parallel |
|
meta_parallel |
|
input_types |
|
output_types |
|
taskgroupv2_id |
TYPE:
|
args_schema_version |
TYPE:
|
args_schema_non_parallel |
|
args_schema_parallel |
|
docs_info |
TYPE:
|
docs_link |
TYPE:
|
category |
TYPE:
|
modality |
TYPE:
|
authors |
TYPE:
|
tags |
|
Source code in fractal_server/app/models/v2/task.py
WorkflowTemplate
Bases: Base
Model for the workflowtemplate database table.
| ATTRIBUTE | DESCRIPTION |
|---|---|
id |
TYPE:
|
user_id |
TYPE:
|
name |
TYPE:
|
version |
TYPE:
|
fractal_server_version |
TYPE:
|
timestamp_created |
TYPE:
|
timestamp_last_used |
TYPE:
|
user_group_id |
TYPE:
|
description |
TYPE:
|
data |
|