@@ -516,46 +516,51 @@ def add_dataset(
516
516
517
517
The YAML file with the dataset config must have the following fields:
518
518
519
- - `` columnNames`` : List[str]
519
+ columnNames : List[str]
520
520
List of the dataset's column names.
521
- - `` classNames`` : List[str]
521
+ classNames : List[str]
522
522
List of class names indexed by label integer in the dataset.
523
523
E.g. ``[negative, positive]`` when ``[0, 1]`` are in your label column.
524
- - `` labelColumnName`` : str
524
+ labelColumnName : str
525
525
Column header in the csv containing the labels.
526
526
527
527
.. important::
528
528
The labels in this column must be zero-indexed integer values.
529
- - `` label`` : str
529
+ label : str
530
530
Type of dataset. E.g. ``'training'`` or
531
531
``'validation'``.
532
- - `` featureNames`` : List[str], default []
532
+ featureNames : List[str], default []
533
533
List of input feature names. Only applicable if your ``task_type`` is
534
534
:obj:`TaskType.TabularClassification` or :obj:`TaskType.TabularRegression`.
535
- - `` textColumnName`` : str, default None
535
+ textColumnName : str, default None
536
536
Column header in the csv containing the input text. Only applicable if
537
537
your ``task_type`` is :obj:`TaskType.TextClassification`.
538
- - `` predictionsColumnName`` : str, default None
538
+ predictionsColumnName : str, default None
539
539
Column header in the csv containing the predictions. Only applicable if you
540
540
are uploading a model as well with the :obj:`add_model` method.
541
541
542
542
.. important::
543
543
Each cell in this column must contain a list of
544
544
class probabilities. For example, for a binary classification
545
- task, the cell values should look like this:
546
- .. csv-table::
547
- :header: ..., predictions
548
- ..., "[0.6650292861587155, 0.3349707138412845]"
549
- ..., "[0.8145561636482788, 0.18544383635172124]"
545
+ task, the column with the predictions should look like this:
550
546
551
- - ``categoricalFeatureNames`` : List[str], default []
547
+ **predictions**
548
+
549
+ ``[0.1, 0.9]``
550
+
551
+ ``[0.8, 0.2]``
552
+
553
+ ``...``
554
+
555
+ categoricalFeatureNames : List[str], default []
552
556
A list containing the names of all categorical features in the dataset.
553
557
E.g. ``["Gender", "Geography"]``. Only applicable if your ``task_type`` is
554
558
:obj:`TaskType.TabularClassification` or :obj:`TaskType.TabularRegression`.
555
- - `` language`` : str, default 'en'
559
+ language : str, default 'en'
556
560
The language of the dataset in ISO 639-1 (alpha-2 code) format.
557
- - `` sep`` : str, default ','
561
+ sep : str, default ','
558
562
Delimiter to use. E.g. `'\\t'`.
563
+
559
564
force : bool
560
565
If :obj:`add_dataset` is called when there is already a dataset of the same type
561
566
in the staging area, when ``force=True``, the existing staged dataset will be
@@ -727,46 +732,51 @@ def add_dataframe(
727
732
728
733
The YAML file with the dataset config must have the following fields:
729
734
730
- - `` columnNames`` : List[str]
735
+ columnNames : List[str]
731
736
List of the dataset's column names.
732
- - `` classNames`` : List[str]
737
+ classNames : List[str]
733
738
List of class names indexed by label integer in the dataset.
734
739
E.g. ``[negative, positive]`` when ``[0, 1]`` are in your label column.
735
- - `` labelColumnName`` : str
736
- Column header in the csv containing the labels.
740
+ labelColumnName : str
741
+ Column header in the dataframe containing the labels.
737
742
738
743
.. important::
739
744
The labels in this column must be zero-indexed integer values.
740
- - `` label`` : str
745
+ label : str
741
746
Type of dataset. E.g. ``'training'`` or
742
747
``'validation'``.
743
- - `` featureNames`` : List[str], default []
748
+ featureNames : List[str], default []
744
749
List of input feature names. Only applicable if your ``task_type`` is
745
750
:obj:`TaskType.TabularClassification` or :obj:`TaskType.TabularRegression`.
746
- - `` textColumnName`` : str, default None
747
- Column header in the csv containing the input text. Only applicable if your
748
- ``task_type`` is :obj:`TaskType.TextClassification`.
749
- - `` predictionsColumnName`` : str, default None
750
- Column header in the csv containing the predictions. Only applicable if you
751
+ textColumnName : str, default None
752
+ Column header in the dataframe containing the input text. Only applicable if
753
+ your ``task_type`` is :obj:`TaskType.TextClassification`.
754
+ predictionsColumnName : str, default None
755
+ Column header in the dataframe containing the predictions. Only applicable if you
751
756
are uploading a model as well with the :obj:`add_model` method.
752
757
753
758
.. important::
754
759
Each cell in this column must contain a list of
755
760
class probabilities. For example, for a binary classification
756
- task, the cell values should look like this:
757
- .. csv-table::
758
- :header: ..., predictions
759
- ..., "[0.6650292861587155, 0.3349707138412845]"
760
- ..., "[0.8145561636482788, 0.18544383635172124]"
761
+ task, the column with the predictions should look like this:
761
762
762
- - ``categoricalFeatureNames`` : List[str], default []
763
+ **predictions**
764
+
765
+ ``[0.1, 0.9]``
766
+
767
+ ``[0.8, 0.2]``
768
+
769
+ ``...``
770
+
771
+ categoricalFeatureNames : List[str], default []
763
772
A list containing the names of all categorical features in the dataset.
764
773
E.g. ``["Gender", "Geography"]``. Only applicable if your ``task_type`` is
765
774
:obj:`TaskType.TabularClassification` or :obj:`TaskType.TabularRegression`.
766
- - `` language`` : str, default 'en'
775
+ language : str, default 'en'
767
776
The language of the dataset in ISO 639-1 (alpha-2 code) format.
768
- - `` sep`` : str, default ','
777
+ sep : str, default ','
769
778
Delimiter to use. E.g. `'\\t'`.
779
+
770
780
force : bool
771
781
If :obj:`add_dataframe` is called when there is already a dataset of the same
772
782
type in the staging area, when ``force=True``, the existing staged dataset will
@@ -993,7 +1003,7 @@ def push(self, project_id: int):
993
1003
Notes
994
1004
-----
995
1005
- To use this method, you must first have committed your changes with the :obj:`commit`
996
- method.
1006
+ method.
997
1007
998
1008
Examples
999
1009
--------
0 commit comments