Skip to content

Commit

Permalink
🚨 Make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
albertsgarde committed Jan 28, 2024
1 parent 019ec70 commit cb662ac
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pre-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
RUSTFLAGS: "-Dwarnings"

jobs:
build:
rust:

runs-on: ubuntu-latest

Expand Down
10 changes: 5 additions & 5 deletions python/deepdecipher/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from .deepdecipher import (
log_init,
start_server,
Database,
DataType,
DataTypeHandle,
Index,
ModelHandle,
ModelMetadata,
DataTypeHandle,
DataType,
ServiceHandle,
ServiceProvider,
Index,
log_init,
start_server,
)

deepdecipher.setup_keyboard_interrupt()
2 changes: 1 addition & 1 deletion src/data/retrieve/neuroscope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async fn scrape_neuron_page_to_database(
let model_name = model.name();
let first_text = page
.texts()
.get(0)
.first()
.with_context(|| format!("Failed to get first text from neuroscope page for neuron {neuron_index} in model '{model_name}'."))?;
let activation_range = first_text.max_activation() - first_text.min_activation();

Expand Down
14 changes: 7 additions & 7 deletions src/server/service_providers/service_provider.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{future::Future, pin::Pin};

use anyhow::{bail, Context, Result};
use anyhow::{anyhow, Context, Result};
use async_trait::async_trait;
use delegate::delegate;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -46,11 +46,11 @@ pub trait ServiceProviderTrait: Clone + Serialize + Deserialize<'static> + Send
query: &serde_json::Value,
model_handle: &ModelHandle,
) -> Result<Self::ModelPageObject> {
bail!(
Err(anyhow!(
"No model data exists for service '{}' for model '{}'.",
service_name,
model_handle.name()
);
))
}

async fn layer_object(
Expand All @@ -61,11 +61,11 @@ pub trait ServiceProviderTrait: Clone + Serialize + Deserialize<'static> + Send
model_handle: &ModelHandle,
layer_index: u32,
) -> Result<Self::LayerPageObject> {
bail!(
Err(anyhow!(
"No layer data exists for service '{}' for model '{}'.",
service_name,
model_handle.name()
);
))
}

async fn neuron_object(
Expand All @@ -77,11 +77,11 @@ pub trait ServiceProviderTrait: Clone + Serialize + Deserialize<'static> + Send
layer_index: u32,
neuron_index: u32,
) -> Result<Self::NeuronPageObject> {
bail!(
Err(anyhow!(
"No neuron data exists for service '{}' for model '{}'.",
service_name,
model_handle.name()
);
))
}

async fn model_binary(
Expand Down

0 comments on commit cb662ac

Please sign in to comment.