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

feat: DIA-1384: add cost estimate endpoint #225

Merged
merged 10 commits into from
Oct 23, 2024
Merged

feat: DIA-1384: add cost estimate endpoint #225

merged 10 commits into from
Oct 23, 2024

Conversation

pakelley
Copy link
Contributor

@pakelley pakelley commented Oct 7, 2024

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Oct 7, 2024

Codecov Report

Attention: Patch coverage is 35.63218% with 56 lines in your changes missing coverage. Please review.

Project coverage is 65.59%. Comparing base (253c542) to head (b922d4d).
Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
adala/runtimes/_litellm.py 22.85% 27 Missing ⚠️
adala/runtimes/base.py 48.27% 15 Missing ⚠️
server/app.py 36.36% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #225      +/-   ##
==========================================
- Coverage   66.41%   65.59%   -0.82%     
==========================================
  Files          46       47       +1     
  Lines        2230     2343     +113     
==========================================
+ Hits         1481     1537      +56     
- Misses        749      806      +57     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@robot-ci-heartex robot-ci-heartex marked this pull request as draft October 8, 2024 10:05
server/app.py Outdated Show resolved Hide resolved
server/app.py Outdated Show resolved Hide resolved
server/app.py Outdated Show resolved Hide resolved
server/app.py Outdated Show resolved Hide resolved
@pakelley pakelley marked this pull request as ready for review October 9, 2024 01:58
@robot-ci-heartex robot-ci-heartex marked this pull request as draft October 9, 2024 12:08
@pakelley pakelley marked this pull request as ready for review October 9, 2024 12:34
@robot-ci-heartex robot-ci-heartex marked this pull request as draft October 11, 2024 00:22
niklub
niklub previously requested changes Oct 11, 2024
@@ -216,6 +216,16 @@ def get_teacher_runtime(self, runtime: Optional[str] = None) -> Runtime:
)
return runtime

def get_skills(self) -> List[Skill]:
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need this function? Skills must be always Dict mapping from skill name to Skill (there is a skills_validator function to prevalidate that), so we can always iterate like

for skill_name in agent.skills.get_skill_names():
     skill = agent.skills[skill_name]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The type sig for skills is skills: SerializeAsAny[Union[Skill, SkillSet]], so we can't count on this always being a SkillSet (and therefore having get_skill_names defined), yeah?
Plus, it seems simpler to be able to get the list of skills than the list of names, I'd think? Since it doesn't seem that get_skill_names is being used, I think it's simpler to change that to get the skills themselves (if we can, in fact, assume this is a SkillSet)

Copy link
Contributor

@niklub niklub Oct 16, 2024

Choose a reason for hiding this comment

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

so we can't count on this always being a SkillSet

we can because of https://github.com/HumanSignal/Adala/blob/master/adala/agents/base.py#L109

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can we change the type sig of skills in Agent then?
And still, like I said in my first comment, it seems simpler to have a SkillSet.get_skills than SkillSet.get_skill_names, esp since SkillSet.get_skill_names doesn't seem to be used anywhere. I'll go ahead and change that and the type sig of Agent.skills

adala/runtimes/_litellm.py Outdated Show resolved Hide resolved
adala/runtimes/base.py Show resolved Hide resolved
adala/runtimes/base.py Show resolved Hide resolved
tests/test_cost_estimation.py Outdated Show resolved Hide resolved
@niklub niklub marked this pull request as ready for review October 14, 2024 12:06
@robot-ci-heartex robot-ci-heartex marked this pull request as draft October 14, 2024 23:04
@pakelley pakelley marked this pull request as ready for review October 16, 2024 14:56
@robot-ci-heartex robot-ci-heartex marked this pull request as draft October 17, 2024 02:28
@pakelley pakelley marked this pull request as ready for review October 17, 2024 15:48
@robot-ci-heartex robot-ci-heartex marked this pull request as draft October 18, 2024 11:05
@pakelley pakelley marked this pull request as ready for review October 18, 2024 15:24
@robot-ci-heartex robot-ci-heartex marked this pull request as draft October 19, 2024 05:04
@pakelley pakelley marked this pull request as ready for review October 21, 2024 05:51
@robot-ci-heartex robot-ci-heartex marked this pull request as draft October 21, 2024 16:06
@pakelley pakelley marked this pull request as ready for review October 22, 2024 21:53
@robot-ci-heartex robot-ci-heartex marked this pull request as draft October 23, 2024 08:07
@robot-ci-heartex robot-ci-heartex marked this pull request as ready for review October 23, 2024 15:09
@pakelley pakelley requested a review from niklub October 23, 2024 15:11
@pakelley pakelley dismissed niklub’s stale review October 23, 2024 15:12

Requested updates have been made

@pakelley pakelley merged commit cbc539c into master Oct 23, 2024
40 of 44 checks passed
@pakelley pakelley deleted the fb-dia-1384 branch October 23, 2024 15:12
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.

5 participants