diff --git a/.github/workflows/model-server-tests.yml b/.github/workflows/model-server-tests.yml index 5727aaff..1b33b5fc 100644 --- a/.github/workflows/model-server-tests.yml +++ b/.github/workflows/model-server-tests.yml @@ -23,16 +23,22 @@ jobs: with: python-version: "3.10" # Adjust to your Python version - # Step 3: Install dependencies (from requirements.txt or Pipfile) + # Step 3: Install Poetry + - name: Install Poetry + run: | + curl -sSL https://install.python-poetry.org | python3 - + export PATH="$HOME/.local/bin:$PATH" + + # Step 4: Install dependencies using Poetry - name: Install dependencies run: | cd model_server - pip install --upgrade pip - pip install -r requirements.txt # Or use pipenv install - pip install pytest + poetry install - # Step 4: Set PYTHONPATH and run tests + # Step 5: Set PYTHONPATH and run tests - name: Run model server tests with pytest + env: + PYTHONPATH: model_server # Ensure the app's path is available run: | cd model_server - PYTHONPATH=. pytest --maxfail=5 --disable-warnings + poetry run pytest --maxfail=5 --disable-warnings diff --git a/demos/hr_agent/arch_config.yaml b/demos/hr_agent/arch_config.yaml index 6bbca230..bb1b32ca 100644 --- a/demos/hr_agent/arch_config.yaml +++ b/demos/hr_agent/arch_config.yaml @@ -24,7 +24,7 @@ endpoints: # default system prompt used by all prompt targets system_prompt: | - You are a HR agent assistant that helps HR decision makers with reporting and workfoce planning. Nothing else. Please stay on topic of HR. + You are a Workforce agent assistant that helps workforce planning and HR decision makers with reporting and workfoce planning. NOTHING ELSE. Please stay on topic of workforce planning and HR. prompt_targets: - name: hr_qa @@ -41,12 +41,12 @@ prompt_targets: parameters: - name: staffing_type type: str - description: The staffing type like contract, fte or agency + description: Staffing type like contract, fte or agency required: true - name: region type: str required: true - description: the geographical region for which you want workforce data. + description: Geographical region for which you want workforce data like asia, europe, americas. - name: point_in_time type: int required: false diff --git a/demos/hr_agent/main.py b/demos/hr_agent/main.py index 1b4bd563..6ffe7cdc 100644 --- a/demos/hr_agent/main.py +++ b/demos/hr_agent/main.py @@ -50,7 +50,7 @@ def get_workforce(request: WorkforceRequset): "region": region, "staffing_type": f"Staffing agency: {staffing_type}", "headcount": f"Headcount: {int(workforce_data_df[(workforce_data_df['region']==region) & (workforce_data_df['point_in_time']==point_in_time)][staffing_type].values[0])}", - "satisfaction": f"Satisifaction: {float(workforce_data_df[(workforce_data_df['region']==region) & (workforce_data_df['point_in_time']==point_in_time)][satisfaction].values[0])}", + "satisfaction": f"Satisifaction: {float(workforce_data_df[(workforce_data_df['region']==region) & (workforce_data_df['point_in_time']==point_in_time)]['satisfaction'].values[0])}", } return response