Skip to content

Times get converted to numpy datetime64 instead of Python datetime objects for TabularDataset filtering methods #381

@mx-iao

Description

@mx-iao

For the filter_dataset_before_time method,

library(azuremlsdk)
ws = get_workspace('workspace-name')
mydate <- as.POSIXct("2011-05-01 17:55:23")
ds <- get_dataset_by_name(ws, 'test_date', version = "latest")
ds <- filter_dataset_before_time(ds, mydate)

the following error gets thrown:

Error in py_call_impl(callable, dots$args, dots$keywords) : AttributeError: 'numpy.ndarray' object has no attribute 'microsecond'

Looks possibly related to this issue, where POSIXct time is getting automatically converted by reticulate to numpy datetim64 objects rather than Python datetime objects, which is what is expected by the underlying Python SDK filter methods for TabularDatasets.

Methods to fix:

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions