ConditionComparison fails if `left` is a primitive such as `float` or `int`
Describe the bug
ConditionComparison fails if left is a primitive such as a float or int.
https://github.com/aws/sagemaker-python-sdk/blob/0a0b6e65288496ad33fd5ee34020665aced02156/src/sagemaker/workflow/conditions.py#L82
This line should be "LeftValue": primitive_or_expr(self.left) matching the line below it or, if current behavior is expected, then documentation should be updated and primitives should not be expected for left.
To reproduce
Create a ConditionGreatherThanOrEqualTo object and set both left and right to primitives such as 1.0 and 0.0.
Expected behavior
Primitives should not cause conditions to fail.
Screenshots or logs
This is a partial version of my code:
This was the result when starting a pipeline:
System information
Running sagemaker==2.74.0 on python==3.8.12 in a custom kernel image attached to SageMaker Studio.
Additional context
None.
Good catch, the left value should allow primitives as well. See PR above
@kevinnowland We have merged the PR with the changes. Can you please check if it solves your issue ?
Closing as https://github.com/aws/sagemaker-python-sdk/issues/2843 should have fixed it. Feel free to reopen if needed.