I'm trying to set an OTV project using Python API
')
# can customize the spec as needed
spec = dr.DatetimePartitioningSpecification(datetime_partition_column = "date",
holdout_start_date=datetime(2022,5,11),
holdout_end_date=datetime(year=2022, month=7, day=11),
number_of_backtests = 2,
use_time_series = False)
project.analyze_and_model('target')
partitioning_preview = dr.DatetimePartitioning.generate_optimized(project.id, spec,"target")
# the preview generated is based on the project's data
project.set_datetime_partitioning = spec
, following the direction in here . Unfortunately, when I checked DataRobot the GUI after running.
project.analyze_and_model('target')
this statement, I see that no-time-series partitioning was performed. What am I missing?
Any help will be appreciated.
Solved! Go to Solution.
Here is the solution:
project.analyze_and_model('target', partitioning_method=partitioning_preview.to_specification())
I found out that I just needed to add partitioning_preview.to_specification() . The function doesn't take spec directly
Here is the solution:
project.analyze_and_model('target', partitioning_method=partitioning_preview.to_specification())
I found out that I just needed to add partitioning_preview.to_specification() . The function doesn't take spec directly