跳转至

Core concepts and limitations(核心概念与限制)

Scenarios

A Scenario is fork of the data in the Ontology created by applying a set of Actions and evaluating a set of Models.

The fork contains only the edits or changes from the base Ontology including modified Object properties, created Objects, deleted Objects, created link types, and deleted link types.

A Scenario is immutable once created. To "modify" a Scenario, create a new Scenario with a modified set of Actions or Models. You can also duplicate a Scenario along with its existing Actions and parameters by selecting the more options ... dropdown menu next to the name of the existing scenario.

Models

A Model in Foundry is a function that estimates object properties given other object properties. This is most commonly used to estimate or forecast unknown values in the Ontology.

To use a model as part of a Scenario, wrap the model in a Function and use it in a Function-backed Action.

:::callout{theme="neutral"} It was previously possible to evaluate a model in a Scenario without wrapping it in an Action if it was managed and deployed using modeling objectives. This feature has been deprecated and should no longer be used for new implementations. To learn more about this legacy feature in existing implementations, refer to the Scenario model selection guide. :::

Domains

A Domain describes the valid set over which Model can be evaluated.

A Domain is defined in terms of a set of Objects in the Ontology.

In the simplest case, a Domain will be defined as all Objects of a particular object type, but more complex sets can be constructed as well.

When evaluating a Model for Objects in a Domain, the results must be independent. That is, evaluating the Model over a subset of the Domain should yield the same results for those Objects as evaluating over the entire Domain.

Domains are primarily used to determine when and how Models should be evaluated in the context of Object-based applications.

However, they can also be used to improve application performance. For example, if only a subset of the Domain is used in an application, then the Model need only be evaluated over that subset. Since model results over Objects in the Domain must be independent, there is no concern that evaluating over the subset would yield different results.

Limitations

For performance reasons, there are a few limitations that you should consider when building out your workflow using Scenarios.

  • A single Scenario cannot make more than 30,000 edits to the Ontology.
  • Since Scenarios infrastructure is built on top of Actions, any limits applied by Actions also apply to the Actions in your Scenario. Refer to the Actions documentation for a complete list of limitations on Actions.
  • If your Scenario contains a Function-backed Action, then that Function is subject to the limitations that exist on Foundry Functions.
  • Your Scenario cannot contain more than 50 Actions.
  • When loading object data from an object set in the context of a Scenario, you cannot load more than 10,000 objects. Attempting to load more than 10,000 objects will result in an error. For example, this can happen when using the .all() or .allAsync() methods in a Foundry Function.
  • Attachment properties are not supported in Scenarios, since uploaded files will not be registered to the referencing objects.

中文翻译

核心概念与限制

场景(Scenario)

场景(Scenario) 是通过应用一组操作(Actions)并评估一组模型(Models)而创建的本体论(Ontology)数据分支。

该分支仅包含与基础本体论(Ontology)之间的差异或变更,包括修改的对象属性、创建的对象、删除的对象、创建的链接类型以及删除的链接类型。

场景一旦创建即不可变。若要"修改"场景,需使用修改后的操作或模型集创建新场景。您还可以通过选择现有场景名称旁的更多选项 ... 下拉菜单,复制该场景及其现有的操作和参数。

模型(Model)

Foundry中的模型(Model) 是一个函数,用于根据其他对象属性估算对象属性。这最常用于估算或预测本体论中的未知值。

要将模型用作场景的一部分,请将模型封装在函数(Function)中,并在函数支持的操作(Function-backed Action)中使用它。

:::callout{theme="neutral"} 此前,如果模型通过建模目标(modeling objectives)进行管理和部署,可以在场景中直接评估模型而无需将其封装在操作中。此功能已弃用,不应再用于新实现。如需了解现有实现中此遗留功能的更多信息,请参阅场景模型选择指南。 :::

域(Domain)

域(Domain) 描述了模型可以评估的有效范围。

域是根据本体论(Ontology)中的一组对象来定义的。

在最简单的情况下,域被定义为特定对象类型(object type)的所有对象,但也可以构建更复杂的集合。

在评估域中对象的模型时,结果必须是独立的。也就是说,对域的子集评估模型,应得到与对整个域评估相同的结果。

域主要用于确定在基于对象的应用程序中何时以及如何评估模型。

然而,域也可用于提高应用程序性能。例如,如果应用程序中只使用了域的子集,则只需对该子集评估模型。由于域中对象的模型结果必须是独立的,因此无需担心对子集评估会产生不同结果。

限制

出于性能考虑,在使用场景构建工作流时,您需要注意以下限制:

  • 单个场景对本体论的编辑次数不能超过30,000次。
  • 由于场景基础设施构建在操作之上,操作所适用的任何限制同样适用于场景中的操作。请参阅操作文档获取操作的完整限制列表。
  • 如果场景包含函数支持的操作(Function-backed Action),则该函数受Foundry函数(Foundry Functions)存在的限制约束。
  • 场景中包含的操作不能超过50个。
  • 在场景上下文中从对象集加载对象数据时,加载的对象数量不能超过10,000个。尝试加载超过10,000个对象将导致错误。例如,在Foundry函数(Foundry Function)中使用.all().allAsync()方法时可能发生此情况。
  • 场景不支持附件属性,因为上传的文件不会注册到引用对象。