Skip to content

Commit

Permalink
use prod env for default team
Browse files Browse the repository at this point in the history
  • Loading branch information
yuli_han authored and yuli_han committed Feb 28, 2024
1 parent 34dc28a commit 9255b3c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
3 changes: 2 additions & 1 deletion api/py/ai/chronon/repo/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,10 @@ def set_runtime_env(args):
environment["production_team_env"] = (
teams_json[team].get("production", {}).get(effective_mode, {})
)
# For default env we can alwasy use production env.
environment["default_env"] = (
teams_json.get("default", {})
.get(context, {})
.get("production", {})
.get(effective_mode, {})
)
environment["cli_args"]["CHRONON_CONF_PATH"] = conf_path
Expand Down
20 changes: 0 additions & 20 deletions api/py/test/sample/teams.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,6 @@
"EXECUTOR_MEMORY": "4G",
"PARALLELISM": "16"
}
},
"dev": {
"backfill" : {
"EXECUTOR_CORES": "1",
"DRIVER_MEMORY": "15G",
"EXECUTOR_MEMORY": "16G",
"PARALLELISM": "4000",
"MAX_EXECUTORS": "1000"
},
"upload" : {
"EXECUTOR_CORES": "1",
"EXECUTOR_MEMORY": "8G",
"PARALLELISM": "1000",
"MAX_EXECUTORS": "1000"
},
"streaming" : {
"EXECUTOR_CORES": "2",
"EXECUTOR_MEMORY": "4G",
"PARALLELISM": "16"
}
}
},
"sample_team": {
Expand Down
2 changes: 1 addition & 1 deletion api/py/test/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def test_environment(teams_json, repo, parser, test_conf_location):
# from team dev env.
assert os.environ['DRIVER_MEMORY'] == '30G'
# from default dev env.
assert os.environ['EXECUTOR_MEMORY'] == '16G'
assert os.environ['EXECUTOR_MEMORY'] == '8G'

# Check conf set environment overrides most.
reset_env(default_environment)
Expand Down

0 comments on commit 9255b3c

Please sign in to comment.