Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

LUIS SDK azure vs container implementation #28

Open
cedrox opened this issue Dec 28, 2019 · 1 comment
Open

LUIS SDK azure vs container implementation #28

cedrox opened this issue Dec 28, 2019 · 1 comment

Comments

@cedrox
Copy link

cedrox commented Dec 28, 2019

Is your feature request related to a problem? Please describe.
When using the container version, you need to access web service. SDK Abstraction don't work as sdk URLs differ in webservice endpoints...
Azure-Samples/cognitive-services-speech-sdk#424 (comment)

The problem here is that prediction results are not the same...

Exemple in code :
Task pred;

            if (_config.UseLocalServices)
            {
                pred = GetPredictionFromEndpointAsync(_config.LuisAPIKey, _config.LuisContainerUrl, _config.LuisAppId, _config.LuisSlotName, question.ToLowerInvariant());
            }
            else
            {
                IList<DynamicList> dynamicLists = _luisFeedDynamicListService.LuisEntries.Select(e => new DynamicList(e.Key, RequestListExtensions.FromLuisEntries(e.Value))).ToList();
                var predictionRequest = new PredictionRequest(question.ToLowerInvariant(), null, null, dynamicLists);
               
                pred = _luisClient.Prediction.GetSlotPredictionAsync(
                   Guid.Parse(_config.LuisAppId),
                   slotName: _config.LuisSlotName,
                   predictionRequest,
                   verbose: true,
                   showAllIntents: true,
                   log: true);
            }

Describe the solution you'd like
The proper solution would be to change only the enpoint like this:
Version Azure
_luisClient = new LUISRuntimeClient(new ApiKeyServiceClientCredentials(_config.LuisAPIKey))
{
Endpoint = _config.LuisHostRegion
};

Version container
_luisClient = new LUISRuntimeClient(new MockCredentials())
{
Endpoint = "http://localhost:5010"
};

How can you have exactly the same result from webservice ?

@diberry
Copy link
Contributor

diberry commented May 14, 2020

@cedrox - Did you turn off negative sampling?

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants