File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/pydvl/valuation/samplers Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -255,12 +255,16 @@ def batches_from_data(self, data: Dataset) -> BatchGenerator:
255255 break
256256
257257 def generate_batches (self , indices : IndexSetT ) -> BatchGenerator :
258- raise AttributeError ("Cannot sample from indices directly. Call `from_data()`." )
258+ raise AttributeError (
259+ "Cannot sample from indices directly. Call `batches_from_data()`."
260+ )
259261
260262 def generate (self , indices : IndexSetT ) -> SampleGenerator :
261263 """This is not needed because this sampler is used by calling the `from_data`
262264 method instead of the `generate_batches` method."""
263- raise AttributeError ("Cannot sample from indices directly." )
265+ raise AttributeError (
266+ "Cannot sample from indices directly. Call `samples_from_data()`."
267+ )
264268
265269 def log_weight (self , n : int , subset_len : int ) -> float :
266270 """CW-Shapley uses the evaluation strategy from the in-class sampler, so this
You can’t perform that action at this time.
0 commit comments