Skip to content

Commit

Permalink
re-deployed
Browse files Browse the repository at this point in the history
  • Loading branch information
adibaba committed Feb 26, 2022
1 parent 1fe6399 commit 71b4018
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions api/embeddings_cc_index_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@
# Line format: http://dbpedia.org/resource/E734345,0.4001125,[...],-0.015108802
#
# Note: Adding 1,000 embeddings takes around 15 seconds
# time python3 api/embeddings_cc_index_examples.py <PASSWORD> -> 7m47,509s (Reading/parsing: 0m33,909s)
# time python3 api/embeddings_cc_index_examples.py <PASSWORD> -> 7m47,509s (Reading/parsing: ~33s)
# time python3 api/embeddings_cc_index_examples.py 123 http://127.0.0.1:8008 -> 2m10,133s
if False:
csv_file = '/tmp/Shallom_entity_embeddings.csv'
es_index = 'dbpedia_en_fr_15k_v2_shallom'
es_index = 'dbpedia_en_fr_15k_v2_shallom___'
max_docs = 100 * 1000

# Delete index
Expand Down Expand Up @@ -141,4 +141,4 @@ def add_embeddings(api, password, index, embeddings):

# Print number of documents
response = embeddings_cc_index.count(es_index)
print(response.status_code, response.text)
print(response.status_code, response.text)
6 changes: 5 additions & 1 deletion docs/vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@
- `kinit wilke`
- `./scripts/vm-push.sh`
- `ssh [email protected]`
- `. /opt/bashrc.sh`
- `sudo mv /tmp/embeddings.cc/ /opt/embeddings.cc/`
- `mkdir /opt/embeddings.cc/instance`
- `cp /opt/embeddings.cc/config.py /opt/`
- `ln -s /opt/config.py /opt/embeddings.cc/instance/config.py`
- Anaconda environment
- `conda create --name embeddings`
- **`. /opt/anaconda3/etc/profile.d/conda.sh`**
Expand Down Expand Up @@ -85,7 +89,7 @@
- `cd /opt/embeddings.cc/`
- `. /opt/anaconda3/etc/profile.d/conda.sh`
- `conda activate embeddings`
- `export FLASK_APP=webservice`
- `export FLASK_APP=webservice_public`
- `export FLASK_RUN_PORT=8443`
- `flask run --host=0.0.0.0`

Expand Down
2 changes: 1 addition & 1 deletion scripts/vm-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ if ! test -f "README.md"; then
exit
fi

rsync -aP --exclude={'.git','instance','__pycache__','.*'} ./ [email protected]:/tmp/embeddings.cc
rsync -aP --exclude={'instance','__pycache__','.*'} ./ [email protected]:/tmp/embeddings.cc

0 comments on commit 71b4018

Please sign in to comment.