hi, @<1523701070390366208:profile|CostlyOstrich36>
sure:
from clearml.automation.controller import PipelineDecorator
@PipelineDecorator.component(return_values=['img'])
def get_image(image_path):
import cv2
img = cv2.imread(image_path)
img = img[..., ::-1]
return img
@PipelineDecorator.pipeline(
project='test',
name='test pipeline',
version='0.0.1',
return_value='result',
)
def executing_pipeline(params):
print(params)
result = get_image(params['image_path'])
return result
if __name__ == '__main__':
params = {'image_path': ''}
PipelineDecorator.run_locally()
executing_pipeline(params)
python test.py
will results in:
Launching step [get_image]
File "/tmp/tmp7drwjuy0.py", line 8
img = img[(..., ::(- 1))]
^
SyntaxError: invalid syntax
Hi @<1523703107031142400:profile|FlatOctopus65> , can you please elaborate on what exactly happens and when? Do you have a snippet to play with ?
@<1523701070390366208:profile|CostlyOstrich36> sorry for the typo
Hi @<1523703107031142400:profile|FlatOctopus65> ! python3.9 introduced a breaking change for codebases that parse code containing slices. You can read more about it here: None . Notable:
* The code that produces a Python code from AST will need to handle indexing with tuples specially (see Tools/parser/unparse.py) because d[(a, b)] is valid syntax (although parenthesis are redundant), but d[(a, b:c)] is not.
What you could do is downgrade to Python 3.8 or use the slice
function:img = img[..., slice(None, None, -1)]
Hope this workaround works for you until we fix this