trevenrawr
04/22/2022, 9:37 PMcontainer_config
on a per-run basis? Depending on how a particular job runs gets configured (through a PartitionedConfig
), I’d like to be able to update a pod’s resource requests, as opposed to always allocating based on the “worst case” resource usage scenario (at the job scope).daniel
04/22/2022, 9:42 PMtags_for_partition_fn
arg on PartitionedConfig that you could use for this: https://docs.dagster.io/_apidocs/partitions#partitionstrevenrawr
04/22/2022, 9:43 PM0.14.6
and they were introduced shortly thereafter! I’m constantly amazed at how you folks are always one step ahead of my needs; thank you again!Value in dict mismatches expected type for key dagster-k8s/config. Expected value of type <class 'str'>. Got value {'container_config': {'resources': {'requests': {'cpu': '4', 'memory': '48Gi'}, 'limits': {'cpu': '16', 'memory': '48Gi'}}}, 'job_spec_config': {'ttl_seconds_after_finished': 300}} of type <class 'dict'>.
I assume I should turn the dict into a string in the tags_for_partition_fn
?daniel
04/22/2022, 11:32 PMtrevenrawr
04/22/2022, 11:48 PMjson.dumps
did the trick; thanks!daniel
04/25/2022, 2:17 PMCharlie Bini
05/03/2022, 7:00 PMdaniel
05/03/2022, 7:00 PMCharlie Bini
05/03/2022, 7:02 PMdagster-k8s/config
tag, and getting this:
dagster.check.CheckError: Value in dict mismatches expected type for key dagster-k8s/config. Expected value of type <class 'str'>. Got value {'container_config': {'resources': {'limits': {'cpu': '1750m', 'memory': '2500Mi'}}}} of type <class 'dict'>.
daniel
05/03/2022, 7:03 PMCharlie Bini
05/03/2022, 7:03 PMjson.dumps
fixes itdaniel
05/03/2022, 7:03 PMCharlie Bini
05/03/2022, 7:04 PMdagster.check.CheckError: Value in dict mismatches expected type for key dagster-k8s/config. Expected value of type <class 'str'>. Got value {'container_config': {'resources': {'limits': {'cpu': '1750m', 'memory': '2500Mi'}}}} of type <class 'dict'>.
File "/root/app/__pypackages__/3.10/lib/dagster/grpc/server.py", line 214, in __init__
self._loaded_repositories = LoadedRepositories(
File "/root/app/__pypackages__/3.10/lib/dagster/grpc/server.py", line 94, in __init__
loadable_targets = get_loadable_targets(
File "/root/app/__pypackages__/3.10/lib/dagster/grpc/utils.py", line 53, in get_loadable_targets
else loadable_targets_from_python_package(package_name, working_directory)
File "/root/app/__pypackages__/3.10/lib/dagster/core/workspace/autodiscovery.py", line 48, in loadable_targets_from_python_package
module = load_python_module(
File "/root/app/__pypackages__/3.10/lib/dagster/core/code_pointer.py", line 136, in load_python_module
return importlib.import_module(module_name)
File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/root/app/teamster/local/__init__.py", line 1, in <module>
from teamster.local.repository import * # noqa: F401, F403
File "/root/app/teamster/local/repository.py", line 4, in <module>
from teamster.local.schedules import powerschool as pss
File "/root/app/teamster/local/schedules/powerschool.py", line 8, in <module>
full_schedule = ScheduleDefinition(
File "/root/app/__pypackages__/3.10/lib/dagster/core/definitions/schedule_definition.py", line 305, in __init__
check_tags(tags, "tags")
File "/root/app/__pypackages__/3.10/lib/dagster/core/storage/tags.py", line 67, in check_tags
check.opt_dict_param(obj, name, key_type=str, value_type=str)
File "/root/app/__pypackages__/3.10/lib/dagster/check/__init__.py", line 276, in opt_dict_param
return _check_mapping_entries(obj, key_type, value_type, mapping_type=dict)
File "/root/app/__pypackages__/3.10/lib/dagster/check/__init__.py", line 1578, in _check_mapping_entries
raise CheckError(
daniel
05/03/2022, 10:09 PMCharlie Bini
05/20/2022, 5:29 PMdaniel
05/20/2022, 6:06 PMCharlie Bini
05/20/2022, 6:13 PMfull_tables = ScheduleDefinition(
name="full_tables",
job=powerschool_extract,
cron_schedule=" 40 14 * * *",
execution_timezone=LOCAL_TIME_ZONE,
run_config=config_from_files(
["./teamster/local/config/powerschool/query-full.yaml"]
),
tags={
"dagster-k8s/config": {
"container_config": {
"resources": {"limits": {"cpu": "1750m", "memory": "3Gi"}}
}
}
},
)
daniel
05/20/2022, 6:16 PMdagster.check.CheckError: Value in dict mismatches expected type for key dagster-k8s/config. Expected value of type <class 'str'>. Got value {'container_config': {'resources': {'limits': {'cpu': '1750m', 'memory': '3Gi'}}}} of type <class 'dict'>.
but in 0.14.16 it loads without an errorCharlie Bini
05/20/2022, 6:18 PMdaniel
05/20/2022, 6:30 PM