|
1894 | 1894 | "type": "string" |
1895 | 1895 | }, |
1896 | 1896 | "task": { |
1897 | | - "description": "What is predicted, of which entity.", |
1898 | | - "type": "object", |
1899 | | - "properties": { |
1900 | | - "kind": { |
1901 | | - "description": "The task's kind, as the engine names it (`regression`,\n`binary_classification`, `multiclass_classification`).", |
1902 | | - "type": "string" |
1903 | | - }, |
1904 | | - "target": { |
1905 | | - "description": "The label column of the instance table; a classification's names its\nclasses, and a binary task's its positive class. The schema of\n[`Target`] and [`ClassTarget`] at once, for the schema only.", |
| 1897 | + "description": "What is predicted, of which entity: a task of each kind, its kind's\nname and its target. The schema of [`Task`] of each target, for the\nschema only.", |
| 1898 | + "anyOf": [ |
| 1899 | + { |
| 1900 | + "description": "A regression's task, for the schema only.", |
1906 | 1901 | "type": "object", |
1907 | 1902 | "properties": { |
1908 | | - "column_name": { |
1909 | | - "type": "string" |
1910 | | - }, |
1911 | | - "dtype": { |
1912 | | - "description": "A column's type on the wire, as the reference's engine names it\n(`_dtype_name`, `_list_dtype_name`).", |
| 1903 | + "kind": { |
1913 | 1904 | "type": "string", |
1914 | 1905 | "enum": [ |
1915 | | - "int64", |
1916 | | - "float32", |
1917 | | - "float64", |
1918 | | - "string", |
1919 | | - "stringlist", |
1920 | | - "bool", |
1921 | | - "timestamp[us]" |
| 1906 | + "regression" |
1922 | 1907 | ] |
1923 | 1908 | }, |
1924 | | - "classes": { |
| 1909 | + "target": { |
| 1910 | + "description": "The label column of the instance table: a regression's.", |
| 1911 | + "type": "object", |
| 1912 | + "properties": { |
| 1913 | + "column_name": { |
| 1914 | + "type": "string" |
| 1915 | + }, |
| 1916 | + "dtype": { |
| 1917 | + "description": "A column's type on the wire, as the reference's engine names it\n(`_dtype_name`, `_list_dtype_name`).", |
| 1918 | + "type": "string", |
| 1919 | + "enum": [ |
| 1920 | + "int64", |
| 1921 | + "float32", |
| 1922 | + "float64", |
| 1923 | + "string", |
| 1924 | + "stringlist", |
| 1925 | + "bool", |
| 1926 | + "timestamp[us]" |
| 1927 | + ] |
| 1928 | + } |
| 1929 | + }, |
| 1930 | + "additionalProperties": false, |
| 1931 | + "required": [ |
| 1932 | + "column_name", |
| 1933 | + "dtype" |
| 1934 | + ] |
| 1935 | + }, |
| 1936 | + "entity_table_names": { |
1925 | 1937 | "type": "array", |
1926 | 1938 | "items": { |
1927 | 1939 | "type": "string" |
1928 | 1940 | } |
1929 | 1941 | }, |
1930 | | - "positive_class": { |
| 1942 | + "anchor_time_column": { |
1931 | 1943 | "type": "string" |
1932 | 1944 | } |
1933 | 1945 | }, |
1934 | 1946 | "additionalProperties": false, |
1935 | 1947 | "required": [ |
1936 | | - "column_name", |
1937 | | - "dtype" |
| 1948 | + "kind", |
| 1949 | + "target", |
| 1950 | + "entity_table_names" |
1938 | 1951 | ] |
1939 | 1952 | }, |
1940 | | - "entity_table_names": { |
1941 | | - "type": "array", |
1942 | | - "items": { |
1943 | | - "type": "string" |
1944 | | - } |
| 1953 | + { |
| 1954 | + "description": "A binary task, for the schema only.", |
| 1955 | + "type": "object", |
| 1956 | + "properties": { |
| 1957 | + "kind": { |
| 1958 | + "type": "string", |
| 1959 | + "enum": [ |
| 1960 | + "binary_classification" |
| 1961 | + ] |
| 1962 | + }, |
| 1963 | + "target": { |
| 1964 | + "description": "A binary task's label column: its classes and positive class.", |
| 1965 | + "type": "object", |
| 1966 | + "properties": { |
| 1967 | + "column_name": { |
| 1968 | + "type": "string" |
| 1969 | + }, |
| 1970 | + "dtype": { |
| 1971 | + "description": "A column's type on the wire, as the reference's engine names it\n(`_dtype_name`, `_list_dtype_name`).", |
| 1972 | + "type": "string", |
| 1973 | + "enum": [ |
| 1974 | + "int64", |
| 1975 | + "float32", |
| 1976 | + "float64", |
| 1977 | + "string", |
| 1978 | + "stringlist", |
| 1979 | + "bool", |
| 1980 | + "timestamp[us]" |
| 1981 | + ] |
| 1982 | + }, |
| 1983 | + "classes": { |
| 1984 | + "type": "array", |
| 1985 | + "items": { |
| 1986 | + "type": "string" |
| 1987 | + } |
| 1988 | + }, |
| 1989 | + "positive_class": { |
| 1990 | + "type": "string" |
| 1991 | + } |
| 1992 | + }, |
| 1993 | + "additionalProperties": false, |
| 1994 | + "required": [ |
| 1995 | + "column_name", |
| 1996 | + "dtype", |
| 1997 | + "classes", |
| 1998 | + "positive_class" |
| 1999 | + ] |
| 2000 | + }, |
| 2001 | + "entity_table_names": { |
| 2002 | + "type": "array", |
| 2003 | + "items": { |
| 2004 | + "type": "string" |
| 2005 | + } |
| 2006 | + }, |
| 2007 | + "anchor_time_column": { |
| 2008 | + "type": "string" |
| 2009 | + } |
| 2010 | + }, |
| 2011 | + "additionalProperties": false, |
| 2012 | + "required": [ |
| 2013 | + "kind", |
| 2014 | + "target", |
| 2015 | + "entity_table_names" |
| 2016 | + ] |
1945 | 2017 | }, |
1946 | | - "anchor_time_column": { |
1947 | | - "description": "The instance table's column holding each example's anchor time,\nwhere the examples have one.", |
1948 | | - "type": "string" |
| 2018 | + { |
| 2019 | + "description": "A multiclass task, for the schema only.", |
| 2020 | + "type": "object", |
| 2021 | + "properties": { |
| 2022 | + "kind": { |
| 2023 | + "type": "string", |
| 2024 | + "enum": [ |
| 2025 | + "multiclass_classification" |
| 2026 | + ] |
| 2027 | + }, |
| 2028 | + "target": { |
| 2029 | + "description": "A multiclass task's label column: its classes, no positive class.", |
| 2030 | + "type": "object", |
| 2031 | + "properties": { |
| 2032 | + "column_name": { |
| 2033 | + "type": "string" |
| 2034 | + }, |
| 2035 | + "dtype": { |
| 2036 | + "description": "A column's type on the wire, as the reference's engine names it\n(`_dtype_name`, `_list_dtype_name`).", |
| 2037 | + "type": "string", |
| 2038 | + "enum": [ |
| 2039 | + "int64", |
| 2040 | + "float32", |
| 2041 | + "float64", |
| 2042 | + "string", |
| 2043 | + "stringlist", |
| 2044 | + "bool", |
| 2045 | + "timestamp[us]" |
| 2046 | + ] |
| 2047 | + }, |
| 2048 | + "classes": { |
| 2049 | + "type": "array", |
| 2050 | + "items": { |
| 2051 | + "type": "string" |
| 2052 | + } |
| 2053 | + } |
| 2054 | + }, |
| 2055 | + "additionalProperties": false, |
| 2056 | + "required": [ |
| 2057 | + "column_name", |
| 2058 | + "dtype", |
| 2059 | + "classes" |
| 2060 | + ] |
| 2061 | + }, |
| 2062 | + "entity_table_names": { |
| 2063 | + "type": "array", |
| 2064 | + "items": { |
| 2065 | + "type": "string" |
| 2066 | + } |
| 2067 | + }, |
| 2068 | + "anchor_time_column": { |
| 2069 | + "type": "string" |
| 2070 | + } |
| 2071 | + }, |
| 2072 | + "additionalProperties": false, |
| 2073 | + "required": [ |
| 2074 | + "kind", |
| 2075 | + "target", |
| 2076 | + "entity_table_names" |
| 2077 | + ] |
1949 | 2078 | } |
1950 | | - }, |
1951 | | - "additionalProperties": false, |
1952 | | - "required": [ |
1953 | | - "kind", |
1954 | | - "target", |
1955 | | - "entity_table_names" |
1956 | 2079 | ] |
1957 | 2080 | }, |
1958 | 2081 | "schema": { |
|
2330 | 2453 | "type": "boolean" |
2331 | 2454 | }, |
2332 | 2455 | "inference_config": { |
2333 | | - "description": "The engine's inference options, as it writes them: a classification's\nwith its class shuffle, a regression's with its target transforms and\noutput type. The schema of [`InferenceConfig`] and\n[`ClassificationConfig`] at once, for the schema only.", |
2334 | | - "type": "object", |
2335 | | - "properties": { |
2336 | | - "kind": { |
2337 | | - "type": "string" |
2338 | | - }, |
2339 | | - "num_estimators": { |
2340 | | - "type": "integer", |
2341 | | - "format": "uint64", |
2342 | | - "minimum": 0 |
2343 | | - }, |
2344 | | - "column_shuffle": { |
2345 | | - "type": "boolean" |
2346 | | - }, |
2347 | | - "category_shuffle": { |
2348 | | - "type": "boolean" |
2349 | | - }, |
2350 | | - "hop_shuffle": { |
2351 | | - "type": "boolean" |
2352 | | - }, |
2353 | | - "class_shuffle": { |
2354 | | - "type": "boolean" |
2355 | | - }, |
2356 | | - "target_transforms": { |
2357 | | - "type": "array", |
2358 | | - "items": { |
2359 | | - "type": "string" |
2360 | | - } |
| 2456 | + "description": "The engine's inference options, a regression's or a classification's:\nthe schema of [`InferenceConfig`] and [`ClassificationConfig`], for the\nschema only.", |
| 2457 | + "anyOf": [ |
| 2458 | + { |
| 2459 | + "description": "A regression's inference options, as the engine writes them\n(`_inference_config_to_json`).", |
| 2460 | + "type": "object", |
| 2461 | + "properties": { |
| 2462 | + "kind": { |
| 2463 | + "type": "string" |
| 2464 | + }, |
| 2465 | + "num_estimators": { |
| 2466 | + "type": "integer", |
| 2467 | + "format": "uint64", |
| 2468 | + "minimum": 0 |
| 2469 | + }, |
| 2470 | + "column_shuffle": { |
| 2471 | + "type": "boolean" |
| 2472 | + }, |
| 2473 | + "category_shuffle": { |
| 2474 | + "type": "boolean" |
| 2475 | + }, |
| 2476 | + "hop_shuffle": { |
| 2477 | + "type": "boolean" |
| 2478 | + }, |
| 2479 | + "class_shuffle": { |
| 2480 | + "description": "The reader's, not the writer's: a regression's options hold none.", |
| 2481 | + "type": "boolean" |
| 2482 | + }, |
| 2483 | + "target_transforms": { |
| 2484 | + "type": "array", |
| 2485 | + "items": { |
| 2486 | + "type": "string" |
| 2487 | + } |
| 2488 | + }, |
| 2489 | + "output_type": { |
| 2490 | + "type": "string" |
| 2491 | + } |
| 2492 | + }, |
| 2493 | + "additionalProperties": false, |
| 2494 | + "required": [ |
| 2495 | + "kind", |
| 2496 | + "num_estimators", |
| 2497 | + "column_shuffle", |
| 2498 | + "category_shuffle", |
| 2499 | + "hop_shuffle", |
| 2500 | + "target_transforms", |
| 2501 | + "output_type" |
| 2502 | + ] |
2361 | 2503 | }, |
2362 | | - "output_type": { |
2363 | | - "type": "string" |
| 2504 | + { |
| 2505 | + "description": "A classification's inference options, its class shuffle the reader's\nto leave out: the schema of [`ClassificationConfig`], for the schema\nonly.", |
| 2506 | + "type": "object", |
| 2507 | + "properties": { |
| 2508 | + "kind": { |
| 2509 | + "type": "string" |
| 2510 | + }, |
| 2511 | + "num_estimators": { |
| 2512 | + "type": "integer", |
| 2513 | + "format": "uint64", |
| 2514 | + "minimum": 0 |
| 2515 | + }, |
| 2516 | + "column_shuffle": { |
| 2517 | + "type": "boolean" |
| 2518 | + }, |
| 2519 | + "category_shuffle": { |
| 2520 | + "type": "boolean" |
| 2521 | + }, |
| 2522 | + "hop_shuffle": { |
| 2523 | + "type": "boolean" |
| 2524 | + }, |
| 2525 | + "class_shuffle": { |
| 2526 | + "type": "boolean" |
| 2527 | + } |
| 2528 | + }, |
| 2529 | + "additionalProperties": false, |
| 2530 | + "required": [ |
| 2531 | + "kind", |
| 2532 | + "num_estimators", |
| 2533 | + "column_shuffle", |
| 2534 | + "category_shuffle", |
| 2535 | + "hop_shuffle" |
| 2536 | + ] |
2364 | 2537 | } |
2365 | | - }, |
2366 | | - "additionalProperties": false, |
2367 | | - "required": [ |
2368 | | - "kind", |
2369 | | - "num_estimators", |
2370 | | - "column_shuffle", |
2371 | | - "category_shuffle", |
2372 | | - "hop_shuffle" |
2373 | 2538 | ] |
2374 | 2539 | } |
2375 | 2540 | }, |
|
0 commit comments