Skip to content

Commit

Permalink
Revert "Always configure the pipeline_loader instead of custom_loader…
Browse files Browse the repository at this point in the history
… when choosing a loader, since the latter is always None (fixes stefan-jansen#218)"

This reverts commit 8165deb.
  • Loading branch information
phelps-sg committed Oct 21, 2023
1 parent 8165deb commit c25081b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/zipline/utils/run_algo.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,13 @@ def _run(
bundle_data.adjustment_reader,
)

def choose_loader(_column):
return pipeline_loader
def choose_loader(column):
if column in USEquityPricing.columns:
return pipeline_loader
try:
return custom_loader.get(column)
except KeyError:
raise ValueError("No PipelineLoader registered for column %s." % column)

if isinstance(metrics_set, str):
try:
Expand Down

0 comments on commit c25081b

Please sign in to comment.