Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8d07f0a
Started migration from Data2dLayer to DataLayer
Dec 15, 2023
02c6ae6
Makes preparations for metrics logging on python
Nov 28, 2023
aea60ad
Adaptates code for new 4D blob
Dec 11, 2023
9c416db
cpprest CI support
Artem-Goldenberg Dec 11, 2023
2ff4066
Add load possibility for zip
MaxVorosh Dec 10, 2023
60ec524
Add load possibility for png on predict
MaxVorosh Dec 14, 2023
b16e7af
GRA-122: Data loader implementation (#67)
MaxVorosh Dec 13, 2023
1621b6d
ID-154: Loss type selection (#70)
AntoxaBarin Dec 14, 2023
aefce3a
ID-171: Fix input selection (#69)
AntoxaBarin Dec 14, 2023
8303c90
Change train and predict for zip file case
MaxVorosh Dec 14, 2023
7965591
Starts fixing train
Dec 15, 2023
c1835c1
Fixes train with dataloader
Dec 15, 2023
41e75f0
It's not fucking working :(
Dec 15, 2023
e2d1914
It's not fucking working :(
Dec 18, 2023
9854021
Input selection bug fix
AntoxaBarin Dec 18, 2023
47b519c
Started migration from Data2dLayer to DataLayer
Dec 15, 2023
dad95f8
Follow up review
Dec 19, 2023
d5c7564
Merge branch 'task181_train_with_dataloader' into input_selection_bugfix
AntoxaBarin Dec 19, 2023
96dbd24
Follow up review
Dec 19, 2023
2899fcb
Merge branch 'task181_train_with_dataloader' into input_selection_bugfix
AntoxaBarin Dec 19, 2023
dfacf4b
Make formats
AntoxaBarin Dec 19, 2023
73d8f80
Fix bug (not deleting connection after deleting layer)
AntoxaBarin Dec 19, 2023
80fb20e
Minor changes in cpp_server
AntoxaBarin Dec 20, 2023
95edbe4
Merge remote-tracking branch 'origin/main' into input_selection_bugfix
AntoxaBarin Dec 21, 2023
708e862
tests fix
Artem-Goldenberg Dec 21, 2023
d47676f
Fix order of addition inputs in layer
AntoxaBarin Dec 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ jobs:
- name: install-cpprest
run: sudo apt install libcpprest-dev

- name: install-cpprest
run: sudo apt install libcpprest-dev

- name: install-boost
uses: MarkusJx/install-boost@v2.4.4
id: install-boost
Expand Down
28 changes: 25 additions & 3 deletions client/templates/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ <h3></h3>
deleteLayer(layer_to_delete).then(response => {
if (response.ok) {
super.removeNodeId(id)
updateConnectionsInLayers(id.split("-")[1])
} else {
errorNotification("Failed to delete layer.\n Server is not responding now.")
}
Expand Down Expand Up @@ -569,7 +570,7 @@ <h3></h3>
if (response.ok) {
editor.updateNodeDataFromId(connection.input_id, {
DBID: data2.DBID,
Connections: [].concat(`${data1.DBID};${connection.output_id}`, data2.Connections), // "db_id;drawflow_id"
Connections: data2.Connections.concat(`${data1.DBID};${connection.output_id}`), // "db_id;drawflow_id"
Parameters: data2.Parameters,
})
} else {
Expand Down Expand Up @@ -1369,6 +1370,7 @@ <h3></h3>

// Input selection
writeIdOnConnections(input_selection_layer_id)

let sortable_list = getSortableInputList(node)
let child = sortable_list.lastElementChild

Expand Down Expand Up @@ -1397,8 +1399,9 @@ <h3></h3>
new_input_order = []
for (let i in sortable_list.childNodes) {
try {
if (sortable_list.childNodes[i].textContent.includes("input")) {
new_input_order.push(Number(sortable_list.childNodes[i].textContent.split(" ")[3]))
if (sortable_list.childNodes[i].textContent.length > 0) {
console.log(sortable_list.childNodes[i].textContent)
new_input_order.push(Number(sortable_list.childNodes[i].textContent))
}
} catch (e) {
continue
Expand Down Expand Up @@ -1608,6 +1611,25 @@ <h3></h3>
}
}
}

function updateConnectionsInLayers(deleted_id) {
let nodes = document.getElementsByClassName("drawflow-node")
for (let i of nodes) {
const data1 = editor.getNodeFromId(i.id.split("-")[1]).data
let updatedConnections = []
for (let connection of data1.Connections) {
if (connection.split(";")[1] == deleted_id) {
continue
}
updatedConnections.unshift(connection)
}
editor.updateNodeDataFromId(i.id.split("-")[1], {
DBID: data1.DBID,
Connections: updatedConnections,
Parameters: data1.Parameters,
})
}
}
</script>

<!--Терминал-->
Expand Down
4 changes: 3 additions & 1 deletion py_server/mlcraft/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def add_model(user_id: int):
return {"model_id": inserted_id}, HTTPStatus.CREATED


@app.route("/<int:user_id>/<int:model_id>", methods=["GET", "PUT", "PATCH", "DELETE"])
@app.route("/<int:user_id>/<int:model_id>", methods=["GET", "PUT", "DELETE"])
def model(user_id: int, model_id: int):
sql_worker.verify_access(user_id, model_id)
match request.method:
Expand Down Expand Up @@ -160,6 +160,8 @@ def train_model(
): # Unfortunately, flask don't have convertor for bool
# checks belonging of the model to user
sql_worker.verify_access(user_id, model_id)
if not request.data:
raise Error("No csv data provided")
if sql_worker.is_model_trained(model_id) and safe:
raise Error("Already trained", HTTPStatus.PRECONDITION_FAILED)

Expand Down
1 change: 1 addition & 0 deletions server/api/DataLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ std::pair<Blob, std::vector<float>> DataLoader::operator[](std::size_t index) co
}

std::size_t DataLoader::size() const {

return loader->size();
}

Expand Down