Yeah, I understand that it's a bit confusing what I'm asking. Here's a sample code:
` from clearml.automation.controller import PipelineDecorator
@PipelineDecorator.component(cache=True)
def step_one():
import numpy as np
image = np.ones((100, 100, 3))
crop = image[0:50, 0:50]
print("here's my crop of shape:", crop.shape)
@PipelineDecorator.pipeline(name='custom pipeline logic', project='examples', version='0.0.5')
def executing_pipeline():
step_one()
if name == 'main':
PipelineDecorator.run_locally()
executing_pipeline() `
Hi SmugSnake6 , can you add a small snippet to reproduce?
So this seems like it could work as a work-around:
` Python 3.10.6 (main, Aug 10 2022, 11:40:04) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import numpy as np
a = np.ones((100, 100, 3))
a.take(range(40), 0).take(range(40), 1).shape
(40, 40, 3)replaces a[0:40, 0:40] `
This crashes with:File "/tmp/tmpa5l_cvuv.py", line 8 crop = image[(0:50, 0:50)] ^ SyntaxError: invalid syntax
Also, I'm not sure I understand exactly what you're expecting to get and what you're getting
This however works fine:
` Python 3.10.6 (main, Aug 10 2022, 11:40:04) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import numpy as np
a = np.ones((100, 100, 3))
a[0:50, 0:50].shape
(50, 50, 3)
`