@@ -604,9 +604,13 @@ def create_project(
604
604
description : Optional [str ] = None ,
605
605
auto_audit_percentage : Optional [float ] = None ,
606
606
auto_audit_number_of_labels : Optional [int ] = None ,
607
- quality_modes : Optional [Set [QualityMode ]] = {QualityMode .Benchmark , QualityMode .Consensus },
607
+ quality_modes : Optional [Set [QualityMode ]] = {
608
+ QualityMode .Benchmark ,
609
+ QualityMode .Consensus ,
610
+ },
608
611
is_benchmark_enabled : Optional [bool ] = None ,
609
- is_consensus_enabled : Optional [bool ] = None ) -> Project :
612
+ is_consensus_enabled : Optional [bool ] = None ,
613
+ ) -> Project :
610
614
"""Creates a Project object on the server.
611
615
612
616
Attribute values are passed as keyword arguments.
@@ -655,7 +659,10 @@ def create_model_evaluation_project(
655
659
description : Optional [str ] = None ,
656
660
auto_audit_percentage : Optional [float ] = None ,
657
661
auto_audit_number_of_labels : Optional [int ] = None ,
658
- quality_modes : Optional [Set [QualityMode ]] = {QualityMode .Benchmark , QualityMode .Consensus },
662
+ quality_modes : Optional [Set [QualityMode ]] = {
663
+ QualityMode .Benchmark ,
664
+ QualityMode .Consensus ,
665
+ },
659
666
is_benchmark_enabled : Optional [bool ] = None ,
660
667
is_consensus_enabled : Optional [bool ] = None ,
661
668
dataset_id : Optional [str ] = None ,
@@ -718,27 +725,41 @@ def create_model_evaluation_project(
718
725
}
719
726
return self ._create_project (_CoreProjectInput (** input ))
720
727
721
- def create_offline_model_evaluation_project (self , ** kwargs ) -> Project :
728
+ def create_offline_model_evaluation_project (
729
+ self ,
730
+ name : str ,
731
+ description : Optional [str ] = None ,
732
+ auto_audit_percentage : Optional [float ] = None ,
733
+ auto_audit_number_of_labels : Optional [int ] = None ,
734
+ quality_modes : Optional [Set [QualityMode ]] = {
735
+ QualityMode .Benchmark ,
736
+ QualityMode .Consensus ,
737
+ },
738
+ is_benchmark_enabled : Optional [bool ] = None ,
739
+ is_consensus_enabled : Optional [bool ] = None ,
740
+ ) -> Project :
722
741
"""
723
742
Creates a project for offline model evaluation.
724
743
Args:
725
744
**kwargs: Additional parameters to pass see the create_project method
726
745
Returns:
727
746
Project: The created project
728
747
"""
729
- kwargs ["media_type" ] = (
730
- MediaType .Conversational
731
- ) # Only Conversational is supported
732
- kwargs ["editor_task_type" ] = (
733
- EditorTaskType .OfflineModelChatEvaluation .value
734
- ) # Special editor task type for offline model evaluation
735
-
736
- # The following arguments are not supported for offline model evaluation
737
- kwargs .pop ("dataset_name_or_id" , None )
738
- kwargs .pop ("append_to_existing_dataset" , None )
739
- kwargs .pop ("data_row_count" , None )
748
+ media_type = MediaType .Conversational
749
+ editor_task_type = EditorTaskType .OfflineModelChatEvaluation
740
750
741
- return self ._create_project (_CoreProjectInput (** kwargs ))
751
+ input = {
752
+ "name" : name ,
753
+ "description" : description ,
754
+ "media_type" : media_type ,
755
+ "auto_audit_percentage" : auto_audit_percentage ,
756
+ "auto_audit_number_of_labels" : auto_audit_number_of_labels ,
757
+ "quality_modes" : quality_modes ,
758
+ "is_benchmark_enabled" : is_benchmark_enabled ,
759
+ "is_consensus_enabled" : is_consensus_enabled ,
760
+ "editor_task_type" : editor_task_type ,
761
+ }
762
+ return self ._create_project (_CoreProjectInput (** input ))
742
763
743
764
def create_prompt_response_generation_project (
744
765
self ,
0 commit comments