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

Add requirements and measures to task registry client #360

Conversation

ChristopherSpelt
Copy link
Contributor

@ChristopherSpelt ChristopherSpelt commented Nov 13, 2024

Description

Fetch requirements and measures from task registry

  • Created a TaskRegistryAPIClient which extends a base APIClient to make requests to the task registry.
  • Since logic for fetching tasks (instruments, requirements and measures) is similar created a TaskRegistryRepository which fetches tasks. It is not intended to be used explicitly on its own, but rather it is injected in the services InstrumentService, RequirementService and MeasureService.

Functionality to filter requirements and measures based on AI Act Profile outcomes

  • An async function get_requirements_and_measures returns the requirement and measures according to an AI Act Profile.

NOTE THE FOLLOWING:

  • publication_category is now renamed to risk_category. The logic for handling this is not very pretty but is necessary because existing algorithms (projects) in the database already have system card JSON's with the key publication_category in them.
  • Renaming of fields and values in instruments, requirements and measures can now have consequences for AMT.
  • Certain pages now load more slow due to the fact a lot of network requests are made to the task registry. We need to consider good caching strategies.

Resolves #323

Checklist

Please check all the boxes that apply to this pull request using "x":

  • I have tested the changes locally and verified that they work as expected.
  • I have followed the project's coding conventions and style guidelines.
  • I have rebased my branch onto the latest commit of the main branch.
  • I have squashed or reorganized my commits into logical units.
  • I have read, understood and agree to the Developer Certificate of Origin, which this project utilizes.

@ChristopherSpelt ChristopherSpelt force-pushed the 323-implement-functionality-to-filter-vereisten-based-on-ai-act-profile-outcomes branch from 2d491e2 to fd5d501 Compare November 14, 2024 15:02
amt/clients/clients.py Dismissed Show dismissed Hide dismissed
@ChristopherSpelt ChristopherSpelt force-pushed the 323-implement-functionality-to-filter-vereisten-based-on-ai-act-profile-outcomes branch 3 times, most recently from 514a314 to 071bd9f Compare November 20, 2024 09:11
@ChristopherSpelt ChristopherSpelt force-pushed the 323-implement-functionality-to-filter-vereisten-based-on-ai-act-profile-outcomes branch 2 times, most recently from d44e51d to b664572 Compare November 20, 2024 11:38
@ChristopherSpelt ChristopherSpelt force-pushed the 323-implement-functionality-to-filter-vereisten-based-on-ai-act-profile-outcomes branch 3 times, most recently from fb5b855 to f771293 Compare November 20, 2024 15:25
@ChristopherSpelt ChristopherSpelt force-pushed the 323-implement-functionality-to-filter-vereisten-based-on-ai-act-profile-outcomes branch from f771293 to 8de085a Compare November 20, 2024 15:42
Copy link

sonarcloud bot commented Nov 20, 2024

@ChristopherSpelt ChristopherSpelt marked this pull request as ready for review November 20, 2024 15:52
@ChristopherSpelt ChristopherSpelt requested a review from a team as a code owner November 20, 2024 15:52
Copy link
Member

@berrydenhartog berrydenhartog left a comment

Choose a reason for hiding this comment

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

LGTM

@berrydenhartog berrydenhartog merged commit f0a4454 into main Nov 20, 2024
15 checks passed
@berrydenhartog berrydenhartog deleted the 323-implement-functionality-to-filter-vereisten-based-on-ai-act-profile-outcomes branch November 20, 2024 16:03
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.

Implement functionality to filter vereisten based on ai act profile outcomes
2 participants