-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add Weights & Biases fine-tuning integration and seed in openai…
…_dart (#377)
- Loading branch information
1 parent
69f8e2f
commit a5fff1b
Showing
7 changed files
with
899 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
112 changes: 112 additions & 0 deletions
112
packages/openai_dart/lib/src/generated/schema/fine_tuning_integration.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
// coverage:ignore-file | ||
// GENERATED CODE - DO NOT MODIFY BY HAND | ||
// ignore_for_file: type=lint | ||
// ignore_for_file: invalid_annotation_target | ||
part of open_a_i_schema; | ||
|
||
// ========================================== | ||
// CLASS: FineTuningIntegration | ||
// ========================================== | ||
|
||
/// A fine-tuning integration to enable for a fine-tuning job. | ||
@freezed | ||
class FineTuningIntegration with _$FineTuningIntegration { | ||
const FineTuningIntegration._(); | ||
|
||
/// Factory constructor for FineTuningIntegration | ||
const factory FineTuningIntegration({ | ||
/// The type of integration to enable. Currently, only "wandb" (Weights and Biases) is supported. | ||
required FineTuningIntegrationType type, | ||
|
||
/// The settings for your integration with Weights and Biases. This payload specifies the project that | ||
/// metrics will be sent to. Optionally, you can set an explicit display name for your run, add tags | ||
/// to your run, and set a default entity (team, username, etc) to be associated with your run. | ||
required FineTuningIntegrationWandb wandb, | ||
}) = _FineTuningIntegration; | ||
|
||
/// Object construction from a JSON representation | ||
factory FineTuningIntegration.fromJson(Map<String, dynamic> json) => | ||
_$FineTuningIntegrationFromJson(json); | ||
|
||
/// List of all property names of schema | ||
static const List<String> propertyNames = ['type', 'wandb']; | ||
|
||
/// Perform validations on the schema property values | ||
String? validateSchema() { | ||
return null; | ||
} | ||
|
||
/// Map representation of object (not serialized) | ||
Map<String, dynamic> toMap() { | ||
return { | ||
'type': type, | ||
'wandb': wandb, | ||
}; | ||
} | ||
} | ||
|
||
// ========================================== | ||
// ENUM: FineTuningIntegrationType | ||
// ========================================== | ||
|
||
/// The type of integration to enable. Currently, only "wandb" (Weights and Biases) is supported. | ||
enum FineTuningIntegrationType { | ||
@JsonValue('wandb') | ||
wandb, | ||
} | ||
|
||
// ========================================== | ||
// CLASS: FineTuningIntegrationWandb | ||
// ========================================== | ||
|
||
/// The settings for your integration with Weights and Biases. This payload specifies the project that | ||
/// metrics will be sent to. Optionally, you can set an explicit display name for your run, add tags | ||
/// to your run, and set a default entity (team, username, etc) to be associated with your run. | ||
@freezed | ||
class FineTuningIntegrationWandb with _$FineTuningIntegrationWandb { | ||
const FineTuningIntegrationWandb._(); | ||
|
||
/// Factory constructor for FineTuningIntegrationWandb | ||
const factory FineTuningIntegrationWandb({ | ||
/// The name of the project that the new run will be created under. | ||
required String project, | ||
|
||
/// A display name to set for the run. If not set, we will use the Job ID as the name. | ||
@JsonKey(includeIfNull: false) String? name, | ||
|
||
/// The entity to use for the run. This allows you to set the team or username of the WandB user that you would | ||
/// like associated with the run. If not set, the default entity for the registered WandB API key is used. | ||
@JsonKey(includeIfNull: false) String? entity, | ||
|
||
/// A list of tags to be attached to the newly created run. These tags are passed through directly to WandB. Some | ||
/// default tags are generated by OpenAI: "openai/finetune", "openai/{base-model}", "openai/{ftjob-abcdef}". | ||
@JsonKey(includeIfNull: false) List<String>? tags, | ||
}) = _FineTuningIntegrationWandb; | ||
|
||
/// Object construction from a JSON representation | ||
factory FineTuningIntegrationWandb.fromJson(Map<String, dynamic> json) => | ||
_$FineTuningIntegrationWandbFromJson(json); | ||
|
||
/// List of all property names of schema | ||
static const List<String> propertyNames = [ | ||
'project', | ||
'name', | ||
'entity', | ||
'tags' | ||
]; | ||
|
||
/// Perform validations on the schema property values | ||
String? validateSchema() { | ||
return null; | ||
} | ||
|
||
/// Map representation of object (not serialized) | ||
Map<String, dynamic> toMap() { | ||
return { | ||
'project': project, | ||
'name': name, | ||
'entity': entity, | ||
'tags': tags, | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.