Skip to content

Commit 6c6f713

Browse files
committed
pyo3 onnx update
1 parent ca3fdb7 commit 6c6f713

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

candle-pyo3/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1612,7 +1612,7 @@ fn candle(py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> {
16121612
m.add_submodule(&nn)?;
16131613
#[cfg(feature = "onnx")]
16141614
{
1615-
let onnx = PyModule::new_bound(py, "onnx")?;
1615+
let onnx = PyModule::new(py, "onnx")?;
16161616
candle_onnx_m(py, &onnx)?;
16171617
m.add_submodule(&onnx)?;
16181618
}

candle-pyo3/src/onnx.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ impl PyONNXTensorDescriptor {
3939
/// The shape of the tensor.
4040
/// &RETURNS&: Tuple[Union[int,str,Any]]
4141
fn shape(&self, py: Python) -> PyResult<Py<PyTuple>> {
42-
let shape = PyList::empty_bound(py);
42+
let shape = PyList::empty(py);
4343
if let Some(d) = &self.0.shape {
4444
for dim in d.dim.iter() {
4545
if let Some(value) = &dim.value {
@@ -128,14 +128,14 @@ impl PyONNXModel {
128128
}
129129

130130
#[getter]
131-
/// The producer of the model.
132-
/// &RETURNS&: str
131+
/// The producer of the model.
132+
/// &RETURNS&: str
133133
fn producer_name(&self) -> String {
134134
self.0.producer_name.clone()
135135
}
136136

137137
#[getter]
138-
/// The version of the producer of the model.
138+
/// The version of the producer of the model.
139139
/// &RETURNS&: str
140140
fn producer_version(&self) -> String {
141141
self.0.producer_version.clone()

0 commit comments

Comments
 (0)