pub struct VerifiedTuple {
pub source_language: Language,
pub target_language: Language,
pub source_code: String,
pub target_code: String,
pub is_correct: bool,
pub execution_time_ms: u64,
}Expand description
Verified transpilation tuple for ML training
Represents a successful transpilation with both source and target code. Used for LLM fine-tuning with entrenar.
Fields§
§source_language: LanguageSource language
target_language: LanguageTarget language
source_code: StringOriginal source code
target_code: StringTranspiled target code
is_correct: boolWhether the transpilation was verified correct (I/O equivalent)
execution_time_ms: u64Execution time in milliseconds
Implementations§
Source§impl VerifiedTuple
impl VerifiedTuple
Sourcepub fn from_test_case(test_case: &TestCase) -> Option<Self>
pub fn from_test_case(test_case: &TestCase) -> Option<Self>
Create from a test case (only if transpilation succeeded)
Trait Implementations§
Source§impl Clone for VerifiedTuple
impl Clone for VerifiedTuple
Source§fn clone(&self) -> VerifiedTuple
fn clone(&self) -> VerifiedTuple
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VerifiedTuple
impl Debug for VerifiedTuple
Source§impl<'de> Deserialize<'de> for VerifiedTuple
impl<'de> Deserialize<'de> for VerifiedTuple
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for VerifiedTuple
impl RefUnwindSafe for VerifiedTuple
impl Send for VerifiedTuple
impl Sync for VerifiedTuple
impl Unpin for VerifiedTuple
impl UnsafeUnpin for VerifiedTuple
impl UnwindSafe for VerifiedTuple
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more