C1M3 (Programming Assignment: Creating a Flow for Automatic Code Review)

Hi there,

I’ve been trying to close out the assignment in module 3. However, exercise 7 keeps timing out on the grader.

I keep getting an “unexpected error” for exercise 7, when the grading takes place.

I believe there is an issue with the grader for exercise 7.

Can someone please review the grader tests for exercise 7?

Hey @MattP! I just retried the lab, and I’m not being able to reproduce the issue. Is it only exercise 7 that you are having issues with? If that’s the case, I think you might have changed the names of some variables you weren’t supposed to.

In the full_crew_review function:

  • You have this line code_review_crew = CodeReviewCrew().crew(). If you changed code_review_crew name, then that explains the error in the grader.
  • Then, when you kickoff the crew, you save the results in the result variable result = code_review_crew......, you also shouldn’t change this variable’s name.

Please check if this is the case, and whether this solved the issue.

Thanks,

I’ve currently got in my code (exercise 7):

code_review_crew = CodeReviewCrew().crew()

And for the results I have in my code:

result = code_review_crew.kickoff(inputs={‘file_content’:pr_content)

Are these the wrong variable names?

I didn’t think I changed them if that’s the case.

If I’ve changed these and was not supposed to, can I reset my workbook to start again?

These seem correct… the only way I was able to reproduce was by changing these variable’s names. If you want you can send (by private DM) your code, and I can take a look at what’s going on. One other thing I forgot to ask, are you on the DeepLearning plarform or on Coursera?

Thanks Magdalena. I’m working from Coursera. How best to DM you?

Thanks - I sent you a DM, this morning.

I’m working from Coursera.

@magdalena.bouza I have a question on the (Module 3 Assignment: Building an Automatic Code Review Flow exercise):

In the crew.py file, line 35 and 36 where the SerperDevTool is imported,

what is the value DLAI_SERPER_BASE_URL? I have been trying to run this in my personal laptop but not sure what it stands for? I did check CrewAI doc but nothing about it was found. Thank you in advance

Hey @sahsancloud! The DLAI_SERPER_BASE_URL is there only so you can connect to Serper through our provied proxy, but it’s meant to only be used when running on the platform. You can safely remove the base_url argument, or replace it with base_url= “``https://google.serper.dev``”.

Hope this helps!
Cheers

Thank you @magdalena.bouza . Just a follow up, I was able to complete the excise and the grader passed me (Achieved 100%). However, I was just curious why the final report for decision is (**Final Review Decision:** ESCALATE, **Confidence Score:** 30).
I thought it should be passed? Or is the objective of the crew just to make a decision based on the PR ? If so, if I want it passed, I have to include probably another agent which can review the PR file and find the errors, what is lacking and correct them, then pass it to the pipeline again ?
Am I in the right direction?

Or if

Yes that’s exactly right! The given PR was made so that the final decision would be to ESCALATE. In that case, the agent system believes it is better to get a human involved. However, you could potentially add an extra agent to deal with the issues.

Great! Thank you @magdalena.bouza !