Skip to content

Commit

Permalink
Hotfix/service api fixes (#78)
Browse files Browse the repository at this point in the history
* Updated embedder API and examples

* Updated the notebooks

Co-authored-by: Mohameth François SY <[email protected]>
  • Loading branch information
eugeniashurko and MFSY authored Jul 28, 2021
1 parent f5cc14d commit 838e9e0
Show file tree
Hide file tree
Showing 5 changed files with 20,716 additions and 6 deletions.
2 changes: 1 addition & 1 deletion services/embedder/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ paths:
'404'
description: Is returned when the model does not exist.

/models/{model_name}/details/{component}:
/models/{model_name}/{component}:
get:
summary: Get details on the embedding model component. Component values can be
"preprocessor", "embedder", "similarity-processor"
Expand Down
4 changes: 2 additions & 2 deletions services/embedder/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def _get_meta_data(model_name, file):
for f in os.listdir(app.config["DOWNLOAD_DIR"]):
try:
os.remove(os.path.join(app.config["DOWNLOAD_DIR"], f))
except:
except Exception:
shutil.rmtree(os.path.join(app.config["DOWNLOAD_DIR"], f))
else:
# Fetch from a local dir
Expand Down Expand Up @@ -338,7 +338,7 @@ def handle_similar_points_request(model_name):
)


@app.route("/models/<model_name>/info/<component_name>/")
@app.route("/models/<model_name>/<component_name>/")
def handle_info_request(model_name, component_name):
"""Handle request of details on different model components."""
if model_name in app.models:
Expand Down
7 changes: 4 additions & 3 deletions services/embedder/configs/forge_configs/forge-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ Model:

Store:
name: BlueBrainNexus
endpoint: https://staging.nexus.ocp.bbp.epfl.ch/v1
bucket: dke/embedder_catalog
endpoint: https://bbp.epfl.ch/nexus/v1
bucket: "dke/embedding-pipelines"
searchendpoints:
sparql:
endpoint: "https://bluebrain.github.io/nexus/vocabulary/defaultSparqlIndex"
vocabulary:
iri: "https://bluebrain.github.io/nexus/contexts/resource.json"
iri: "https://bluebrain.github.io/nexus/contexts/metadata.json"
namespace: "https://bluebrain.github.io/nexus/vocabulary/"
deprecated_property: "https://bluebrain.github.io/nexus/vocabulary/deprecated"
project_property: "https://bluebrain.github.io/nexus/vocabulary/project"
max_connection: 50
versioned_id_template: "{x.id}?rev={x._store_metadata._rev}"
file_resource_mapping: https://raw.githubusercontent.com/BlueBrain/nexus-forge/master/examples/configurations/nexus-store/file-to-resource-mapping.hjson

Expand Down
Binary file modified services/embedder/downloads/Attri2vec_test_model.zip
Binary file not shown.
Loading

0 comments on commit 838e9e0

Please sign in to comment.