Skip to content

Commit

Permalink
fixed bug in Interactions.from_raw
Browse files Browse the repository at this point in the history
  • Loading branch information
feldlime committed Dec 3, 2023
1 parent 9e11b63 commit 897674b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Loosened `pandas`, `torch` and `torch-light` versions for `python >= 3.8` ([#58](https://github.com/MobileTeleSystems/RecTools/pull/58))

### Fixed
- Bug in `Interactions.from_raw` method ([#58](https://github.com/MobileTeleSystems/RecTools/pull/58))


## [0.4.2] - 01.12.2023

Expand Down
4 changes: 2 additions & 2 deletions rectools/dataset/interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ def from_raw(
Columns.Item: item_id_map.convert_to_internal(interactions[Columns.Item]),
},
)
df[Columns.Weight] = interactions[Columns.Weight]
df[Columns.Datetime] = interactions[Columns.Datetime]
df[Columns.Weight] = interactions[Columns.Weight].values
df[Columns.Datetime] = interactions[Columns.Datetime].values
cls._convert_weight_and_datetime_types(df)

return cls(df)
Expand Down

0 comments on commit 897674b

Please sign in to comment.