Skip to content

Fix tensor engine unit test failures #571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion monarch_messages/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ pub enum StreamCreationMode {
pub enum CallFunctionError {
#[error("{0}")]
Error(#[from] anyhow::Error),
#[error("Computation depended on an input that failed with errror: {0}")]
#[error("Computation depended on an input that failed with error: {0}")]
DependentError(Arc<CallFunctionError>),
}

Expand Down
6 changes: 3 additions & 3 deletions monarch_tensor_worker/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,7 @@ mod tests {
.context("no such ref")?
.err()
.context("expected error")?;
assert!(mutated_ref.contains("InvalidRemoteFunction"));
assert!(mutated_ref.contains("failed to resolve function"));

let responses = controller_rx.drain();
assert_eq!(
Expand Down Expand Up @@ -2185,7 +2185,7 @@ mod tests {
value
.unwrap_err()
.backtrace
.contains("InvalidRemoteFunction")
.contains("failed to resolve function")
);
}
_ => panic!("unexpected response {:#?}", responses),
Expand All @@ -2198,7 +2198,7 @@ mod tests {
value
.unwrap_err()
.backtrace
.contains("InvalidRemoteFunction")
.contains("failed to resolve function")
);
}
_ => panic!("unexpected response {:#?}", responses),
Expand Down
18 changes: 9 additions & 9 deletions monarch_tensor_worker/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2736,7 +2736,7 @@ mod tests {
let error = result.unwrap().unwrap_err();

// Check that the error contains the expected strings
let error_str = format!("{:?}", error);
let error_str = error.to_string();
assert!(
error_str.contains("recording failed"),
"Error should contain 'recording failed': {}",
Expand Down Expand Up @@ -3034,14 +3034,14 @@ mod tests {
.unwrap()
.unwrap_err();
// Check that the error contains the expected strings
let error_str = format!("{:?}", result_error);
let error_str = result_error.to_string();
assert!(
error_str.contains("recording failed"),
"Error should contain 'recording failed': {}",
error_str
);
assert!(
error_str.contains("torch operator failed"),
error_str.contains("torch operator error"),
"Error should contain 'torch operator failed': {}",
error_str
);
Expand Down Expand Up @@ -3096,7 +3096,7 @@ mod tests {
.unwrap()
.unwrap_err();
// Check that the error contains the expected strings
let error_str = format!("{:?}", result_error);
let error_str = result_error.to_string();
assert!(
error_str.contains("Computation depended on an input that failed"),
"Error should contain dependency message: {}",
Expand All @@ -3118,7 +3118,7 @@ mod tests {
3.into(),
captured_ref,
&mut test_setup.controller_rx,
"RecordingFailed",
"recording failed",
)
.await;

Expand Down Expand Up @@ -3477,7 +3477,7 @@ mod tests {
.unwrap_err();

// Check that the error contains the expected strings
let error_str = format!("{:?}", result_error);
let error_str = result_error.to_string();
assert!(
error_str.contains("Computation depended on an input that failed"),
"Error should contain dependency message: {}",
Expand All @@ -3486,7 +3486,7 @@ mod tests {

// Since we're checking for pointer equality in the original code, we need to ensure
// the error is propagated correctly. We can check that the original error message is contained.
let input_error_str = format!("{:?}", input_error);
let input_error_str = input_error.to_string();
assert!(
error_str.contains(&input_error_str),
"Error should contain the original error: {}",
Expand Down Expand Up @@ -4232,7 +4232,7 @@ mod tests {
.unwrap()
.unwrap_err();
// Check that the error contains the expected string
let error_str = format!("{:?}", real_result_err);
let error_str = real_result_err.to_string();
assert!(
error_str.contains("recording failed"),
"Error should contain 'recording failed': {}",
Expand Down Expand Up @@ -4309,7 +4309,7 @@ mod tests {
.unwrap()
.unwrap_err();
// Check that the error contains the expected strings
let error_str = format!("{:?}", real_result_err);
let error_str = real_result_err.to_string();
assert!(
error_str.contains("Computation depended on an input that failed"),
"Error should contain dependency message: {}",
Expand Down
Loading