Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

remove LUIS-specific validation logic for Orchestrator scenarios #1224

Conversation

hcyang
Copy link
Contributor

@hcyang hcyang commented Apr 28, 2021

The lu parser is designed for LUIS which imposes a constraint on the number of utterances. For Orchestrator, it can handle more utterances and this limitation needs to be removed.
This will not impact existing LUIS validations, worked with @munozemilio to use alternate implementation that doesn't impose limit.
We have a customer (ATOS) who will run into this sooner than later.

#1223

@hcyang hcyang self-assigned this Apr 28, 2021
@hcyang hcyang requested a review from munozemilio as a code owner April 28, 2021 03:29
@hcyang hcyang linked an issue Apr 28, 2021 that may be closed by this pull request
@daveta
Copy link
Contributor

daveta commented Apr 28, 2021

Would it be possible to add large import as a test?

@hcyang
Copy link
Contributor Author

hcyang commented Apr 28, 2021

Would it be possible to add large import as a test?

We can create a unit test without loading a large LU file, but by dynamically creating on the fly. Will create a unit test.

throw error;
}
public static debuggingThrow1WithCause(
message: any,
Copy link
Contributor

@munozemilio munozemilio Apr 28, 2021

Choose a reason for hiding this comment

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

Please avoid code duplication. You can change this to a list/array of objectArgument.

Copy link
Contributor

@daveta daveta left a comment

Choose a reason for hiding this comment

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

Nice - this should give much better context!

this.name = this.constructor.name;
}

public getCause(): Error {
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 public readonly cause?

@@ -25,6 +27,8 @@ export class Utility {
public static toPrintDebuggingLogToConsole: boolean = false;
public static toPrintDetailedDebuggingLogToConsole: boolean = false;

public static externalLoggingObject: any = null;
Copy link
Contributor

Choose a reason for hiding this comment

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

unknown would be better than any, if possible.

}
return logMessage;
}
public static debuggingLog2WithCause(
Copy link
Contributor

Choose a reason for hiding this comment

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

These all could likely be collapsed into a single method with a rest param. Something like

public static debuggingLogWithCause(message: string, cause: Error, ...rest: unknown[]) {
  const isWarning = typeof rest[rest.length - 1] === 'boolean' ? rest.pop() : false;
  ...
}

@@ -2289,62 +2300,334 @@ export class Utility {
Utility.toObfuscateLabelTextInReportUtility = flag;
}

public static debuggingLog(
public static resetExternalLoggingObject(externalLoggingObject: any) {
Utility.externalLoggingObject = externalLoggingObject;
Copy link
Contributor

Choose a reason for hiding this comment

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

Having static, shared state is a little worrying. What about concurrent execution?

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

Successfully merging this pull request may close these issues.

lu parser needs to handle files over 15,000 utterances
7 participants