I have to use Chrome extension Requestly to deal with the paths of some libraries.
Due to the removal of the export function in the free version of Requestly, I'm not going to update these Requestly rules. Please let me know if you like another form of solution! (https://app.requestly.io/pricing)
tensorflow_core: https://www.tensorflow.org/api_docs/python/{element.qname.slashes}#{functionToProperty.name}
Import the shared rule to Requestly: https://app.requestly.io/rules/#sharedList/1605688738767-Pycharm or import the following text version.
[
{
"creationDate": 1605688040286,
"description": "",
"groupId": "",
"id": "Redirect_1605688040286",
"isSample": false,
"name": "tensorflow API",
"objectType": "rule",
"pairs": [
{
"destination": "https://www.tensorflow.org/api_docs/python/tf/$2",
"source": {
"filters": {},
"key": "Url",
"operator": "Matches",
"value": "/https:\\/\\/www.tensorflow.org\\/api_docs\\/python\\/tensorflow_core\\/(python\\/)?(.+)$/i"
}
},
{
"destination": "https://www.tensorflow.org/api_docs/python/tf/$1#$2",
"source": {
"filters": {},
"key": "Url",
"operator": "Matches",
"value": "/https:\\/\\/www\\.tensorflow\\.org\\/api_docs\\/python\\/tf\\/(.+)\\/(\\w+)#\\2$/i"
}
},
{
"destination": "$1/optimizers/$2",
"source": {
"filters": {},
"key": "Url",
"operator": "Matches",
"value": "/(.+?)\\/optimizer_v2\\/\\w+\\/(.+)/i"
}
}
],
"ruleType": "Redirect",
"status": "Active"
},
{
"creationDate": 1605875268105,
"description": "",
"groupId": "",
"id": "Replace_1605875268105",
"isSample": false,
"name": "Tensorflow API replace",
"objectType": "rule",
"pairs": [
{
"from": "ops/dataset_ops/DatasetV2",
"source": {
"filters": {},
"key": "Url",
"operator": "Contains",
"value": "www.tensorflow.org"
},
"status": "Inactive",
"to": "Dataset"
},
{
"from": "ops/dataset_ops/DatasetV1",
"source": {
"filters": {},
"key": "Url",
"operator": "Contains",
"value": "www.tensorflow.org"
},
"status": "Inactive",
"to": "Dataset"
}
],
"ruleType": "Replace",
"status": "Active",
"version": 2
}
]
Chinese docs uses links pointing tensorflow.google.cn instead of www.tensorflow.org. If you don't like being extradited to China, add the following rule.
[
{
"creationDate": 1605860688972,
"description": "",
"groupId": "",
"id": "Replace_1605860688972",
"isSample": false,
"name": "No extradition to China",
"objectType": "rule",
"pairs": [
{
"from": "tensorflow.google.cn",
"source": {
"filters": {},
"key": "host",
"operator": "Contains",
"value": "tensorflow.google.cn"
},
"status": "Inactive",
"to": "www.tensorflow.org"
}
],
"ruleType": "Replace",
"status": "Active",
"version": 2
}
]
kerastuner: https://keras-team.github.io/keras-tuner/documentation/tuners/#{class.name}-class
(imperfect)