task_spec.proto 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. // LINT: ALLOW_GROUPS
  2. // Protocol buffer specifications for task configuration.
  3. syntax = "proto2";
  4. package syntaxnet;
  5. // Task input descriptor.
  6. message TaskInput {
  7. // Name of input resource.
  8. required string name = 1;
  9. // Name of stage responsible of creating this resource.
  10. optional string creator = 2;
  11. // File format for resource.
  12. repeated string file_format = 3;
  13. // Record format for resource.
  14. repeated string record_format = 4;
  15. // Is this resource multi-file?
  16. optional bool multi_file = 5 [default = false];
  17. // An input can consist of multiple file sets.
  18. repeated group Part = 6 {
  19. // File pattern for file set.
  20. optional string file_pattern = 7;
  21. // File format for file set.
  22. optional string file_format = 8;
  23. // Record format for file set.
  24. optional string record_format = 9;
  25. }
  26. }
  27. // Task output descriptor.
  28. message TaskOutput {
  29. // Name of output resource.
  30. required string name = 1;
  31. // File format for output resource.
  32. optional string file_format = 2;
  33. // Record format for output resource.
  34. optional string record_format = 3;
  35. // Number of shards in output. If it is different from zero this output is
  36. // sharded. If the number of shards is set to -1 this means that the output is
  37. // sharded, but the number of shard is unknown. The files are then named
  38. // 'base-*-of-*'.
  39. optional int32 shards = 4 [default = 0];
  40. // Base file name for output resource. If this is not set by the task
  41. // component it is set to a default value by the workflow engine.
  42. optional string file_base = 5;
  43. // Optional extension added to the file name.
  44. optional string file_extension = 6;
  45. }
  46. // A task specification is used for describing executing parameters.
  47. message TaskSpec {
  48. // Name of task.
  49. optional string task_name = 1;
  50. // Workflow task type.
  51. optional string task_type = 2;
  52. // Task parameters.
  53. repeated group Parameter = 3 {
  54. required string name = 4;
  55. optional string value = 5;
  56. }
  57. // Task inputs.
  58. repeated TaskInput input = 6;
  59. // Task outputs.
  60. repeated TaskOutput output = 7;
  61. }