Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
GitLab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
GitLab
Commits
8f456549
Verified
Commit
8f456549
authored
1 month ago
by
Bruno Cardoso
Committed by
GitLab
1 month ago
Browse files
Options
Downloads
Patches
Plain Diff
Add fallback to experimental label
parent
c5300deb
No related branches found
No related tags found
3 merge requests
!181325
Fix ambiguous `created_at` in project.rb
,
!180187
Draft: Update dashboard editing to save visualizations directly to the dashboard file
,
!180071
Add fallback to experimental label
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ee/app/models/ai/self_hosted_model.rb
+1
-1
1 addition, 1 deletion
ee/app/models/ai/self_hosted_model.rb
ee/spec/models/ai/self_hosted_model_spec.rb
+15
-3
15 additions, 3 deletions
ee/spec/models/ai/self_hosted_model_spec.rb
with
16 additions
and
4 deletions
ee/app/models/ai/self_hosted_model.rb
+
1
−
1
View file @
8f456549
...
...
@@ -58,7 +58,7 @@ def identifier
end
def
release_state
MODELS_RELEASE_STATE
[
self
[
:model
].
to_sym
]
MODELS_RELEASE_STATE
[
self
[
:model
]
&
.
to_sym
]
||
RELEASE_STATE_EXPERIMENTAL
end
def
ga?
...
...
This diff is collapsed.
Click to expand it.
ee/spec/models/ai/self_hosted_model_spec.rb
+
15
−
3
View file @
8f456549
...
...
@@ -50,10 +50,22 @@
end
describe
'#release_state'
do
subject
(
:self_hosted_model
)
{
build
(
:ai_self_hosted_model
,
model: :deepseekcoder
)
}
Ai
::
SelfHostedModel
::
MODELS_RELEASE_STATE
.
each
do
|
model
,
expected_state
|
context
"when model is
#{
model
}
"
do
subject
(
:self_hosted_model
)
{
build
(
:ai_self_hosted_model
,
model:
model
)
}
it
'returns release state of model'
do
expect
(
self_hosted_model
.
release_state
).
to
eq
(
'BETA'
)
it
"returns
#{
expected_state
}
"
do
expect
(
self_hosted_model
.
release_state
).
to
eq
(
expected_state
)
end
end
end
context
'when model is not listed in MODELS_RELEASE_STATE'
do
subject
(
:self_hosted_model
)
{
build
(
:ai_self_hosted_model
,
model:
nil
)
}
it
'returns EXPERIMENTAL as default release state'
do
expect
(
self_hosted_model
.
release_state
).
to
eq
(
Ai
::
SelfHostedModel
::
RELEASE_STATE_EXPERIMENTAL
)
end
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment