(buffer)
| 4770 | throw new python.Error('Unsupported XGBoost binary format.'); |
| 4771 | } |
| 4772 | XGBoosterUnserializeFromBuffer(buffer) { |
| 4773 | if (buffer.length > 2 && buffer[0] === 0x7B && buffer[1] !== 0x22) { |
| 4774 | const obj = execution.invoke('ubjson.loadb', [buffer]); |
| 4775 | this.XGBoosterLoadModel(obj.Model); |
| 4776 | return; |
| 4777 | } |
| 4778 | throw new python.Error('Unsupported XGBoost binary format.'); |
| 4779 | } |
| 4780 | __setstate__(state) { |
| 4781 | const handle = state.get('handle'); |
| 4782 | if (handle) { |
no test coverage detected