Skip to content

Commit be5d0c5

Browse files
authored
Merge pull request #3 from outerbounds/new_model
new model
2 parents 8f32934 + a0f75ae commit be5d0c5

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
--perimeter default \
2828
--github-actions
2929
30-
- name: Run tests
30+
- name: Backtest model
3131
run: |-
3232
python hello.py run --with kubernetes
3333

backtest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from metaflow import Runner
2+
3+
with Runner('model.py', decospecs=['kubernetes']).run() as running:
4+
assert running.run.data.model_accuracy > 0.9

model.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from metaflow import FlowSpec, step, card, project, current
2+
3+
@project(name='mlproject')
4+
class GitHubActionsDemo(FlowSpec):
5+
6+
@step
7+
def start(self):
8+
self.x = 'cucumber'
9+
print('x is', self.x)
10+
print('branch is', current.branch_name)
11+
print("Hello GitHub Actions!")
12+
self.next(self.end)
13+
14+
@step
15+
def end(self):
16+
self.model_accuracy = 0.91
17+
print('fixed')
18+
19+
if __name__ == "__main__":
20+
GitHubActionsDemo()

0 commit comments

Comments
 (0)