This repository was archived by the owner on Dec 20, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,14 @@ def get_order_rewards(cls, block_range: BlockRange) -> DataFrame:
88
88
89
89
# Solvers do not appear in both environments!
90
90
assert set (prod .solver ).isdisjoint (set (barn .solver )), "solver overlap!"
91
- return pd .concat ([prod , barn ])
91
+ if not prod .empty and not barn .empty :
92
+ return pd .concat ([prod , barn ])
93
+ elif not prod .empty :
94
+ return prod .copy ()
95
+ elif not barn .empty :
96
+ return barn .copy ()
97
+ else :
98
+ return pd .DataFrame ()
92
99
93
100
@classmethod
94
101
def get_batch_rewards (cls , block_range : BlockRange ) -> DataFrame :
@@ -116,4 +123,11 @@ def get_batch_rewards(cls, block_range: BlockRange) -> DataFrame:
116
123
117
124
# Solvers do not appear in both environments!
118
125
assert set (prod .solver ).isdisjoint (set (barn .solver )), "solver overlap!"
119
- return pd .concat ([prod , barn ])
126
+ if not prod .empty and not barn .empty :
127
+ return pd .concat ([prod , barn ])
128
+ elif not prod .empty :
129
+ return prod .copy ()
130
+ elif not barn .empty :
131
+ return barn .copy ()
132
+ else :
133
+ return pd .DataFrame ()
You can’t perform that action at this time.
0 commit comments