Skip to content

Conversation

@rlundeen2
Copy link
Contributor

Adding AttackIdentifier, making executors Identifiable and removing LegacyIdentifiable

self._objective_target = objective_target
self._params_type = params_type
self._request_converters: list[Any] = []
self._response_converters: list[Any] = []
Copy link
Contributor

Choose a reason for hiding this comment

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

why not type List[PromptConverterConfiguration]?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could be talked into it, no super strong reason other than all usage right now is just converter lists. And we currently saved self._request_converters in the attacks but not PromptConverterConfiguration so it was a smaller change

class_module=self.__class__.__module__,
objective_target_identifier=objective_target_identifier,
objective_scorer_identifier=scorer_identifier,
request_converter_identifiers=converter_identifiers or None,
Copy link
Contributor

Choose a reason for hiding this comment

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

For our data model should this be None or an empty list? I can imagine users wanting attack identifiers to explicitly reflect "no request converters were used" vs the more ambiguous "none were provided or found"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

None is consistent with how the other properties are populated, so I think it makes the most sense to keep for now. I know others aren't a list. So I have a slight pref for the way it is but don't care much.

attack_identifier: Optional[Union["AttackIdentifier", Dict[str, Any]]] = None

# The identifier from the component's get_identifier() (target, scorer, etc.)
component_identifier: Optional[Dict[str, Any]] = None
Copy link
Contributor

Choose a reason for hiding this comment

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

This may be out of scope but why isn't this Union[TargetIdentifier, ScorerIdentifier, Dict[str, Any]]?

Copy link
Contributor Author

@rlundeen2 rlundeen2 Feb 12, 2026

Choose a reason for hiding this comment

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

I think as long as it's an Identifier it's okay here. What you say is more specific but I could see us adding more and using them. So slight pref as is but if you feel strongly I can change it!

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