Skip to content

Commit

Permalink
Merge pull request #3 from outerbounds/new_model
Browse files Browse the repository at this point in the history
new model
  • Loading branch information
tuulos authored May 30, 2024
2 parents 8f32934 + a0f75ae commit be5d0c5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
--perimeter default \
--github-actions
- name: Run tests
- name: Backtest model
run: |-
python hello.py run --with kubernetes
Expand Down
4 changes: 4 additions & 0 deletions backtest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from metaflow import Runner

with Runner('model.py', decospecs=['kubernetes']).run() as running:
assert running.run.data.model_accuracy > 0.9
20 changes: 20 additions & 0 deletions model.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from metaflow import FlowSpec, step, card, project, current

@project(name='mlproject')
class GitHubActionsDemo(FlowSpec):

@step
def start(self):
self.x = 'cucumber'
print('x is', self.x)
print('branch is', current.branch_name)
print("Hello GitHub Actions!")
self.next(self.end)

@step
def end(self):
self.model_accuracy = 0.91
print('fixed')

if __name__ == "__main__":
GitHubActionsDemo()

0 comments on commit be5d0c5

Please sign in to comment.