#3062 - First pass at unifying naming convention for discriminators (still errors) [skip ci]
This commit is contained in:
@@ -38,7 +38,7 @@ When declaring a custom class, it must have a unique discriminator string, that
|
||||
|
||||
.. code:: Python
|
||||
|
||||
class CreateDirectoryAction(AbstractAction, discriminator="node_folder_create")
|
||||
class CreateDirectoryAction(AbstractAction, discriminator="node-folder-create")
|
||||
|
||||
config: CreateDirectoryAction.ConfigSchema
|
||||
|
||||
@@ -58,7 +58,7 @@ When declaring a custom class, it must have a unique discriminator string, that
|
||||
config.directory_name,
|
||||
]
|
||||
|
||||
The above action would fail pydantic validation as the discriminator "node_folder_create" is already used by the `NodeFolderCreateAction`, and would create a duplicate listing within `AbstractAction._registry`.
|
||||
The above action would fail pydantic validation as the discriminator "node-folder-create" is already used by the `NodeFolderCreateAction`, and would create a duplicate listing within `AbstractAction._registry`.
|
||||
|
||||
|
||||
form_request method
|
||||
|
||||
@@ -51,11 +51,11 @@ The core features that should be implemented in any new agent are detailed below
|
||||
action_space:
|
||||
action_map:
|
||||
0:
|
||||
action: do_nothing
|
||||
action: do-nothing
|
||||
options: {}
|
||||
reward_function:
|
||||
reward_components:
|
||||
- type: DUMMY
|
||||
- type: dummy
|
||||
|
||||
agent_settings:
|
||||
start_step: 25
|
||||
|
||||
@@ -28,7 +28,7 @@ To add a new reward class follow the example below. Note that the type attribute
|
||||
|
||||
.. code-block:: Python
|
||||
|
||||
class DatabaseFileIntegrity(AbstractReward, discriminator="DATABASE_FILE_INTEGRITY"):
|
||||
class DatabaseFileIntegrity(AbstractReward, discriminator="database-file-integrity"):
|
||||
"""Reward function component which rewards the agent for maintaining the integrity of a database file."""
|
||||
|
||||
config: "DatabaseFileIntegrity.ConfigSchema"
|
||||
@@ -38,7 +38,7 @@ class DatabaseFileIntegrity(AbstractReward, discriminator="DATABASE_FILE_INTEGRI
|
||||
class ConfigSchema(AbstractReward.ConfigSchema):
|
||||
"""ConfigSchema for DatabaseFileIntegrity."""
|
||||
|
||||
type: str = "DATABASE_FILE_INTEGRITY"
|
||||
type: str = "database-file-integrity"
|
||||
node_hostname: str
|
||||
folder_name: str
|
||||
file_name: str
|
||||
|
||||
Reference in New Issue
Block a user