Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
NACSOS Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MCC APSIS
NACSOS
NACSOS Core
Commits
af9f6fdb
Commit
af9f6fdb
authored
1 year ago
by
Tim Repke
Browse files
Options
Downloads
Patches
Plain Diff
fix irr stuff
parent
e12ad362
No related branches found
No related tags found
1 merge request
!82
Master
Pipeline
#2865
failed
1 year ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/api/routes/evaluation.py
+12
-0
12 additions, 0 deletions
server/api/routes/evaluation.py
with
12 additions
and
0 deletions
server/api/routes/evaluation.py
+
12
−
0
View file @
af9f6fdb
...
...
@@ -7,6 +7,7 @@ from nacsos_data.db.schemas import AnnotationTracker, AssignmentScope, Annotatio
AnnotationQuality
from
nacsos_data.models.annotation_quality
import
AnnotationQualityModel
from
nacsos_data.models.annotation_tracker
import
AnnotationTrackerModel
,
DehydratedAnnotationTracker
from
nacsos_data.models.bot_annotations
import
BotAnnotationMetaDataBaseModel
from
nacsos_data.util.annotations.evaluation
import
get_new_label_batches
from
nacsos_data.util.annotations.evaluation.buscar
import
(
calculate_h0s_for_batches
,
...
...
@@ -62,6 +63,17 @@ async def get_project_scopes(permissions: UserPermissions = Depends(UserPermissi
return
assignment_scopes
+
resolution_scopes
@router.get
(
'
/resolutions
'
,
response_model
=
list
[
BotAnnotationMetaDataBaseModel
])
async
def
get_resolutions_for_scope
(
assignment_scope_id
:
str
,
permissions
:
UserPermissions
=
Depends
(
UserPermissionChecker
(
'
annotations_read
'
)))
\
->
list
[
BotAnnotationMetaDataBaseModel
]:
async
with
db_engine
.
session
()
as
session
:
# type: AsyncSession
stmt
=
(
select
(
BotAnnotationMetaData
)
.
where
(
BotAnnotationMetaData
.
assignment_scope_id
==
assignment_scope_id
))
rslt
=
(
await
session
.
execute
(
stmt
)).
scalars
().
all
()
return
[
BotAnnotationMetaDataBaseModel
.
model_validate
(
r
.
__dict__
)
for
r
in
rslt
]
async
def
read_tracker
(
session
:
AsyncSession
,
tracker_id
:
str
|
uuid
.
UUID
,
project_id
:
str
|
uuid
.
UUID
|
None
=
None
)
->
AnnotationTracker
:
stmt
=
(
select
(
AnnotationTracker
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment