Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TO BE PUSHED ONCE test on niko and complex-test are OK as well as DB migration Feat/sim search b2f backup before rebase #81

Open
wants to merge 43 commits into
base: master
Choose a base branch
from

Conversation

moilerat
Copy link
Collaborator

No description provided.

moilerat and others added 30 commits December 15, 2023 16:09
…arity search to object_set/{project_id}/query
Copy link
Member

@grololo06 grololo06 left a comment

Choose a reason for hiding this comment

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

On s'approche


sim_search_request = SimilaritySearchReq(
project_id = project_id,
target_id = int(filters.seed_object_id.lstrip("I")) if filters.seed_object_id else None,
Copy link
Member

Choose a reason for hiding this comment

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

Je ne comprends pas pourquoi target_id peut être None. C'est l'objet dont on va chercher les similaires, ça me semble fonctionnellement absurde qu'il soit absent.

"target_id": target_id,
}
filters = {}
req_and_filters = {"filters": filters, "request": req}
Copy link
Member

Choose a reason for hiding this comment

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

C'est la cause du problème de test planté dans l'action. Le filter est (je ne sais pourquoi) censé contenu la cible de la recherche par similarité, et le champ n'est pas rempli ici.

@@ -73,6 +73,10 @@ class ProjectFiltersDict(TypedDict, total=False):
filt_last_annot: Optional[str]
""" Coma-separated list of annotator, i.e. person who validated the classification
in last. """
seed_object_id: Optional[str]
Copy link
Member

Choose a reason for hiding this comment

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

Pourquoi c'est dans les filtres, qui sont censés limiter l'affichage? Et pourquoi une str? C'est censé être e.g. I123456?

"target_id": target_id,
}
filters = {"taxo": ",".join([str(taxo_id) for taxo_id in taxo_ids_to_filter])}
req_and_filters = {"filters": filters, "request": req}
Copy link
Member

Choose a reason for hiding this comment

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

Pareil que + haut.

@@ -0,0 +1,12 @@
ecotaxa4=# CREATE TABLE obj_cnn_features_vector AS SELECT objcnnid, ARRAY[cnn01, cnn02, cnn03, cnn04, cnn05, cnn06, cnn07, cnn08, cnn09, cnn10, cnn11, cnn12, cnn13, cnn14, cnn15, cnn16, cnn17, cnn18, cnn19, cnn20, cnn21, cnn22, cnn23, cnn24, cnn25, cnn26, cnn27, cnn28, cnn29, cnn30, cnn31, cnn32, cnn33, cnn34, cnn35, cnn36, cnn37, cnn38, cnn39, cnn40, cnn41, cnn42, cnn43, cnn44, cnn45, cnn46, cnn47, cnn48, cnn49, cnn50] as features FROM obj_cnn_features;
Copy link
Member

Choose a reason for hiding this comment

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

Ce n'est plus le code de migration actuel, autant virer.

elif len(rsp.details[len(rsp.details) - 1]) == 12:
rsp.details[len(rsp.details) - 1].append(sim_search_score_current)
else :
print("Unexpected short details, sim score not send to front : " + str(len(rsp.details[len(rsp.details) - 1])))
Copy link
Member

Choose a reason for hiding this comment

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

Utilise STP le log pour laisser des messages, on peut même le capturer dans les tests.

window_size=None,
)

object_ids = [with_p[0] for with_p in obj_with_parents]
Copy link
Member

Choose a reason for hiding this comment

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

Un set() serait mieux vu que c'est principalement pour chercher dedans.

if objid not in object_ids:
continue
index = object_ids.index(objid)
index_ss = sim_search_rsp.neighbor_ids.index(objid) # VR TODO est-ce qu'un zip serait mieux ?
Copy link
Member

Choose a reason for hiding this comment

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

Oui, un zip() serait plus efficace.

example="obj.longitude",
),
# TODO: order_field should be a user-visible field name, not nXXX, in case of free field
window_start: Optional[int] = Query(
Copy link
Member

Choose a reason for hiding this comment

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

Ne me semble pas pertinent dans le contexte.

default=None,
example="obj.longitude,fre.feret",
),
order_field: Optional[str] = Query(
Copy link
Member

Choose a reason for hiding this comment

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

Ne me semble pas pertinent dans le contexte.

self.set_job_result(errors=[], infos=done_infos)
return

def _ensure_deep_features_for(self, proj_id: ProjectIDT, model_name: str) -> str:
Copy link
Member

Choose a reason for hiding this comment

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

Mon IDE dit que c'est un copier/coller de la méthode de même nom dans GPU_Prediction.py, il faudrait l'enlever là-bas.

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.

4 participants