Skip to content

Conversation

AdilZouitine
Copy link
Member

  • Introduced to_tensor function using singledispatch to handle various input types, including scalars, arrays, and dictionaries, converting them to PyTorch tensors.
  • Replaced previous tensor conversion logic in gym_action_processor, normalize_processor, and test_converters with the new to_tensor function for improved readability and maintainability.

- Introduced `to_tensor` function using `singledispatch` to handle various input types, including scalars, arrays, and dictionaries, converting them to PyTorch tensors.
- Replaced previous tensor conversion logic in `gym_action_processor`, `normalize_processor`, and `test_converters` with the new `to_tensor` function for improved readability and maintainability.
- Updated tests to cover new functionality and ensure correct tensor conversion behavior.
@imstevenpmwork imstevenpmwork added the enhancement Suggestions for new features or improvements label Sep 2, 2025
@imstevenpmwork imstevenpmwork self-requested a review September 2, 2025 11:28
@imstevenpmwork imstevenpmwork merged commit a837685 into user/azouitine/2025-7-4-convert-codebase-with-pipeline Sep 2, 2025
2 of 3 checks passed
@imstevenpmwork imstevenpmwork deleted the refactor/converting_data_type_to_tensor branch September 2, 2025 11:28
@imstevenpmwork imstevenpmwork restored the refactor/converting_data_type_to_tensor branch September 2, 2025 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Suggestions for new features or improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants