Skip to content

Commit

Permalink
Merge branch 'main' into users/boomanaident154/whole-corpus-sampler
Browse files Browse the repository at this point in the history
  • Loading branch information
boomanaiden154 committed Sep 16, 2024
2 parents 5c89f41 + 32ad407 commit 50fa562
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 46 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@

name: MLGO CI

on: [push, repository_dispatch, pull_request]
permissions:
contents: read

on:
push:
branches:
- 'main'
repository_dispatch:
pull_request:

jobs:
LicenseCheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: ./check-license.sh
Envvars:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -46,17 +54,17 @@ jobs:
- task: Test
cmd: pytest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Python With Cached pip Packages
if: needs.Envvars.outputs.do_cache == '1'
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pipenv'
cache-dependency-path: Pipfile.lock
- name: Install Python, no cache
if: needs.Envvars.outputs.do_cache == '0'
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Pipenv
Expand Down
40 changes: 0 additions & 40 deletions compiler_opt/es/es_worker.py

This file was deleted.

2 changes: 1 addition & 1 deletion compiler_opt/rl/corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def reset(self):
def sample(self, k: int, sort: bool = False) -> List[ModuleSpec]:
"""Samples `k` corpus elements, optionally sorting by size descending.
Use load_corpus_element to get LoadedModuleSpecs - this allows the user
Use load_module_spec to get LoadedModuleSpecs - this allows the user to
decide how the loading should happen (e.g. may want to use a threadpool)
"""
# Note: sampler is intentionally defaulted to a mutable object, as the
Expand Down
1 change: 1 addition & 0 deletions compiler_opt/rl/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ def reset(self, module: corpus.LoadedModuleSpec):
self._clang_generator.send(None)
# pytype: disable=attribute-error
self._iclang, self._clang = self._clang_generator.send(module)
# pytype: enable=attribute-error
return self._get_observation()

def step(self, action: np.ndarray):
Expand Down

0 comments on commit 50fa562

Please sign in to comment.