Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better naming for github action runs #175

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test-mlperf-inference-abtf-poc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

jobs:
build:
name: Test MLPerf Inference ABTF POC
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

jobs:
build:
name: MLPerf Inference Bert ${{ matrix.backend }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

jobs:
build:
name: MLPerf inference MLCommons C++ ResNet50
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-mlperf-inference-rgat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

jobs:
build:
name: rgat-inference-run
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sujik18 I was referring to the previous line where "build" is used. Do you know if the "name" field can override the job name "build"? If so, then it is fine.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arjunsuresh Yes, I believe that by mentioning name field it will override the "build" as it did work for other tests.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you see the action here it still shows "build": https://github.com/mlcommons/mlperf-automations/actions/runs/13100736773

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arjunsuresh I tried replacing the build value with another job key value, but the test name is still showing as build. You can see it here https://github.com/mlcommons/mlperf-automations/actions/runs/13104065296/workflow
I double-checked for any syntax errors, but there aren't any. Even if it was a GitHub internal issue, it would have also affected other test names, but that isn't the case, so I'm not sure why it's happening.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sujik18 if the pull_request_target is specified in the github action, then the action is running from the base branch and so the PR changes won't be reflected there. But you can see for the changes in the github actions with "on:pull_request".

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sujik18 the change is working fine 👍. Can you please revert back to pull_request_target - once the PR is merged, from next PR onwards the tests will run as expected.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arjunsuresh I now understand that I was only checking the on:pull_request_target event. The recent commit was unnecessary. I will revert back to pull_request_target, and we can simply ignore the last commit to proceed with merging the PR

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. The changes are fine for the github actions. Have you seen my comment on the logging part in the github issue?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, actually by mistake those commits got included with this PR instead of a new one, wrt to logger issue, apart from making the induvial script to utilize global logger, do we also need each script to write the logs in a single mlc-log.txt file,
I guess that would be a better approach for maintaining the logs?
Currently each script file is generating its own log.txt in its own directory. For that we need to change the default value given to the path for setup_logging function call, as the folder directory of mlc seems to have been changed, the current default value seems to be invalid.

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-mlperf-inference-tvm-resnet50.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

jobs:
tvm-run:
name: TVM ResNet50
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
build:

name: Test MLPerf loadgen with HuggingFace bert onnx fp32 squad model on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down
8 changes: 6 additions & 2 deletions script/app-image-classification-onnx-py/customize.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
from mlc import utils
import os
import shutil
import logging

# Configure the logger
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

def preprocess(i):

Expand Down Expand Up @@ -45,14 +49,14 @@ def postprocess(i):
with open(fjson, 'w', encoding='utf-8') as f:
json.dump(data, f, ensure_ascii=False, indent=4)
except Exception as e:
print('CM warning: {}'.format(e))
logger.warning('CM warning: {}'.format(e))

try:
import yaml
with open(fyaml, 'w', encoding='utf-8') as f:
yaml.dump(data, f)
except Exception as e:
print('CM warning: {}'.format(e))
logger.warning('CM warning: {}'.format(e))

top_classification = data.get('top_classification', '')

Expand Down
6 changes: 5 additions & 1 deletion script/app-image-corner-detection/customize.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
from mlc import utils
import os
import logging

# Configure the logger
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

def preprocess(i):
os_info = i['os_info']
Expand Down Expand Up @@ -38,6 +42,6 @@ def preprocess(i):
def postprocess(i):

env = i['env']
print(env['MLC_OUTPUT'] + " generated in " + env['MLC_RUN_DIR'])
logger.info(env['MLC_OUTPUT'] + " generated in " + env['MLC_RUN_DIR'])

return {'return': 0}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
import json
import shutil
import subprocess
import logging

# Configure the logger
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

def preprocess(i):

Expand Down Expand Up @@ -72,7 +76,7 @@ def preprocess(i):
env['MLC_MLPERF_LOADGEN_EXTRA_OPTIONS'] += " --count " + \
env['MLC_MLPERF_LOADGEN_QUERY_COUNT']

print("Using MLCommons Inference source from '" +
logger.info("Using MLCommons Inference source from '" +
env['MLC_MLPERF_INFERENCE_SOURCE'] + "'")

if 'MLC_MLPERF_CONF' not in env:
Expand Down
Loading