(self, split_infos: splits_lib.SplitDict)
| 35 | drop_remainder: bool |
| 36 | |
| 37 | def to_absolute(self, split_infos: splits_lib.SplitDict): |
| 38 | # Extract the absolute instructions |
| 39 | # One absolute instruction is created per `+`, so `train[:54%]+train[60%:]` |
| 40 | # will create 2 absolute instructions. |
| 41 | read_instruction = splits_lib.AbstractSplit.from_spec(self.split) |
| 42 | absolute_instructions = read_instruction.to_absolute(split_infos) |
| 43 | |
| 44 | # Create the subsplit |
| 45 | read_instructions_for_index = [ |
| 46 | self._absolute_to_read_instruction_for_index(abs_inst, split_infos) |
| 47 | for abs_inst in absolute_instructions |
| 48 | ] |
| 49 | instuctions = functools.reduce(operator.add, read_instructions_for_index) |
| 50 | return instuctions.to_absolute(split_infos) |
| 51 | |
| 52 | def _absolute_to_read_instruction_for_index( |
| 53 | self, |
nothing calls this directly
no test coverage detected