Skip to content

Commit

Permalink
fix inconsistant naming of collections
Browse files Browse the repository at this point in the history
  • Loading branch information
Wrede committed Oct 4, 2024
1 parent 3450880 commit db425d6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
5 changes: 4 additions & 1 deletion fedn/network/api/v1/inference_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@

from fedn.network.api.auth import jwt_auth_required
from fedn.network.api.shared import control
from fedn.network.api.v1.shared import api_version
from fedn.network.api.v1.shared import api_version, mdb
from fedn.network.storage.statestore.stores.inference_store import InferenceStore

bp = Blueprint("inference", __name__, url_prefix=f"/api/{api_version}/infer")

inference_store = InferenceStore(mdb, "control.inferences")


@bp.route("/start", methods=["POST"])
@jwt_auth_required(role="admin")
Expand Down
4 changes: 4 additions & 0 deletions fedn/network/api/v1/status_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,12 @@ def get_statuses():
limit, skip, sort_key, sort_order, use_typing = get_typed_list_headers(request.headers)
kwargs = request.args.to_dict()

# print all the typed headers
print(f"limit: {limit}, skip: {skip}, sort_key: {sort_key}, sort_order: {sort_order}, use_typing: {use_typing}")
print(f"kwargs: {kwargs}")
statuses = status_store.list(limit, skip, sort_key, sort_order, use_typing=use_typing, **kwargs)

print(f"statuses: {statuses}")
result = [status.__dict__ for status in statuses["result"]] if use_typing else statuses["result"]

response = {"count": statuses["count"], "result": result}
Expand Down
6 changes: 3 additions & 3 deletions fedn/network/combiner/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
mdb: Database = mc[network_id]

client_store = ClientStore(mdb, "network.clients")
validation_store = ValidationStore(mdb, "network.validations")
validation_store = ValidationStore(mdb, "control.validations")
combiner_store = CombinerStore(mdb, "network.combiners")
status_store = StatusStore(mdb, "network.status")
inference_store = InferenceStore(mdb, "network.inferences")
status_store = StatusStore(mdb, "control.status")
inference_store = InferenceStore(mdb, "control.inferences")

repository = Repository(modelstorage_config["storage_config"], init_buckets=False)

Expand Down

0 comments on commit db425d6

Please sign in to comment.