Skip to content

Commit

Permalink
Merge pull request #33 from evaline-ju/basic-ci
Browse files Browse the repository at this point in the history
👷 Add initial CI
  • Loading branch information
evaline-ju authored May 15, 2024
2 parents 1018d24 + 3be8534 commit b27795c
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 10 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build Orchestrator

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build
- name: Lint with clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Check formatting
run: cargo fmt -- -check
- name: Test
run: cargo test

5 changes: 1 addition & 4 deletions src/clients/chunker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ use crate::{
chunkers_service_client::ChunkersServiceClient, BidiStreamingTokenizationTaskRequest,
TokenizationTaskRequest,
},
caikit_data_model::nlp::{
TokenizationResults, TokenizationStreamResult,
},
caikit_data_model::nlp::{TokenizationResults, TokenizationStreamResult},
},
};

Expand Down Expand Up @@ -73,7 +71,6 @@ impl ChunkerClient {
});
Ok(ReceiverStream::new(rx))
}

}

fn request_with_model_id<T>(request: T, model_id: &str) -> Request<T> {
Expand Down
9 changes: 4 additions & 5 deletions src/clients/nlp.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{collections::HashMap, pin::Pin};
use std::collections::HashMap;

use futures::{Stream, StreamExt};
use futures::StreamExt;
use ginepro::LoadBalancedChannel;
use tokio::sync::mpsc;
use tokio_stream::wrappers::ReceiverStream;
Expand All @@ -11,9 +11,8 @@ use crate::{
config::ServiceConfig,
pb::{
caikit::runtime::nlp::{
nlp_service_client::NlpServiceClient,
ServerStreamingTextGenerationTaskRequest, TextGenerationTaskRequest,
TokenClassificationTaskRequest, TokenizationTaskRequest,
nlp_service_client::NlpServiceClient, ServerStreamingTextGenerationTaskRequest,
TextGenerationTaskRequest, TokenClassificationTaskRequest, TokenizationTaskRequest,
},
caikit_data_model::nlp::{
GeneratedTextResult, GeneratedTextStreamResult, TokenClassificationResults,
Expand Down
3 changes: 2 additions & 1 deletion src/orchestrator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ use uuid::Uuid;

use crate::{
clients::{
self, detector::DetectorRequest, ChunkerClient, DetectorClient, GenerationClient, NlpClient, TgisClient,
self, detector::DetectorRequest, ChunkerClient, DetectorClient, GenerationClient,
NlpClient, TgisClient,
},
config::{GenerationProvider, OrchestratorConfig},
models::{
Expand Down

0 comments on commit b27795c

Please sign in to comment.