-
-
Notifications
You must be signed in to change notification settings - Fork 270
[ENH] V1 → V2 API Migration - Tasks #1611
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
fd43c48
f4aab6b
d43cf86
3e323ed
9195fa6
5342eec
adc0e74
bfb2d3e
cabaecf
0be93cf
8e5c4eb
021c1ed
5e6c56e
1fec002
1877c07
85c1113
39bf86a
7b66677
b61741f
2a51495
2bf1d1e
d2224c4
f89230a
0708966
122bd21
d6565f1
f7aa11e
9608c36
f6bc7f7
baa3a38
1d3cf95
1b00a7f
cc6e673
c1bf558
52b93fe
ec9477f
dc411dd
3de0919
37b1454
10d134a
935f0f4
0981b2e
2398b5f
9514df8
1a794fe
dbe7782
d8be5f1
b204845
54725fa
abc44a5
b034687
b8826f5
445cbe8
295ef93
488f409
93d7409
45e7257
7fcf039
37cfb2e
9290010
bbfa193
53bee94
4531cbc
d90615a
9b12d6f
45d3423
16f22b1
dd2ce68
ebeccea
a0ac6b9
439e683
f87051b
4077a56
fad1ee7
4086730
fecebbc
4845a1e
a247050
e4a6807
03bf396
c1a4fff
4c6bd2f
ba0e480
33b4ca0
a6b9a45
f924b32
541b0f2
acb173f
3e8d1f0
f83bdb5
519d5cb
30fd44d
2a42712
001caad
fb38a2d
03c4ca9
8d708fd
4f75bba
164f66f
c4dae43
36c20a2
ab3c1eb
c908993
06b9741
015cca3
2a488ca
599c7e1
2867862
f09f3cd
5f731ce
bad7842
aefdb38
0f40b02
7ac1672
6ac1dfe
62924c9
27696bb
190face
95daaa6
7841ea8
cc515aa
e6a92df
1b8c22a
fc839a6
1c922af
ffa9ce9
a7b2d21
27fe790
8de78af
4482a2c
278b546
cf30367
b41a9b2
f737cb1
b40d702
5f079ba
8965112
72ea1a4
a696c49
755636d
d07af34
2d9c8ec
002b989
045d896
c437966
e27470a
d04d956
9263f7f
79dea29
f6497c2
dce7f54
40dd460
0fc917c
3d86b18
f75b2de
3648972
aba3d3e
d99d54d
dc22e3a
7318573
29ef187
cf94c89
298fbda
9870502
33065c2
76b92bb
419edcb
cb6d937
8544c8a
d4c413b
fab1a15
ab997d9
2d06a8d
975734f
276324a
73f7594
2ee7fa3
a8ce427
4be5bbd
9027c01
e5461a9
7d899a9
8587414
23a3450
ac28f82
4a66245
c762fb4
77c21f2
eac24fc
2ed65fe
f3b07de
29db3f1
3b4e538
8ac886b
305f4f0
b2bf164
e97e6c2
c66d73c
aa54e8e
2d452d3
c235812
39eb823
50eed37
49ae63a
6ec4bf4
bdd9494
d510747
d4ad4c9
a79f1a1
e5b918b
4e44fe5
4024913
7a000eb
79f6187
b1a9e7f
d716ecf
3c29e71
b4ff0b2
93155ee
d3cc9a7
a6b82f4
3419973
8de99b7
7d61107
1ecbbba
65472ed
b5eba2b
f11ca75
44b48b5
73f609e
04bc83b
f926092
caed1d1
d488c3c
dc50f3d
d4b033e
cebf764
ca8b72d
844faf5
9a752eb
f276b28
edde570
a416fbd
b1e91fe
7c7d400
b3b3b2a
79985a5
61a57e7
369ae20
cdb4d3a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,7 +40,7 @@ def get(self, task_id: int) -> OpenMLTask: | |
| if not isinstance(task_id, int): | ||
| raise TypeError(f"Task id should be integer, is {type(task_id)}") | ||
|
|
||
| response = self._http.get(f"task/{task_id}") | ||
| response = self._http.get(f"task/{task_id}", use_cache=True) | ||
| return self._create_task_from_xml(response.text) | ||
|
|
||
| def _create_task_from_xml(self, xml: str) -> OpenMLTask: | ||
|
|
@@ -330,7 +330,7 @@ def _get_estimation_procedure_list(self) -> builtins.list[dict[str, Any]]: | |
|
|
||
| class TaskV2API(ResourceV2API, TaskAPI): | ||
| def get(self, task_id: int) -> OpenMLTask: | ||
| response = self._http.get(f"tasks/{task_id}") | ||
| response = self._http.get(f"tasks/{task_id}", use_cache=True) | ||
| return self._create_task_from_json(response.json()) | ||
|
|
||
| def _create_task_from_json(self, task_json: dict) -> OpenMLTask: | ||
|
|
@@ -380,4 +380,4 @@ def list( | |
| task_type: TaskType | int | None = None, | ||
| **kwargs: Any, | ||
| ) -> pd.DataFrame: | ||
| raise NotImplementedError("Task listing is not available in API v2 yet.") | ||
| raise NotImplementedError(self._not_supported(method="list")) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can just use no need for |
||
|
satvshr marked this conversation as resolved.
|
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we have an api call in
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I remember you and Shrivaths discussing cache paths for V1 and V2 and I think the understanding was that the paths would differ, if that is the case, we should change this later on and leave it as it is right now.
Only the
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is cache and api-calls which are needed to be updated in this file. I think you'd only need to update
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as discussed on discord, no need to use |
Uh oh!
There was an error while loading. Please reload this page.