remote
This module provides a simple self-standing script that executes arbitrary python code received via pickled files on a cluster node.
ExceptionProxy
¶
Proxy class to serialise exceptions
In general exceptions are not serialisable. This proxy class saves the serialisable content of an exception. On the receiving end, it can be used to reconstruct a TaskExecutionError.
Attributes:
Name | Type | Description |
---|---|---|
exc_type_name |
str
|
Name of the exception type |
tb |
str
|
TBD |
args |
TBD |
|
kwargs |
dict
|
TBD |
Source code in fractal_server/app/runner/executors/slurm/remote.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
FractalVersionMismatch
¶
Bases: RuntimeError
Custom exception for version mismatch
Source code in fractal_server/app/runner/executors/slurm/remote.py
54 55 56 57 58 59 |
|
_check_versions_mismatch(server_versions)
¶
Compare the server {python,cloudpickle,fractal_server} versions with the ones available to the current worker
Parameters:
Name | Type | Description | Default |
---|---|---|---|
server_versions |
dict[Literal['python', 'fractal_server', 'cloudpickle'], Union[str, tuple[int]]]
|
The version used in the fractal-server instance that created the cloudpickle file |
required |
Raises:
Type | Description |
---|---|
FractalVersionMismatch
|
If the cloudpickle or fractal_server versions do not match with the ones on the server |
Source code in fractal_server/app/runner/executors/slurm/remote.py
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 |
|
worker(*, in_fname, out_fname, extra_import_paths=None)
¶
Execute a job, possibly on a remote node.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
in_fname |
str
|
Absolute path to the input pickle file (must be readable). |
required |
out_fname |
str
|
Absolute path of the output pickle file (must be writeable). |
required |
extra_import_paths |
Optional[str]
|
Additional import paths |
None
|
Source code in fractal_server/app/runner/executors/slurm/remote.py
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 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
|