Exemple #1
0
 def create(self, validated_data):
     """Check the hptuning or set the value from the specification."""
     if not validated_data.get('hptuning') and validated_data.get('content'):
         config = validate_group_spec_content(validated_data['content'])
         if config.hptuning:
             hptuning = config.hptuning.to_dict()
             validated_data['hptuning'] = hptuning
     return super(ExperimentGroupDetailSerializer, self).create(validated_data=validated_data)
Exemple #2
0
 def create(self, validated_data):
     """Check the params or set the value from the specification."""
     if not validated_data.get('params') and validated_data.get('content'):
         config = validate_group_spec_content(validated_data['content'])
         if config.settings:
             params = config.settings.to_light_dict(exclude_attrs=['logging'])
             validated_data['params'] = params
     return super(ExperimentGroupDetailSerializer, self).create(validated_data=validated_data)
Exemple #3
0
 def create(self, validated_data):
     """Check the hptuning or set the value from the specification."""
     if not validated_data.get('hptuning') and validated_data.get(
             'content'):
         config = validate_group_spec_content(validated_data['content'])
         if config.hptuning:
             hptuning = config.hptuning.to_dict()
             validated_data['hptuning'] = hptuning
     return super(ExperimentGroupDetailSerializer,
                  self).create(validated_data=validated_data)
Exemple #4
0
    def create(self, validated_data):
        """Check the hptuning or set the value from the specification."""
        if not validated_data.get('hptuning') and validated_data.get(
                'content'):
            config = validate_group_spec_content(validated_data['content'])
            if config.hptuning:
                hptuning = config.hptuning.to_dict()
                if config.search_algorithm == SearchAlgorithms.GRID:
                    hptuning['grid_search'] = hptuning.get('grid_search', {})
                validated_data['hptuning'] = hptuning

        return super().create(validated_data=validated_data)
Exemple #5
0
 def validate_content(self, content):
     # This is optional
     if not content:
         return content
     validate_group_spec_content(content)
     return content
 def validate_content(self, content):
     validate_group_spec_content(content)
     return content
Exemple #7
0
 def validate_content(self, content):
     validate_group_spec_content(content)
     return content