Skip to content

Commit

Permalink
Added performance testing (#119)
Browse files Browse the repository at this point in the history
* Removed print

* Updated to consume modular entity standardizer

* Updated to consume modular entity standardizer

* Removed pickle file names

* Removed pt files

* Removed wikidata

* Removed old model_objects

* Added models

* Updated to pass unit tests

* Updated requirements

* Updated requirements

* Added tfidf package

* Added tfidf installation

* Removed dist

* Modular entity standardizer

* Removed links

* Added source

* Removed non=modular python files

* Moving events.py to top level

* Commit

* Update structure

* Updated to add dist/

* Updated names

* Updated names

* Added requirement.txt for service

* Moved sql files

* Updated to remove aca_

* Updated git actions

* Updated git actions

* Updated

* Updated

* Updated

* tfidf -> wdapi

* Added config.py

* Added config directory

* Added files

* Added generator

* Added spqrql wrapper package

* Updated

* Updated with gnn requirements

* Added tfidf model files

* Removed backup file

* Removed another backup

* Updated

* Deleted

* Upodated vagrant file

* Updated log and print message

* Minor edit

* Updated setup.sh

* Updated

* Updated

* Updated

* Updated

* Update

* Updated to merge utils_nlp

* Consolidated almost duplicate files

* Added runtime reporting for tfidf training

* Updated import

* Added training runtime

* Fixed indentation

* Updated dict key

* Minor error

* Updates

* Updated

* Minor edit

* Updated README, clean and run scripts

* Added vagrant instruction

* Updated readme

* Updated readme

* Updated readme

* Updated readme

* Updated readme

* Removed

* Added

* Edited

* Updated README

* Added

* Line continue

* Removed conflicting file

* Updated to have a single package for all entity_standardizer modules

* Restructured entity_standardizer directory

* Updated setup

* Modified structure

* Updated

* Committed Dockerfile

* Updated

* Updated workflow

* Updated setup

* Updated for compatibility

* Added deepdiff

* Updated

* Added C++ requirement for gensim

* Spelling error

* Updated to remove unused packages and c++14 dependency

* Updated README

* Updated Dockerfile for Openshift deployment

* Added files for direct container deployment

* iUpdated

* Updated

* Added build step

* Updated

* Updated

* Updated to simplify deployment

* No need for whl

* Added dist

* Updated readme

* Updated

* Updated

* Removed requirements

* Updated

* Updated Dockerfile to build entity_standardizer and generate
data/models.

* Updated README

* Updated to simplify README

* Moved .py files into service

* Updated

* Updated

* Updated

* changed import

* Updated to point to konveyor

* Updated

* For debugging empty object

* Debugging openshift runtime error

* For debug

* For debug

* Updated

* Removed logging

* Updated log file

* Updated log file

* Moved config.py into service

* Added waitress to run standalone service on windows

* removed legacy notations

* Updated to fix Input parsing error #35

* Updated to add all mentions as training data for deployment

* Restored accidental delete

* Updated to not respond with bad input request when unknown technology is
detected

* Updated logger

* Minor edit

* Point deploy.sh to konveryor

* Fixed logger

* Added performance testing

Co-authored-by: Mihir Choudhury <choudhury@us.ibm.com>
Co-authored-by: mmerler <michele.merler@gmail.com>
  • Loading branch information
3 people authored Apr 14, 2022
1 parent 0b772d5 commit 875892c
Show file tree
Hide file tree
Showing 14 changed files with 110,158 additions and 32 deletions.
34 changes: 8 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,6 @@ in the [Developer's Guide](docs/development.md) before proceeding further.

## Running TCA as a service

<!-- **STEP 1 - SETUP** -->

<!-- In order to setup the environment and generate the resources needed by the backend API, run the bash script ``setup.sh`` -->
<!-- ```bash -->
<!-- bash setup.sh -->
<!-- ``` -->

<!-- **STEP 2 - CHECK SUCCESSFUL SETUP** -->
<!-- Do not proceed to the next step if the final output of the ``setup.sh`` bash script is not the following one: -->
<!-- ```bash -->
<!-- -----------Set up for Tackle Containerzation Adviser Completed !!!--------- -->
<!-- ``` -->

There are 4 options for deploying TCA as a service.

1. Install the service requirements and start the service from command line.
Expand Down Expand Up @@ -93,20 +80,15 @@ bash run.sh
bash deploy.sh
```

<!-- ## Updating TCA's Knowledge Base -->
<!-- If you want to make changes to TCA's Knowledge Base, make sure that you have created a proper development environment by following the setup procedure in the [Developer's Guide](docs/development.md) and then please follow the instructions below. -->
<!-- ### Setup TCA's environment by running the following -->
<!-- ``` -->
<!-- bash setup.sh -->
<!-- ``` -->
<!-- ### Update TCA's Knowledge Base -->
<!-- For updating the TCA's Knowledge Base, enter in the *db* folder. Upload the DB file in a tool such DBeaver. Once you have completed making changes, generate a new .sql file and update the existing .sql file with the new file. -->
<!-- ### Clean up TCA's environment by running the following and then rerun the setup. -->
<!-- ``` -->
<!-- bash clean.sh -->
<!-- bash setup.sh -->
<!-- ``` -->
## Run a performance test for TCA service
A performance test measures the response time of TCA service under
various load conditions. Before running
performance test, update *config/test.ini* with the hostname
and port where TCA service has been deployed

```
python test/performance/run_payload.py <#users> <#applications/user>
```

## Running TCA with a new version of Knowledge Base

Expand Down
3 changes: 3 additions & 0 deletions config/test.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[performance]
host=http://localhost
port=8000
1 change: 0 additions & 1 deletion docker-compose-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ services:
retries: 3
networks:
- overlay

networks:
overlay:
2 changes: 0 additions & 2 deletions service/entity_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ def __init__(self, logger=False):
self.__class_type_mapper = {}
self.logger.error(f'class_type_mapper[{class_type_mapper_filepath}] is empty or not exists')

# self.__sim = sim_applier()

self.NA_CATEGORY=config['NA_VALUES']['NA_CATEGORY']
self.NA_VERSION = config['NA_VALUES']['NA_VERSION']

Expand Down
5 changes: 2 additions & 3 deletions service/standardizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def version_standardizer(mention, top_entity_prediction):


def entity_standardizer(mentions):
logger = logging.getLogger('planner')
logger = logging.getLogger('standardizer')
logger.setLevel(logging.INFO)
config = configparser.ConfigParser()
common = os.path.join("config", "common.ini")
Expand Down Expand Up @@ -66,8 +66,7 @@ def entity_standardizer(mentions):
print(f"No predictions for {mention}")
logger.error(f"No predictions for {mention}")
continue
entities[mention] = predictions
logger.info(f"TFIDF took {tfidf_end - tfidf_start} seconds.")
entities[mention] = predictions

return entities

Expand Down
Loading

0 comments on commit 875892c

Please sign in to comment.