matlab-deep-learning/llms-with-matlab

Example UsingDALLEToEditImages errors

Closed this issue · 6 comments

UsingDALLEToEditImages:

[images,resp] = createVariation(mdl, imagePath, NumImages=4);

Error using [imread](matlab:matlab.lang.internal.introspective.errorDocCallback('imread', 'E:\jobarchive\Btext\2024_04_22_h17m05s46_job2591482_pass\matlab\toolbox\matlab\imagesci\imread.m', 352)) ([line 352](matlab: opentoline('E:\jobarchive\Btext\2024_04_22_h17m05s46_job2591482_pass\matlab\toolbox\matlab\imagesci\imread.m',352,0)))
Can't read URL "https://oaidalleapiprodscus.blob.core.windows.net/private/org-pq0MGRBYHualPO5l0BarTWqW/user-qV2F18SvbhogHzXIkc70zO8l/img-QWk9Dz7ye9dye7G36Po5g2YQ.png?st=2024-05-14T14%3A42%3A29Z&se=2024-05-14T16%3A42%3A29Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2024-05-13T23%3A03%3A20Z&ske=2024-05-14T23%3A03%3A20Z&sks=b&skv=2021-08-06&sig=aGDLoCV%2B47a5o3S5wEg7Y4Ki%2BVcEED33Lrb3W1cvPtg%3D".
Reason: Could not find file : https://oaidalleapiprodscus.blob.core.windows.net/private/org-pq0MGRBYHualPO5l0BarTWqW/user-qV2F18SvbhogHzXIkc70zO8l/img-QWk9Dz7ye9dye7G36Po5g2YQ.png?st=2024-05-14T14%3A42%3A29Z&se=2024-05-14T16%3A42%3A29Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2024-05-13T23%3A03%3A20Z&ske=2024-05-14T23%3A03%3A20Z&sks=b&skv=2021-08-06&sig=aGDLoCV%2B47a5o3S5wEg7Y4Ki%2BVcEED33Lrb3W1cvPtg%3D

Error in [openAIImages>extractImages](matlab:matlab.lang.internal.introspective.errorDocCallback('openAIImages>extractImages', 'C:\Users\vpapanas\OneDrive - MathWorks\Documents\GitHub\llms-with-matlab\openAIImages.m', 301)) ([line 301](matlab: opentoline('C:\Users\vpapanas\OneDrive - MathWorks\Documents\GitHub\llms-with-matlab\openAIImages.m',301,0)))
images = arrayfun(@imread,urls,UniformOutput=false);

Error in [openAIImages/createVariation](matlab:matlab.lang.internal.introspective.errorDocCallback('openAIImages/createVariation', 'C:\Users\vpapanas\OneDrive - MathWorks\Documents\GitHub\llms-with-matlab\openAIImages.m', 266)) ([line 266](matlab: opentoline('C:\Users\vpapanas\OneDrive - MathWorks\Documents\GitHub\llms-with-matlab\openAIImages.m',266,0)))
images = extractImages(response);

This was resolved in the latest update.

Hi Toshi, I think this issue is not resolved. The example error both locally and in the test I added. Please see the Actions result here:

https://github.com/matlab-deep-learning/llms-with-matlab/actions/runs/9098850116/job/25010021296

I am not sure why, but my fix was reverted back. When I created this example, it worked fine. Then it was edited which introduced the bug. There has been a lot of commits lately. Let's hold off until things settle.

@vpapanasta I checked the example and it runs fine.

texampleTests.m doesn't even test this example. Can you check texampleTests.m to make sure it does what it supposed to do?

Examples in the repo

  • AnalyzeScientificPapersUsingFunctionCalls.mlx (in texampleTests.m )
  • AnalyzeSentimentinTextUsingChatGPTinJSONMode.mlx (NOT in texampleTests.m)
  • AnalyzeTextDataUsingParallelFunctionCallwithChatGPT.mlx (in texampleTests.m )
  • CreateSimpleChatBot.mlx (NOT in texampleTests.m)
  • DescribeImagesUsingChatGPT.mlx (in texampleTests.m )
  • InformationRetrievalUsingOpenAIDocumentEmbedding.mlx (in texampleTests.m )
  • ProcessGeneratedTextinRealTimebyUsingChatGPTinStreamingMode.mlx (in texampleTests.m )
  • RetrievalAugmentedGenerationUsingChatGPTandMATLAB.mlx (in texampleTests.m )
  • SummarizeLargeDocumentsUsingChatGPTandMATLAB.mlx (in texampleTests.m )
  • UsingDALLEToEditImages.mlx (NOT in texampleTests.m) <--- the example in question
  • UsingDALLEToGenerateImages.mlx (in texampleTests.m )

The reason why I have not added tests for AnalyzeSentimentinTextUsingChatGPTinJSONMode and UsingDALLEToEditImages is because they error. Fixing them, we can add these tests to validate that the problem is fixed.

As for CreateSimpleChatBot, I have not thought of a way to write a test that tests this interactive chat functionality. I will think of something nice and add a test for this in the future.

@vpapanasta I did test UsingDALLEToEditImages but I didn't get any error. I believe the test is not implemented correctly.