Skip to content

ID-171: Fix input selection#69

Merged
AntoxaBarin merged 3 commits intomainfrom
task171_FixInputSelection
Dec 14, 2023
Merged

ID-171: Fix input selection#69
AntoxaBarin merged 3 commits intomainfrom
task171_FixInputSelection

Conversation

@AntoxaBarin
Copy link
Contributor

ID-171
Починил выбор входов. Потестил, сейчас всё должно нормально работать, если увидите любые баги, то сообщите. Вся проблема была в том, что внутри объекта Sortable (штука, которая позволяет нам менять порядок входов) массивы и переменные магическим (я не знаю, как это объяснить иначе) образом принимали неверные значения после clearModel, после переключений между слоями и тд. Сейчас же я вынес всю логику из Sortable в отдельный метод matchConnectionsAfterSelection. По сути, он берет новый порядок входов, запихивает его в слой и отправляет в бд.

Новые глобальные переменные в client/scripts/storage.js: is_id_on_paths - флаг "есть ли сейчас нарисованные циферки на соединениях". Этот флаг нужен, чтоб мы лишний раз не убирали эти самые циферки с соединений. input_selection_layer_id/db_id - запоминаем библиотечные id и id из бд у слоя, которому меняем порядок входов.

Copy link
Contributor

@Artem-Goldenberg Artem-Goldenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Все ок, как и с прошлым можешь заливать, можешь что то подправить

function matchConnectionsAfterSelection(new_input_order) {
let newConnections = []
let connections = editor.getNodeFromId(input_selection_layer_id).data.Connections
for (let i = 0; i < new_input_order.length; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А почему здесь через I а не через let of?

try {
path.setAttribute("display", "none")
} catch (e) {
console.log(e)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ну я так понимаю такого не должно происходит поэтому можно написать console.error или что то такое

@AntoxaBarin AntoxaBarin merged commit 8e98adf into main Dec 14, 2023
@AntoxaBarin AntoxaBarin deleted the task171_FixInputSelection branch December 14, 2023 09:47
lpetrov02 pushed a commit that referenced this pull request Dec 15, 2023
* Fix input selection

* Clean up fix input selection
lpetrov02 pushed a commit that referenced this pull request Dec 15, 2023
* Fix input selection

* Clean up fix input selection
lpetrov02 pushed a commit that referenced this pull request Dec 18, 2023
Makes preparations for metrics logging on python
Functionality for c++ http added, but not working yet
Adds saving train metrics
Adds saving train metrics and responding with PNG

Adaptates code for new 4D blob

cpprest CI support
Add load possibility for zip
Add load possibility for png on predict
-------
GRA-122: Data loader implementation (#67)
Data loader implementation
-------
ID-154: Loss type selection (#70)
* Add loss type selection
* Add loss type selection
* Remove layer-class loss
* Clean up Loss type
* Make format
-------
ID-171: Fix input selection (#69)
* Fix input selection
* Clean up fix input selection
-------
Change train and predict for zip file case
Starts fixing train
Fixes train with dataloader
It's not fucking working :( (x3)
server train fix
Fixes train and predcit
lpetrov02 pushed a commit that referenced this pull request Dec 18, 2023
Makes preparations for metrics logging on python
Functionality for c++ http added, but not working yet
Adds saving train metrics
Adds saving train metrics and responding with PNG

Adaptates code for new 4D blob

cpprest CI support
Add load possibility for zip
Add load possibility for png on predict
-------
GRA-122: Data loader implementation (#67)
Data loader implementation
-------
ID-154: Loss type selection (#70)
* Add loss type selection
* Add loss type selection
* Remove layer-class loss
* Clean up Loss type
* Make format
-------
ID-171: Fix input selection (#69)
* Fix input selection
* Clean up fix input selection
-------
Change train and predict for zip file case
Starts fixing train
Fixes train with dataloader
It's not fucking working :( (x3)
server train fix
Fixes train and predcit
lpetrov02 added a commit that referenced this pull request Dec 20, 2023
* Started migration from Data2dLayer to DataLayer

Makes preparations for metrics logging on python
Functionality for c++ http added, but not working yet
Adds saving train metrics
Adds saving train metrics and responding with PNG

Adaptates code for new 4D blob

cpprest CI support
Add load possibility for zip
Add load possibility for png on predict
-------
GRA-122: Data loader implementation (#67)
Data loader implementation
-------
ID-154: Loss type selection (#70)
* Add loss type selection
* Add loss type selection
* Remove layer-class loss
* Clean up Loss type
* Make format
-------
ID-171: Fix input selection (#69)
* Fix input selection
* Clean up fix input selection
-------
Change train and predict for zip file case
Starts fixing train
Fixes train with dataloader
It's not fucking working :( (x3)
server train fix
Fixes train and predcit

* Follow up review

* Follow up review

* ID-167: Upload zip (#74)

* Fixes graph tests

* Fixes DataLayer

---------

Co-authored-by: lpetrov02 <lpetrov02@mail.ru>
Co-authored-by: Artem Goldenberg <58527023+Artem-Goldenberg@users.noreply.github.com>
AntoxaBarin added a commit that referenced this pull request Dec 21, 2023
* Started migration from Data2dLayer to DataLayer

* Makes preparations for metrics logging on python
Functionality for c++ http added, but not working yet
Adds saving train metrics
Adds saving train metrics and responding with PNG

* Adaptates code for new 4D blob

* cpprest CI support

* Add load possibility for zip

* Add load possibility for png on predict

* GRA-122: Data loader implementation (#67)

Data loader implementation

* ID-154: Loss type selection (#70)

* Add loss type selection

* Add loss type selection

* Remove layer-class loss

* Clean up Loss type

* Make format

* ID-171: Fix input selection (#69)

* Fix input selection

* Clean up fix input selection

* Change train and predict for zip file case

* Starts fixing train

* Fixes train with dataloader

* It's not fucking working :(

* It's not fucking working :(

* Input selection bug fix

* Started migration from Data2dLayer to DataLayer

Makes preparations for metrics logging on python
Functionality for c++ http added, but not working yet
Adds saving train metrics
Adds saving train metrics and responding with PNG

Adaptates code for new 4D blob

cpprest CI support
Add load possibility for zip
Add load possibility for png on predict
-------
GRA-122: Data loader implementation (#67)
Data loader implementation
-------
ID-154: Loss type selection (#70)
* Add loss type selection
* Add loss type selection
* Remove layer-class loss
* Clean up Loss type
* Make format
-------
ID-171: Fix input selection (#69)
* Fix input selection
* Clean up fix input selection
-------
Change train and predict for zip file case
Starts fixing train
Fixes train with dataloader
It's not fucking working :( (x3)
server train fix
Fixes train and predcit

* Follow up review

* Follow up review

* Make formats

* Fix bug (not deleting connection after deleting layer)

* Minor changes in cpp_server

* tests fix

* Fix order of addition inputs in layer

---------

Co-authored-by: lpetrov02 <lpetrov02@mail.ru>
Co-authored-by: Artem Goldenberg <st087953@student.spbu.ru>
Co-authored-by: MaxVorosh <ma_voroshilov@mail.ru>
Co-authored-by: Voroshilov Maksim <47945698+MaxVorosh@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants