Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit34e64d8

Browse files
authored
Make JSON pub and add derives for RankResult (#1513)
1 parent803731b commit34e64d8

File tree

1 file changed

+3
-3
lines changed
  • pgml-extension/src/bindings/transformers

1 file changed

+3
-3
lines changed

‎pgml-extension/src/bindings/transformers/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use anyhow::{anyhow, bail, Context, Result};
77
use pgrx::*;
88
use pyo3::prelude::*;
99
use pyo3::types::{PyBool,PyDict,PyFloat,PyInt,PyList,PyString,PyTuple};
10-
use serde::Deserialize;
10+
use serde::{Deserialize,Serialize};
1111
use serde_json::Value;
1212

1313
usecrate::create_pymodule;
@@ -23,7 +23,7 @@ pub use transform::*;
2323
create_pymodule!("/src/bindings/transformers/transformers.py");
2424

2525
// Need a wrapper so we can implement traits for it
26-
structJson(Value);
26+
pubstructJson(pubValue);
2727

2828
implFrom<Json>forValue{
2929
fnfrom(value:Json) ->Self{
@@ -109,7 +109,7 @@ pub fn embed(transformer: &str, inputs: Vec<&str>, kwargs: &serde_json::Value) -
109109
})
110110
}
111111

112-
#[derive(Deserialize)]
112+
#[derive(Debug,Deserialize,Serialize,PartialEq,Clone)]
113113
pubstructRankResult{
114114
pubcorpus_id:i64,
115115
pubscore:f64,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp