File tree Expand file tree Collapse file tree 1 file changed +32
-1
lines changed Expand file tree Collapse file tree 1 file changed +32
-1
lines changed Original file line number Diff line number Diff line change 55os .environ ["ROBOFLOW_CONFIG_DIR" ] = f"{ thisdir } /data/.config"
66
77from roboflow .roboflowpy import _argparser # noqa: E402
8+ from roboflow import Roboflow
89
910# import requests
1011# requests.urllib3.disable_warnings()
1112
1213rootdir = os .path .abspath (f"{ thisdir } /../.." )
1314sys .path .append (rootdir )
1415
15- if __name__ == "__main__" :
16+
17+ def run_cli ():
1618 parser = _argparser ()
1719 # args = parser.parse_args(["login"])
1820 # args = parser.parse_args(f"upload {thisdir}/../datasets/chess -w wolfodorpythontests -p chess".split()) # noqa: E501 // docs
4547 # f"import -w tonyprivate -p meh-plvrv {thisdir}/../datasets/paligemma/".split() # noqa: E501 // docs
4648 )
4749 args .func (args )
50+
51+
52+ def run_api_train ():
53+ rf = Roboflow ()
54+ project = rf .workspace ("meh3" ).project ("mosquitobao" )
55+ # version_number = project.generate_version(
56+ # settings={
57+ # "augmentation": {
58+ # "bbblur": {"pixels": 1.5},
59+ # "image": {"versions": 2},
60+ # },
61+ # "preprocessing": {
62+ # "auto-orient": True,
63+ # },
64+ # }
65+ # )
66+ version_number = "61"
67+ print (version_number )
68+ version = project .version (version_number )
69+ model = version .train (
70+ speed = "fast" , # Options: "fast" (default) or "accurate" (paid feature)
71+ checkpoint = None , # Use a specific checkpoint to continue training
72+ )
73+ print (model )
74+
75+
76+ if __name__ == "__main__" :
77+ # run_cli()
78+ run_api_train ()
You can’t perform that action at this time.
0 commit comments